Bugzilla – Attachment 75513 Details for
Bug 20807
Lost items report: Improve the display of CSV profile errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20807: Lost items report: Improve the display of CSV profile errors
Bug-20807-Lost-items-report-Improve-the-display-of.patch (text/plain), 5.80 KB, created by
Mark Tompsett
on 2018-05-23 18:34:10 UTC
(
hide
)
Description:
Bug 20807: Lost items report: Improve the display of CSV profile errors
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-05-23 18:34:10 UTC
Size:
5.80 KB
patch
obsolete
>From 1df82d4b6b437f70b978be6aaf1f389a2ae9bcd6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 23 May 2018 17:59:28 +0000 >Subject: [PATCH] Bug 20807: Lost items report: Improve the display of CSV > profile errors > >This patch modifies the template for the lost items report to change the >way it handles a missing CSV profile. Now, if there is a missing CSV >profile, a message is displayed with details about the profile >requirements. If the logged-in user has the right permission there is a >link to the CSV profiles page. > >Since item selection is used only in conjunction with exporting results, >item selection controls are all hidden when there is no valid CSV >profile. > >To test, apply the patch go to Reports -> Lost items. > > - Run the report with parameters which will return results. > - If your system has no CSV profile for exporting lost items: > - If you are logged in as a user with manage_csv_profiles permission: > - You should see a message dialog instructing you to create a CSV > profile with a link to the CSV profiles page. > - If you are not logged in as a user with manage_csv_profiles > permission: > - You should see a similar message but without a link to the CSV > profiles page. > - In both cases, with no CSV profile defined there should be no > checkboxes in the table of results and no "select all/clear all" > controls. > - If your system has a valid CSV profile for exporting lost items: > - Checking the checkbox for one or more items in the table should > trigger the display of an "Export selected items" link. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > .../prog/en/modules/reports/itemslost.tt | 50 ++++++++++++++-------- > 1 file changed, 32 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >index 596e99dffa..a8cb2ba516 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt >@@ -36,29 +36,41 @@ > </div> > > [% IF items.count %] >- <div class="lostitems-table_table_controls"> >+ [% IF csv_profiles.count %] >+ <div class="lostitems-table_table_controls"> > | <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> | > <a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> > <span class="itemselection_actions"> >- | Actions: >- [% IF csv_profiles.count %] >- <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a> >- Using the following CSV profile: >- <select name="csv_profile_id" id="csv_profile_id"> >- [% FOREACH csv_profile IN csv_profiles %] >- <option value="[% csv_profile.export_format_id %]">[% csv_profile.profile %]</<option> >- [% END %] >- </select> >- [% ELSE %] >- <span class="itemselection_action_export" title="You should create a CSV profile for export_lost_items"><i class="fa fa-download"></i> Export selected items</a> >- [% END %] >+ | Actions: >+ <a class="itemselection_action_export"><i class="fa fa-download"></i> Export selected items</a> >+ Using the following CSV profile: >+ <select name="csv_profile_id" id="csv_profile_id"> >+ [% FOREACH csv_profile IN csv_profiles %] >+ <option value="[% csv_profile.export_format_id %]"> >+ [% csv_profile.profile %] >+ </option> >+ [% END %] >+ </select> > </span> >- </div> >+ </div> >+ [% ELSE %] >+ <div class="dialog message"> >+ [% IF ( CAN_user_tools_manage_csv_profiles ) %] >+ To enable the export of selected items, <a href="/cgi-bin/koha/tools/csv-profiles.pl">create a CSV profile</a> of the type "SQL" with usage option "Export lost items in report." >+ [% ELSE %] >+ To enable the export of selected items, your administrator must create a CSV profile of the type "SQL" with usage option "Export lost items in report." >+ [% END %] >+ </div> >+ <div class="lostitems-table_table_controls"> >+ </div> >+ [% END %] > > <table id="lostitems-table"> > <thead> > <tr> >- <th class="NoSort"></th> >+ [% IF csv_profiles.count %] >+ <th class="NoSort"></th> >+ [% END %] > <th>Title</th> > <th>Author</th> > <th>Lost status</th> >@@ -79,9 +91,11 @@ > <tbody> > [% FOREACH item IN items %] > <tr> >- <td style="text-align:center;vertical-align:middle"> >- <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> >- </td> >+ [% IF csv_profiles.count %] >+ <td style="text-align:center;vertical-align:middle"> >+ <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> >+ </td> >+ [% END %] > <td> > <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a> > </td> >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20807
:
75512
|
75513
|
75746