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

(-)a/admin/currency.pl (-2 / +7 lines)
Lines 164-171 if ($op eq 'add_form') { Link Here
164
    my $results = StringSearch($searchfield);
164
    my $results = StringSearch($searchfield);
165
    my $count = scalar(@$results);
165
    my $count = scalar(@$results);
166
    my @loop;
166
    my @loop;
167
    my $activecurrency;
167
    for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
168
    for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
168
        warn Data::Dumper::Dumper($results->[$i]);
169
        # warn Data::Dumper::Dumper($results->[$i]);
170
        if($results->[$i]{'active'} == 1){ $activecurrency = 1; }
169
        push @loop, {
171
        push @loop, {
170
            currency  => $results->[$i]{'currency'},
172
            currency  => $results->[$i]{'currency'},
171
            rate      => $results->[$i]{'rate'},
173
            rate      => $results->[$i]{'rate'},
Lines 174-180 if ($op eq 'add_form') { Link Here
174
            active    => $results->[$i]{'active'},
176
            active    => $results->[$i]{'active'},
175
        };
177
        };
176
    }
178
    }
177
    $template->param(loop => \@loop);
179
    $template->param(
180
        loop => \@loop,
181
        activecurrency => $activecurrency,
182
    );
178
183
179
    if ($offset>0) {
184
    if ($offset>0) {
180
        $template->param(offsetgtzero => 1,
185
        $template->param(offsetgtzero => 1,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl (-1 / +1 lines)
Lines 252-258 Link Here
252
<!--  DEFAULT  display budget periods list -->
252
<!--  DEFAULT  display budget periods list -->
253
<!-- TMPL_IF name="else" -->
253
<!-- TMPL_IF name="else" -->
254
    <h2>Root budgets administration</h2>
254
    <h2>Root budgets administration</h2>
255
    <p><!-- TMPL_IF name="cur" --><b>Currency = <!-- TMPL_VAR name="cur" --></b><!-- /TMPL_IF --></p>
255
    <!-- TMPL_IF name="cur" --><p><b>Currency = <!-- TMPL_VAR name="cur" --></b></p><!-- TMPL_ELSE --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.</p></div><!-- /TMPL_IF -->
256
    <table id="periodsh">
256
    <table id="periodsh">
257
    <thead>
257
    <thead>
258
	    <tr>
258
	    <tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl (-3 / +5 lines)
Lines 96-102 Link Here
96
    $(document).ready(function() {
96
    $(document).ready(function() {
97
        var tooltipcontent = $(".tooltipcontent");
97
        var tooltipcontent = $(".tooltipcontent");
98
        tooltipcontent.hide();
98
        tooltipcontent.hide();
99
        
99
100
        $(".tooltiped td").each(function (){
100
        $(".tooltiped td").each(function (){
101
            contentelem = $(this).parent().children().filter(".tooltipcontent");
101
            contentelem = $(this).parent().children().filter(".tooltipcontent");
102
            if(contentelem.html() != ""){
102
            if(contentelem.html() != ""){
Lines 104-110 Link Here
104
                content: contentelem.html(),
104
                content: contentelem.html(),
105
                show: "mouseover",
105
                show: "mouseover",
106
                hide: "mouseout",
106
                hide: "mouseout",
107
                style: { 
107
                style: {
108
                    name: "light",
108
                    name: "light",
109
                    tip: "bottomLeft",
109
                    tip: "bottomLeft",
110
                    border: {
110
                    border: {
Lines 140-146 Link Here
140
<!-- TMPL_INCLUDE NAME="header.inc" -->
140
<!-- TMPL_INCLUDE NAME="header.inc" -->
141
<!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
141
<!-- TMPL_INCLUDE NAME="budgets-admin-search.inc" -->
142
142
143
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; 
143
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
144
    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root budgets</a> &rsaquo; <!-- TMPL_IF NAME="else" -->Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->
144
    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Root budgets</a> &rsaquo; <!-- TMPL_IF NAME="else" -->Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="add_form" -->
145
    <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Budgets</a> &rsaquo; <!-- TMPL_IF NAME="budget_id" -->Modify budget<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add budget<!-- /TMPL_IF --><!-- /TMPL_IF -->  <!-- TMPL_IF name="delete_confirm" -->
145
    <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->">Budgets</a> &rsaquo; <!-- TMPL_IF NAME="budget_id" -->Modify budget<!-- TMPL_IF NAME="budget_name" --> '<!-- TMPL_VAR NAME="budget_name" -->'<!-- /TMPL_IF --><!-- TMPL_ELSE -->Add budget<!-- /TMPL_IF --><!-- /TMPL_IF -->  <!-- TMPL_IF name="delete_confirm" -->
146
    <a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets</a> &rsaquo; Delete budget?<!-- /TMPL_IF --></div>
146
    <a href="/cgi-bin/koha/admin/aqbudgets.pl">Budgets</a> &rsaquo; Delete budget?<!-- /TMPL_IF --></div>
Lines 153-158 Link Here
153
<!-- TMPL_UNLESS name="delete_confirm" --><!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" --><!-- /TMPL_UNLESS -->
153
<!-- TMPL_UNLESS name="delete_confirm" --><!-- TMPL_INCLUDE NAME="budgets-admin-toolbar.inc" --><!-- /TMPL_UNLESS -->
154
<!-- TMPL_IF name="else" -->
154
<!-- TMPL_IF name="else" -->
155
155
156
<!-- TMPL_UNLESS NAME="cur" --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.</p></div><!-- /TMPL_UNLESS -->
157
156
<h1>Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'</h1>
158
<h1>Budgets for '<!-- TMPL_VAR name="budget_period_description" -->'</h1>
157
<table id="budgeth">
159
<table id="budgeth">
158
    <thead>
160
    <thead>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl (-1 / +1 lines)
Lines 155-161 Budget planning Link Here
155
155
156
    <!-- TMPL_IF NAME="budget_lines" -->
156
    <!-- TMPL_IF NAME="budget_lines" -->
157
157
158
    <!-- TMPL_IF name="cur" --><p><b>Currency = <!-- TMPL_VAR name="cur" --> <!-- TMPL_VAR NAME="cur_format" --></b></p><!-- /TMPL_IF -->
158
    <!-- TMPL_IF name="cur" --><p><b>Currency = <!-- TMPL_VAR name="cur" --></b></p><!-- TMPL_ELSE --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please <a href="/cgi-bin/koha/admin/currency.pl">specify an active currency</a>.</p></div><!-- /TMPL_IF -->
159
159
160
    <table id="plan" width="100%">
160
    <table id="plan" width="100%">
161
    <thead>
161
    <thead>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl (-7 / +10 lines)
Lines 1-5 Link Here
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2
<title>Koha &rsaquo; Administration &rsaquo; Currencies &amp; Exchange Rates &rsaquo; 
2
<title>Koha &rsaquo; Administration &rsaquo; Currencies &amp; Exchange Rates &rsaquo;
3
<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
3
<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->New Currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
4
<!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
4
<!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
5
<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
5
<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
Lines 69-75 Link Here
69
<div id="bd">
69
<div id="bd">
70
    <div id="yui-main">
70
    <div id="yui-main">
71
    <div class="yui-b">
71
    <div class="yui-b">
72
    
72
73
<!-- TMPL_IF NAME="else" -->
73
<!-- TMPL_IF NAME="else" -->
74
<div id="toolbar">
74
<div id="toolbar">
75
    <ul class="toolbar">
75
    <ul class="toolbar">
Lines 117-123 Link Here
117
117
118
        </ol>
118
        </ol>
119
        </fieldset>
119
        </fieldset>
120
        
120
121
    <fieldset class="action">
121
    <fieldset class="action">
122
        <input type="submit" value="Submit" onclick="Check(this.form)" />
122
        <input type="submit" value="Submit" onclick="Check(this.form)" />
123
        <input type="button" onclick="window.location.href='<!-- TMPL_VAR NAME="script_name" -->'" value="Cancel" />
123
        <input type="button" onclick="window.location.href='<!-- TMPL_VAR NAME="script_name" -->'" value="Cancel" />
Lines 177-185 Link Here
177
<!-- TMPL_IF NAME="else" -->
177
<!-- TMPL_IF NAME="else" -->
178
178
179
<h2>Currencies and Exchange Rates</h2>
179
<h2>Currencies and Exchange Rates</h2>
180
181
<!-- TMPL_IF NAME="loop" --><!-- TMPL_UNLESS NAME="activecurrency" --><div class="dialog alert"><h3>No active currency is defined</h3><p>Please edit one currency and mark it as active.</p></div><!-- /TMPL_UNLESS --><!-- /TMPL_IF -->
182
183
180
    <!-- TMPL_IF NAME="searchfield" -->
184
    <!-- TMPL_IF NAME="searchfield" -->
181
        You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
185
        You searched for <!-- TMPL_VAR NAME="searchfield" --></span>
182
    <!-- /TMPL_IF -->	
186
    <!-- /TMPL_IF -->
183
187
184
    <table>
188
    <table>
185
        <tr>
189
        <tr>
Lines 207-219 Link Here
207
        <!-- /TMPL_LOOP -->
211
        <!-- /TMPL_LOOP -->
208
    </table>
212
    </table>
209
<br>
213
<br>
210
    
214
211
    <!-- TMPL_IF NAME="offsetgtzero" -->
215
    <!-- TMPL_IF NAME="offsetgtzero" -->
212
        <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
216
        <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Previous</a>
213
    <!-- /TMPL_IF -->
217
    <!-- /TMPL_IF -->
214
218
215
    <!-- TMPL_IF NAME="ltcount" -->
219
    <!-- TMPL_IF NAME="ltcount" -->
216
        <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>	
220
        <a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>
217
    <!-- /TMPL_IF -->
221
    <!-- /TMPL_IF -->
218
222
219
<!-- /TMPL_IF -->
223
<!-- /TMPL_IF -->
220
- 

Return to bug 3970