Bugzilla – Attachment 8125 Details for
Bug 7577
Suggestion show page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 7577: Adds a display page for suggestions
SIGNED-OFF-Bug-7577-Adds-a-display-page-for-sugges.patch (text/plain), 16.96 KB, created by
Owen Leonard
on 2012-03-09 17:04:05 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7577: Adds a display page for suggestions
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2012-03-09 17:04:05 UTC
Size:
16.96 KB
patch
obsolete
>From f7f46529e6d5b350799ed761767c87fc3a979a6a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 22 Feb 2012 15:30:38 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 7577: Adds a display page for suggestions >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../prog/en/modules/acqui/neworderempty.tt | 2 +- > .../prog/en/modules/acqui/orderreceive.tt | 2 +- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 4 +- > .../prog/en/modules/suggestion/suggestion.tt | 142 ++++++++++++++++++-- > suggestion/suggestion.pl | 17 ++- > 5 files changed, 149 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index a27d151..e6464f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -326,7 +326,7 @@ $(document).ready(function() > <ol> > <li> > <span class="label">Suggested by: </span> >- [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]">suggestion #[% suggestionid %]</a>) >+ [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</a>) > </li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index e238278..3eb3e23 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -42,7 +42,7 @@ > <ol> > <li> > <span class="label">Suggested by: </span> >- [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]">suggestion #[% suggestionid %]</a>) >+ [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</a>) > </li> > </ol> > </fieldset> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index afc9b65..786c5be 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -244,7 +244,7 @@ > [% IF ( loop_order.suggestionid ) %] > <br/> > Suggested by: [% loop_order.surnamesuggestedby %][% IF ( loop_order.firstnamesuggestedby ) %], [% loop_order.firstnamesuggestedby %] [% END %] >- (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]">suggestion #[% loop_order.suggestionid %]</a>) >+ (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_order.suggestionid %]&op=show">suggestion #[% loop_order.suggestionid %]</a>) > [% END %] > </td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td> >@@ -369,7 +369,7 @@ > [% IF ( loop_receive.suggestionid ) %] > <br/> > Suggested by: [% loop_receive.surnamesuggestedby %][% IF ( loop_receive.firstnamesuggestedby ) %], [% loop_receive.firstnamesuggestedby %] [% END %] >- (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_receive.suggestionid %]">suggestion #[% loop_receive.suggestionid %]</a>) >+ (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% loop_receive.suggestionid %]&op=show">suggestion #[% loop_receive.suggestionid %]</a>) > [% END %] > </td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_receive.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">MARC</a> | <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_receive.biblionumber %]" title="MARC" rel="gb_page_center[600,500]">Card</a></td> >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 47ee96a..91c5a8f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1,5 +1,19 @@ >-[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Acquisitions › >-[% IF ( op_save ) %][% IF ( suttesionid ) %]Edit purchase suggestion #[% suggestionid %][% ELSE %]Enter a new purchase suggestion[% END %][% ELSE %]Suggestions Management[% END %]</title> >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Acquisitions › >+ [% IF ( op_save ) %] >+ [% IF ( suggestionid) %] >+ [% IF ( op == 'show' ) %] >+ Show purchase suggestion #[% suggestionid %] >+ [% ELSE %] >+ Edit purchase suggestion #[% suggestionid %] >+ [% END %] >+ [% ELSE %] >+ Enter a new purchase suggestion >+ [% END %] >+ [% ELSE %] >+ Suggestions Management >+ [% END %] >+</title> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'calendar.inc' %] > [% IF ( op_else ) %] <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >@@ -91,7 +105,114 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <body> > [% INCLUDE 'header.inc' %] > [% INCLUDE 'cat-search.inc' %] >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › [% IF ( op_save ) %] <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › [% IF ( suggestionid ) %]Suggestion edit #[% suggestionid %][% ELSE %]New purchase suggestion[% END %][% ELSE %]Suggestions Management[% END %] </div> >+<div id="breadcrumbs"> >+ <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › >+ [% IF ( op_save ) %] >+ <a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a> › >+ [% IF ( op == 'show' ) %] >+ Show suggestion #[% suggestionid %] >+ [% ELSE %] >+ Suggestion edit #[% suggestionid %] >+ [% END %] >+ [% ELSE %] >+ Suggestions Management >+ [% END %] >+</div> >+ >+[% IF ( op == 'show' ) %] >+<div id="doc" class="yui-t7"> <!-- <div id="doc3" class="yui-t2"> --> >+<div id="bd"> >+ <div id="yui-main"> >+ <div class="yui-b"> >+ >+ <fieldset class="rows"> >+ <legend>Bibliographic information</legend> >+ <ol> >+ <li><span class="label">Title:</span>[% title |html %]</li> >+ <li><span class="label">Author:</span>[% author %]</li> >+ <li><span class="label">Copyright date:</span>[% copyrightdate %]</li> >+ <li><span class="label">ISBN or ISSN or other standard number:</span>[% isbn %]</li> >+ <li><span class="label">Publisher:</span>[% publishercode %]</li> >+ <li><span class="label">Publication Place:</span>[% place %]</li> >+ <li><span class="label">Collection Title:</span>[% collectiontitle %]</li> >+ <li><span class="label">Document Type:</span> >+ [% FOREACH itemtypeloo IN itemtypeloop %] >+ [% IF ( itemtypeloo.selected ) %][% itemtypeloo.description %][% END %] >+ [% END %] >+ </li> >+ [% IF ( patron_reason_loop ) %] >+ <li><span class="label">Reason for suggestion: </span> >+ [% FOREACH patron_reason_loo IN patron_reason_loop %] >+ [% IF ( patron_reason_loo.selected ) %][% patron_reason_loo.lib %][% END %] >+ [% END %] >+ </li> >+ [% END %] >+ <li><span class="label">Notes:</span>[% note %]</li> >+ </ol> >+ </fieldset> >+ <fieldset class="rows"> <legend>Suggestion management</legend> >+ <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 >+ [% END %] >+ </li> >+ <li> >+ <table> >+ <thead><tr><th> </th><th>Date</th><th>By</th></tr></thead> >+ <tbody> >+ <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> >+ </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> >+ </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> >+ </tr> >+ </tbody> >+ </table></li></ol> >+ </fieldset> >+ <fieldset class="rows"> <legend>Acquisition information</legend> >+ <ol> >+ <li> >+ <span class="label">Library:</span> [% branchname %] >+ </li> >+ <li> >+ <span class="label">Budget:</span> [% budgetname %] >+ </li> >+ <li> >+ <span class="label">Copies:</span>[% quantity %] >+ </li> >+ <li> >+ <span class="label">Currency:</span>[% currency %] >+ </li> >+ <li> >+ <span class="label">Price:</span>[% price %] >+ </li> >+ <li> >+ <span class="label">Total</span>[% total %] >+ </li> >+ </ol> >+ </fieldset> >+ >+ <a class="cancel" href="suggestion.pl"><<Back to the list</a> >+ >+ </div> >+ </div> >+</div> >+[% ELSE %] > > [% IF ( op_save ) %]<div id="doc" class="yui-t7">[% ELSE %]<div id="doc3" class="yui-t2">[% END %] > <div id="bd"> >@@ -189,7 +310,7 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <input type="text" readonly="readonly" id="total" name="total" size="10" value="[% total %]"/> > </li></ol> > </fieldset><input type="hidden" id="returnsuggested" name="returnsuggested" value="[% IF ( returnsuggestedby ) %][% returnsuggestedby %][% ELSE %]noone[% END %]"/> >- <fieldset class="action"><input type="hidden" name="op" value="[% op %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby %]#suggestions[% ELSE %]suggestion.pl?suggestionid=[% suggestionid %][% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit Your Suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %] >+ <fieldset class="action"><input type="hidden" name="op" value="[% op %]" />[% IF ( suggestionid ) %]<input type="submit" value="Save" /> <a class="cancel" href="[% IF ( returnsuggestedby ) %]/cgi-bin/koha/members/moremember.pl?borrowernumber=[% returnsuggestedby %]#suggestions[% ELSE %]suggestion.pl?suggestionid=[% suggestionid %]&op=show[% END %]">Cancel</a>[% ELSE %]<input type="submit" value="Submit Your Suggestion" /> <a class="cancel" href="suggestion.pl">Cancel</a>[% END %] > </fieldset> > </form> > [% END %] >@@ -245,9 +366,9 @@ $(document).ready(function() { calcNewsuggTotal(); }); > <input type="checkbox" name="edit_field" value="[% suggestions_loo.suggestionid %]" /> > </td> > <td> >- <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=edit" title="suggestion" > >- [% suggestions_loo.title |html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author %][% END %] >- </a> >+ <a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=show" title="suggestion" > >+ [% suggestions_loo.title |html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author %][% END %]</a> >+ [<a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=edit" title="suggestion" >edit</a>] > <br /> > [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate %] [% END %] > [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc %]</i> [% END %] >@@ -314,7 +435,7 @@ $(document).ready(function() { calcNewsuggTotal(); }); > </div> > </div> > >- [% UNLESS ( op_save ) %] <div class="yui-b"> >+ [% UNLESS ( op_save ) %] [% UNLESS ( op == 'show' ) %]<div class="yui-b"> > <form name="suggestionfilter" action="suggestion.pl" method="get"> > <fieldset class="brief"><ol style="display:block;"><li><label for="displayby">Organize by: </label> > <select name="displayby" id="displayby" style="width:auto;"> >@@ -458,7 +579,10 @@ $(document).ready(function() { calcNewsuggTotal(); }); > </fieldset> > </div> > </form> >- </div>[% END %] >+ </div> >+ [% END %] >+ [% END %] > </div> >+[% END %] > [% INCLUDE 'intranet-bottom.inc' %] > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 272ca6f..64f00d4 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -34,13 +34,13 @@ use C4::Debug; > > sub Init{ > my $suggestion= shift @_; >- foreach my $date qw(suggesteddate manageddate){ >+ foreach my $date ( qw(suggesteddate manageddate) ){ > $suggestion->{$date}=(($suggestion->{$date} eq "0000-00-00" ||$suggestion->{$date} eq "")? > $suggestion->{$date}=C4::Dates->today: > format_date($suggestion->{$date}) > ); > } >- foreach my $date qw(rejecteddate accepteddate){ >+ foreach my $date ( qw(rejecteddate accepteddate) ){ > $suggestion->{$date}=(($suggestion->{$date} eq "0000-00-00" ||$suggestion->{$date} eq "")? > "": > format_date($suggestion->{$date}) >@@ -173,6 +173,13 @@ elsif ($op eq "change" ) { > } > $op = 'else'; > } >+elsif ( $op eq 'show' ) { >+ $suggestion_ref=&GetSuggestion($$suggestion_ref{'suggestionid'}); >+ $$suggestion_ref{branchname} = GetBranchName $$suggestion_ref{branchcode}; >+ my $budget = GetBudget $$suggestion_ref{budgetid}; >+ $$suggestion_ref{budgetname} = $$budget{budget_name}; >+ Init($suggestion_ref); >+} > if ($op=~/else/) { > $op='else'; > >@@ -193,7 +200,7 @@ if ($op=~/else/) { > my $budget = GetBudget($suggestion->{budgetid}); > $suggestion->{budget_name}=$budget->{budget_name} if $budget; > } >- foreach my $date qw(suggesteddate manageddate accepteddate){ >+ foreach my $date ( qw(suggesteddate manageddate accepteddate) ){ > if ($suggestion->{$date} ne "0000-00-00" && $suggestion->{$date} ne "" ){ > $suggestion->{$date}=format_date($suggestion->{$date}) ; > } else { >@@ -219,7 +226,7 @@ if ($op=~/else/) { > ); > } > >-foreach my $element qw(managedby suggestedby acceptedby) { >+foreach my $element ( qw(managedby suggestedby acceptedby) ) { > # $debug || warn $$suggestion_ref{$element}; > if ($$suggestion_ref{$element}){ > my $member=GetMember(borrowernumber=>$$suggestion_ref{$element}); >@@ -333,7 +340,7 @@ $template->param( > ); > > my %hashlists; >-foreach my $field qw(managedby acceptedby suggestedby budgetid) { >+foreach my $field ( qw(managedby acceptedby suggestedby budgetid) ) { > my $values_list; > $values_list=GetDistinctValues("suggestions.".$field) ; > my @codes_list = map{ >-- >1.7.3
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 7577
:
7802
|
7810
| 8125