digitalutsc / islandora_lite_docs

Contains a Wiki with documentation for the UTSC Library's Islandora Lite System
GNU General Public License v3.0
2 stars 0 forks source link

Create a unified "revision" view with media revisions #41

Open kstapelfeldt opened 3 years ago

kstapelfeldt commented 3 years ago

As a collection administrator, I wish to look at the revisions tab at the node level, and be able to view and revert all revisions to not just the node, but the related media.

Might be views embedded in views - not sure how to get the context correct.

kstapelfeldt commented 3 years ago

https://www.drupal.org/project/views_field_view

kstapelfeldt commented 3 years ago

Screen Shot 2021-09-22 at 9 43 03 AM

kstapelfeldt commented 3 years ago

Screen Shot 2021-09-22 at 9 43 34 AM

kstapelfeldt commented 3 years ago

Looking at methods for grouping/organization to simplify navigation in the case of multiple revisions (and grouping by ID)

johnguirgis commented 3 years ago

Method 1

Have a table with all of a node's media and a link to view the revisions of each media entity on a new page. Far simpler and requires fewer views (3) to achieve but may be better to have all information available on same page Example: approach1

Method 2

Have a tab for each of the node's media which can be expanded to view all of the revision information about that media entity. More compact and convenient than Method 1 but requires an additional view and accordion UI module may have negative impact on performance. Example: approach2

kstapelfeldt commented 3 years ago

As per meeting, going for approach 1 (thank you). Please add a "date last modified" column and "last modified by" column (the latter will bring back the username)

kstapelfeldt commented 3 years ago

package with Islandora display.

kstapelfeldt commented 3 years ago

Packaging as a separate module - can this work with any content type with media? (How generalizable is this approach?) Can we make it a separate module that works on any content type with a specific media field?

johnguirgis commented 3 years ago

I've made some changes to the view to address the stuff we talked about in our 1-on-1 (mainly the headers), please let me know if it looks OK or if I've missed anything.

Screen Shot 2021-09-29 at 3 17 37 PM

As for generalizing this view for other content types, that won't be possible with the default content types in Drupal. For example, the Article content type has an Image field, but this field references a file entity (which is not revisionable in Drupal) and not a media entity.

Screen Shot 2021-09-29 at 2 57 42 PM

There is no media entity created for images in an Article or one that corresponds to the referenced file, so it would be impossible for an Article to have an image with multiple revisions.
The other default content type, Basic Page, has no media associated with it so this is also not applicable. For custom content types that reference a media entity, the view would have to be modified to use the specific media field of that content type to get the revisions. Right now, the view uses the "Preservation Master File" field to bring the media revisions and if the field does not exist, it ignores it and only brings back the node revisions. I do not yet see a way to generalize this but I will continue to look into it.

kstapelfeldt commented 2 years ago

What I understand: If there is a "Preservation Master File" entity, this will work.

@johnguirgis todo

  1. provide documentation for how to edit the view for additional media in readme of new module.
  2. fold service file into example.
  3. Create a small module - commit to new "Unified Revision View" repository made by @Natkeeran
Natkeeran commented 2 years ago

@johnguirgis module works as expected: https://github.com/digitalutsc/unified_revision_view.

There are three views (media_revisions, media-revisions-latest, media-revisions-parent) that provide same/similar functionality as https://www.drupal.org/project/media_revisions_ui. Perhaps, we can use that module! (i.e instead of http://localhost:8000/media/1/media-revisions-parent, point to http://localhost:8000/media/1/revisions)

Also, we can probably include these views into the https://github.com/digitalutsc/islandora_display module.

kylehuynh205 commented 8 months ago

Need put this work in deployment