Koha/koha-tmpl/intranet-tmpl/prog/en/includes/branch-selector.inc
Marc Véron 0ee3249438 Bug 18693: Translatability: Get rid of exposing a [%% FOREACH loop in translation for branch-selector.inc
The file branch-selector.inc exposes the following line to translation
(due to newlines insied a tt directive):
%s %s [%% FOREACH branch IN branches; IF branch.selected; selectall = 0; END; END %%]

Additionally, export.tt exposes the following line to translation:
[%% INCLUDE 'branch-selector.inc' branches = libraries %%]

To test:
- Apply patch
- In Staff client, go to Home > Tools > Export data
- Verify that library selection behaves as before
- Bonus test: Create a "language" aa-AA (perl translate create aa-AA
  from folder misc/translator, verify that lines mentioned above do
  no longer appear in aa-AA-staff-prog.po
- Run QA tools (newest version with test for newlines in tt directives)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-06-05 16:47:22 -03:00

27 lines
1.2 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>