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

(-)a/C4/Koha.pm (-19 lines)
Lines 46-52 BEGIN { Link Here
46
                &GetItemTypesCategorized &GetItemTypesByCategory
46
                &GetItemTypesCategorized &GetItemTypesByCategory
47
		&GetSupportName &GetSupportList
47
		&GetSupportName &GetSupportList
48
		&get_itemtypeinfos_of
48
		&get_itemtypeinfos_of
49
		&getframeworkinfo
50
		&getallthemes
49
		&getallthemes
51
		&getFacets
50
		&getFacets
52
		&displayServers
51
		&displayServers
Lines 354-377 END_SQL Link Here
354
    return get_infos_of( $query, 'itemtype', undef, \@itemtypes );
353
    return get_infos_of( $query, 'itemtype', undef, \@itemtypes );
355
}
354
}
356
355
357
=head2 getframeworkinfo
358
359
  $frameworkinfo = &getframeworkinfo($frameworkcode);
360
361
Returns information about an frameworkcode.
362
363
=cut
364
365
sub getframeworkinfo {
366
    my ($frameworkcode) = @_;
367
    my $dbh             = C4::Context->dbh;
368
    my $sth             =
369
      $dbh->prepare("select * from biblio_framework where frameworkcode=?");
370
    $sth->execute($frameworkcode);
371
    my $res = $sth->fetchrow_hashref;
372
    return $res;
373
}
374
375
=head2 getitemtypeinfo
356
=head2 getitemtypeinfo
376
357
377
  $itemtype = &getitemtypeinfo($itemtype, [$interface]);
358
  $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 46-51 use C4::Members::Attributes qw(GetBorrowerAttributes); Link Here
46
use Koha::Borrower::Debarments qw(GetDebarments IsDebarred);
46
use Koha::Borrower::Debarments qw(GetDebarments IsDebarred);
47
use Koha::DateUtils;
47
use Koha::DateUtils;
48
use Koha::Database;
48
use Koha::Database;
49
use Koha::BiblioFrameworks;
49
50
50
use Date::Calc qw(
51
use Date::Calc qw(
51
  Today
52
  Today
Lines 562-568 my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch ); Link Here
562
if($bor_messages_loop){ $template->param(flagged => 1 ); }
563
if($bor_messages_loop){ $template->param(flagged => 1 ); }
563
564
564
my $fast_cataloging = 0;
565
my $fast_cataloging = 0;
565
if (defined getframeworkinfo('FA')) {
566
if ( Koha::BiblioFrameworks->find('FA') ) {
566
    $fast_cataloging = 1 
567
    $fast_cataloging = 1 
567
}
568
}
568
569
(-)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 %]">[% 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 120-135 $(document).ready(function() { Link Here
120
    <p>Description: [% liblibrarian %]</p>
120
    <p>Description: [% liblibrarian %]</p>
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 %]" /><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
123
	<input type="hidden" name="searchfield" value="[% searchfield %]" /><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
124
    <input type="submit" class="approve" value="Yes, delete this tag" /></form>
124
    <input type="submit" class="approve" value="Yes, delete this tag" /></form>
125
	
125
	
126
    <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /><input type="submit" value="No, do not delete" class="deny" /></form></div>
126
    <form action="[% script_name %]" method="get"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" /><input type="submit" value="No, do not delete" class="deny" /></form></div>
127
[% END %]
127
[% END %]
128
128
129
[% IF ( delete_confirmed ) %]
129
[% IF ( delete_confirmed ) %]
130
130
131
    <div class="dialog message"><h3>Tag deleted</h3>
131
    <div class="dialog message"><h3>Tag deleted</h3>
132
    <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
132
    <form action="[% script_name %]" method="post"><input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
133
    <input type="submit" value="OK" class="approve" />
133
    <input type="submit" value="OK" class="approve" />
134
    </form></div>
134
    </form></div>
135
[% END %]
135
[% END %]
Lines 137-144 $(document).ready(function() { Link Here
137
137
138
    <form action="[% script_name %]" method="post">
138
    <form action="[% script_name %]" method="post">
139
        <input type="hidden" name="op" value="framework_create_confirm" />
139
        <input type="hidden" name="op" value="framework_create_confirm" />
140
        <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" />
140
        <input type="hidden" name="frameworkcode" value="[% framework.frameworkcode %]" />
141
        Create framework for [% frameworkcode %] ([% frameworktext %]) using
141
        Create framework for [% frameworkcode %] ([% framework.frameworktext %]) using
142
        <select name="existingframeworkcode">
142
        <select name="existingframeworkcode">
143
            <option value="">Default</option>
143
            <option value="">Default</option>
144
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
144
        [% FOREACH existingframeworkloo IN existingframeworkloop %]
Lines 159-169 $(document).ready(function() { Link Here
159
<label for="frameworkcode"><strong>In framework:</strong> </label>
159
<label for="frameworkcode"><strong>In framework:</strong> </label>
160
        <select id="frameworkcode" name="frameworkcode">
160
        <select id="frameworkcode" name="frameworkcode">
161
            <option value="">Default</option>
161
            <option value="">Default</option>
162
            [% FOREACH framework IN frameworks %]
162
            [% FOREACH f IN frameworks %]
163
            [% IF framework.frameworkcode == frameworkcode %]
163
            [% IF f.frameworkcode == framework.frameworkcode %]
164
                <option value="[% framework.frameworkcode %]" selected="selected">[% framework.frameworktext %]</option>
164
                <option value="[% f.frameworkcode %]" selected="selected">[% f.frameworktext %]</option>
165
                [% ELSE %]
165
                [% ELSE %]
166
                <option value="[% framework.frameworkcode %]">[% framework.frameworktext %]</option>
166
                <option value="[% f.frameworkcode %]">[% f.frameworktext %]</option>
167
                [% END %]
167
                [% END %]
168
            [% END %]
168
            [% END %]
169
        </select>
169
        </select>
170
- 

Return to bug 15801