moving language chooser to the main page.
monving the getalltemplates and getalllanguages subs out from Search.pm (that will be deprecated soon) to Koha.pm
This commit is contained in:
parent
e334c8699f
commit
502ab11ae9
6 changed files with 24 additions and 15 deletions
|
@ -57,7 +57,7 @@ related to the (guessed) charset.
|
|||
&guesscharset
|
||||
&guesstype
|
||||
&output_html_with_http_headers
|
||||
);
|
||||
);
|
||||
|
||||
=item guesscharset
|
||||
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>OPAC Basket</title>
|
||||
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/opac.css">
|
||||
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang"-->/includes/opac.css">
|
||||
<script type="text/javascript" language="javascript" src="<TMPL_VAR NAME="themelang">/includes/basket.js"></script>
|
||||
<SCRIPT language='javascript'>
|
||||
var MSG_NO_RECORD_SELECTED = "No biblio selected";
|
||||
|
|
|
@ -309,7 +309,7 @@ select:hover {
|
|||
border:1px solid #000000;
|
||||
padding-left:10pt;
|
||||
padding-right:10pt;
|
||||
float:left;
|
||||
/* float:left; */
|
||||
margin-bottom:10px;
|
||||
-moz-border-radius: 6px;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,15 @@
|
|||
<a href="/cgi-bin/koha/opac-main.pl?logout.x=1" class="button">
|
||||
Log Out
|
||||
</a>
|
||||
<form action="/cgi-bin/koha/changelanguage.pl" method="post">
|
||||
<select name="language">
|
||||
<TMPL_LOOP NAME="languages">
|
||||
<option value="<TMPL_VAR NAME="language">"><TMPL_VAR NAME="language"></option>
|
||||
</TMPL_LOOP>
|
||||
</select>
|
||||
<input type="submit" value="Change Language" class="button">
|
||||
</form>
|
||||
|
||||
<!-- TMPL_ELSE -->
|
||||
<h2><a href="/cgi-bin/koha/opac-user.pl">Log In to Koha</a></h2>
|
||||
<!-- /TMPL_IF -->
|
||||
|
|
|
@ -7,6 +7,7 @@ use HTML::Template;
|
|||
use C4::Auth; # get_template_and_user
|
||||
use C4::Interface::CGI::Output;
|
||||
use C4::BookShelves;
|
||||
use C4::Koha;
|
||||
|
||||
my $input = new CGI;
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
@ -34,8 +35,19 @@ my ($template, $borrowernumber, $cookie)
|
|||
authnotrequired => 1,
|
||||
flagsrequired => {borrow => 1},
|
||||
});
|
||||
my @options;
|
||||
my $counter=0;
|
||||
foreach my $language (getalllanguages()) {
|
||||
next if $language eq 'images';
|
||||
my $selected='0';
|
||||
# next if $currently_selected_languages->{$language};
|
||||
push @options, { language => $language, counter => $counter };
|
||||
$counter++;
|
||||
}
|
||||
|
||||
$template->param(CGIitemtype => $CGIitemtype,
|
||||
suggestion => C4::Context->preference("suggestion"),
|
||||
virtualshelves => C4::Context->preference("virtualshelves"),
|
||||
languages => \@options,
|
||||
);
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
|
@ -175,20 +175,10 @@ if ($op eq "do_search") {
|
|||
-size => 1,
|
||||
-multiple => 0 );
|
||||
$sth->finish;
|
||||
my @options;
|
||||
my $counter=0;
|
||||
foreach my $language (getalllanguages()) {
|
||||
next if $language eq 'images';
|
||||
my $selected='0';
|
||||
# next if $currently_selected_languages->{$language};
|
||||
push @options, { language => $language, counter => $counter };
|
||||
$counter++;
|
||||
}
|
||||
|
||||
$template->param(classlist => $classlist,
|
||||
CGIitemtype => $CGIitemtype,
|
||||
CGIbranch => $CGIbranch,
|
||||
languages => \@options,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue