Bug 2889: Added highlighting to smart-rules.tmpl

Removed unused toggle variable form smart-rules.pl and added highlighting to smart-rules.tmpl through template __odd__.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This commit is contained in:
Garry Collum 2009-06-10 20:23:52 -04:00 committed by Henri-Damien LAURENT
parent 5fc37a04b4
commit e277ad95eb
2 changed files with 85 additions and 1 deletions

View File

@ -204,7 +204,6 @@ $sth->finish;
$sth=$dbh->prepare("SELECT description,itemtype FROM itemtypes ORDER BY description");
$sth->execute;
# $i=0;
my $toggle= 1;
my @row_loop;
my @itemtypes;
while (my $row=$sth->fetchrow_hashref){

View File

@ -72,7 +72,11 @@ $(document).ready(function() {
<th>Loan Period</th><th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="rules" -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td><!-- TMPL_IF NAME="default_humancategorycode" -->
<em>Default</em>
<!-- TMPL_ELSE -->
@ -153,7 +157,11 @@ $(document).ready(function() {
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="branch_cat_rule_loop" -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td><!-- TMPL_IF NAME="default_humancategorycode" -->
<em>Default</em>
<!-- TMPL_ELSE -->
@ -187,6 +195,83 @@ $(document).ready(function() {
</form>
</div>
<!-- /TMPL_IF -->
<div class="help">
<p>
For this library, you can edit rules for given itemtypes, regardless
of the patron's category.
</p>
<p>
Currently, this means hold policies.
The various policies have the following effects:
</p>
<ul>
<li><strong>From Any Library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
<li><strong>From Home Library:</strong> Only patrons from the item's home library may put this book on hold.</li>
<li><strong>No Holds Allowed:</strong> No patron may put this book on hold.</li>
</ul>
<p>
Note that if the system preference
<code>AllowHoldPolicyOverride</code> is enabled, these policies can
be overridden by your circulation staff. Also, these policies are
based on the patron's home branch, <em>not</em> the branch that
the reserving staff member is from.
</p>
</div>
<div>
<form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
<input type="hidden" name="op" value="add-branch-item" />
<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->"/>
<table>
<tr>
<th>Item Type</th>
<th>Hold Policy</th>
<th>&nbsp;</th>
</tr>
<!-- TMPL_LOOP NAME="branch_item_rule_loop" -->
<!-- TMPL_UNLESS NAME="__odd__" -->
<tr class="highlight">
<!-- TMPL_ELSE -->
<tr>
<!-- /TMPL_UNLESS -->
<td><!-- TMPL_IF NAME="default_humanitemtype" -->
<em>Default</em>
<!-- TMPL_ELSE -->
<!-- TMPL_VAR NAME="humanitemtype" -->
<!-- /TMPL_IF -->
</td>
<td><!-- TMPL_IF NAME="holdallowed_any" -->
From Any Library
<!-- TMPL_ELSIF NAME="holdallowed_same" -->
From Home Library
<!-- TMPL_ELSE -->
No Holds Allowed
<!-- /TMPL_IF -->
</td>
<td>
<a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&amp;itemtype=<!-- TMPL_VAR NAME="itemtype" -->&amp;branch=<!-- TMPL_VAR NAME="branch" -->">Delete</a>
</td>
</tr>
<!-- /TMPL_LOOP -->
<tr>
<td>
<select name="itemtype">
<!-- TMPL_LOOP NAME="itemtypeloop" -->
<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
<!-- /TMPL_LOOP -->
</select>
</td>
<td>
<select name="holdallowed">
<option value="2">From Any Library</option>
<option value="1">From Home Library</option>
<option value="0">No Holds Allowed</option>
</select>
</td>
<td><input type="submit" value="Add" class="submit" /></td>
</tr>
</table>
</form>
</div>
</div>
</div>