Jonathan Druart
0ab22e1c7c
In order to simplify and make uniform the code, the controller scripts send a Koha::Patron object to the templates instead of all attributes of a patron. That will make the code much more easier to maintain and will be less error-prone. The variable "patron" sent to the templates is supposed to represent the patron the librarian is editing the detail. In the members module and some scripts of the circulation module, the patron's detail are sent one by one to the template. That leads to frustration from developpers (making sure everything is passed from all scripts) and to regression (we got tone of bugs in the last year because of this way to do). With this patch set it will be easy access patron's detail, passing only 1 variable from the controllers. Test plan: Play with the patron and circulation module and make sur the detail of the patron you are editing/seeing info are correctly displayed. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
81 lines
3 KiB
Text
81 lines
3 KiB
Text
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Comments › [% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="tools_reviewswaiting" class="tools">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
|
|
› <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a> ›[% IF ( status ) %] Approved comments[% ELSE %] Comments awaiting moderation[% END %]</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
<h1>Comments</h1>
|
|
|
|
<!-- The manual invoice and credit buttons -->
|
|
<div class="statictabs">
|
|
<ul>
|
|
[% IF ( status ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?status=1">Approved comments</a></li>
|
|
[% IF ( status ) %]<li>[% ELSE %]<li class="active">[% END %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl" >Comments awaiting moderation</a></li>
|
|
</ul>
|
|
<div class="tabs-container">
|
|
|
|
[% IF ( reviews ) %]
|
|
<table id="commentst">
|
|
<thead><tr>
|
|
<th>
|
|
Commenter
|
|
</th>
|
|
<th>
|
|
On title
|
|
</th>
|
|
<th>
|
|
Comment
|
|
</th>
|
|
<th>
|
|
|
|
</th>
|
|
</tr></thead>
|
|
<tbody>[% FOREACH review IN reviews %]
|
|
<tr>
|
|
<td>
|
|
[% IF ( review.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% review.borrowernumber %]">[% review.patron.surname %], [% review.patron.firstname %]</a>[% ELSE %](deleted patron)[% END %]
|
|
</td>
|
|
<td>
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% review.biblionumber %]">[% review.bibliotitle %]</a>
|
|
</td>
|
|
<td>
|
|
[% review.review |html %]
|
|
</td>
|
|
<td>
|
|
[% IF ( status ) %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=unapprove&reviewid=[% review.reviewid %]" class="btn btn-default btn-xs"><i class="fa fa-remove"></i> Unapprove</a>[% ELSE %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=[% review.reviewid %]" class="btn btn-default btn-xs"><i class="fa fa-check"></i> Approve</a>[% END %]
|
|
<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=[% review.reviewid %]" class="btn btn-default btn-xs"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a>
|
|
</td>
|
|
</tr>
|
|
[% END %]</tbody>
|
|
</table>
|
|
<div class="pages">[% pagination_bar %]</div>
|
|
[% ELSE %]
|
|
[% IF ( status ) %]<p><b>No comments have been approved.</b></p>[% ELSE %]<p><b>No comments to moderate.</b></p>[% END %]
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
[% INCLUDE 'tools-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
<script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|