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

(-)a/C4/Koha.pm (-19 lines)
Lines 42-48 BEGIN { Link Here
42
		&GetItemTypes &getitemtypeinfo
42
		&GetItemTypes &getitemtypeinfo
43
                &GetItemTypesCategorized &GetItemTypesByCategory
43
                &GetItemTypesCategorized &GetItemTypesByCategory
44
		&GetSupportName &GetSupportList
44
		&GetSupportName &GetSupportList
45
		&getframeworkinfo
46
		&getallthemes
45
		&getallthemes
47
		&getFacets
46
		&getFacets
48
		&getnbpages
47
		&getnbpages
Lines 302-325 sub GetItemTypesByCategory { Link Here
302
    return @$tmp;
301
    return @$tmp;
303
}
302
}
304
303
305
=head2 getframeworkinfo
306
307
  $frameworkinfo = &getframeworkinfo($frameworkcode);
308
309
Returns information about an frameworkcode.
310
311
=cut
312
313
sub getframeworkinfo {
314
    my ($frameworkcode) = @_;
315
    my $dbh             = C4::Context->dbh;
316
    my $sth             =
317
      $dbh->prepare("select * from biblio_framework where frameworkcode=?");
318
    $sth->execute($frameworkcode);
319
    my $res = $sth->fetchrow_hashref;
320
    return $res;
321
}
322
323
=head2 getitemtypeinfo
304
=head2 getitemtypeinfo
324
305
325
  $itemtype = &getitemtypeinfo($itemtype, [$interface]);
306
  $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 205-211 if ($op eq 'add_form') { Link Here
205
	}
203
	}
206
	$template->param(existingframeworkloop => \@existingframeworkloop,
204
	$template->param(existingframeworkloop => \@existingframeworkloop,
207
					frameworkcode => $frameworkcode,
205
					frameworkcode => $frameworkcode,
208
# 					FRtext => $frameworkinfo->{frameworktext},
209
					);
206
					);
210
################## DEFAULT ##################################
207
################## DEFAULT ##################################
211
} else { # DEFAULT
208
} 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 IsDebarred);
47
use Koha::Patron::Debarments qw(GetDebarments IsDebarred);
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
53
Lines 565-571 my $patron_messages = Koha::Patron::Messages->search( Link Here
565
);
566
);
566
567
567
my $fast_cataloging = 0;
568
my $fast_cataloging = 0;
568
if (defined getframeworkinfo('FA')) {
569
if ( Koha::BiblioFrameworks->find('FA') ) {
569
    $fast_cataloging = 1 
570
    $fast_cataloging = 1 
570
}
571
}
571
572
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tt (-18 / +17 lines)
Lines 33-47 $(document).ready(function() { Link Here
33
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
33
&rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a>
34
&rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
34
&rsaquo; <a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC frameworks</a>
35
[% IF ( add_form ) %]
35
[% IF ( add_form ) %]
36
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
36
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% framework.frameworktext %] ([% framework.frameworkcode %])</a>
37
&rsaquo; [% action %] [% searchfield %]
37
&rsaquo; [% action %] [% searchfield %]
38
[% ELSIF ( else ) %]
38
[% ELSIF ( else ) %]
39
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
39
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% IF framework %][% framework.frameworktext %] ([% framework.frameworkcode %])[% ELSE %]Default MARC framework[% END %]</a>
40
[% ELSIF ( delete_confirm ) %]
40
[% ELSIF ( delete_confirm ) %]
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 %]">[% framwork.frameworktext %] ([% framework.frameworkcode %])</a>
42
&rsaquo; Confirm deletion of tag '[% searchfield %]'
42
&rsaquo; Confirm deletion of tag '[% searchfield %]'
43
[% ELSIF ( delete_confirmed ) %]
43
[% ELSIF ( delete_confirmed ) %]
44
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% frameworkcode %]">[% frameworktext %] ([% frameworkcode %])</a>
44
&rsaquo; <a href="/cgi-bin/koha/admin/marctagstructure.pl?frameworkcode=[% framework.frameworkcode %]">[% framework.frameworktext %] ([% framework.frameworkcode %])</a>
45
&rsaquo; Data deleted
45
&rsaquo; Data deleted
46
[% END %]
46
[% END %]
47
</div>
47
</div>
Lines 53-69 $(document).ready(function() { Link Here
53
53
54
[% IF ( else ) %]
54
[% IF ( else ) %]
55
<div id="toolbar" class="btn-toolbar">
55
<div id="toolbar" class="btn-toolbar">
56
    <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>
56
    <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>
57
</div>[% END %]
57
</div>[% END %]
58
58
59
<h1>MARC Framework for [% IF ( frameworkcode ) %][% frameworktext %] ([% frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
59
<h1>MARC Framework for [% IF framework %][% framework.frameworktext %] ([% framework.frameworkcode %])[% ELSE %]default MARC framework[% END %]</h1>
60
60
61
[% IF ( add_form ) %]
61
[% IF ( add_form ) %]
62
62
63
    <form action="[% script_name %]" name="Aform" method="post" class="validated">
63
    <form action="[% script_name %]" name="Aform" method="post" class="validated">
64
	
64
	
65
      <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" />
65
      <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" />
66
	<input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
66
	<input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
67
67
68
        <ol>
68
        <ol>
69
            <li>
69
            <li>
Lines 107-113 $(document).ready(function() { Link Here
107
</ol></fieldset> 
107
</ol></fieldset> 
108
    <fieldset class="action">
108
    <fieldset class="action">
109
        <input type="submit" value="Save changes" />
109
        <input type="submit" value="Save changes" />
110
        <a class="cancel" href="[% script_name %]?frameworkcode=[% frameworkcode %]">Cancel</a>
110
        <a class="cancel" href="[% script_name %]?frameworkcode=[% framework.frameworkcode %]">Cancel</a>
111
    </fieldset>
111
    </fieldset>
112
    </form>
112
    </form>
113
[% END %]
113
[% END %]
Lines 121-130 $(document).ready(function() { Link Here
121
        <form action="[% script_name %]" method="post">
121
        <form action="[% script_name %]" method="post">
122
            <input type="hidden" name="op" value="delete_confirmed" />
122
            <input type="hidden" name="op" value="delete_confirmed" />
123
            <input type="hidden" name="searchfield" value="[% searchfield %]" />
123
            <input type="hidden" name="searchfield" value="[% searchfield %]" />
124
            <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
124
            <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
125
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
125
            <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this tag</button>
126
        </form>
126
        </form>
127
        <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
127
        <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
128
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
128
            <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
129
        </form>
129
        </form>
130
    </div>
130
    </div>
Lines 133-139 $(document).ready(function() { Link Here
133
[% IF ( delete_confirmed ) %]
133
[% IF ( delete_confirmed ) %]
134
134
135
    <div class="dialog message"><h3>Tag deleted</h3>
135
    <div class="dialog message"><h3>Tag deleted</h3>
136
    <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
136
    <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
137
        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
137
        <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
138
    </form></div>
138
    </form></div>
139
[% END %]
139
[% END %]
Lines 141-148 $(document).ready(function() { Link Here
141
141
142
    <form action="[% script_name %]" method="post">
142
    <form action="[% script_name %]" method="post">
143
        <input type="hidden" name="op" value="framework_create_confirm" />
143
        <input type="hidden" name="op" value="framework_create_confirm" />
144
        <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
144
        <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
145
        Create framework for [% frameworkcode %] ([% frameworktext %]) using
145
        Create framework for [% frameworkcode %] ([% framework.frameworktext %]) using
146
        <select name="existingframeworkcode">
146
        <select name="existingframeworkcode">
147
            <option value="">Default</option>
147
            <option value="">Default</option>
148
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
148
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
Lines 163-173 $(document).ready(function() { Link Here
163
<label for="frameworkcode"><strong>In framework:</strong> </label>
163
<label for="frameworkcode"><strong>In framework:</strong> </label>
164
        <select id="frameworkcode" name="frameworkcode">
164
        <select id="frameworkcode" name="frameworkcode">
165
            <option value="">Default</option>
165
            <option value="">Default</option>
166
            [% FOREACH framework IN frameworks %]
166
            [% FOREACH f IN frameworks %]
167
            [% IF framework.frameworkcode == frameworkcode %]
167
            [% IF f.frameworkcode == framework.frameworkcode %]
168
                <option value="[% framework.frameworkcode %]" selected="selected">[% framework.frameworktext %]</option>
168
                <option value="[% f.frameworkcode %]" selected="selected">[% f.frameworktext %]</option>
169
                [% ELSE %]
169
                [% ELSE %]
170
                <option value="[% framework.frameworkcode %]">[% framework.frameworktext %]</option>
170
                <option value="[% f.frameworkcode %]">[% f.frameworktext %]</option>
171
                [% END %]
171
                [% END %]
172
            [% END %]
172
            [% END %]
173
        </select>
173
        </select>
174
- 

Return to bug 15801