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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc (-5 / +26 lines)
Lines 1-11 Link Here
1
<div id="toolbar" class="btn-toolbar">
1
<div id="toolbar" class="btn-toolbar">
2
    <div class="btn-group">
2
    <div class="btn-group">
3
        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New <span class="caret"></span></button>
3
        [% SWITCH label_element %]
4
            [% CASE "batch" %]
5
                [% SET default_new = "/cgi-bin/koha/labels/label-edit-batch.pl?op=new" %]
6
                [% SET new_label_element = "New label batch" %]
7
            [% CASE "layout" %]
8
                [% SET default_new = "/cgi-bin/koha/labels/label-edit-layout.pl?op=new" %]
9
                [% SET new_label_element = "New label layout" %]
10
            [% CASE "template" %]
11
                [% SET default_new = "/cgi-bin/koha/labels/label-edit-template.pl?op=new" %]
12
                [% SET new_label_element = "New label template" %]
13
            [% CASE "profile" %]
14
                [% SET default_new = "/cgi-bin/koha/labels/label-edit-profile.pl?op=new" %]
15
                [% SET new_label_element = "New printer profile" %]
16
            [% CASE %]
17
                [% SET default_new = "/cgi-bin/koha/labels/label-edit-batch.pl?op=new" %]
18
                [% SET new_label_element = "New label batch" %]
19
        [% END %]
20
        <a href="[% default_new | html %]" class="btn btn-default"><i class="fa fa-plus"></i> <span id="label-new">[% new_label_element | html %]</span> </a>
21
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
22
            <span class="caret"></span>
23
            <span class="sr-only">Toggle dropdown</span>
24
        </button>
4
        <ul class="dropdown-menu">
25
        <ul class="dropdown-menu">
5
            <li><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=new">Label batch</a></li>
26
            <li><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=new">New label batch</a></li>
6
            <li><a href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">Label layout</a></li>
27
            <li><a href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">New label layout</a></li>
7
            <li><a href="/cgi-bin/koha/labels/label-edit-template.pl?op=new">Label template</a></li>
28
            <li><a href="/cgi-bin/koha/labels/label-edit-template.pl?op=new">New label template</a></li>
8
            <li><a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Printer profile</a></li>
29
            <li><a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">New printer profile</a></li>
9
        </ul>
30
        </ul>
10
    </div>
31
    </div>
11
</div>
32
</div>
(-)a/labels/label-edit-batch.pl (-6 / +7 lines)
Lines 133-143 $template->param( Link Here
133
                ) if ($err ne 0);
133
                ) if ($err ne 0);
134
134
135
$template->param(
135
$template->param(
136
                op                      => $op,
136
    op                => $op,
137
                batch_id                => $batch_id,
137
    batch_id          => $batch_id,
138
                table_loop              => $table,
138
    table_loop        => $table,
139
                duplicate_message       => $duplicate_message,
139
    duplicate_message => $duplicate_message,
140
                duplicate_count         => $duplicate_count,
140
    duplicate_count   => $duplicate_count,
141
                );
141
    label_element     => "batch",
142
);
142
143
143
output_html_with_http_headers $cgi, $cookie, $template->output;
144
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/labels/label-edit-layout.pl (-1 / +2 lines)
Lines 157-162 $template->param( Link Here
157
    scale_height             => $layout->get_attr('scale_height'),
157
    scale_height             => $layout->get_attr('scale_height'),
158
    callnum_split            => $layout->get_attr('callnum_split'),
158
    callnum_split            => $layout->get_attr('callnum_split'),
159
    format_string            => $layout->get_attr('format_string'),
159
    format_string            => $layout->get_attr('format_string'),
160
    layout_string => 1,    # FIXME: This should not be hard-coded; It should perhaps be yet another syspref... CN
160
    layout_string => 1,          # FIXME: This should not be hard-coded; It should perhaps be yet another syspref... CN,
161
    label_element => "layout",
161
);
162
);
162
output_html_with_http_headers $cgi, $cookie, $template->output;
163
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/labels/label-edit-profile.pl (-9 / +10 lines)
Lines 90-104 foreach my $unit (@$units) { Link Here
90
$template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0;
90
$template->param(profile_id => $profile->get_attr('profile_id')) if $profile->get_attr('profile_id') > 0;
91
91
92
$template->param(
92
$template->param(
93
    label_template      => $label_template[0]->{'template_code'} || '',
93
    label_template => $label_template[0]->{'template_code'} || '',
94
    printer_name        => $profile->get_attr('printer_name'),
94
    printer_name   => $profile->get_attr('printer_name'),
95
    paper_bin           => $profile->get_attr('paper_bin'),
95
    paper_bin      => $profile->get_attr('paper_bin'),
96
    offset_horz         => $profile->get_attr('offset_horz'),
96
    offset_horz    => $profile->get_attr('offset_horz'),
97
    offset_vert         => $profile->get_attr('offset_vert'),
97
    offset_vert    => $profile->get_attr('offset_vert'),
98
    creep_horz          => $profile->get_attr('creep_horz'),
98
    creep_horz     => $profile->get_attr('creep_horz'),
99
    creep_vert          => $profile->get_attr('creep_vert'),
99
    creep_vert     => $profile->get_attr('creep_vert'),
100
    units               => $units,
100
    units          => $units,
101
    op                  => $op,
101
    op             => $op,
102
    label_element  => "profile",
102
);
103
);
103
104
104
output_html_with_http_headers $cgi, $cookie, $template->output;
105
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/labels/label-edit-template.pl (-18 / +18 lines)
Lines 132-154 foreach my $unit (@$units) { Link Here
132
}
132
}
133
133
134
$template->param(
134
$template->param(
135
    profile_list         => $profile_list,
135
    profile_list    => $profile_list,
136
    template_id          => ($label_template->get_attr('template_id') > 0) ? $label_template->get_attr('template_id') : '',
136
    template_id     => ( $label_template->get_attr('template_id') > 0 ) ? $label_template->get_attr('template_id') : '',
137
    template_code        => $label_template->get_attr('template_code'),
137
    template_code   => $label_template->get_attr('template_code'),
138
    template_desc        => $label_template->get_attr('template_desc'),
138
    template_desc   => $label_template->get_attr('template_desc'),
139
    page_width           => $label_template->get_attr('page_width'),
139
    page_width      => $label_template->get_attr('page_width'),
140
    page_height          => $label_template->get_attr('page_height'),
140
    page_height     => $label_template->get_attr('page_height'),
141
    label_width          => $label_template->get_attr('label_width'),
141
    label_width     => $label_template->get_attr('label_width'),
142
    label_height         => $label_template->get_attr('label_height'),
142
    label_height    => $label_template->get_attr('label_height'),
143
    top_text_margin      => $label_template->get_attr('top_text_margin'),
143
    top_text_margin => $label_template->get_attr('top_text_margin'),
144
    left_text_margin     => $label_template->get_attr('left_text_margin'),
144
    left_text_margin => $label_template->get_attr('left_text_margin'),
145
    top_margin           => $label_template->get_attr('top_margin'),
145
    top_margin       => $label_template->get_attr('top_margin'),
146
    left_margin          => $label_template->get_attr('left_margin'),
146
    left_margin      => $label_template->get_attr('left_margin'),
147
    cols                 => $label_template->get_attr('cols'),
147
    cols             => $label_template->get_attr('cols'),
148
    rows                 => $label_template->get_attr('rows'),
148
    rows             => $label_template->get_attr('rows'),
149
    col_gap              => $label_template->get_attr('col_gap'),
149
    col_gap          => $label_template->get_attr('col_gap'),
150
    row_gap              => $label_template->get_attr('row_gap'),
150
    row_gap          => $label_template->get_attr('row_gap'),
151
    units                => $units,
151
    units            => $units,
152
    label_element    => "template",
152
);
153
);
153
154
154
output_html_with_http_headers $cgi, $cookie, $template->output;
155
output_html_with_http_headers $cgi, $cookie, $template->output;
155
- 

Return to bug 37581