Review main Merged

69718[TASK] Unify code in FileList

Oli Bartsch CR +2 V +2 Expert +629 −1640 updated 07/08/21, 08:32

Commit message

Currently, the Backend module File > FileList
has two main views:

* The list view
* The search result view

Both are handled via an Extbase controller, even
though no pure Extbase-related feature (validation,
type-converting, persistence) is used.

Instead, the list view is generated by a PHP-based
code "FileList" (similar to DatabaseRecordList),
where as the search result view is built on top of
Fluid. The latter approach hinders flexibility,
and also leads to inconsistencies, due to the nature of
using two different approaches.

Most notable:

- The search result view looks different than the
  list view, also no additional icons are possible.

- The search result view has a clipboard, but does
  not allow to expand.

- The search result view does not respect the listing
  limit, nor is the pagination displayed.

- The search result view changes the module headline
  to "Search: <word>", removing the context on
  which folder the search was performed.

However, the search result view works with the
SearchDemand object which is a clean way to
put the query requirements into the File List
to render the found files.

Therefore, this patch merges both Search Result Fluid
view and PHP-based view back into one, more flexible
and consistent, view. This also means, FileListController
is not longer registered as an Extbase backend module
and some internal ViewHelpers and classes were removed.

The main benefits:
* Exchanging features between DatabaseRecordList and FileList
  are easier to achieve
* Hooks for additional icons also work in the search result view
* Numeric Clipboards also work in the search result view
* Buttons in each found file row look the same now
* The current folder is now also displayed in search result view
* Bookmarking also works properly now and additionally
  also takes a possible searchTerm into account
* The search results are now paginated, respecting the
  listing limit
* Invalid folders do not longer lead to an exception
  in the search result view

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 5

Files 22