Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.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

89 lines
4.5 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% USE AuthorisedValues %]
[% USE ItemTypes %]
[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Course reserves for [% course.course_name %]
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='opac-main' %]
[% 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><a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a> <span class="divider">&rsaquo;</span></li>
<li><a href="#">Course reserves for <i>[% course.course_name %]</i></a></li>
</ul>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<h2>Course reserves for <i>[% course.course_name %]</i></h2>
<div class="rows">
<ol>
[% IF ( course.term ) %]<li><span class="label">Term:</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</li>[% END %]
<li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</li>
[% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number %]</li>[% END %]
[% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section %]</li>[% END %]
[% IF ( course.instructors ) %]
<li><span class="label">Instructors:</span>
<ul>
[% FOREACH i IN course.instructors %]
<li><div class="instructor">[% i.firstname %] [% i.surname %]</div></li>
[% END %]
</ul>
</li>
[% END %]
[% IF ( course.public_note ) %]<li><span class="label">Notes:</span> [% course.public_note %]</li>[% END %]
</ol>
</div>
[% IF ( course_reserves ) %]
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Title</th>
<th>Item type</th>
<th>Location</th>
<th>Collection</th>
<th>Call number</th>
<th>Copy number</th>
<th>Status</th>
<th>Date due</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
[% FOREACH cr IN course_reserves %]
<tr>
<td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
<td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
<td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
<td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
<td>[% cr.item.itemcallnumber %]</td>
<td>[% cr.item.copynumber %]</td>
<td>[% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %]</td>
<td>[% cr.issue.date_due | $KohaDates as_due_date => 1 %]</td>
<td>[% cr.public_note %]</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<br style="clear:both;" />
<div class="dialog message">
<p>No reserves have been selected for this course.</p>
</div>
[% END %]
</div> <!-- / .span12 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% END %]