Koha/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc
Jonathan Druart df97814f30 Bug 15758: Koha::Libraries - Remove GetBranches
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-08 14:36:03 +00:00

27 lines
1.1 KiB
HTML

[%# First check to see if we have anything selected, otherwise we select all %]
[% selectall = 1 %]
[% FOREACH branch IN branches;
IF branch.selected;
selectall = 0;
END;
END %]
<div class="branchselector">
<p><a href="#" id="checkall"> <i class="fa fa-check"></i> Select all</a> | <a href="#" id="checknone"> <i class="fa fa-remove"></i> Clear all</a></p>
<div class="branchgridrow">
[% FOREACH branch IN branches %]
<div class="branchgriditem">
[% IF branch.selected || (selectall == 1) %]
<input id="branch_[% branch.branchcode %]" class="branch_select" type="checkbox" name="branch" value="[% branch.branchcode %]" checked="checked" />
[% ELSE %]
<input id="branch_[% branch.branchcode %]" class="branch-select" type="checkbox" name="branch" value="[% branch.branchcode %]" />
[% END %]
<label for="branch_[% branch.branchcode %]">[% branch.branchname %]</label>
</div>
[% IF loop.count() % 4 == 0 && !loop.last() %]
</div>
<div class="branchgridrow">
[% END %]
[% END %]
</div>
</div>