http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14252 --- Comment #40 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 39707 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39707 [Signed-off] (followup) Adds OpacLangSelectorMode syspref Review of attachment 39707: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14252&attachment=39707) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ +321,5 @@
+ - "Display language selector on " + - pref: OpacLangSelectorMode + choices: + both: "both masthead and footer" + head: "only header"
Choose 'masthead' or 'header' and be consistent. ::: koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ +71,4 @@
<a id="user-menu-trigger" class="pull-right" href="#"><i class="icon-user"></i> <span class="caret"></span></a> <div id="members"> <ul class="nav pull-right"> + [% IF ( Koha.Preference( 'OpacLangSelectorMode' ) == 'both' ) || ( Koha.Preference( 'OpacLangSelectorMode' ) == 'head' ) %]
I know it is an extra line of code, but the whole Koha.Preference() call is 'slow', so a double call is 2n. Variable access in Template Toolkit is most certainly faster than a call. [% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %] [% IF OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'head' %] is likely faster (n+k, where 1<k<n). @@ +106,4 @@
[% END # / UNLESS ( one_language_enabled ) %] [% END # / IF ( languages_loop && opaclanguagesdisplay ) %] [% END # / IF opaclanguagesdisplay %] + [% END # / IF OpacLangSelectorMode %]
Both sections are new code, could we get the indentation right? ::: koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ +70,5 @@
+ </div> <!-- / #changelanguage --> + [% END # / UNLESS ( one_language_enabled ) %] + [% END # / IF ( languages_loop && opaclanguagesdisplay ) %] + [% END # / IF opaclanguagesdisplay %] +[% END %]
Why not indent this properly? -- You are receiving this mail because: You are watching all bug changes.