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

(-)a/installer/data/mysql/atomicupdate/atomicupdate_bug_18718_Language_Selector_Staff.perl (+14 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do("INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES  ('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff client','Choice')" );
4
5
    # or perform some test and warn
6
    # if( !column_exists( 'biblio', 'biblionumber' ) ) {
7
    #    warn "There is something wrong";
8
    # }
9
10
    # Always end with this (adjust the bug info)
11
    SetVersion( $DBversion );
12
    print "Upgrade to $DBversion done (Bug 18718 - Language selector in staff header menu similar to OPAC )\n";
13
}
14
(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 337-343 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
337
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
337
('OpacItemLocation','callnum','callnum|ccode|location','Show the shelving location of items in the opac','Choice'),
338
('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'),
338
('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'),
339
('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL),
339
('OpacKohaUrl','1',NULL,'Show \'Powered by Koha\' text on OPAC footer.',NULL),
340
('OpacLangSelectorMode','both','top|both|footer','Select the location to display the language selector','Choice'),
340
('OpacLangSelectorMode','both','top|both|footer','Select the location to display the language selector in OPAC','Choice'),
341
('opaclanguages','en',NULL,'Set the default language in the OPAC.','Languages'),
341
('opaclanguages','en',NULL,'Set the default language in the OPAC.','Languages'),
342
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
342
('opaclanguagesdisplay','0','','If ON, enables display of Change Language feature on OPAC','YesNo'),
343
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
343
('opaclayoutstylesheet','opac.css','','Enter the name of the layout CSS stylesheet to use in the OPAC','free'),
Lines 493-498 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
493
('SpineLabelShowPrintOnBibDetails','0','','If turned on, a \"Print Label\" link will appear for each item on the bib details page in the staff interface.','YesNo'),
493
('SpineLabelShowPrintOnBibDetails','0','','If turned on, a \"Print Label\" link will appear for each item on the bib details page in the staff interface.','YesNo'),
494
('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'),
494
('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'),
495
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
495
('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'),
496
('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff client','Choice'),
496
('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'),
497
('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'),
497
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'),
498
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'),
498
('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'),
499
('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (+1 lines)
Lines 97-102 Link Here
97
                    </li>
97
                    </li>
98
                </ul>
98
                </ul>
99
            </li>
99
            </li>
100
            [% INCLUDE 'langmenu-staff-top.inc' %]
100
            <li>
101
            <li>
101
                <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper">Help</a>
102
                <a class="toplinks" href="/cgi-bin/koha/help.pl" id="helper">Help</a>
102
            </li>
103
            </li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc (-2 / +2 lines)
Lines 1-6 Link Here
1
[% USE Koha %]
1
        </div>
2
        </div>
2
3
[% IF ( ( languages_loop ) && ( ! popup_window ) && ( Koha.Preference('StaffLangSelectorMode') == 'both' || Koha.Preference('StaffLangSelectorMode') == 'footer') ) %]
3
[% IF ( languages_loop && ! popup_window ) %]
4
    [% UNLESS ( one_language_enabled ) %]
4
    [% UNLESS ( one_language_enabled ) %]
5
        <div id="changelanguage" class="navbar navbar-default navbar-fixed-bottom">
5
        <div id="changelanguage" class="navbar navbar-default navbar-fixed-bottom">
6
            <div class="container-fluid">
6
            <div class="container-fluid">
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/langmenu-staff-top.inc (+31 lines)
Line 0 Link Here
1
2
[% IF ( ( ! one_language_enabled ) && ( languages_loop ) && ( Koha.Preference('StaffLangSelectorMode') == 'both' || Koha.Preference('StaffLangSelectorMode') == 'top') ) %]
3
<li class="dropdown">
4
  <a href="#" title="Switch languages" class="dropdown-toggle" id="langmenu" data-toggle="dropdown" role="button"><i class="icon-flag icon-white"></i> <span class="langlabel">Languages</span> <b class="caret"></b></a>
5
    <ul aria-labelledby="langmenu" role="menu" class="dropdown-menu">
6
    [% FOREACH languages_loo IN languages_loop.sort('rfc4646_subtag') %]
7
        [% IF ( languages_loo.group_enabled ) %]
8
            [% IF ( languages_loo.plural ) %]
9
                [% FOREACH sublanguages_loo IN languages_loo.sublanguages_loop %]
10
                    [% IF ( sublanguages_loo.enabled ) %]
11
                        [% IF ( sublanguages_loo.sublanguage_current ) %]
12
                         <li role="presentation"> <a href="#" tabindex="-1" class="menu-inactive" role="menuitem">[% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %]&nbsp;<i class="icon-ok"></i></a></li>
13
                        [% ELSE %]
14
                        <li role="presentation"><a href="/cgi-bin/koha/changelanguage.pl?language=[% sublanguages_loo.rfc4646_subtag %]"  tabindex="-1" role="menuitem" class="listmenulink"> [% sublanguages_loo.native_description %] [% sublanguages_loo.script_description %] [% sublanguages_loo.region_description %] [% sublanguages_loo.variant_description %]</a></li>
15
                        [% END %]
16
                    [% END # / IF sublanguages_loo.enabled %]
17
                [% END # / FOREACH sublanguages_loo %]
18
            [% ELSE %]
19
                [% IF ( languages_loo.group_enabled ) %]
20
                    [% IF ( languages_loo.current ) %]
21
                    <li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]&nbsp;<i class="icon-ok"></i></a></li>
22
                    [% ELSE %]
23
                    <li role="presentation"><a href="/cgi-bin/koha/changelanguage.pl?language=[% languages_loo.rfc4646_subtag %]"  tabindex="-1" role="menuitem" class="listmenulink">[% IF ( languages_loo.native_description ) %][% languages_loo.native_description %][% ELSE %][% languages_loo.rfc4646_subtag %][% END %]</a></li>
24
                    [% END %]
25
                [% END # / IF languages_loo.current %]
26
            [% END # / IF ( languages_loo.plural ) %]
27
        [% END # / IF ( languages_loo.group_enabled ) %]
28
    [% END # / FOREACH languages_loo IN languages_loop %]
29
    </ul> <!-- /# .dropdown-menu -->
30
</li> <!-- / .dropdown -->
31
[% END # / IF opaclanguagedisplay %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref (-1 / +7 lines)
Lines 1-6 Link Here
1
Staff Client:
1
Staff Client:
2
    Appearance:
2
    Appearance:
3
        -
3
        -
4
            - "Display language selector on "
5
            - pref: StaffLangSelectorMode
6
              choices:
7
                  both: "both top and footer"
8
                  top: "top"
9
                  footer: "only footer"
10
        -
4
            - Use the
11
            - Use the
5
            - pref: template
12
            - pref: template
6
              choices: staff-templates
13
              choices: staff-templates
7
- 

Return to bug 18718