Koha/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt
Liz Rea fa99f75bdc Bug 14667: UI/UX improvements for the Label creator
Note: It would be good to adopt these same changes in the Patron Card creator for consistency and push
      them in conjunction with these changes. -Chris_n

Reasoning

Librarians will be doing label things in the following frequencies, from most frequent to least frequent:
1. Creating new label batches - every day/every few days
2. Managing existing label batches - every day/every few days
3. Managing existing label layouts - as needed, infrequent
5. Managing existing label templates - as needed, infrequent
6. Creating new label layouts - as needed, infrequent
7. Creating new label templates - as needed, infrequent
8. Managing existing printer profiles - possibly once only!
9. Creating new printer profiles - possibly once only!

This change to the label creator aims to make the most frequently used items easily accessible at the top of the main area,
reduces clutter on the page, and makes the label creator fall in line with UI paradigms found elsewhere in Koha.

To test:

Open the label creator: More -> Tools -> Label creator
Note that the toolbar has changed. It should be consistent across all of the label creator (it is an include).

+ New menu:

Label batch
1. make sure it looks ok - toolbar buttons are consistent at the top of the main block.
2. add items both by barcode, and by search (note this patch does not touch the pop up window. Another day.)
3. note that the usual buttons have moved below the textarea, and now have icons.
4. delete and export single items using the buttons corresponding to each item
5. select multiple and use the buttons above the table to remove and export selected items
6. export a full batch
7. deduplicate a batch
There should be no regressions in functionality.

Layout
1. This menu item should take you directly to the "Edit layout" screen.
2. no functional changes here.
3. note toolbar at top is consistent

Label template
1. this menu item should take you directly to the "Edit label template" page.
2. no functional changes here.
3. note toolbar at top is consistent.

Printer profile
1. this menu item should take you directly to the "Edit printer profile" page.
2. no functional changes here.
3. note toolbar at top is consistent.

+ Manage menu:

Label batches
1. This menu item should take you directly to the "currently available batches" page.
2. select a batch to edit using the buttons
3. select a batch to delete using the buttons - it should ask for confirm.
4. select several batches using the tickboxes, and select Export selected. Batches should be exported as normal.
5. note toolbar at top is consistent.

Layouts
1. This menu item should take you directly to the "currently available layouts" page.
2. select a layout to edit using the buttons
3. select a layout to delete using the buttons
4. note toolbar at top is consistent.

Label templates
1. This menu item should take you directly to the "currently available templates" page.
2. select a template to edit using the buttons
3. select a template to delete using the buttons
4. note toolbar at top is consistent.

Printer profiles
1. This menu item should take you directly to the "currently available profiles" page.
2. select a profile to edit using the buttons
3. select a profile to delete using the buttons
4. note toolbar at top is consistent

+ General
* note that sidebar now only has "labels home" instead of the full "manage" list. It seemed redundant with the toolbar tidied up.

Please note that I am happy to take suggestions/amendments to these changes.

Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:22:55 -03:00

149 lines
7.8 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Tools &rsaquo; Labels &rsaquo; Manage label elements</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'greybox.inc' %]
<script type="text/javascript">
//<![CDATA[
function Xport() {
batches= new Array;
if(document.layouts.action.length > 0) {
for (var i=0; i < document.layouts.action.length; i++) {
if (document.layouts.action[i].checked) {
batches.push("batch_id=" + document.layouts.action[i].value);
}
}
if (batches.length < 1) {
alert(_("Please select at least one batch to export."));
return; // no batch selected
}
getstr = batches.join("&");
}
else if (document.layouts.action.checked) {
getstr = "batch_id="+document.layouts.action.value;
}
else {
alert(_("Please select at least one batch to export."));
return; // no batch selected
}
return GB_showCenter('Export Labels', "/cgi-bin/koha/labels/label-print.pl?" + getstr, 700, 800);
};
function selected_layout(op) {
var selected = new Array;
if (document.layouts.action.length) {
for (i=0;i<document.layouts.action.length;i++){
if (document.layouts.action[i].checked){
selected.push(i);
}
};
if (selected.length == 1) {
return(document.layouts.action[selected[0]].value);
}
else {
alert(_("Please select only one %s to %s.").format("[% label_element %]", op));
return (-1);
}
}
else {
if (document.layouts.action.checked){
return(document.layouts.action.value);
}
};
alert(_("Please select a %s.").format("[% label_element %]"));
return (-1);
};
//]]>
</script>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript" id="js">
$(document).ready(function() {
$("#labels-table").dataTable($.extend(true, {}, dataTablesDefaults, {
"sPaginationType": "four_button",
"aaSorting": [[ 1, "asc" ]],
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
]
}));
});
</script>
</head>
<body id="labels_label-manage" class="tools labels">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Labels home</a> &rsaquo;
Manage label [% label_element_title %]
</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% INCLUDE 'labels-toolbar.inc' %]
<div class="yui-gc">
<div class="yui-u first" id="manage-label-layouts">
<div class="hint">Current library: [% LoginBranchname %]</div>
[% IF ( table_loop ) %]
<form name="layouts" action="/cgi-bin/koha/label-manage.pl?label_element=[% label_element %]">
[% IF ( label_element == 'layout' ) %]
<h2>Currently available layouts</h2>
[% ELSIF ( label_element == 'template' ) %]
<h2>Currently available templates</h2>
[% ELSIF ( label_element == 'profile' ) %]
<h2>Currently available profiles</h2>
[% ELSIF ( label_element == 'batch' ) %]
<h2>Currently available batches</h2>
[% END %]
<table id="labels-table">
[% FOREACH table_loo IN table_loop %]
[% IF ( table_loo.header_fields ) %]
<thead>
<tr>
[% FOREACH header_field IN table_loo.header_fields %]
<th>[% header_field.field_label %]</th>
[% END %]
</tr>
</thead>
[% ELSE %]
<tr>
[% FOREACH text_field IN table_loo.text_fields %]
[% IF ( text_field.select_field ) %]
<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>
[% IF label_element == 'batch' %] <td align="center"><input type="checkbox" name="action" value="[% text_field.field_value %]" /></td>[% END %]
[% ELSIF ( text_field.field_value ) %]
<td>[% text_field.field_value %]</td>
[% ELSE %]
<td>&nbsp;</td>
[% END %]
[% END %]
</tr>
[% END %]
[% END %]
</table>
[% IF ( print ) %]<input type="button" class="btn btn-sm" id="print" onclick="Xport()" value="Export selected" />[% END %]
</fieldset>
</form>
[% ELSE %]
<div class="dialog message">
<h4>There are no [% label_element_title %] currently available.</h4>
<p>Use the toolbar above to create a new [% label_element %].</p></div>
[% END %]
</div>
[% IF ( error ) %]
<div class="yui-u">
<div class="dialog alert">
<strong>WARNING:</strong> An error was encountered and the [% op %] operation for [% label_element %] [% element_id %] was not completed. Please have your system administrator check the error log for details.
</div>
</div>
[% END %]
</div>
</div>
</div>
<div class="yui-b">
[% INCLUDE 'labels-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]