Koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-article-requests.inc
Owen Leonard dd75682f77
Bug 30487: Convert checkout and patron details page tabs to Bootstrap
This patch updates the checkout and patron details pages, updating
jQueryUI tabs to Bootstrap tabs.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Go to Circulation -> Check out and load a patron record for checkout.
Ideally the patron record should have a variet of data associated with
it:

 - Checkouts
 - Relative's checkouts (if patron is a guarantor or guarantee to
   another patron with checkouts)
 - Holds
 - Article requests
 - Claims
 - Restrictions
 - Clubs

On the patron's checkout page, test the various tabs corresponding to
the features listed above. Having data to display in those tabs helps
confirm that any table functionality triggered by the tab activation is
working correctly.

The checkouts tab should work correctly whether you have "Always show
checkouts immediately" checked or not.

Test that you can pre-select any tab by appending its anchor to the URL,
e.g.:

/cgi-bin/koha/circ/circulation.pl?borrowernumber=123#reserves

Perform the same checks on the patron details page.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-17 08:06:34 -03:00

105 lines
4.3 KiB
HTML

[% USE Context %]
[% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %]
<div id="article-requests" role="tabpanel" class="tab-pane">
[% IF current_article_requests.count > 0 %]
<table id="article-requests-table" class="table table-bordered table-striped">
<thead>
<tr>
<th class="article-request-record-title anti-the">Record title</th>
<th class="article-request-created_on psort">Placed on</th>
<th class="article-request-title anti-the">Title</th>
<th class="article-request-author">Author</th>
<th class="article-request-volume">Volume</th>
<th class="article-request-issue">Issue</th>
<th class="article-request-date">Date</th>
<th class="article-request-toc" title="Table of contents">TOC</th>
<th class="article-request-pages">Pages</th>
<th class="article-request-chapters">Chapters</th>
<th class="article-request-notes">Notes</th>
<th class="article-request-format">Format</th>
<th class="article-request-status">Status</th>
<th class="article-request-branchcode">Pickup library</th>
</tr>
</thead>
<tbody>
[% FOREACH ar IN current_article_requests %]
<tr>
<td class="article-request-record-title">
<a class="article-request-title" href="/cgi-bin/koha/circ/request-article.pl?biblionumber=[% ar.biblionumber | html %]">
[% ar.biblio.title | html %]
[% ar.item.enumchron | html %]
</a>
[% ar.biblio.author | html %]
[% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %]
</td>
<td class="article-request-created_on">
[% ar.created_on | $KohaDates %]
</td>
<td class="article-request-title">
[% ar.title | html %]
</td>
<td class="article-request-author">
[% ar.author | html %]
</td>
<td class="article-request-volume">
[% ar.volume | html %]
</td>
<td class="article-request-issue">
[% ar.issue | html %]
</td>
<td class="article-request-date">
[% ar.date | html %]
</td>
<td class="article-request-toc">
[% IF ar.toc_request %]<span>Yes</span>[% END %]
</td>
<td class="article-request-pages">
[% ar.pages | html %]
</td>
<td class="article-request-chapters">
[% ar.chapters | html %]
</td>
<td class="article-request-patron-notes">
[% ar.patron_notes | html %]
</td>
<td class="article-request-format">
[% IF ar.format == 'PHOTOCOPY' %]<span>Copy</span>
[% ELSIF ar.format == 'SCAN' %]<span>Scan</span>
[% END %]
</td>
<td class="article-request-status">
[% IF ar.status == 'PENDING' %]
<span>Pending</span>
[% ELSIF ar.status == 'PROCESSING' %]
<span>Processing</span>
[% ELSIF ar.status == 'COMPLETED' %]
<span>Completed</span>
[% ELSIF ar.status == 'CANCELED' %]
<span>Canceled</span>
[% END %]
</td>
<td class="article-request-branchcode">
[% ar.branch.branchname | html %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<span>Patron has no current article requests.</span>
[% END %]
</div>