View | Details | Raw Unified | Return to bug 14252
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_14252-OpacLangSelectorMode_syspref.sql (+4 lines)
Line 0 Link Here
1
--
2
-- Adds OpacLangSelectorMode syspref for bug 14252
3
--
4
INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('OpacLangSelectorMode','both','both|head|foot','Select the location to display the language selector','Choice');
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 270-275 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
270
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
270
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
271
('OPACItemsResultsDisplay','0','','If OFF : show only the status of items in result list.If ON : show full location of items (branch+location+callnumber) as in staff interface','YesNo'),
271
('OPACItemsResultsDisplay','0','','If OFF : show only the status of items in result list.If ON : show full location of items (branch+location+callnumber) as in staff interface','YesNo'),
272
('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL),
272
('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL),
273
('OpacLangSelectorMode','both','both|head|foot','Select the location to display the language selector','Choice'),
273
('opaclanguages','en',NULL,'Set the default language in the OPAC.','Languages'),
274
('opaclanguages','en',NULL,'Set the default language in the OPAC.','Languages'),
274
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
275
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
275
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
276
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+7 lines)
Lines 317-322 OPAC: Link Here
317
            - pref: OpacCustomSearch
317
            - pref: OpacCustomSearch
318
              type: textarea
318
              type: textarea
319
              class: code
319
              class: code
320
        -
321
            - "Display language selector on "
322
            - pref: OpacLangSelectorMode
323
              choices:
324
                  both: "both masthead and footer"
325
                  head: "only header"
326
                  foot: "only footer"
320
    Features:
327
    Features:
321
        -
328
        -
322
            - pref: opacuserlogin
329
            - pref: opacuserlogin
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (+2 lines)
Lines 71-76 Link Here
71
                        <a id="user-menu-trigger" class="pull-right" href="#"><i class="icon-user"></i> <span class="caret"></span></a>
71
                        <a id="user-menu-trigger" class="pull-right" href="#"><i class="icon-user"></i> <span class="caret"></span></a>
72
                        <div id="members">
72
                        <div id="members">
73
                            <ul class="nav pull-right">
73
                            <ul class="nav pull-right">
74
                            [% IF ( Koha.Preference( 'OpacLangSelectorMode' ) == 'both' ) || ( Koha.Preference( 'OpacLangSelectorMode' ) == 'head' ) %]
74
                            [% IF ( opaclanguagesdisplay ) %]
75
                            [% IF ( opaclanguagesdisplay ) %]
75
                                [% IF ( languages_loop && opaclanguagesdisplay ) %]
76
                                [% IF ( languages_loop && opaclanguagesdisplay ) %]
76
                                    [% UNLESS ( one_language_enabled ) %]
77
                                    [% UNLESS ( one_language_enabled ) %]
Lines 105-110 Link Here
105
                                    [% END # / UNLESS ( one_language_enabled ) %]
106
                                    [% END # / UNLESS ( one_language_enabled ) %]
106
                                [% END # / IF ( languages_loop && opaclanguagesdisplay ) %]
107
                                [% END # / IF ( languages_loop && opaclanguagesdisplay ) %]
107
                            [% END # / IF opaclanguagesdisplay %]
108
                            [% END # / IF opaclanguagesdisplay %]
109
                            [% END # / IF OpacLangSelectorMode %]
108
                                [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
110
                                [% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
109
                                    [% UNLESS ( loggedinusername ) %]
111
                                    [% UNLESS ( loggedinusername ) %]
110
                                        [% IF Koha.Preference('casAuthentication') %]
112
                                        [% IF Koha.Preference('casAuthentication') %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc (-2 / +43 lines)
Lines 29-35 Link Here
29
    [% END # / OpacKohaUrl %]
29
    [% END # / OpacKohaUrl %]
30
30
31
</div> <!-- / #wrap in masthead.inc -->
31
</div> <!-- / #wrap in masthead.inc -->
32
32
[% IF ( Koha.Preference( 'OpacLangSelectorMode' ) == 'both' ) || ( Koha.Preference( 'OpacLangSelectorMode' ) == 'foot' ) %]
33
    [% IF ( opaclanguagesdisplay ) %]
34
        [% IF ( languages_loop && opaclanguagesdisplay ) %]
35
            [% UNLESS ( one_language_enabled ) %]
36
                <div id="changelanguage" class="navbar navbar-fixed-bottom navbar-static-bottom">
37
                    <div class="navbar-inner">
38
                        <ul id="i18nMenu" class="nav">
39
                            <li><p class="lang navbar-text"><strong>Languages:&nbsp;</strong></p></li>
40
                            [% FOREACH languages_loo IN languages_loop %]
41
                                [% IF ( languages_loo.group_enabled ) %]
42
                                    [% IF ( languages_loo.plural ) %]
43
                                        <li class="dropdown">
44
                                            <a data-toggle="dropdown" class="dropdown-toggle sublangs" id="show[% languages_loo.rfc4646_subtag %]" href="#">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %] <b class="caret"></b></a>
45
                                                <ul id="sub[% languages_loo.rfc4646_subtag %]" class="dropdown-menu">
46
                                                    [% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]
47
                                                        [% IF ( sublanguages_loo.enabled ) %]
48
                                                            [% IF ( sublanguages_loo.sublanguage_current ) %]
49
                                                                <li> <p>[% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])</p></li>
50
                                                            [% ELSE %]
51
                                                                <li><a href="/cgi-bin/koha/opac-changelanguage.pl?language=[% sublanguages_loo.rfc4646_subtag %]"> [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %] ([% sublanguages_loo.rfc4646_subtag %])</a></li>
52
                                                            [% END %]
53
                                                        [% END # / IF sublanguages_loo.enabled %]
54
                                                    [% END # / FOREACH sublanguages_loo %]
55
                                                </ul>
56
                                        </li> <!-- / .more -->
57
                                    [% ELSE %]
58
                                        [% IF ( languages_loo.group_enabled ) %]
59
                                            [% IF ( languages_loo.current ) %]
60
                                                <li class="active"><p class="navbar-text">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</p></li>
61
                                            [% ELSE %]
62
                                                <li><a href="/cgi-bin/koha/opac-changelanguage.pl?language=[% languages_loo.rfc4646_subtag %]">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a></li>
63
                                            [% END %]
64
                                        [% END # / IF languages_loo.current %]
65
                                    [% END # / IF ( languages_loo.plural ) %]
66
                                [% END # / IF ( languages_loo.group_enabled ) %]
67
                            [% END # / FOREACH languages_loo IN languages_loop %]
68
                        </ul> <!-- / #i18menu -->
69
                    </div> <!-- / .navbar-inner -->
70
                </div> <!-- / #changelanguage -->
71
            [% END # / UNLESS ( one_language_enabled ) %]
72
        [% END # / IF ( languages_loop && opaclanguagesdisplay ) %]
73
    [% END # / IF opaclanguagesdisplay %]
74
[% END %]
33
[% END # / UNLESS is_popup %]
75
[% END # / UNLESS is_popup %]
34
76
35
77
36
- 

Return to bug 14252