Bugzilla – Attachment 16648 Details for
Bug 9307
Allow libraries to add/edit status for suggestion management.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9307 - Allow libraries to add/edit status for suggestion management.
Bug-9307---Allow-libraries-to-addedit-status-for-s.patch (text/plain), 28.56 KB, created by
Brendan Gallagher
on 2013-03-21 14:34:19 UTC
(
hide
)
Description:
Bug 9307 - Allow libraries to add/edit status for suggestion management.
Filename:
MIME Type:
Creator:
Brendan Gallagher
Created:
2013-03-21 14:34:19 UTC
Size:
28.56 KB
patch
obsolete
>From e7cb23675d79fdaa0151248d51d7016440d4cc0a Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 20 Dec 2012 09:31:23 -0500 >Subject: [PATCH] Bug 9307 - Allow libraries to add/edit status for suggestion management. > >This patch allows for the addition of new suggestion status by adding >authorised values of the category SUGGEST_STATUS >--- > .../prog/en/modules/admin/authorised_values.tt | 2 +- > .../prog/en/modules/help/suggestion/suggestion.tt | 2 + > .../prog/en/modules/suggestion/suggestion.tt | 277 +++++++++++++++----- > .../opac-tmpl/prog/en/modules/opac-suggestions.tt | 15 +- > suggestion/suggestion.pl | 7 + > 5 files changed, 227 insertions(+), 76 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >index 790f0b5..b30a87a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt >@@ -81,7 +81,7 @@ $(document).ready(function() { > <fieldset class="rows"><ol> > <li> > [% IF ( action_add_category ) %]<label for="category">Category</label> >- <input type="text" name="category" id="category" size="10" maxlength="10" class="focus" /> >+ <input type="text" name="category" id="category" size="16" maxlength="16" class="focus" /> > [% ELSE %]<span class="label">Category</span> > <input type="hidden" name="category" value="[% category %]" /> [% category %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt >index 1049d0d..31b90ac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/suggestion/suggestion.tt >@@ -34,6 +34,8 @@ > > <p>Once you have clicked 'Submit' the suggestion will be moved to the matching tab. The status will also be updated on the patron's account in the OPAC and an email notice will be sent to the patron using the template that matches the status you have chosen.</p> > >+<p><strong>Customization:</strong> You can create additional custom suggestion statuses by creating new authorised values of the category SUGGEST_STATUS</p> >+ > <p><strong>See the full documentation for Purchase Suggestions in the <a href="http://manual.koha-community.org/3.10/en/managesuggest.html">manual</a> (online).</strong></p> > > [% INCLUDE 'help-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 5165f83..3695b31 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1,3 +1,5 @@ >+[% USE KohaAuthorisedValues %] >+[% USE KohaBranchName %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › > [% IF ( op_save ) %] >@@ -190,12 +192,28 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <ol> > <li> > <span class="label">Status:</span> >- [% IF ( STATUS == 'ASKED' ) %]Pending >- [% ELSIF ( STATUS == 'ACCEPTED' ) %]Accepted >- [% ELSIF ( STATUS == 'CHECKED' ) %]Checked >- [% ELSIF ( STATUS == 'REJECTED' ) %]Rejected >- [% ELSE %]No Status >+ [% SET status_found = 0 %] >+ [% IF ( STATUS == 'ASKED' ) %] >+ Pending >+ [% SET status_found = 1 %] >+ [% ELSIF ( STATUS == 'ACCEPTED' ) %] >+ Accepted >+ [% SET status_found = 1 %] >+ [% ELSIF ( STATUS == 'CHECKED' ) %] >+ Checked >+ [% SET status_found = 1 %] >+ [% ELSIF ( STATUS == 'REJECTED' ) %] >+ Rejected >+ [% SET status_found = 1 %] >+ [% ELSE %] >+ [% FOREACH s IN SuggestionStatuses %] >+ [% IF STATUS == s.authorised_value %] >+ [% s.lib %] >+ [% SET status_found = 1 %] >+ [% END %] >+ [% END %] > [% END %] >+ > </li> > <li> > <table> >@@ -204,18 +222,18 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <tr> > <th><span class="label">Suggestion creation</span> </th> > <td>[% suggesteddate %]</td> >- <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode %] ([% suggestedby_description %])[% END %] >+ <td>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode | $KohaBranchName %] ([% suggestedby_description %])[% END %] > </td> > </tr> > <tr> > <th><span class="label">Suggestion management</span> </th> > <td>[% manageddate %]</td> >- <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode %] ([% managedby_description %])[% END %]</td> >+ <td>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $KohaBranchName %] ([% managedby_description %])[% END %]</td> > </tr> > <tr> > <th><span class="label">Suggestion accepted</span> </th> > <td>[% accepteddate %]</td> >- <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode %] ([% acceptedby_description %])[% END %]</td> >+ <td>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $KohaBranchName %] ([% acceptedby_description %])[% END %]</td> > </tr> > </tbody> > </table></li></ol> >@@ -286,34 +304,64 @@ $(document).ready(function() { calcNewsuggTotal(); }); > </fieldset> > <fieldset class="rows"> <legend>Suggestion management</legend> > <ol> >- [% IF ( suggestionid ) %]<li><label for="status">Status:</label><select id="STATUS" name="STATUS"><option value="">No Status</option> >- [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> >- [% ELSE %]<option value="ASKED">Pending</option>[% END %] >- [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option> >- [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %] >- [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option> >- [% ELSE %]<option value="CHECKED">Checked</option>[% END %] >- [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option> >- [% ELSE %]<option value="REJECTED">Rejected</option>[% END %] >- </select></li>[% END %] >+ [% IF ( suggestionid ) %] >+ <li> >+ <label for="status">Status:</label> >+ <select id="STATUS" name="STATUS"> >+ <option value="">No Status</option> >+ >+ [% IF (statusselected_ASKED ) %] >+ <option value="ASKED" selected="selected">Pending</option> >+ [% ELSE %] >+ <option value="ASKED">Pending</option> >+ [% END %] >+ >+ [% IF (statusselected_ACCEPTED ) %] >+ <option value="ACCEPTED" selected="selected">Accepted</option> >+ [% ELSE %] >+ <option value="ACCEPTED">Accepted</option> >+ [% END %] >+ >+ [% IF (statusselected_CHECKED ) %] >+ <option value="CHECKED" selected="selected">Checked</option> >+ [% ELSE %] >+ <option value="CHECKED">Checked</option> >+ [% END %] >+ >+ [% IF ( statusselected_REJECTED ) %] >+ <option value="REJECTED" selected="selected">Rejected</option> >+ [% ELSE %] >+ <option value="REJECTED">Rejected</option> >+ [% END %] >+ >+ [% FOREACH s IN SuggestionStatuses %] >+ [% IF s.authorised_value == selected_status %] >+ <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option> >+ [% ELSE %] >+ <option value="[% s.authorised_value %]">[% s.lib %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ [% END %] > <li><table> > <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead> > <tbody> > <tr> > <th><label for="suggesteddate">Suggestion creation</label> </th> > <td><input type="text" id="suggesteddate" name="suggesteddate" size="10" maxlength="10" value="[% suggesteddate %]"/></td> >- <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode %] ([% suggestedby_description %])[% END %] >+ <td><input type="hidden" id="suggestedby" name="suggestedby" value="[% suggestedby %]"/>[% IF ( suggestedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% suggestedby_borrowernumber %]">[% suggestedby_surname %], [% suggestedby_firstname %]</a> [% suggestedby_branchcode | $KohaBranchName %] ([% suggestedby_description %])[% END %] > </td> > </tr> > <tr> > <th><label for="managedon">Suggestion management</label> </th> > <td><input type="text" id="managedon" name="manageddate" size="10" maxlength="10" value="[% manageddate %]" /></td> >- <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode %] ([% managedby_description %])[% END %]</td> >+ <td><input type="hidden" id="managedby" name="managedby" value="[% managedby %]"/>[% IF ( managedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% managedby_borrowernumber %]">[% managedby_surname %], [% managedby_firstname %]</a> [% managedby_branchcode | $KohaBranchName %] ([% managedby_description %])[% END %]</td> > </tr> > <tr> > <th><label for="accepteddate">Suggestion accepted</label> </th> > <td><input type="text" id="accepteddate" name="accepteddate" size="10" maxlength="10" value="[% accepteddate %]" /></td> >- <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode %] ([% acceptedby_description %])[% END %]</td> >+ <td><input type="hidden" id="acceptedby" name="acceptedby" value="[% acceptedby %]"/>[% IF ( acceptedby_borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% acceptedby_borrowernumber %]">[% acceptedby_surname %], [% acceptedby_firstname %]</a> [% acceptedby_branchcode | $KohaBranchName %] ([% acceptedby_description %])[% END %]</td> > </tr> > </tbody> > </table></li></ol> >@@ -359,21 +407,36 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <h1>Suggestions management</h1> > > [% UNLESS ( notabs ) %] >-<div id="sorting" class="overlay">Sorting...</div> >-<div id="loadingtab" class="overlay">Loading tab...</div> >-<div id="suggestiontabs" class="toptabs"> >-<ul class="ui-tabs-nav"> >-[% FOREACH suggestion IN suggestions %] >-[% IF ( suggestion.first ) %]<li class="ui-tabs-selected">[% ELSE %]<li>[% END %]<a href="#[% suggestion.suggestiontype %]">[% IF ( suggestion.suggestiontypelabel ) %] >- [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending >- [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted >- [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked >- [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected >- [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available >- [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered[% ELSE %] >- [% suggestion.suggestiontypelabel %][% END %] >- [% ELSE %]No name[% END %] ([% suggestion.suggestionscount %])</a></li> >-[% END %] >+ <div id="sorting" class="overlay">Sorting...</div> >+ <div id="loadingtab" class="overlay">Loading tab...</div> >+ <div id="suggestiontabs" class="toptabs"> >+ <ul class="ui-tabs-nav"> >+ [% FOREACH suggestion IN suggestions %] >+ [% IF ( suggestion.first ) %] >+ <li class="ui-tabs-selected"> >+ [% ELSE %] >+ <li> >+ [% END %] >+ >+ <a href="#[% suggestion.suggestiontype %]"> >+ [% IF ( suggestion.suggestiontypelabel ) %] >+ [% IF (suggestion.suggestiontypelabel == "Pending") %]Pending >+ [% ELSIF (suggestion.suggestiontypelabel == "Accepted") %]Accepted >+ [% ELSIF (suggestion.suggestiontypelabel == "Checked") %]Checked >+ [% ELSIF (suggestion.suggestiontypelabel == "Rejected") %]Rejected >+ [% ELSIF (suggestion.suggestiontypelabel == "Available") %]Available >+ [% ELSIF (suggestion.suggestiontypelabel == "Ordered") %]Ordered >+ [% ELSE %][% suggestion.suggestiontypelabel %][% END %] >+ [% ELSE %] >+ [% IF ( suggestion.suggestiontype ) %] >+ [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestion.suggestiontype ) %] >+ [% ELSE %] >+ No name >+ [% END %] >+ [% END %] >+ ([% suggestion.suggestions_loop.size %])</a></li> >+ >+ [% END %] > </ul> > [% END %] > >@@ -417,41 +480,88 @@ $(document).ready(function() { calcNewsuggTotal(); }); > [% IF ( suggestions_loo.manageddate ) %] - [% suggestions_loo.manageddate %][% END %] > </td> > <td> >- [% suggestions_loo.branchcode %] >+ [% suggestions_loo.branchcode | $KohaBranchName %] > </td> > <td> > [% suggestions_loo.budget_name %] > </td> > <td> >- [% IF ( suggestions_loo.ASKED ) %]Pending[% END %] [% IF ( suggestions_loo.ACCEPTED ) %]Accepted[% END %] [% IF ( suggestions_loo.ORDERED ) %]Ordered[% END %] [% IF ( suggestions_loo.REJECTED ) %]Rejected[% END %] [% IF ( suggestions_loo.CHECKED ) %]Checked[% END %] [% IF ( suggestions_loo.reason ) %]<br />([% suggestions_loo.reason %])[% END %] >+ [% IF ( suggestions_loo.ASKED ) %] >+ Pending >+ [% ELSIF ( suggestions_loo.ACCEPTED ) %] >+ Accepted >+ [% ELSIF ( suggestions_loo.ORDERED ) %] >+ Ordered >+ [% ELSIF ( suggestions_loo.REJECTED ) %] >+ Rejected >+ [% ELSIF ( suggestions_loo.CHECKED ) %] >+ Checked >+ [% ELSIF KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %] >+ [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS ) %] >+ [% END %] >+ >+ [% IF ( suggestions_loo.reason ) %] >+ <br />([% suggestions_loo.reason %]) >+ [% END %] > </td> > </tr> > [% END %]</tbody> > </table> <fieldset> > <div id="select-reason[% suggestion.suggestiontype %]"> > <div id="status[% suggestion.suggestiontype %]"> >- <label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label><select name="STATUS" id="STATUS[% suggestion.suggestiontype %]"> >- <option value=""> -- Choose a status --</option> >- [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> >- [% ELSE %]<option value="ASKED">Pending</option>[% END %] >- [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option> >- [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %] >- [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option> >- [% ELSE %]<option value="CHECKED">Checked</option>[% END %] >- [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option> >- [% ELSE %]<option value="REJECTED">Rejected</option>[% END %] >- </select> >- <label for="reason[% suggestion.suggestiontype %]">with this reason:</label> <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]"> >- <option value=""> -- Choose a reason -- </option> >- [% FOREACH reasonsloo IN suggestion.reasonsloop %] >- <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option> >- [% END %] >- <option value="other">Others...</option> >- </select> <span id="other_reason[% suggestion.suggestiontype %]"> >- <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" value="please note your reason here..." /> <a href="#back[% suggestion.suggestiontype %]">Cancel</a> >- </span> <strong style="padding: 0 1em;">OR:</strong> <label for="[% suggestion.suggestiontype %]delete">Delete selected</label> <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" /> >- </div> >+ <label for="STATUS[% suggestion.suggestiontype %]">Mark selected as: </label> >+ <select name="STATUS" id="STATUS[% suggestion.suggestiontype %]"> >+ <option value=""> -- Choose a status --</option> >+ >+ [% IF (statusselected_ASKED ) %] >+ <option value="ASKED" selected="selected">Pending</option> >+ [% ELSE %] >+ <option value="ASKED">Pending</option> >+ [% END %] >+ >+ [% IF (statusselected_ACCEPTED ) %] >+ <option value="ACCEPTED" selected="selected">Accepted</option> >+ [% ELSE %] >+ <option value="ACCEPTED">Accepted</option> >+ [% END %] >+ >+ [% IF (statusselected_CHECKED ) %] >+ <option value="CHECKED" selected="selected">Checked</option> >+ [% ELSE %] >+ <option value="CHECKED">Checked</option> >+ [% END %] >+ >+ [% IF ( statusselected_REJECTED ) %] >+ <option value="REJECTED" selected="selected">Rejected</option> >+ [% ELSE %] >+ <option value="REJECTED">Rejected</option> >+ [% END %] >+ >+ [% FOREACH s IN SuggestionStatuses %] >+ <option value="[% s.authorised_value %]">[% s.lib %]</option> >+ [% END %] >+ </select> >+ >+ <label for="reason[% suggestion.suggestiontype %]">with this reason:</label> >+ <select id="reason[% suggestion.suggestiontype %]" name="reason[% suggestion.suggestiontype %]"> >+ <option value=""> -- Choose a reason -- </option> >+ [% FOREACH reasonsloo IN suggestion.reasonsloop %] >+ <option value="[% reasonsloo.lib %]">[% reasonsloo.lib %]</option> >+ [% END %] >+ <option value="other">Others...</option> >+ </select> >+ >+ <span id="other_reason[% suggestion.suggestiontype %]"> >+ <input type="text" size="31" id="select-other_reason[% suggestion.suggestiontype %]" name="other_reason[% suggestion.suggestiontype %]" value="please note your reason here..." /> >+ <a href="#back[% suggestion.suggestiontype %]">Cancel</a> >+ </span> >+ >+ <strong style="padding: 0 1em;">OR:</strong> >+ >+ <label for="[% suggestion.suggestiontype %]delete">Delete selected</label> >+ <input type="checkbox" name="op" id="[% suggestion.suggestiontype %]delete" /> > </div> >+ </div> > > > <input type="hidden" name="tabcode" value="[% suggestion.suggestiontype %]" /> >@@ -493,16 +603,45 @@ $(document).ready(function() { calcNewsuggTotal(); }); > </fieldset> > <fieldset class="brief"><h4 class="local_collapse"><a href="#">Suggestion information</a></h4> > <ol> >- <li><label for="STATUS"> Status:</label><select name="STATUS" id="STATUS"><option value="">Any</option> >- [% IF (statusselected_ASKED ) %]<option value="ASKED" selected="selected">Pending</option> >- [% ELSE %]<option value="ASKED">Pending</option>[% END %] >- [% IF (statusselected_ACCEPTED ) %]<option value="ACCEPTED" selected="selected">Accepted</option> >- [% ELSE %]<option value="ACCEPTED">Accepted</option>[% END %] >- [% IF (statusselected_CHECKED ) %]<option value="CHECKED" selected="selected">Checked</option> >- [% ELSE %]<option value="CHECKED">Checked</option>[% END %] >- [% IF ( statusselected_REJECTED ) %]<option value="REJECTED" selected="selected">Rejected</option> >- [% ELSE %]<option value="REJECTED">Rejected</option>[% END %] >- </select></li> >+ <li> >+ <label for="STATUS"> Status:</label> >+ <select name="STATUS" id="STATUS"> >+ <option value="">Any</option> >+ >+ [% IF (statusselected_ASKED ) %] >+ <option value="ASKED" selected="selected">Pending</option> >+ [% ELSE %] >+ <option value="ASKED">Pending</option> >+ [% END %] >+ >+ [% IF (statusselected_ACCEPTED ) %] >+ <option value="ACCEPTED" selected="selected">Accepted</option> >+ [% ELSE %] >+ <option value="ACCEPTED">Accepted</option> >+ [% END %] >+ >+ [% IF (statusselected_CHECKED ) %] >+ <option value="CHECKED" selected="selected">Checked</option> >+ [% ELSE %] >+ <option value="CHECKED">Checked</option> >+ [% END %] >+ >+ [% IF ( statusselected_REJECTED ) %] >+ <option value="REJECTED" selected="selected">Rejected</option> >+ [% ELSE %] >+ <option value="REJECTED">Rejected</option> >+ [% END %] >+ >+ [% FOREACH s IN SuggestionStatuses %] >+ [% IF s.authorised_value == selected_status %] >+ <option value="[% s.authorised_value %]" selected="selected">[% s.lib %]</option> >+ [% ELSE %] >+ <option value="[% s.authorised_value %]">[% s.lib %]</option> >+ [% END %] >+ [% END %] >+ </select> >+ </li> >+ > <li><label for="suggestedby"> Suggested by:</label><select id="suggestedby" name="suggestedby"><option value="">Any</option> > [% FOREACH suggestedby_loo IN suggestedby_loop %][% IF ( suggestedby_loo.selected ) %]<option value="[% suggestedby_loo.code %]" selected="selected">[% suggestedby_loo.desc %]</option>[% ELSE %]<option value="[% suggestedby_loo.code %]">[% suggestedby_loo.desc %]</option>[% END %][% END %] > </select></li> >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt >index 65cb297..baa3cfb 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tt >@@ -1,3 +1,4 @@ >+[% USE KohaAuthorisedValues %] > [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › > [% IF ( op_add ) %]Enter a new purchase suggestion[% END %] > [% IF ( op_else ) %]Purchase Suggestions[% END %] >@@ -216,12 +217,14 @@ $.tablesorter.addParser({ > [% IF ( suggestions_loo.surnamemanagedby ) %][% suggestions_loo.surnamemanagedby %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby %][% ELSE %] [% END %] > </td> > <td> >- [% IF ( suggestions_loo.ASKED ) %]Requested[% END %] >- [% IF ( suggestions_loo.CHECKED ) %]Checked by the library[% END %] >- [% IF ( suggestions_loo.ACCEPTED ) %]Accepted by the library[% END %] >- [% IF ( suggestions_loo.ORDERED ) %]Ordered by the library[% END %] >- [% IF ( suggestions_loo.REJECTED ) %]Suggestion declined [% END %] >- [% IF ( suggestions_loo.AVAILABLE ) %]Available in the library[% END %] >+ [% IF ( suggestions_loo.ASKED ) %]Requested >+ [% ELSIF ( suggestions_loo.CHECKED ) %]Checked by the library >+ [% ELSIF ( suggestions_loo.ACCEPTED ) %]Accepted by the library >+ [% ELSIF ( suggestions_loo.ORDERED ) %]Ordered by the library >+ [% ELSIF ( suggestions_loo.REJECTED ) %]Suggestion declined >+ [% ELSIF ( suggestions_loo.AVAILABLE ) %]Available in the library >+ [% ELSE %] [% KohaAuthorisedValues.GetByCode( 'SUGGEST_STATUS', suggestions_loo.STATUS, 1 ) %] [% END %] >+ > [% IF ( suggestions_loo.reason ) %]([% suggestions_loo.reason %])[% END %] > </td> > </tr> >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index b4f4d37..497fbaa 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -58,6 +58,9 @@ sub Init{ > > sub GetCriteriumDesc{ > my ($criteriumvalue,$displayby)=@_; >+ unless ( grep { /$criteriumvalue/ } qw(ASKED ACCEPTED REJECTED CHECKED) ) { >+ return GetAuthorisedValueByCode('SUGGEST_STATUS', $criteriumvalue ) || "Unknown"; >+ } > return ($criteriumvalue eq 'ASKED'?"Pending":ucfirst(lc( $criteriumvalue))) if ($displayby =~/status/i); > return (GetBranchName($criteriumvalue)) if ($displayby =~/branchcode/); > return (GetSupportName($criteriumvalue)) if ($displayby =~/itemtype/); >@@ -383,4 +386,8 @@ foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) { > $hashlists{ lc($field) . "_loop" } = \@codes_list; > } > $template->param(%hashlists); >+$template->param( >+ DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), >+ SuggestionStatuses => GetAuthorisedValues('SUGGEST_STATUS'), >+); > output_html_with_http_headers $input, $cookie, $template->output; >-- >1.7.2.5
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 9307
:
14196
|
14197
|
14211
|
14684
|
16648
|
16785
|
19085
|
19112
|
19113