Bug 28073: Patron modifications should auto-open panel for referring patron record
This patch makes it possible to link directly to the correct panel on the "Update patron records" page. The link on the checkout and patron details screen has been updated to read "Patron has pending modifications." Also changed: Moved the "Patron's address in doubt" message so that it is above the table of changed fields. To test, apply the patch and if necessary submit patron modification requests from multiple patrons via the OPAC. - Open the checkout page for one of these patrons. - If you are logged in as a user with permission to edit patron records you should see a message, "Pending modifications: Review pending modifications," which links to the pending modifications page. - Clicking the link should open the page for reviewing pending patron modifications, and the correct panel should be automatically expanded. - If you are logged in as a user without permission to edit patrons you should see the message "Pending modifications: Patron has pending modifications," which isn't linked. - The process should work exactly the same from the patron detail page. - Following the "Pending modifications" link from the staff interface home page or the patrons home page should work as before: The page opens with the first panel expanded. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
6d9e145716
commit
7e1227890b
3 changed files with 27 additions and 15 deletions
|
@ -6,9 +6,11 @@
|
||||||
<ul>
|
<ul>
|
||||||
[% IF ( has_modifications ) %]
|
[% IF ( has_modifications ) %]
|
||||||
<li class="has_modifications">
|
<li class="has_modifications">
|
||||||
<span class="circ-hlt">Pending modifications:</span> Patron has pending modifications.
|
<span class="circ-hlt">Pending modifications:</span>
|
||||||
[% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
|
[% IF CAN_user_borrowers_edit_borrowers && ( !Koha.Preference('IndependentBranchesPatronModifications') || borrower.branch == branch ) %]
|
||||||
<a href="/cgi-bin/koha/members/members-update.pl">View all pending patron modifications</a>
|
<a href="/cgi-bin/koha/members/members-update.pl?active=[% patron.borrowernumber | uri %]">Review pending modifications</a>
|
||||||
|
[% ELSE %]
|
||||||
|
Patron has pending modifications
|
||||||
[% END %]
|
[% END %]
|
||||||
</li>
|
</li>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -114,9 +114,9 @@
|
||||||
<div id="pending_updates">
|
<div id="pending_updates">
|
||||||
[% FOREACH pm IN PendingModifications %]
|
[% FOREACH pm IN PendingModifications %]
|
||||||
[% SET borrowernumber = pm.borrowernumber %]
|
[% SET borrowernumber = pm.borrowernumber %]
|
||||||
<h3><a href="#panel_modify_[% pm.borrowernumber | uri %]">[% borrowers.$borrowernumber.surname | html %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname | html %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) | html %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) | html %]) ([% borrowers.$borrowernumber.cardnumber | html %]) - Requested on [% pm.timestamp | $KohaDates with_hours = 1 %]</a></h3>
|
<h3 class="panel-header" id="panel-header-[% pm.borrowernumber | html %]"><a href="#panel_modify_[% pm.borrowernumber | uri %]">[% borrowers.$borrowernumber.surname | html %][% IF ( borrowers.$borrowernumber.firstname ) %], [% borrowers.$borrowernumber.firstname | html %][% END %] - [% Categories.GetName( borrowers.$borrowernumber.categorycode ) | html %] ([% Branches.GetName( borrowers.$borrowernumber.branchcode ) | html %]) ([% borrowers.$borrowernumber.cardnumber | html %]) - Requested on [% pm.timestamp | $KohaDates with_hours = 1 %]</a></h3>
|
||||||
<div id="panel_modify_[% pm.borrowernumber | html %]">
|
<div id="panel_modify_[% pm.borrowernumber | html %]">
|
||||||
<div style="background-color:#E6F0F2;padding:.5em;margin:.3em 0;">
|
<div class="btn-toolbar">
|
||||||
<input type="radio" id="approve_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="approve" />
|
<input type="radio" id="approve_modify_[% pm.borrowernumber | html %]" name="modify_[% pm.borrowernumber | html %]" value="approve" />
|
||||||
<label for="approve_modify_[% pm.borrowernumber | html %]">Approve</label>
|
<label for="approve_modify_[% pm.borrowernumber | html %]">Approve</label>
|
||||||
|
|
||||||
|
@ -127,6 +127,16 @@
|
||||||
<label for="ignore_modify_[% pm.borrowernumber | html %]">Ignore</label>
|
<label for="ignore_modify_[% pm.borrowernumber | html %]">Ignore</label>
|
||||||
| <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber | html %]" >Patron details</a>
|
| <a target="_blank" href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% pm.borrowernumber | html %]" >Patron details</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
[% IF borrowers.$borrowernumber.gonenoaddress > 0 %]
|
||||||
|
<div class="dialog message" style="margin-top:.8em">
|
||||||
|
<h4>Patron's address in doubt</h4>
|
||||||
|
<p>The <strong>Gone no address</strong> flag is set for this patron. If this modification request resolves the issue, please unset the flag.</p>
|
||||||
|
<input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/>
|
||||||
|
<label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label>
|
||||||
|
</div>
|
||||||
|
[% END %]
|
||||||
|
|
||||||
[% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %]
|
[% IF !pm.extended_attributes and pm.size > 3 or pm.extended_attributes and pm.size > 4 %]
|
||||||
[%# timestamp+verification_token+borrowernumber=3 %]
|
[%# timestamp+verification_token+borrowernumber=3 %]
|
||||||
<div class="members-update-table">
|
<div class="members-update-table">
|
||||||
|
@ -179,19 +189,10 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF borrowers.$borrowernumber.gonenoaddress > 0 %]
|
|
||||||
<div class="dialog message" style="margin-top:.8em">
|
|
||||||
<h4>Patron's address in doubt</h4>
|
|
||||||
<p>The <strong>Gone no address</strong> flag is set for this patron. If this modification request resolves the issue, please unset the flag.</p>
|
|
||||||
<input type="checkbox" id="unset_gna_[% pm.borrowernumber | html %]" name="unset_gna_[% pm.borrowernumber | html %]" value="unset_gna_[% pm.borrowernumber | html %]"/>
|
|
||||||
<label for="unset_gna_[% pm.borrowernumber | html %]">Unset Gone no address for this patron</label>
|
|
||||||
</div>
|
|
||||||
[% END %]
|
|
||||||
</div>
|
</div>
|
||||||
[% END %]
|
[% END %]
|
||||||
</div>
|
</div>
|
||||||
<fieldset class="action"><input type="submit" value="Submit" /></fieldset>
|
<fieldset class="action"><input type="submit" value="Submit" /></fieldset>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
[% ELSE %]
|
[% ELSE %]
|
||||||
<div class="dialog message">
|
<div class="dialog message">
|
||||||
|
@ -207,7 +208,15 @@
|
||||||
[% Asset.js("js/members-menu.js") | $raw %]
|
[% Asset.js("js/members-menu.js") | $raw %]
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
$( "#pending_updates" ).accordion();
|
$( "#pending_updates" ).accordion({
|
||||||
|
collapsible: true,
|
||||||
|
heightStyle: "content",
|
||||||
|
[%- IF ( active ) -%]
|
||||||
|
active: $(".panel-header").index( $("#panel-header-[% active | html %]") )
|
||||||
|
[%- ELSE -%]
|
||||||
|
active: 0
|
||||||
|
[%- END -%]
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
|
@ -70,7 +70,8 @@ foreach my $pm (@$pending_modifications) {
|
||||||
|
|
||||||
$template->param(
|
$template->param(
|
||||||
PendingModifications => $pending_modifications,
|
PendingModifications => $pending_modifications,
|
||||||
borrowers => $borrowers
|
borrowers => $borrowers,
|
||||||
|
active => ( $query->param('active') || 0 ),
|
||||||
);
|
);
|
||||||
|
|
||||||
output_html_with_http_headers $query, $cookie, $template->output;
|
output_html_with_http_headers $query, $cookie, $template->output;
|
||||||
|
|
Loading…
Reference in a new issue