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

110 lines
7.4 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Add to your list
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
[% INCLUDE 'bodytag.inc' bodyid='addtolist' bodyclass='popup' %]
<div class="main">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div id="useraddbybiblionumber">
[% IF ( authorized ) %]
[% UNLESS ( newshelf ) %]
[% IF ( multiple ) %]
<h1>Add [% total %] items to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>: [% ELSE %]a list:[% END %]</h1>
[% ELSE %]
<h1>Add to [% IF ( singleshelf ) %]<em>[% shelfname %]</em>[% ELSE %]a list:[% END %]</h1>
[% END %]
<ul>
[% FOREACH biblio IN biblios %]
<li> <span class="title">[% biblio.title |html %]</span>
[% IF ( biblio.author ) %]<span class="author"> [% biblio.author %] </span>[% END %]
</li>
[% END %]
</ul>
[% IF ( existingshelves ) %]
<form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
<fieldset>
<legend>Select a list</legend>
<label for="shelfnumber">Add to list:</label> <select name="shelfnumber" id="shelfnumber">
[% IF ( privatevirtualshelves ) %]<optgroup label="Private Lists">
[% FOREACH privatevirtualshelve IN privatevirtualshelves %]
<option value="[% privatevirtualshelve.shelfnumber %]">[% privatevirtualshelve.shelfname %]</option>
[% END %]
</optgroup>[% END %]
[% IF ( publicvirtualshelves ) %]<optgroup label="Public Lists">
[% FOREACH publicvirtualshelve IN publicvirtualshelves %]
<option value="[% publicvirtualshelve.shelfnumber %]">[% publicvirtualshelve.shelfname %]</option>
[% END %]
</optgroup>[% END %]
</select>
[% FOREACH biblio IN biblios %]
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]" />
[% END %]
<input type="hidden" name="modifyshelfcontents" value="1" />
</fieldset>
<fieldset class="action">
<input type="submit" value="Save" class="btn" />
<a class="close cancel" href="#">Cancel</a>
</fieldset>
</form>
<p>...or...</p>
[% ELSE %]
[% IF ( singleshelf ) %]
<form name="f1" action="/cgi-bin/koha/opac-addbybiblionumber.pl" method="post">
[% FOREACH biblio IN biblios %]
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber %]">
[% END %]
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" />
<input type="hidden" name="modifyshelfcontents" value="1" /></fieldset>
<fieldset class="action">
<input type="submit" value="Save" class="btn" />
<a class="close cancel" href="#">Cancel</a>
</fieldset>
</form>
[% END %]
[% END # IF / existingshelves %]
[% END # / UNLESS newshelf %]
[% UNLESS ( singleshelf ) %]
<form name="f2" method="post" action="/cgi-bin/koha/opac-addbybiblionumber.pl">
<fieldset>
<legend>Add to a new list:</legend>
<label for="newvirtualshelf">List name:</label>
<input type="text" name="newvirtualshelf" id="newvirtualshelf" size="40" />
<label for="category">Category:</label>
<select name="category" id="category">
<option value="1">Private</option>
[% IF (OpacAllowPublicListCreation) %]
<option value="2">Public</option>
[% END %]
</select>
</fieldset>
[% FOREACH biblio IN biblios %]
<input type="hidden" name="biblionumber" value="[% biblio.biblionumber | html%]" />
[% END %]
<fieldset class="action">
<input type="submit" value="Save" class="btn" />
<a class="close cancel" href="#">Cancel</a>
</fieldset>
</form>
[% END # / UNLESS singleshelf %]
[% ELSE %]
<p>
[% IF (errcode==1) %]
Could not create new list. Please check if the name is unique.
[% ELSE %]
Sorry, you cannot add items to this list.
[% END %]
</p>
[% END # IF authorized %]
<p><a href="#" class="close">Close this window.</a></p>
</div> <!-- / #useraddbybiblionumber -->
</div> <!-- / .span12 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' is_popup=1 %]
[% BLOCK jsinclude %][% END %]