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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-menu.inc (-4 lines)
Lines 1-8 Link Here
1
<div id="navmenu"><ul id="navmenulist">
1
<div id="navmenu"><ul id="navmenulist">
2
    <li><a href="/cgi-bin/koha/labels/label-home.pl">Labels home</a></li>
2
    <li><a href="/cgi-bin/koha/labels/label-home.pl">Labels home</a></li>
3
    <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage layouts</a></li>
4
    <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Manage templates</a></li>
5
    <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Manage profiles</a></li>
6
    <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Manage batches</a></li>
7
</ul>
3
</ul>
8
</div>
4
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-toolbar.inc (-12 / +15 lines)
Lines 1-17 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
        <a class="btn btn-small" href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">New layout</a>
3
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New <span class="caret"></span></button>
4
        <ul class="dropdown-menu">
5
            <li><a href="/cgi-bin/koha/labels/label-edit-batch.pl?op=new">Label batch</a></li>
6
            <li><a href="/cgi-bin/koha/labels/label-edit-layout.pl?op=new">Layout</a></li>
7
            <li><a href="/cgi-bin/koha/labels/label-edit-template.pl?op=new">Label template</a></li>
8
            <li><a href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">Printer profile</a></li>
9
        </ul>
4
    </div>
10
    </div>
5
6
    <div class="btn-group">
11
    <div class="btn-group">
7
            <a class="btn btn-small" href="/cgi-bin/koha/labels/label-edit-template.pl?op=new">New template</a>
12
        <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-edit"></i> Manage <span class="caret"></span></button>
13
        <ul class="dropdown-menu">
14
            <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Label batches</a></li>
15
            <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Layouts</a></li>
16
            <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Label templates</a></li>
17
            <li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Printer profiles</a></li>
18
        </ul>
8
    </div>
19
    </div>
9
20
</div>
10
    <div class="btn-group">
11
        <a class="btn btn-small" href="/cgi-bin/koha/labels/label-edit-profile.pl?op=new">New profile</a>
12
    </div>
13
14
    <div class="btn-group">
15
        <a class="btn btn-small" href="/cgi-bin/koha/labels/label-edit-batch.pl?op=new">New batch</a>
16
    </div>
17
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt (-25 / +11 lines)
Lines 19-34 Link Here
19
                return true;    // ok
19
                return true;    // ok
20
            };
20
            };
21
        }
21
        }
22
           function DeleteConfirm() {
23
                var msg = "Are you sure you want to delete batch [% batch_id %]?"
24
                var answer = confirm(msg);
25
                if (answer) {
26
                    window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=batch&amp;element_id=[% batch_id %]";
27
                }
28
                else {
29
                    return; // abort delete
30
                }
31
            };
32
            function Remove() {
22
            function Remove() {
33
                items = new Array;
23
                items = new Array;
34
                item_num = new Array;
24
                item_num = new Array;
Lines 47-56 Link Here
47
                    item_msg = item_num.join(", ");
37
                    item_msg = item_num.join(", ");
48
                    var msg = "Are you sure you want to remove label number(s): " + item_msg + " from this batch?"
38
                    var msg = "Are you sure you want to remove label number(s): " + item_msg + " from this batch?"
49
                }
39
                }
50
//                else if (document.items.action.checked) {
51
//                    getstr = "label_id="+document.items.action.value;
52
//                    var msg = "Are you sure you want to remove selected item from this batch?"
53
//                }
54
                else {
40
                else {
55
                    alert(_("Please select at least label to delete."));
41
                    alert(_("Please select at least label to delete."));
56
                    return;     // no item selected
42
                    return;     // no item selected
Lines 174-188 Link Here
174
        <div id="bd">
160
        <div id="bd">
175
            <div id="yui-main">
161
            <div id="yui-main">
176
                <div class="yui-b">
162
                <div class="yui-b">
177
                    <div id="toolbar" class="btn-toolbar">
163
                        [% INCLUDE 'labels-toolbar.inc' %]
178
                            <a class="btn btn-small" id="additems" href="#">Add item(s)</a>[% IF ( table_loop ) %]
179
                            <a class="btn btn-small" id="removeitems" href="#">Remove item(s)</a>
180
                            <a class="btn btn-small" id="deletebatch" href="#">Delete batch</a>
181
                            <a class="btn btn-small" id="deduplicate" href="#">Remove duplicates</a>
182
                            <a class="btn btn-small" id="exportitems" href="#">Export item(s)</a>
183
                            <a class="btn btn-small" id="exportbatch" href="#">Export batch</a>[% END %]
184
                    </div>
185
186
                        [% IF ( err ) %]
164
                        [% IF ( err ) %]
187
                            <div class="dialog alert">
165
                            <div class="dialog alert">
188
                                <strong>WARNING:</strong> An error was encountered and [% errstr %] Please have your system administrator check the error log for details.
166
                                <strong>WARNING:</strong> An error was encountered and [% errstr %] Please have your system administrator check the error log for details.
Lines 210-216 Link Here
210
                                    </fieldset>
188
                                    </fieldset>
211
                                </div>
189
                                </div>
212
                            </form>
190
                            </form>
213
                                [% IF ( table_loop ) %]
191
                            <div id="batch-manage" class="btn-toolbar">
192
                                <a class="btn btn-small" id="additems" href="#"><icon class="icon-plus"></icon> Add item(s)</a>[% IF ( table_loop ) %]
193
                                <a class="btn btn-small" id="removeitems" href="#"><icon class="icon-trash"></icon> Remove selected items</a>
194
                                <a class="btn btn-small" id="deduplicate" href="#"><icon class="icon-minus"></icon> Remove duplicates</a>
195
                                <a class="btn btn-small" id="exportitems" href="#"><icon class="icon-share"></icon> Export selected items</a>
196
                                <a class="btn btn-small" id="exportbatch" href="#"><icon class="icon-share"></icon> Export full batch</a>[% END %]
197
                            </div>
198
                            [% IF ( table_loop ) %]
214
                                <form name="items" class="checkboxed">
199
                                <form name="items" class="checkboxed">
215
                                    <h2>Items in batch number [% batch_id %]</h2>
200
                                    <h2>Items in batch number [% batch_id %]</h2>
216
                                    <table id="batcht">
201
                                    <table id="batcht">
Lines 241-247 Link Here
241
                                                    <tr>
226
                                                    <tr>
242
                                                        [% FOREACH text_field IN table_loo.text_fields %]
227
                                                        [% FOREACH text_field IN table_loo.text_fields %]
243
                                                            [% IF ( text_field.select_field ) %]
228
                                                            [% IF ( text_field.select_field ) %]
244
                                                                <td><input type="checkbox" name="action" value="[% text_field.field_value %]"></td>
229
                                                                <td><a class="btn btn-mini" onclick="return confirm('Are you sure you want to delete this?');" href="/cgi-bin/koha/labels/label-edit-batch.pl?op=remove&amp;batch_id=[% batch_id |url %]&amp;label_id=[% text_field.field_value |url %]"><icon class="icon-trash"></icon> Delete</a> <a class="btn btn-mini" href="#" onclick="GB_showCenter('Export labels','/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&amp;label_id=[% text_field.field_value |url %]')"><icon class="icon-share"></icon> Export</a></td>
230
                                                                <td><center><input type="checkbox" name="action" value="[% text_field.field_value %]"></center></td>
245
                                                            [% ELSE %]
231
                                                            [% ELSE %]
246
                                                                <td>
232
                                                                <td>
247
                                                                    [% IF ( text_field.field_name == '_item_type_tbl' ) %]
233
                                                                    [% IF ( text_field.field_name == '_item_type_tbl' ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-layout.tt (+6 lines)
Lines 49-54 Link Here
49
        <div id="bd">
49
        <div id="bd">
50
            <div id="yui-main">
50
            <div id="yui-main">
51
                <div class="yui-b">
51
                <div class="yui-b">
52
                    <div class="yui-g">
53
                    [% INCLUDE 'labels-toolbar.inc' %]
54
                        <div class="yui-u first">
55
56
                        </div>
57
                    </div>
52
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
58
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-layout.pl" method="get">
53
                        <fieldset class="rows">
59
                        <fieldset class="rows">
54
                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout</legend>
60
                            <legend>[% IF ( layout_id ) %]Edit[% ELSE %]Create[% END %] Label layout</legend>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-profile.tt (-1 / +4 lines)
Lines 50-56 Link Here
50
        <div id="bd">
50
        <div id="bd">
51
	    <div id="yui-main">
51
	    <div id="yui-main">
52
	        <div class="yui-b">
52
	        <div class="yui-b">
53
                        <div class="yui-g">
53
                    <div class="yui-g">
54
                    [% INCLUDE 'labels-toolbar.inc' %]
55
                    </div>
56
                        <div class="yui-u first">
54
                            <h3>Edit printer profile</h3>
57
                            <h3>Edit printer profile</h3>
55
                                <div class="yui-g first">
58
                                <div class="yui-g first">
56
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-profile.pl" method="get">
59
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-profile.pl" method="get">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-template.tt (+6 lines)
Lines 50-55 Link Here
50
        <div id="bd">
50
        <div id="bd">
51
            <div id="yui-main">
51
            <div id="yui-main">
52
                <div class="yui-b">
52
                <div class="yui-b">
53
                    <div class="yui-g">
54
                    [% INCLUDE 'labels-toolbar.inc' %]
55
                        <div class="yui-u first">
56
57
                        </div>
58
                    </div>
53
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
59
                    <form name="input" action="/cgi-bin/koha/labels/label-edit-template.pl" method="get">
54
                    <div class="yui-g">
60
                    <div class="yui-g">
55
                        <h3>Edit label template</h3>
61
                        <h3>Edit label template</h3>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-home.tt (-22 / +1 lines)
Lines 21-48 Link Here
21
                    <div class="yui-g">
21
                    <div class="yui-g">
22
                    [% INCLUDE 'labels-toolbar.inc' %]
22
                    [% INCLUDE 'labels-toolbar.inc' %]
23
                        <div class="yui-u first">
23
                        <div class="yui-u first">
24
                            <div class="justify homeimage">
24
25
                            <div class="lci_01"></div>
26
                            <div class="lci_02"></div>
27
                            <div class="lci_03"></div>
28
                                <h2>Welcome to Koha's label creator module</h2>
29
                                <p>The Label Creator allow you to use layouts and templates which you design to print a nearly unlimited variety of labels including barcodes. Here are some of the features of the Label Creator module:</p>
30
                                <ul>
31
                                    <li>Customize label layouts</li>
32
                                    <li>Design custom label templates for printed labels</li>
33
                                    <li>Build and manage batches of labels</li>
34
                                    <li>Export single or multiple batches</li>
35
                                    <li>Export single or multiple labels from within a batch</li>
36
                                    <li>Export label data in one of three formats:</li>
37
                                    <ul>
38
                                        <li>PDF - Readable by any standard PDF reader, making labels printable directly on a printer</li>
39
                                        <li>CSV - Export label data after your chosen layout is applied allowing labels to be imported in to a variety of applications</li>
40
                                        <li>XML - Included as an alternate export format</li>
41
                                    </ul>
42
                                </ul>
43
                                <p>At the top of each screen within the Label Creator, you will see a toolbar allowing quick access to relevant functions. The menu to the left of each screen also allows easy access to the different sections of the Label Creator. The breadcrumb trail near the top of each screen will give specific indication as to where you are within the Label Creator module and allow quick navigation to previously traversed sections. And finally, you can find more detailed information on each section of the Label Creator by clicking the online help link at the upper left-hand corner of every page.</p>
44
                                <p>The developers of the Label Creator module hope you will find this an extremely useful tool in the course of your cataloging work. You are encouraged to submit any enhancement requests as well as any bugs via <a href="http://bugs.koha-community.org/">Koha Project Bugzilla</a>.</p>
45
                            </div>
46
                        </div>
25
                        </div>
47
                    </div>
26
                    </div>
48
                </div>
27
                </div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt (-30 / +3 lines)
Lines 4-34 Link Here
4
    [% INCLUDE 'greybox.inc' %]
4
    [% INCLUDE 'greybox.inc' %]
5
    <script type="text/javascript">
5
    <script type="text/javascript">
6
        //<![CDATA[
6
        //<![CDATA[
7
            function DeleteConfirm() {
8
                var element_id = selected_layout("delete");
9
                if (element_id>-1) {
10
                    var msg = _("Are you sure you want to delete %s %s?").format("[% label_element %]", element_id);
11
                    var answer = confirm(msg);
12
                    if (answer) {
13
                        window.location = "/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element %]&amp;element_id=" + element_id;
14
                    }
15
                    else {
16
                        return; // abort delete
17
                    }
18
                }
19
                else {
20
                    return;     // no layout selected
21
                };
22
            };
23
            function Edit() {
24
                var element_id = selected_layout("edit");
25
                if (element_id>-1) {
26
                    window.location = "/cgi-bin/koha/labels/label-edit-[% label_element %].pl?op=edit&amp;element_id=" + element_id;
27
                }
28
                else {
29
                    return;     // no layout selected
30
                };
31
            };
32
            function Xport() {
7
            function Xport() {
33
                batches= new Array;
8
                batches= new Array;
34
                if(document.layouts.action.length > 0) {
9
                if(document.layouts.action.length > 0) {
Lines 136-142 Link Here
136
                                        <tr>
111
                                        <tr>
137
                                        [% FOREACH text_field IN table_loo.text_fields %]
112
                                        [% FOREACH text_field IN table_loo.text_fields %]
138
                                            [% IF ( text_field.select_field ) %]
113
                                            [% IF ( text_field.select_field ) %]
139
                                                <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>
114
                                                <td align="center"><a class="btn btn-mini" href="/cgi-bin/koha/labels/label-edit-[% label_element |url %].pl?op=edit&amp;element_id=[% text_field.field_value |url %]"><icon class="icon-edit"></icon> Edit</a>  <a class="btn btn-mini" href="/cgi-bin/koha/labels/label-manage.pl?op=delete&amp;label_element=[% label_element %]&amp;element_id=[% text_field.field_value |url %]" onclick="return confirm('Are you sure you want to delete this?');"><icon class="icon-trash"></icon> Delete</a></td>
115
                                                [% IF label_element == 'batch' %] <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
140
                                            [% ELSIF ( text_field.field_value ) %]
116
                                            [% ELSIF ( text_field.field_value ) %]
141
                                                <td>[% text_field.field_value %]</td>
117
                                                <td>[% text_field.field_value %]</td>
142
                                            [% ELSE %]
118
                                            [% ELSE %]
Lines 147-156 Link Here
147
                                    [% END %]
123
                                    [% END %]
148
                                [% END %]
124
                                [% END %]
149
                            </table>
125
                            </table>
150
                            <fieldset class="action">
126
                                [% IF ( print ) %]<input type="button" class="btn btn-sm" id="print" onclick="Xport()" value="Export selected" />[% END %]
151
                                <input type="button" id="edit" onclick="Edit()" value="Edit" />
152
                                <input type="button" id="delete" onclick="DeleteConfirm()" value="Delete" />
153
                                [% IF ( print ) %]<input type="button" id="print" onclick="Xport()" value="Export" />[% END %]
154
                            </fieldset>
127
                            </fieldset>
155
                            </form>
128
                            </form>
156
                            [% ELSE %]
129
                            [% ELSE %]
(-)a/labels/label-edit-batch.pl (+1 lines)
Lines 52-57 my $display_columns = [ {_label_number => {label => 'Label Number', link_field Link Here
52
                        {_summary       => {label => 'Summary', link_field => 0}},
52
                        {_summary       => {label => 'Summary', link_field => 0}},
53
                        {_item_type     => {label => 'Item Type', link_field => 0}},
53
                        {_item_type     => {label => 'Item Type', link_field => 0}},
54
                        {_barcode       => {label => 'Barcode', link_field => 0}},
54
                        {_barcode       => {label => 'Barcode', link_field => 0}},
55
                        {_delete        => {label => ' ', link_field => 0}},
55
                        {select         => {label => 'Select', value => '_label_id'}},
56
                        {select         => {label => 'Select', value => '_label_id'}},
56
                      ];
57
                      ];
57
my $op = $cgi->param('op') || 'edit';
58
my $op = $cgi->param('op') || 'edit';
(-)a/labels/label-manage.pl (-8 / +11 lines)
Lines 49-70 my $display_columns = { layout => [ # db column => {col label Link Here
49
                                        {barcode_type    => {label => 'Barcode Type',   link_field      => 0}},
49
                                        {barcode_type    => {label => 'Barcode Type',   link_field      => 0}},
50
                                        {printing_type   => {label => 'Print Type',     link_field      => 0}},
50
                                        {printing_type   => {label => 'Print Type',     link_field      => 0}},
51
                                        {format_string   => {label => 'Fields to Print',link_field      => 0}},
51
                                        {format_string   => {label => 'Fields to Print',link_field      => 0}},
52
                                        {select          => {label => 'Select',         value           => 'layout_id'}},
52
                                        {select         => {label => 'Actions',         value           => 'layout_id'}},
53
                                    ],
53
                                    ],
54
                        template => [   {template_id     => {label => 'Template ID',    link_field      => 0}},
54
                        template => [
55
                                        {template_id     => {label => 'Template ID',    link_field      => 0}},
55
                                        {template_code   => {label => 'Template Name',  link_field      => 0}},
56
                                        {template_code   => {label => 'Template Name',  link_field      => 0}},
56
                                        {template_desc   => {label => 'Description',    link_field      => 0}},
57
                                        {template_desc   => {label => 'Description',    link_field      => 0}},
57
                                        {select          => {label => 'Select',         value           => 'template_id'}},
58
                                        {select         => {label => 'Actions',         value           => 'template_id'}},
58
                                    ],
59
                                    ],
59
                        profile =>  [   {profile_id      => {label => 'Profile ID',     link_field      => 0}},
60
                        profile =>  [
61
                                        {profile_id      => {label => 'Profile ID',     link_field      => 0}},
60
                                        {printer_name    => {label => 'Printer Name',   link_field      => 0}},
62
                                        {printer_name    => {label => 'Printer Name',   link_field      => 0}},
61
                                        {paper_bin       => {label => 'Paper Bin',      link_field      => 0}},
63
                                        {paper_bin       => {label => 'Paper Bin',      link_field      => 0}},
62
                                        {_template_code  => {label => 'Template Name',  link_field      => 0}},     # this display column does not have a corrisponding db column in the profile table, hence the underscore
64
                                        {_template_code  => {label => 'Template Name',  link_field      => 0}},     # this display column does not have a corrisponding db column in the profile table, hence the underscore
63
                                        {select          => {label => 'Select',         value           => 'profile_id'}},
65
                                        {select          => {label => 'Actions',         value           => 'profile_id'}},
64
                                    ],
66
                                    ],
65
                        batch =>    [   {batch_id        => {label => 'Batch ID',       link_field      => 0}},
67
                        batch =>    [
68
                                        {batch_id        => {label => 'Batch ID',       link_field      => 0}},
66
                                        {_item_count     => {label => 'Item Count',     link_field      => 0}},
69
                                        {_item_count     => {label => 'Item Count',     link_field      => 0}},
67
                                        {select          => {label => 'Select',         value           => 'batch_id'}},
70
                                        {select          => {label => 'Actions',         value           => 'batch_id'}},
71
                                        {select1         => {label => ' ',           link_field       => 'batch_id'}},
68
                                    ],
72
                                    ],
69
};
73
};
70
74
71
- 

Return to bug 14667