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

(-)a/C4/Auth.pm (+1 lines)
Lines 458-463 sub get_template_and_user { Link Here
458
            ShowReviewerPhoto         => C4::Context->preference("ShowReviewerPhoto"),
458
            ShowReviewerPhoto         => C4::Context->preference("ShowReviewerPhoto"),
459
            suggestion                => "" . C4::Context->preference("suggestion"),
459
            suggestion                => "" . C4::Context->preference("suggestion"),
460
            virtualshelves            => "" . C4::Context->preference("virtualshelves"),
460
            virtualshelves            => "" . C4::Context->preference("virtualshelves"),
461
	    GoogleTransliteration     => C4::Context->preference("GoogleTransliteration"),
461
            OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
462
            OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
462
            OpacAddMastheadLibraryPulldown => C4::Context->preference("OpacAddMastheadLibraryPulldown"),
463
            OpacAddMastheadLibraryPulldown => C4::Context->preference("OpacAddMastheadLibraryPulldown"),
463
            OPACXSLTDetailsDisplay           => C4::Context->preference("OPACXSLTDetailsDisplay"),
464
            OPACXSLTDetailsDisplay           => C4::Context->preference("OPACXSLTDetailsDisplay"),
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 4370-4375 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4370
    SetVersion($DBversion);
4370
    SetVersion($DBversion);
4371
}
4371
}
4372
4372
4373
$DBversion = '3.05.00.XXX';
4374
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4375
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GoogleTransliteration','0','Show GoogleTransliteration on the OPAC Masthead.', '','YesNo')");
4376
    print "Upgrade to $DBversion done (Add GoogleTransliteration on opac page)\n";
4377
    SetVersion ($DBversion);
4378
}
4379
4373
=head1 FUNCTIONS
4380
=head1 FUNCTIONS
4374
4381
4375
=head2 DropAllForeignKeys($table)
4382
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+7 lines)
Lines 1-4 Link Here
1
OPAC:
1
OPAC:
2
    GoogleTransliteration:
3
        -
4
            - pref: GoogleTransliteration
5
              choices:
6
                  yes: Show
7
                  no: "Don't show"
8
            - Show GoogleTransliteration on the OPAC Masthead.
2
    Appearance:
9
    Appearance:
3
        -
10
        -
4
            - Use the
11
            - Use the
(-)a/koha-tmpl/opac-tmpl/prog/en/js/googletransliteration.js (+29 lines)
Line 0 Link Here
1
      // Load the Google Transliteration API
2
      google.load("elements", "1", {
3
            packages: "transliteration"
4
          });
5
      
6
	function onLoad() {
7
        var options = {
8
          sourceLanguage: 'en',
9
          destinationLanguage: ['hi','kn','ml','ta','te','ar','ur','pa','fa','bn'],
10
          shortcutKey: 'ctrl+g',
11
          transliterationEnabled: false
12
        };
13
14
        // Create an instance on TransliterationControl with the required
15
        // options.
16
        var control =
17
            new google.elements.transliteration.TransliterationControl(options);
18
19
        // Enable transliteration in the textfields with the given ids.
20
        var ids = [ "transl1" ];
21
        control.makeTransliteratable(ids);
22
23
        // Show the transliteration control which can be used to toggle between
24
        // English and Hindi and also choose other destination language.
25
        control.showControl('translControl');
26
      }
27
      google.setOnLoadCallback(onLoad);
28
29
(-)a/opac/opac-main.pl (-5 lines)
Lines 90-98 $template->param( Link Here
90
    koha_news_count => $koha_news_count
90
    koha_news_count => $koha_news_count
91
);
91
);
92
92
93
# If GoogleIndicTransliteration system preference is On Set paramter to load Google's javascript in OPAC search screens
94
if (C4::Context->preference('GoogleIndicTransliteration')) {
95
        $template->param('GoogleIndicTransliteration' => 1);
96
}
97
98
output_html_with_http_headers $input, $cookie, $template->output;
93
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/opac/opac-search.pl (-6 lines)
Lines 669-677 if (defined $barshelves) { Link Here
669
669
670
my $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html';
670
my $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html';
671
671
672
# If GoogleIndicTransliteration system preference is On Set paramter to load Google's javascript in OPAC search screens 
673
if (C4::Context->preference('GoogleIndicTransliteration')) {
674
        $template->param('GoogleIndicTransliteration' => 1);
675
}
676
677
output_with_http_headers $cgi, $cookie, $template->output, $content_type;
672
output_with_http_headers $cgi, $cookie, $template->output, $content_type;
678
- 

Return to bug 5621