From 05974e30cbec2f58bd3fb78f660ad4fd2f81ece9 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 20 Apr 2021 12:13:28 +0000 Subject: [PATCH] Bug 28175: Usability improvements to uploads page This patch makes a variety of changes to the uploads page in order to improve usability: - Add a toolbar with an "Upload" button so that it can be accessed from the upload results or search results views - On views other than the "main" view, add search forms to the sidebar - The search form markup has been modified somewhat in order to make it work well in both the sidebar and the main body of the page. - Show the upload category description instead of the code - Link the upload category in search results to a search for that category The "enctype" attribute has been removed from the search forms because it is unnecessary and causes form resubmission errors in some browsers (Firefox at least). To test, apply the patch and make sure you have at least one entry under Authorized values for the category UPLOAD. - Go to Tools -> Upload. - Upload a file, adding a category as you do so. - On the upload results page, test that the "Upload file" button returns you to the main upload page. - On the upload results or search results view, confirm that the "Search uploads by category" and "Search uploads by name" forms work correctly. - When viewing upload or search results, confirm that the category discription is shown instead of the code. Confirm that the category is a link to a search for other files in that category. Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/tools/upload.tt | 36 ++++++++++++++++------ 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt index 7a657ab980..d1b700a877 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE TablesSettings %] +[% USE AuthorisedValues %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% IF plugin %] @@ -111,11 +112,11 @@ [% BLOCK form_browse %] [% IF uploadcategories %] -
+ [% PROCESS plugin_pars %] -
- Search uploads by category +
+

Search uploads by category

  1. @@ -135,11 +136,11 @@ [% END %] [% BLOCK form_search %] - + [% PROCESS plugin_pars %] -
    - Search uploads by name or hashvalue +
    +

    Search uploads by name or hashvalue

    1. @@ -208,7 +209,9 @@ [% record.filename | html %] [% record.filesize | html %] [% record.hashvalue | html %] - [% record.uploadcategorycode | html %] + + [% AuthorisedValues.GetByCode( 'UPLOAD', record.uploadcategorycode ) | html %] + [% IF !plugin %] [% IF record.public %] @@ -267,10 +270,19 @@ [% PROCESS submitter %] [% IF mode == 'new' || mode == 'deleted' %] [% PROCESS form_new %] - [% PROCESS form_browse %] - [% PROCESS form_search %] +
      +
      + [% PROCESS form_browse %] +
      +
      + [% PROCESS form_search %] +
      +
      [% PROCESS closer %] [% ELSIF mode == 'report' %] + [% IF uploads %]

      Your request gave the following results:

      [% PROCESS table_results %] @@ -288,6 +300,12 @@
      -- 2.11.0