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

(-)a/C4/Koha.pm (-24 / +5 lines)
Lines 39-51 BEGIN { Link Here
39
	require Exporter;
39
	require Exporter;
40
	@ISA    = qw(Exporter);
40
	@ISA    = qw(Exporter);
41
	@EXPORT = qw(
41
	@EXPORT = qw(
42
		&GetPrinters &GetPrinter
42
        &GetPrinters &GetPrinter
43
		&GetItemTypes &getitemtypeinfo
43
        &GetItemTypes &getitemtypeinfo
44
                &GetItemTypesCategorized &GetItemTypesByCategory
44
                &GetItemTypesCategorized &GetItemTypesByCategory
45
        &getframeworkinfo
45
        &getallthemes
46
		&getallthemes
46
        &getFacets
47
		&getFacets
47
        &getnbpages
48
		&getnbpages
49
		&get_infos_of
48
		&get_infos_of
50
		&get_notforloan_label_of
49
		&get_notforloan_label_of
51
		&getitemtypeimagedir
50
		&getitemtypeimagedir
Lines 223-246 sub GetItemTypesByCategory { Link Here
223
    return @$tmp;
222
    return @$tmp;
224
}
223
}
225
224
226
=head2 getframeworkinfo
227
228
  $frameworkinfo = &getframeworkinfo($frameworkcode);
229
230
Returns information about an frameworkcode.
231
232
=cut
233
234
sub getframeworkinfo {
235
    my ($frameworkcode) = @_;
236
    my $dbh             = C4::Context->dbh;
237
    my $sth             =
238
      $dbh->prepare("select * from biblio_framework where frameworkcode=?");
239
    $sth->execute($frameworkcode);
240
    my $res = $sth->fetchrow_hashref;
241
    return $res;
242
}
243
244
=head2 getitemtypeinfo
225
=head2 getitemtypeinfo
245
226
246
  $itemtype = &getitemtypeinfo($itemtype, [$interface]);
227
  $itemtype = &getitemtypeinfo($itemtype, [$interface]);
(-)a/admin/marctagstructure.pl (-5 / +2 lines)
Lines 35-42 my $input = new CGI; Link Here
35
my $frameworkcode         = $input->param('frameworkcode')         || ''; # set to select framework
35
my $frameworkcode         = $input->param('frameworkcode')         || ''; # set to select framework
36
my $existingframeworkcode = $input->param('existingframeworkcode') || '';
36
my $existingframeworkcode = $input->param('existingframeworkcode') || '';
37
my $searchfield           = $input->param('searchfield') || 0;
37
my $searchfield           = $input->param('searchfield') || 0;
38
# set when we have to create a new framework (in frameworkcode) by copying an old one (in existingframeworkcode)
39
my $frameworkinfo = getframeworkinfo($frameworkcode);
40
$searchfield=~ s/\,//g;
38
$searchfield=~ s/\,//g;
41
39
42
my $offset    = $input->param('offset') || 0;
40
my $offset    = $input->param('offset') || 0;
Lines 76-85 unless ($frameworkexist) { Link Here
76
	}
74
	}
77
}
75
}
78
76
77
my $framework = $frameworks->search({ frameworkcode => $frameworkcode })->next;
79
$template->param(
78
$template->param(
80
    frameworks    => $frameworks,
79
    frameworks    => $frameworks,
81
    frameworkcode => $frameworkcode,
80
    framework     => $framework,
82
    frameworktext => $frameworkinfo->{frameworktext},
83
    script_name   => $script_name,
81
    script_name   => $script_name,
84
    ( $op || 'else' ) => 1,
82
    ( $op || 'else' ) => 1,
85
);
83
);
Lines 209-215 if ($op eq 'add_form') { Link Here
209
	}
207
	}
210
	$template->param(existingframeworkloop => \@existingframeworkloop,
208
	$template->param(existingframeworkloop => \@existingframeworkloop,
211
					frameworkcode => $frameworkcode,
209
					frameworkcode => $frameworkcode,
212
# 					FRtext => $frameworkinfo->{frameworktext},
213
					);
210
					);
214
################## DEFAULT ##################################
211
################## DEFAULT ##################################
215
} else { # DEFAULT
212
} else { # DEFAULT
(-)a/circ/circulation-home.pl (-5 / +3 lines)
Lines 16-28 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
# 
17
# 
18
18
19
use strict;
19
use Modern::Perl;
20
#use warnings; FIXME - Bug 2505
21
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
22
use C4::Auth;
21
use C4::Auth;
23
use C4::Output;
22
use C4::Output;
24
use C4::Context;
23
use C4::Context;
25
use C4::Koha;
24
use Koha::BiblioFrameworks;
26
25
27
my $query = new CGI;
26
my $query = new CGI;
28
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user(
27
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user(
Lines 36-43 my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( Link Here
36
);
35
);
37
36
38
# Checking if there is a Fast Cataloging Framework
37
# Checking if there is a Fast Cataloging Framework
39
my $fa = getframeworkinfo('FA');
38
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
40
$template->param( fast_cataloging => 1 ) if (defined $fa);
41
39
42
# Checking if the transfer page needs to be displayed
40
# Checking if the transfer page needs to be displayed
43
$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
41
$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
(-)a/circ/circulation.pl (-1 / +2 lines)
Lines 47-52 use Koha::Patron; Link Here
47
use Koha::Patron::Debarments qw(GetDebarments);
47
use Koha::Patron::Debarments qw(GetDebarments);
48
use Koha::DateUtils;
48
use Koha::DateUtils;
49
use Koha::Database;
49
use Koha::Database;
50
use Koha::BiblioFrameworks;
50
use Koha::Patron::Messages;
51
use Koha::Patron::Messages;
51
use Koha::Patron::Images;
52
use Koha::Patron::Images;
52
use Koha::SearchEngine;
53
use Koha::SearchEngine;
Lines 579-585 my $patron_messages = Koha::Patron::Messages->search( Link Here
579
);
580
);
580
581
581
my $fast_cataloging = 0;
582
my $fast_cataloging = 0;
582
if (defined getframeworkinfo('FA')) {
583
if ( Koha::BiblioFrameworks->find('FA') ) {
583
    $fast_cataloging = 1 
584
    $fast_cataloging = 1 
584
}
585
}
585
586
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-18 / +17 lines)
Lines 38-52 $(document).ready(function() { Link Here
38
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
38
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
39
&rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
39
&rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
40
[% IF ( add_form ) %]
40
[% IF ( add_form ) %]
41
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
41
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% framework.frameworktext %] ([% framework.frameworkcode %])</a>
42
&rsaquo; [% action %] [% searchfield %]
42
&rsaquo; [% action %] [% searchfield %]
43
[% ELSIF ( else ) %]
43
[% ELSIF ( else ) %]
44
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
44
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
45
[% ELSIF ( delete_confirm ) %]
45
[% ELSIF ( delete_confirm ) %]
46
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
46
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% framwork.frameworktext %] ([% framework.frameworkcode %])</a>
47
&rsaquo; Confirm deletion of tag '[% searchfield %]'
47
&rsaquo; Confirm deletion of tag '[% searchfield %]'
48
[% ELSIF ( delete_confirmed ) %]
48
[% ELSIF ( delete_confirmed ) %]
49
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
49
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% framework.frameworktext %] ([% framework.frameworkcode %])</a>
50
&rsaquo; Data deleted
50
&rsaquo; Data deleted
51
[% END %]
51
[% END %]
52
</div>
52
</div>
Lines 58-74 $(document).ready(function() { Link Here
58
58
59
[% IF ( else ) %]
59
[% IF ( else ) %]
60
<div id="toolbar" class="btn-toolbar">
60
<div id="toolbar" class="btn-toolbar">
61
    <a class="btn btn-small" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% frameworkcode %]"><i class="fa fa-plus"></i> New tag</a>
61
    <a class="btn btn-small" id="addtag" href="/cgi-bin/koha/admin/marctagstructure.pl?op=add_form&amp;frameworkcode=[% framework.frameworkcode %]"><i class="fa fa-plus"></i> New tag</a>
62
</div>[% END %]
62
</div>[% END %]
63
63
64
<h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
64
<h1>MARC Framework for [% IF framework %][% framework.frameworktext %] ([% framework.frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
65
65
66
[% IF ( add_form ) %]
66
[% IF ( add_form ) %]
67
67
68
    <form action="[% script_name %]" name="Aform" method="post" class="validated">
68
    <form action="[% script_name %]" name="Aform" method="post" class="validated">
69
	
69
	
70
      <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action %][% END %]</legend>  <input type="hidden" name="op" value="add_validate" />
70
      <fieldset class="rows"><legend>[% IF ( use_heading_flags_p ) %][% IF ( heading_modify_tag_p ) %]Modify tag <input type="hidden" name="modif" value="1" />[% searchfield %][% END %][% IF ( heading_add_tag_p ) %]Add tag[% END %][% ELSE %][% action %][% END %]</legend>  <input type="hidden" name="op" value="add_validate" />
71
	<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
71
    <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
72
72
73
        <ol>
73
        <ol>
74
            <li>
74
            <li>
Lines 112-118 $(document).ready(function() { Link Here
112
</ol></fieldset> 
112
</ol></fieldset> 
113
    <fieldset class="action">
113
    <fieldset class="action">
114
        <input type="submit" value="Save changes" />
114
        <input type="submit" value="Save changes" />
115
        <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
115
        <a class="cancel" href="[% script_name %]?frameworkcode=[% framework.frameworkcode %]">Cancel</a>
116
    </fieldset>
116
    </fieldset>
117
    </form>
117
    </form>
118
[% END %]
118
[% END %]
Lines 126-135 $(document).ready(function() { Link Here
126
        <form action="[% script_name %]" method="post">
126
        <form action="[% script_name %]" method="post">
127
            <input type="hidden" name="op" value="delete_confirmed" />
127
            <input type="hidden" name="op" value="delete_confirmed" />
128
            <input type="hidden" name="searchfield" value="[% searchfield %]" />
128
            <input type="hidden" name="searchfield" value="[% searchfield %]" />
129
            <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
129
            <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
130
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
130
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
131
        </form>
131
        </form>
132
        <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
132
        <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
133
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
133
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
134
        </form>
134
        </form>
135
    </div>
135
    </div>
Lines 138-144 $(document).ready(function() { Link Here
138
[% IF ( delete_confirmed ) %]
138
[% IF ( delete_confirmed ) %]
139
139
140
    <div class="dialog message"><h3>Tag deleted</h3>
140
    <div class="dialog message"><h3>Tag deleted</h3>
141
    <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
141
    <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
142
        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
142
        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
143
    </form></div>
143
    </form></div>
144
[% END %]
144
[% END %]
Lines 146-153 $(document).ready(function() { Link Here
146
146
147
    <form action="[% script_name %]" method="post">
147
    <form action="[% script_name %]" method="post">
148
        <input type="hidden" name="op" value="framework_create_confirm" />
148
        <input type="hidden" name="op" value="framework_create_confirm" />
149
        <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
149
        <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
150
        Create framework for [% frameworkcode %] ([% frameworktext %]) using
150
        Create framework for [% frameworkcode %] ([% framework.frameworktext %]) using
151
        <select name="existingframeworkcode">
151
        <select name="existingframeworkcode">
152
            <option value="">Default</option>
152
            <option value="">Default</option>
153
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
153
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
Lines 168-178 $(document).ready(function() { Link Here
168
<label for="frameworkcode"><strong>In framework:</strong> </label>
168
<label for="frameworkcode"><strong>In framework:</strong> </label>
169
        <select id="frameworkcode" name="frameworkcode">
169
        <select id="frameworkcode" name="frameworkcode">
170
            <option value="">Default</option>
170
            <option value="">Default</option>
171
            [% FOREACH framework IN frameworks %]
171
            [% FOREACH f IN frameworks %]
172
            [% IF framework.frameworkcode == frameworkcode %]
172
            [% IF f.frameworkcode == framework.frameworkcode %]
173
                <option value="[% framework.frameworkcode %]" selected="selected">[% framework.frameworktext %]</option>
173
                <option value="[% f.frameworkcode %]" selected="selected">[% f.frameworktext %]</option>
174
                [% ELSE %]
174
                [% ELSE %]
175
                <option value="[% framework.frameworkcode %]">[% framework.frameworktext %]</option>
175
                <option value="[% f.frameworkcode %]">[% f.frameworktext %]</option>
176
                [% END %]
176
                [% END %]
177
            [% END %]
177
            [% END %]
178
        </select>
178
        </select>
179
- 

Return to bug 15801