Merge commit 'pianohacker-koha/prefs-submit' into master
authorGalen Charlton <gmcharlt@gmail.com>
Wed, 27 Jan 2010 01:26:01 +0000 (20:26 -0500)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 27 Jan 2010 01:26:17 +0000 (20:26 -0500)
Merge in Jesse Weaver's system preference editor changes.

Conflicts:
C4/Bookfund.pm
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tmpl

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
1  2 
C4/Context.pm
C4/Output.pm
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tmpl

diff --combined C4/Context.pm
@@@ -71,7 -71,7 +71,7 @@@ BEGIN 
                                }       
                  print "</body></html>";
                        }
 -              CGI::Carp::set_message(\&handle_errors);
 +              #CGI::Carp::set_message(\&handle_errors);
                ## give a stack backtrace if KOHA_BACKTRACES is set
                ## can't rely on DebugLevel for this, as we're not yet connected
                if ($ENV{KOHA_BACKTRACES}) {
@@@ -507,6 -507,37 +507,37 @@@ sub clear_syspref_cache 
      %sysprefs = ();
  }
  
+ =head2 set_preference
+   C4::Context->set_preference( $variable, $value );
+   This updates a preference's value both in the systempreferences table and in
+   the sysprefs cache.
+ =cut
+ sub set_preference {
+     my $self = shift;
+     my $var = shift;
+     my $value = shift;
+     my $dbh = C4::Context->dbh or return 0;
+     my $type = $dbh->selectrow_array( "SELECT type FROM systempreferences WHERE variable = ?", {}, $var );
+     $value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );
+     my $sth = $dbh->prepare( "
+       INSERT INTO systempreferences
+         ( variable, value )
+         VALUES( ?, ? )
+         ON DUPLICATE KEY UPDATE value = VALUES(value)
+     " );
+     $sth->execute( $var, $value );
+     $sth->finish;
+ }
  # AUTOLOAD
  # This implements C4::Config->foo, and simply returns
  # C4::Context->config("foo"), as described in the documentation for
diff --combined C4/Output.pm
@@@ -26,11 -26,10 +26,11 @@@ package C4::Output
  # templates.
  
  use strict;
 -use warnings;
  
  use C4::Context;
  use C4::Languages qw(getTranslatedLanguages get_bidi regex_lang_subtags language_get_description accept_language );
 +use C4::Dates qw(format_date);
 +use C4::Budgets qw(GetCurrency);
  
  use HTML::Template::Pro;
  use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@@@ -47,10 -46,10 +47,10 @@@ BEGIN 
                                        html =>[qw(&output_with_http_headers &output_html_with_http_headers)]
                                );
      push @EXPORT, qw(
 -        &themelanguage &gettemplate setlanguagecookie pagination_bar
 +        &themelanguage &gettemplate setlanguagecookie getlanguagecookie pagination_bar
      );
      push @EXPORT, qw(
 -        &output_html_with_http_headers &output_with_http_headers
 +        &output_html_with_http_headers &output_with_http_headers FormatData FormatNumber
      );
  }
  
@@@ -70,19 -69,11 +70,12 @@@ my $path = C4::Context->config('intraht
  
  #---------------------------------------------------------------------------------------------------------
  # FIXME - POD
- sub gettemplate {
+ sub _get_template_file {
      my ( $tmplbase, $interface, $query ) = @_;
-     ($query) or warn "no query in gettemplate";
-     my $htdocs;
-     if ( $interface ne "intranet" ) {
-         $htdocs = C4::Context->config('opachtdocs');
-     }
-     else {
-         $htdocs = C4::Context->config('intrahtdocs');
-     }
-     my $path = C4::Context->preference('intranet_includes') || 'includes';
+     my $htdocs = C4::Context->config( $interface ne 'intranet' ? 'opachtdocs' : 'intrahtdocs' );
      my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, $interface, $query );
 +    my $opacstylesheet = C4::Context->preference('opacstylesheet');
  
      # if the template doesn't exist, load the English one as a last resort
      my $filename = "$htdocs/$theme/$lang/modules/$tmplbase";
          $lang = 'en';
          $filename = "$htdocs/$theme/$lang/modules/$tmplbase";
      }
+     return ( $htdocs, $theme, $lang, $filename );
+ }
+ sub gettemplate {
+     my ( $tmplbase, $interface, $query ) = @_;
+     ($query) or warn "no query in gettemplate";
+     my $path = C4::Context->preference('intranet_includes') || 'includes';
+     my $opacstylesheet = C4::Context->preference('opacstylesheet');
+     my ( $htdocs, $theme, $lang, $filename ) = _get_template_file( $tmplbase, $interface, $query );
      my $template       = HTML::Template::Pro->new(
          filename          => $filename,
          die_on_bad_params => 1,
@@@ -143,7 -145,7 +147,7 @@@ sub themelanguage 
                getTranslatedLanguages($interface,'prog') )
        if $http_accept_language;
      # But, if there's a cookie set, obey it
 -    $lang = $query->cookie('KohaOpacLanguage') if $query->cookie('KohaOpacLanguage');
 +    $lang = $query->cookie('KohaOpacLanguage') if (defined $query and $query->cookie('KohaOpacLanguage'));
      # Fall back to English
      my @languages;
      if ($interface eq 'intranet') {
@@@ -204,60 -206,6 +208,60 @@@ sub setlanguagecookie 
      );
  }
  
 +sub getlanguagecookie {
 +    my ($query) = @_;
 +    my $lang;
 +    if ($query->cookie('KohaOpacLanguage')){
 +        $lang = $query->cookie('KohaOpacLanguage') ;
 +    }else{
 +        $lang = $ENV{HTTP_ACCEPT_LANGUAGE};
 +        
 +    }
 +    $lang = substr($lang, 0, 2);
 +
 +    return $lang;
 +}
 +
 +=item FormatNumber
 +=cut
 +sub FormatNumber{
 +my $cur  =  GetCurrency;
 +my $cur_format = C4::Context->preference("CurrencyFormat");
 +my $num;
 +
 +if ( $cur_format eq 'FR' ) {
 +    $num = new Number::Format(
 +        'decimal_fill'      => '2',
 +        'decimal_point'     => ',',
 +        'int_curr_symbol'   => $cur->{symbol},
 +        'mon_thousands_sep' => ' ',
 +        'thousands_sep'     => ' ',
 +        'mon_decimal_point' => ','
 +    );
 +} else {  # US by default..
 +    $num = new Number::Format(
 +        'int_curr_symbol'   => '',
 +        'mon_thousands_sep' => ',',
 +        'mon_decimal_point' => '.'
 +    );
 +}
 +return $num;
 +}
 +
 +=item FormatData
 +
 +FormatData($data_hashref)
 +C<$data_hashref> is a ref to data to format
 +
 +Format dates of data those dates are assumed to contain date in their noun
 +Could be used in order to centralize all the formatting for HTML output
 +=cut
 +
 +sub FormatData{
 +              my $data_hashref=shift;
 +        $$data_hashref{$_} = format_date( $$data_hashref{$_} ) for grep{/date/} keys (%$data_hashref);
 +}
 +
  =item pagination_bar
  
     pagination_bar($base_url, $nb_pages, $current_page, $startfrom_name)
@@@ -448,9 -396,6 +452,9 @@@ sub output_with_http_headers($$$$;$) 
          $options->{'Content-Style-Type' } = 'text/css';
          $options->{'Content-Script-Type'} = 'text/javascript';
      }
 +    # remove SUDOC specific NSB NSE
 +    $data =~ s/\x{C2}\x{98}|\x{C2}\x{9C}/ /g;
 +    $data =~ s/\x{C2}\x{88}|\x{C2}\x{89}/ /g;
      print $query->header($options), $data;
  }
  
@@@ -24,7 -24,6 +24,7 @@@ a.overdue,.overdue 
  body {
        text-align : left;
        padding:0 0 2.5em 0;
 +  font-family: arial, verdana, helvetica, sans-serif;
  }
  
  br.clear {
@@@ -232,11 -231,13 +232,11 @@@ table 
        border-right : 1px solid #BCBCBC;
  }
  
 -table.borderless {
 -    border-collapse : separate;
 -    border: 0 none;
 +table.invis{
 +      border : white;
  }
 -
 -#label-search-results {
 -        width: 700px;
 +table.invis tr,table.invis td {
 +      border : white;
  }
  
  td, th {
@@@ -254,12 -255,6 +254,12 @@@ td.borderless 
      border : 0 none;
  }
  
 +td.data,
 +th.data {
 +      font-family : "Courier New", Courier, monospace;
 +      text-align : right;
 +}
 +
  th {
        background-color : #E8E8E8;
        font-weight : bold;
@@@ -303,15 -298,6 +303,15 @@@ tr.highlight.onissue td 
        background-color: #FFFFE1;
  }
  
 +tfoot td {
 +      background-color : #f3f3f3;
 +      font-weight : bold;
 +}
 +
 +td.total {
 +      text-align : right;
 +}
 +
  caption {
        font-size : 133.9%;
        font-weight : bold;
@@@ -528,16 -514,6 +528,16 @@@ div.yui-b fieldset.brief ol 
  div.yui-b fieldset.brief select {
        width: 12em;
  }
 +div.yui-b fieldset.brief li.radio {
 +      padding : .7em 0;
 +}
 +div.yui-b fieldset.brief li.radio label {
 +      display : inline;
 +}
 +
 +div.yui-b fieldset.brief li.radio input {
 +      padding:0.3em 0;
 +}
  
  fieldset.rows {  
  border-width : 1px;
@@@ -709,9 -685,8 +709,9 @@@ fieldset.rows label.inline 
  }
  
  fieldset.rows .inputnote {
 +      clear : left;
        float : left;
 -      margin : .5em 0 0 10em;
 +      margin : .5em 0 0 11em;
  }
  
  .ui-tabs-nav li {
      visibility:visible; /* you propably don't need to change this one */
      display:block;
  }
 -#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newbatch a, #newprofile a, #newsubscription a, #newdictionary a, #neworder a {
 +#newbiblio a, #addchild a, #newentry a, #newshelf a, #newmenuc .first-child, #newsupplier .first-child, #newlabel a, #newtemplate a, #newlabelbatch a, #newpatroncardbatch a, #newprofile a, #newsubscription a, #newdictionary a, #newbasket a, #newrootbudget-button, #budgets_menuc .first-child, #periods_menuc .first-child {
        padding-left : 34px;
        background-image: url("../../img/toolbar-new.gif");
        background-position : center left;
        background-repeat : no-repeat;
  }
  
 -#editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child {
 +#editmenuc .first-child, #deleteshelf .first-child,#newmenuc .first-child, #addbiblio .first-child, #z3950search .first-child, #printmenuc .first-child, #newsupplier .first-child, #savemenuc .first-child, #budgets_menuc .first-child, #periods_menuc .first-child {
        padding-left : 15px;
  }
  
@@@ -1448,35 -1423,19 +1448,35 @@@ div.pages a 
        text-decoration: none;
  }
  
 -div.pages a:link {
 +div.pages a:link,
 +div.pages a:visited {
        background-color : #eeeeee;
        color : #3366CC;
  }
  
  div.pages a:hover {
 -      background-color : #e8f0f6;
 +      background-color : #FFC;
  }
  
  div.pages a:active {
        background-color : #ffc;
  }
  
 +div.pages .current,
 +div.pages .currentPage {
 +      background-color : #e6fcb7;
 +      color : #666;
 +      font-weight: bold;
 +      padding: 1px 5px 1px 5px;
 +}
 +
 +div.pages .inactive {
 +      background-color : #f3f3f3;
 +      color : #BCBCBC;
 +      font-weight: bold;
 +      padding: 1px 5px 1px 5px;
 +}
 +
  div.browse {
        margin : .5em 0;
  }
@@@ -1489,33 -1448,15 +1489,15 @@@ div#header_search input.submit 
        font-size : 1em;
  }
  
- input[type=submit], input[type=button] {
-       border: 1px outset #999999;
-       border-top-color: #666;
-       border-left-color: #666;
-       padding: 0.25em;
-       background : #E8E8E8 url(../../img/button-bg.gif) top left repeat-x;
-       color: #333333;
- }
- input.submit,button.submit {
-       border: 1px solid #999999;
-       border-top-color: #666;
-       border-left-color: #666;
-       padding: 0.25em;
-       background : #E8E8E8 url(../../img/button-bg.gif) top left repeat-x;
-       color: #333333;
- }
  *html input.submit {
        padding : .1em;
  }
  
- input[type=submit]:active, input[type=button]:active {
+ input[type=submit]:active, input[type=button]:active, button.submit:active {
        border : 1px inset #999999;
  }
  
- input[type=reset], input[type=button], input.submit, button.submit {
+ input[type=submit], input[type=reset], input[type=button], input.submit, button.submit {
        border: 1px outset #999999;
        border-top-color: #666;
        border-left-color: #666;
@@@ -1561,7 -1502,6 +1543,7 @@@ a.yuimenuitemlabel:hover 
  #toplevelnav {
        float : left;
        margin-left : .5em;
 +      width : 30em;
  }
  
  ul#toplevelmenu {
@@@ -1833,42 -1773,7 +1815,46 @@@ h1#xml a 
        width:35px;
  }
  
 +#cartDetails {
 +      background-color : #FFF;
 +      border: 1px solid #739acf;
 +      border-right-width : 2px;
 +      border-bottom-width : 2px;
 +      color : black;
 +      display : none;
 +      margin : 0;
 +      padding : 10px;
 +      text-align : center;
 +      width : 180px;
 +}
 +#cartmenulink {
 +        background: transparent url("../../img/cart-small.gif") 0 3px no-repeat;
 +        padding-left : 15px;
 +}
 +#cartmenulink span#basketcount span {
 +      display : inline;
 +      font-size : 90%;
 +      font-weight : normal;
 +      padding : 0;
 +}
 +#moremenu {
 +        display : none;
 +}
 +
 +.results_summary {
 +  display: block;
 +  font-size : 85%; 
 +  color: #707070;
 +  padding : 0 0 .5em 0;
 +}
 +.results_summary .label {
 +  color: #202020;
 +}
 +.results_summary a {
 +  font-weight: normal;
 +}
 +
+ img.spinner {
+     vertical-align: middle;
+     padding-right: 0.3em;
+ }
@@@ -1,13 -1,14 +1,13 @@@
  <h5>System Preferences</h5>
  <ul>
-       <li><a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a></li>
+       <li><a href="/cgi-bin/koha/admin/preferences.pl">System Preferences</a></li>
  </ul>
  
  <h5>Basic parameters</h5>
  <ul>
 -      <li><a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a></li>
 -      <li><a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds and budgets</a></li>
 -      <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></li>
 +      <li><a href="/cgi-bin/koha/admin/branches.pl">Libraries, branches, groups</a></li>
        <li><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></li>
 +      <li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></li>
  </ul>
  
  <h5>Patrons and circulation</h5>
@@@ -23,6 -24,7 +23,6 @@@
  
  <h5>Catalog</h5>
  <ul>
 -      <li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></li>
        <li><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Bibliographic framework</a></li>
        <li><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></li>
        <li><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Bibliographic framework test</a></li>
      <li><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></li>
  </ul>
  
 +<h5>Acquisition parameters</h5>
 +
 +<ul>
 +      <li><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></li>
 +      <li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets, periods, planning</a></li>
 +      <li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root Budgets</a></li>
 +</ul>
 +
  <h5>Additional parameters</h5>
  
  <ul>
@@@ -7,54 -7,36 +7,54 @@@
  <!-- TMPL_ELSE -->
      <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/staff-global.css" />
  <!-- /TMPL_IF -->
 -<!-- TMPL_IF NAME="css_libs" --><!-- TMPL_LOOP NAME="css_libs" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/<!-- TMPL_VAR NAME="lib" -->" /><!-- /TMPL_LOOP --><!-- /TMPL_IF -->
 +<!-- TMPL_IF NAME="css_libs" -->
 +    <!-- TMPL_LOOP NAME="css_libs" -->
 +        <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/<!-- TMPL_VAR NAME="lib" -->" />
 +    <!-- /TMPL_LOOP -->
 +<!-- /TMPL_IF -->
  
 -<!-- TMPL_IF NAME="css_module" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/modules/<!-- TMPL_VAR NAME="css_module" -->" /><!-- /TMPL_IF -->
 -<!-- TMPL_IF NAME="css_page" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/pages/<!-- TMPL_VAR NAME="css_page" -->" /><!-- /TMPL_IF -->
 +<!-- TMPL_IF NAME="css_module" -->
 +    <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/modules/<!-- TMPL_VAR NAME="css_module" -->" />
 +<!-- /TMPL_IF -->
 +<!-- TMPL_IF NAME="css_page" -->
 +    <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/pages/<!-- TMPL_VAR NAME="css_page" -->" />
 +<!-- /TMPL_IF -->
  
  <!-- TMPL_IF NAME="css_widgets" -->
 -<!-- TMPL_LOOP NAME="css_widgets" -->
 -<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/<!-- TMPL_VAR NAME="widget" -->" />
 -<!-- /TMPL_LOOP -->
 +    <!-- TMPL_LOOP NAME="css_widgets" -->
 +    <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/<!-- TMPL_VAR NAME="widget" -->" />
 +    <!-- /TMPL_LOOP -->
  <!-- /TMPL_IF -->
 +
  <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script>
 -<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/ui.tabs.js"></script><script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hotkeys.min.js"></script>
 +<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/ui.tabs.js"></script>
 +<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.hotkeys.min.js"></script>
 +<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.dropshadow-min.js"></script>
 +<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js"></script>
 +
  <!-- TMPL_IF NAME="js_libs" -->
 -<!-- TMPL_LOOP NAME="js_libs" --><script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/<!-- TMPL_VAR NAME="lib" -->"></script>
 -<!-- /TMPL_LOOP -->
 +    <!-- TMPL_LOOP NAME="js_libs" -->
 +        <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/<!-- TMPL_VAR NAME="lib" -->"></script>
 +    <!-- /TMPL_LOOP -->
  <!-- /TMPL_IF -->
  <!-- TMPL_IF NAME="js_module" -->
 -<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/modules/<!-- TMPL_VAR NAME="js_module" -->"></script>
 +    <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/modules/<!-- TMPL_VAR NAME="js_module" -->"></script>
  <!-- /TMPL_IF -->
  <!-- TMPL_IF NAME="js_page" -->
 -<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/pages/<!-- TMPL_VAR NAME="js_page" -->"></script>
 +    <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/pages/<!-- TMPL_VAR NAME="js_page" -->"></script>
  <!-- /TMPL_IF -->
 +<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/tags.js"></script>
  
  <!-- TMPL_IF NAME="js_widgets" -->
 -<!-- TMPL_LOOP NAME="js_widgets" -->
 -<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/<!-- TMPL_VAR NAME="widget" -->"></script>
 -<!-- /TMPL_LOOP -->
 +    <!-- TMPL_LOOP NAME="js_widgets" -->
 +        <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/<!-- TMPL_VAR NAME="widget" -->"></script>
 +    <!-- /TMPL_LOOP -->
  <!-- /TMPL_IF -->
 -<!-- TMPL_IF NAME="login" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/login.css" /><!-- /TMPL_IF -->
 -<!-- TMPL_IF NAME="wizard" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/wizard.css" />
 +<!-- TMPL_IF NAME="login" -->
 +    <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/login.css" />
 +<!-- /TMPL_IF -->
 +<!-- TMPL_IF NAME="wizard" -->
 +    <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/wizard.css" />
  <!-- /TMPL_IF -->
  
  <!-- local colors -->
  
  <!-- yui js --> 
  <script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/utilities/utilities.js"></script> 
 -<!-- TMPL_IF NAME="CircAutocompl" --><script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/autocomplete/autocomplete-min.js"></script> <!-- /TMPL_IF -->
 +<script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/datasource/datasource.js"></script> 
 +<!-- TMPL_IF NAME="CircAutocompl" -->
 +    <script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/autocomplete/autocomplete-min.js"></script>
 +<!-- /TMPL_IF -->
  <script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/button/button-min.js"></script> 
  <script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/container/container_core-min.js"></script> 
  <script type="text/javascript" src="<!-- TMPL_VAR NAME="yuipath" -->/menu/menu-min.js"></script> 
 +
  <!-- koha core js -->
  <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/js/staff-global.js"></script>
 -<!-- TMPL_IF NAME="intranetuserjs" --><script type="text/javascript">
 -//<![CDATA[
 -<!-- TMPL_VAR NAME="intranetuserjs" -->
 -//]]>
 -</script><!-- /TMPL_IF -->
 +<!-- TMPL_IF NAME="intranetuserjs" -->
 +    <script type="text/javascript">
 +    //<![CDATA[
 +    <!-- TMPL_VAR NAME="intranetuserjs" -->
 +    //]]>
 +    </script>
 +<!-- /TMPL_IF -->
 +<script type="text/javascript" language="javascript">
 +    //<![CDATA[
 +    <!-- TMPL_IF NAME="intranetbookbag" -->var MSG_BASKET_EMPTY = _("Your cart is currently empty");
 +        var MSG_RECORD_IN_BASKET = _("This item is already in your cart");
 +        var MSG_RECORD_ADDED = _("This item has been added to your cart");
 +        var MSG_NRECORDS_ADDED = _(" item(s) added to your cart");
 +        var MSG_NRECORDS_IN_BASKET = _("already in your cart");
 +        var MSG_NO_RECORD_SELECTED = _("No item was selected");
 +        var MSG_NO_RECORD_ADDED = _("No item was added to your cart");
 +        var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
 +        var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");
 +        var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be reserved.");
 +    <!-- /TMPL_IF -->
 +    //]]>
 +    </script>
 +    <!-- TMPL_IF EXPR="virtualshelves || intranetbookbag" -->
 +        <script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/basket.js"></script>
 +    <!-- /TMPL_IF -->
@@@ -1,4 -1,5 +1,5 @@@
  // staff-global.js
+ if ( KOHA === undefined ) var KOHA = {};
  
  function _(s) { return s } // dummy function for gettext
  
@@@ -31,7 -32,6 +32,7 @@@
                                function onShowMoreClick(p_oEvent) {
                      // Position and display the menu        
                      positionoMoremenu();
 +                        $("#moremenu").show();
                      oMoremenu.show();
                      // Stop propagation and prevent the default "click" behavior
                      YAHOO.util.Event.stopEvent(p_oEvent);     
        <div class="yui-g">
  
  <div class="yui-u first">
- <form action="/cgi-bin/koha/admin/systempreferences.pl" method="post">
+ <form action="/cgi-bin/koha/admin/preferences.pl" method="post">
  <fieldset>
- <h4><a href="/cgi-bin/koha/admin/systempreferences.pl">Global system preferences</a></h4>
+ <h4><a href="/cgi-bin/koha/admin/preferences.pl">Global system preferences</a></h4>
        <p>Manage global system preferences like MARC flavor, date format, administrator email, and templates.</p>
-               <input type="hidden" value="all" name="tab" />
+         <input type="hidden" name="op" value="search" />
          <input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
          <input type="submit" name="ok" class="submit" value="Search" />
  </fieldset>
  <div class="hint"><h4>Hint:</h4><p>Configure these parameters in the order they appear.</p></div>
  <h3>Basic parameters</h3>
  <dl>
 -      <dt><a href="/cgi-bin/koha/admin/branches.pl">Libraries and groups</a></dt>
 -      <dd>Define libraries and groups.</dd>
 -      <dt><a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds and budgets</a></dt>
 -      <dd>Funds and budgets administration for acquisitions.</dd>
 -      <dt><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></dt>
 -      <dd>Define currencies and exchange rates used for acquisitions.</dd>
 -      <dt><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></dt>
 -      <dd>Define item types used for circulation rules.</dd>
 +        <dt><a href="/cgi-bin/koha/admin/branches.pl">Libraries, branches and groups</a></dt>
 +        <dd>Define libraries, branches and groups.</dd>
 +        <dt><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></dt>
 +        <dd>Define item types used for circulation rules.</dd>
 +        <dt><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></dt>
 +              <dd>Define categories and authorized values for them.</dd>
  </dl>
  
  <h3>Patrons and circulation</h3>
  <div class="yui-u">
  <h3>Catalog</h3>
  <dl>
 -      <dt><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></dt>
 -      <dd>Define categories and authorized values for them.</dd>
        <dt><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC Bibliographic framework</a></dt>
        <dd>Create and manage Bibliographic frameworks that define the characteristics of your MARC Records (field and subfield definitions) as well as templates for the MARC editor.</dd>
        <dt><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></dt>
        <dd>Define the mapping between the Koha transactional database (SQL) and the MARC Bibliographic records. Note that the mapping can be defined through MARC Bibliographic Framework. This tool is just a shortcut to speed up linkage.</dd>
 +      <dt><a href="/cgi-bin/koha/admin/fieldmapping.pl">Keywords to MARC mapping</a></dt>
 +      <dd>Define the mapping between keywords and MARC fields, those keywords are used to find some datas independently of the framework.</dd>
        <dt><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Bibliographic framework test</a></dt>
        <dd>Checks the MARC structure. If you change your MARC Bibliographic framework it's recommended that you run this tool to test for errors in your definition.</dd>
      <dt><a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a></dt>
      <dd>Manage rules for automatically matching MARC records during record imports.</dd>
  </dl>
  
 +<h3>Acquisition parameters</h3>
 +<dl>
 +        <dt><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></dt>
 +        <dd>Define currencies and exchange rates used for acquisitions.</dd>
 +
 +        <dt><a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets, periods, planning</a></dt>
 +        <dd>Define your budgets</dd>
 +        
 +        <dt><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root Budgets</a></dt>
 +        <dd>Define your root budgets</dd>
 +
 +</dl>
 +
  <h3>Additional parameters</h3>
  <dl>
        <!-- TMPL_IF NAME="NoZebra" --><dt><a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a></dt>
@@@ -24,8 -24,8 +24,8 @@@
         </li>
         <li><a accesskey="r" href="/cgi-bin/koha/circ/returns.pl">Check in</a></li>
          <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li></ul>
 -              <!-- /TMPL_IF -->
 -                <!-- TMPL_IF NAME="CAN_user_borrowers" -->
 +      <!-- /TMPL_IF -->
 +      <!-- TMPL_IF NAME="CAN_user_borrowers" -->
                <h3><a href="/cgi-bin/koha/members/members-home.pl">Patrons</a></h3>
                <ul>
          <li><form action="/cgi-bin/koha/members/member.pl" method="post">
@@@ -36,7 -36,7 +36,7 @@@
          </li>
      </ul>
        <!-- /TMPL_IF -->
 -                <!-- TMPL_IF NAME="CAN_user_catalogue" -->
 +      <!-- TMPL_IF NAME="CAN_user_catalogue" -->
                  <h3><a href="/cgi-bin/koha/catalogue/search.pl">Search</a></h3>
                                <ul>
                      <li>
        </div>
        
        <div class="yui-u">
 -    <!-- TMPL_IF NAME="CAN_user_editcatalogue" -->
 +    <!-- TMPL_IF NAME="CAN_user_editcatalogue_edit_catalogue" -->
      <h3><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></h3>
        <ul>
          <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl">Add MARC Record</a></li>
          <li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
 -              <!-- TMPL_IF NAME="CAN_user_serials" -->
 -        <li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li>
 -              <!-- /TMPL_IF -->
      </ul>
 -      <!-- TMPL_IF NAME="CAN_user_acquisition" -->
 -    <h3><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></h3>
 -      <!-- /TMPL_IF -->
 -    <!-- /TMPL_IF --><!-- TMPL_IF NAME="CAN_user_reports" -->
 -          <h3><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></h3>
      <!-- /TMPL_IF -->
-     <!-- TMPL_IF NAME="CAN_user_parameters" --> <h3> <a href="/cgi-bin/koha/admin/admin-home.pl">Koha administration</a></h3>
-               <ul>
-             <li><a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a></li>
 +    <!-- TMPL_IF NAME="CAN_user_serials" -->
 +    <h3><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></h3>
 +    <!-- /TMPL_IF -->
 +      <!-- TMPL_IF NAME="CAN_user_acquisition" --> <h3><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></h3> <!-- /TMPL_IF -->
 +    <!-- TMPL_IF NAME="CAN_user_reports"     --> <h3><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> </h3> <!-- /TMPL_IF -->
+     <!-- TMPL_IF NAME="CAN_user_parameters" -->
+    <h3> <a href="/cgi-bin/koha/admin/admin-home.pl">Koha administration</a></h3>
+                       <ul>
+             <li><a href="/cgi-bin/koha/admin/preferences.pl">System preferences</a></li>
          </ul>
      <!-- /TMPL_IF -->
 -    <!-- TMPL_IF NAME="CAN_user_tools" -->
 -    <h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3>
 -    <!-- /TMPL_IF -->
 +    <!-- TMPL_IF NAME="CAN_user_tools" --> <h3><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></h3> <!-- /TMPL_IF -->
      <h3><a href="/cgi-bin/koha/about.pl">About Koha</a></h3>
        </div>
        </div>
 -                      <!-- TMPL_IF NAME="IntranetmainUserblock" --><div id="mainuserblock" class="yui-g">
 -              <!-- TMPL_VAR NAME="IntranetmainUserblock" -->
 -              </div><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
 +              <!-- TMPL_IF NAME="IntranetmainUserblock" --><div id="mainuserblock" class="yui-g">
 +                      <!-- TMPL_VAR NAME="IntranetmainUserblock" -->
 +                      </div><!-- TMPL_ELSE -->&nbsp;
 +              <!-- /TMPL_IF -->
  <!-- TMPL_IF NAME="koha_news_count" -->
        </div><!-- /yui-bd -->
        </div><!-- /yui-main -->
        <div class="yui-b">
                <div id="koha-news">
              <h3>News</h3>
 -                      <!-- <!-- TMPL_VAR name="koha_news_count" --> recent news item(s) -->
              <!-- TMPL_LOOP name="koha_news" -->
                      <div class="newsitem" id="news<!-- TMPL_VAR NAME="idnew" -->"><h4><!-- TMPL_VAR name="title" --></h4>
                                         <p><!-- TMPL_VAR name="new" --></p>