From 71623e35542ede64eaa6d90786bb78bbd65c47c7 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 --- .../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 ef91aea3d1..3a4ccf5e78 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 %]Yes[% ELSE %]No[% END %] [% IF record.permanent %]No[% ELSE %]Yes[% END %] @@ -261,10 +264,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 %] @@ -282,6 +294,12 @@
      -- 2.11.0