</div> <!-- / #opac-user-holds -->
[% END # / #RESERVES.count %]
- [% IF Koha.Preference('ArticleRequests') && borrower.article_requests_current.count %]
+ [% IF Koha.Preference('ArticleRequests') %]
<div id="opac-user-article-requests">
- <table id="article-requests-table" class="table table-bordered table-striped">
- <caption>Article requests <span class="count">([% borrower.article_requests_current.count %] total)</span></caption>
- <thead>
- <tr>
- <th class="anti-the article-request-record-title">Record title</th>
- <th class="psort article-request-created-on">Placed on</th>
- <th class="anti-the article-request-title">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-pages">Pages</th>
- <th class="article-request-chapters">Chapters</th>
- <th class="article-request-patron-notes">Notes</th>
- <th class="article-request-status">Status</th>
- <th class="article-request-branchcode">Pickup library</th>
- <th class="nosort article-request-cancel"> </th>
- </tr>
- </thead>
+ [% IF borrower.article_requests_current.count %]
+ <table id="article-requests-table" class="table table-bordered table-striped">
+ <caption>Article requests <span class="count">([% borrower.article_requests_current.count %] total)</span></caption>
+ <thead>
+ <tr>
+ <th class="anti-the article-request-record-title">Record title</th>
+ <th class="psort article-request-created-on">Placed on</th>
+ <th class="anti-the article-request-title">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-pages">Pages</th>
+ <th class="article-request-chapters">Chapters</th>
+ <th class="article-request-patron-notes">Notes</th>
+ <th class="article-request-status">Status</th>
+ <th class="article-request-branchcode">Pickup library</th>
+ <th class="nosort article-request-cancel"> </th>
+ </tr>
+ </thead>
- <tbody>
- [% FOREACH ar IN borrower.article_requests_current %]
- <td class="article-request-record-title">
- <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber %]">
- [% ar.biblio.title %]
- [% ar.item.enumchron %]
- </a>
- [% ar.biblio.author %]
- [% IF ar.itemnumber %] <i>(only [% ar.item.barcode %])</i>[% END %]
- </td>
+ <tbody>
+ [% FOREACH ar IN borrower.article_requests_current %]
+ <td class="article-request-record-title">
+ <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber %]">
+ [% ar.biblio.title %]
+ [% ar.item.enumchron %]
+ </a>
+ [% ar.biblio.author %]
+ [% IF ar.itemnumber %] <i>(only [% ar.item.barcode %])</i>[% END %]
+ </td>
- <td class="article-request-created_on">
- [% ar.created_on | $KohaDates %]
- </td>
+ <td class="article-request-created_on">
+ [% ar.created_on | $KohaDates %]
+ </td>
- <td class="article-request-title">
- [% ar.title %]
- </td>
+ <td class="article-request-title">
+ [% ar.title %]
+ </td>
- <td class="article-request-author">
- [% ar.author %]
- </td>
+ <td class="article-request-author">
+ [% ar.author %]
+ </td>
- <td class="article-request-volume">
- [% ar.volume %]
- </td>
+ <td class="article-request-volume">
+ [% ar.volume %]
+ </td>
- <td class="article-request-issue">
- [% ar.issue %]
- </td>
+ <td class="article-request-issue">
+ [% ar.issue %]
+ </td>
- <td class="article-request-date">
- [% ar.date %]
- </td>
+ <td class="article-request-date">
+ [% ar.date %]
+ </td>
- <td class="article-request-pages">
- [% ar.pages %]
- </td>
+ <td class="article-request-pages">
+ [% ar.pages %]
+ </td>
- <td class="article-request-chapters">
- [% ar.chapters %]
- </td>
+ <td class="article-request-chapters">
+ [% ar.chapters %]
+ </td>
- <td class="article-request-patron-notes">
- [% ar.patron_notes %]
- </td>
+ <td class="article-request-patron-notes">
+ [% ar.patron_notes %]
+ </td>
- <td class="article-request-status">
- [% IF ar.status == 'PENDING' %]
- Pending
- [% ELSIF ar.status == 'PROCESSING' %]
- Processing
- [% ELSIF ar.status == 'COMPLETED' %]
- Completed
- [% ELSIF ar.status == 'CANCELED' %]
- Canceled
- [% END %]
- </td>
+ <td class="article-request-status">
+ [% IF ar.status == 'PENDING' %]
+ Pending
+ [% ELSIF ar.status == 'PROCESSING' %]
+ Processing
+ [% ELSIF ar.status == 'COMPLETED' %]
+ Completed
+ [% ELSIF ar.status == 'CANCELED' %]
+ Canceled
+ [% END %]
+ </td>
- <td class="article-request-branchcode">
- [% ar.branch.branchname %]
- </td>
+ <td class="article-request-branchcode">
+ [% ar.branch.branchname %]
+ </td>
- <td class="article-request-cancel">
- <span class="tdlabel">Cancel:</span>
- <a class="btn btn-mini btn-danger" href="opac-article-request-cancel.pl?id=[% ar.id %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="icon-remove icon-white"></i> Cancel</a>
- <!-- TODO: replace MSG_CONFIRM_DELETE_HOLD with correct message -->
- </td>
- </tr>
- [% END %]
- </tbody>
- </table>
+ <td class="article-request-cancel">
+ <span class="tdlabel">Cancel:</span>
+ <a class="btn btn-mini btn-danger" href="opac-article-request-cancel.pl?id=[% ar.id %]" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);"><i class="icon-remove icon-white"></i> Cancel</a>
+ <!-- TODO: replace MSG_CONFIRM_DELETE_HOLD with correct message -->
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>
+ [% ELSE %]
+ <table class="table table-bordered table-striped">
+ <tr><td>You have no article requests currently.</td></tr>
+ </table>
+ [% END # IF article_requests_current.count %]
</div> <!-- / #opac-user-article-requests -->
[% END %]