Details

      Description

      There is currently no (at least apparent) way to locate content items put into the trash in the eZ Platform admin interface.

        Issue Links

          Activity

          Show
          Damien Pobel added a comment - Specified in https://doc.ez.no/display/PR/Deleting+Content#DeletingContent-Story1:Asaneditor,Iwanttosendapieceofcontenttothetrash
          Hide
          Damien Pobel added a comment - - edited

          This is the first story in the Trash in PlatformUI EPIC, so let's reduce the scope as much as possible. So this story is about:

          • adding a Trash route, view and view service
          • adding the Trash button action view in the Discovery Bar (but without the number of Trash elements => EZP-25306)

          In the Trash view:

          • the trash is only displayed as a table (with the columns Name, Type, Original Location, let's leave the Section aside for now)
          • the list is not paginated (as there's no easy want to get the total number of elements in the Trash without loading the full trash list)
          • no action bar yet (right toolbar)
          • no special sorting (the REST API does not support it, so that's incompatible with pagination)
          • no filtering
          • the trash is displayed as a flat list (no link like on "eZ Mountain Range" with the current REST API we cannot do that and paginate the list)
          Show
          Damien Pobel added a comment - - edited This is the first story in the Trash in PlatformUI EPIC, so let's reduce the scope as much as possible. So this story is about: adding a Trash route, view and view service adding the Trash button action view in the Discovery Bar (but without the number of Trash elements => EZP-25306 ) In the Trash view: the trash is only displayed as a table (with the columns Name, Type, Original Location, let's leave the Section aside for now) the list is not paginated (as there's no easy want to get the total number of elements in the Trash without loading the full trash list) no action bar yet (right toolbar) no special sorting (the REST API does not support it, so that's incompatible with pagination) no filtering the trash is displayed as a flat list (no link like on "eZ Mountain Range" with the current REST API we cannot do that and paginate the list)
          Hide
          Damien Pobel added a comment -

          Technically, the complicated part is the load logic in the trash view service:

          when everything is loaded and ready, you'll need to pass those elements to the view which is basically a dumb loop over the (trash items + content + type + parent locations) elements.

          Show
          Damien Pobel added a comment - Technically, the complicated part is the load logic in the trash view service: in the trash view service load method, you'll first load the full trash item list with http://ezsystems.github.io/javascript-rest-client/classes/ContentService.html#method_loadTrashItems for each item you'll instantiate a TrashItem model. So you'll need a TrashItem model. Being able to load it with https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#get-trashitem is not really necessary but you have to write the parsing rules like in any model (REST_STRUCT_ROOT + ATTRS_REST_MAP) because from the loadTrashItems result you'll initialize those models with loadFromHash once the TrashItems are ready, you'll need to load the corresponding Contents, do that with a REST view to get that in one request in parallel, you'll have to do the same with the parent Locations in parallel, you'll have to load the Content Types as well (one by one for now) when everything is loaded and ready, you'll need to pass those elements to the view which is basically a dumb loop over the (trash items + content + type + parent locations) elements.
          Show
          Yannick Roger (Inactive) added a comment - PR: https://github.com/ezsystems/PlatformUIBundle/pull/488
          Show
          Yannick Roger (Inactive) added a comment - Added in: https://github.com/ezsystems/PlatformUIBundle/commit/abad031954a117bbdfaf724bcaa24253bf65833f
          Hide
          Yannick Roger (Inactive) added a comment -

          To QA team, We know this patch highlights EZP-25404

          That means we should now have a bug when clicking on the content tree while being on the trash view. I will be fixed by the improvement above.

          Show
          Yannick Roger (Inactive) added a comment - To QA team, We know this patch highlights EZP-25404 That means we should now have a bug when clicking on the content tree while being on the trash view. I will be fixed by the improvement above.
          Hide
          Paulo Nunes added a comment -

          Tested and approved by QA for master.

          Show
          Paulo Nunes added a comment - Tested and approved by QA for master.

            People

            • Assignee:
              Unassigned
              Reporter:
              Eirik Alfstad Johansen
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: