Koha/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt
Owen Leonard 9a4308481d
Bug 32182: Replace static tabs markup with Bootstrap
This patch reimplements certain tabbed interfaces to use Bootstrap
markup. Previously these tabs required special CSS because they're
static, i.e. not JS-driven tabs for switching in-page. The tabs are
links to separate pages.

Note: This patch includes whitespace changes, so use diff accordingly.

To test, apply the patch and rebuild the staff interface CSS.

Test the following pages to confirm that the tabs look correct and still
link to the correct locations:

- Patron details
    - Accounting
      - Pay amount
    - Transactions
    - Create manual invoice
    - Create manual credit
- Tools -> Comments

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-16 09:35:14 -03:00

122 lines
4.1 KiB
Text

[% USE raw %]
[% USE Asset %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( status ) %]Approved comments[% ELSE %]Comments awaiting moderation[% END %] &rsaquo; Comments &rsaquo; Tools &rsaquo; Koha</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="tools_reviewswaiting" class="tools">
[% WRAPPER 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
[% END %]
[% WRAPPER 'sub-header.inc' %]
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
<ol>
<li>
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
</li>
<li>
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
</li>
<li>
<a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments</a>
</li>
<li>
<a href="#" aria-current="page">
[% IF ( status ) %]
<span>Approved comments</span>
[% ELSE %]
<span>Comments awaiting moderation</span>
[% END %]
</a>
</li>
</ol>
</nav>
[% END %]
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
<h1>Comments</h1>
<!-- The manual invoice and credit buttons -->
<div class="toptabs">
<ul class="nav nav-tabs" role="tablist">
[% IF ( status ) %]
<li role="presentation" class="active">
[% ELSE %]
<li role="presentation">
[% END %]
<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?status=1">Approved comments</a>
</li>
[% IF ( status ) %]
<li role="presentation">
[% ELSE %]
<li role="presentation" class="active">
[% END %]
<a href="/cgi-bin/koha/reviews/reviewswaiting.pl" >Comments awaiting moderation</a>
</li>
</ul> <!-- /.nav.nav-tabs -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active">
[% IF ( reviews ) %]
<table id="commentst">
<thead><tr>
<th>
Commenter
</th>
<th>
On title
</th>
<th>
Comment
</th>
<th>
&nbsp;
</th>
</tr></thead>
<tbody>[% FOREACH review IN reviews %]
<tr>
<td>
[% IF ( review.borrowernumber ) %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% review.borrowernumber | uri %]">[% review.patron.surname | html %], [% review.patron.firstname | html %]</a>[% ELSE %](deleted patron)[% END %]
</td>
<td>
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% review.biblionumber | uri %]">[% review.bibliotitle | html %]</a>
</td>
<td>
[% review.review | html %]
</td>
<td class="actions">
[% IF ( status ) %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=unapprove&amp;reviewid=[% review.reviewid | uri %]" 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&amp;reviewid=[% review.reviewid | uri %]" 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&amp;reviewid=[% review.reviewid | uri %]" 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 | $raw %]</div>
[% ELSE %]
[% IF ( status ) %]<p><strong>No comments have been approved.</strong></p>[% ELSE %]<p><strong>No comments to moderate.</strong></p>[% END %]
[% END %]
</div> <!-- /.tab-pane -->
</div> <!-- /.tab-content -->
</div> <!-- /.toptabs -->
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'tools-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/tools-menu.js") | $raw %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]