Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt
Marc Véron 6246f2c700 Bug 12162 - Add class="branchcode" to body tag to make OPAC CSS-styleable per branch
This patch adds a branch sepecific class to all OPAC pages.

Example:
If not logged in, opac-main.pl displays:
<body ID="opac-main" class="branch-default" >
If logged in at branch FFL, it displays:
<body ID="opac-main" class="branch-FFL" >

If you log in, opac-user.pl should display
<body ID="opac-user" class="branch-FFL scrollto" >

To test:
1)
Apply patch.

2)
Add to syspref OPACUserCSS something highly visible, e.g. for branch FFL:
.branch-FFL {
background-color: yellow;
border: 10px solid red;
}

3)
Go to OPAC and login in with a user with home branch FFL

4)
Verify that colors change as appropriate.

5)
Log out. Verify that colors display as before or as defined in class branch-default in OPACUserCSS

6)
Display patch in patch diff view, verify that ids and classes in body tag are consistent with params bodyid and bodyclass in INCLUDE line

7)
Search for regressions

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-09-23 15:39:31 -03:00

94 lines
4.9 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your fines and charges
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
<body id="opac-account" class="scrollto">
[% INCLUDE 'bodytag.inc' bodyid='opac-account' bodyclass='scrollto' %]
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]</a>[% END %] <span class="divider">&rsaquo;</span></li>
<li><a href="#">Your fines and charges</a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span2">
<div id="navigation">
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
</div>
</div>
<div class="span10">
<div id="useraccount" class="maincontent">
<h3>Fines and charges</h3>
[% IF ( ACCOUNT_LINES ) %]
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Date</th>
<th>Description</th>
<th>Fine amount</th>
<th>Amount outstanding</th>
</tr>
</thead>
<tfoot>
<tr>
<th class="sum" colspan="3">Total due</th>
<td class="sum">[% total %]</td>
</tr>
</tfoot>
<tbody>
[% FOREACH ACCOUNT_LINE IN ACCOUNT_LINES %]
[% IF ( ACCOUNT_LINE.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
<td>[% ACCOUNT_LINE.date | $KohaDates %]</td>
<td>
[% SWITCH ACCOUNT_LINE.accounttype %]
[% CASE 'Pay' %]Payment, thanks
[% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
[% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
[% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
[% CASE 'N' %]New card
[% CASE 'F' %]Fine
[% CASE 'A' %]Account management fee
[% CASE 'M' %]Sundry
[% CASE 'L' %]Lost item
[% CASE 'W' %]Writeoff
[% CASE 'FU' %]Accruing fine
[% CASE 'Rent' %]Rental fee
[% CASE 'FOR' %]Forgiven
[% CASE 'LR' %]Lost item fee refund
[% CASE 'PAY' %]Payment
[% CASE 'WO' %]Writeoff
[% CASE 'C' %]Credit
[% CASE 'CR' %]Credit
[% CASE %][% ACCOUNT_LINE.accounttype %]
[%- END -%]
[%- IF ACCOUNT_LINE.description %], [% ACCOUNT_LINE.description %][% END %]
[% IF ACCOUNT_LINE.title %]([% ACCOUNT_LINE.title %])[% END %]
</td>
[% IF ( ACCOUNT_LINE.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amount %]</td>
[% IF ( ACCOUNT_LINE.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% ACCOUNT_LINE.amountoutstanding %]</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<h4>You have no fines or charges</h4>
[% END %]
</div> <!-- / #useraccount -->
</div> <!-- / .span10 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %][% END %]