[10/40] Work on Label Tool Homepage.
This commit is contained in:
parent
e12ae1892c
commit
b44db285a6
|
|
@ -534,7 +534,7 @@ fieldset.rows fieldset {
|
|||
}
|
||||
|
||||
.yui-u fieldset.rows label, .yui-u fieldset.rows span.label {
|
||||
width: 6em;
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.yui-u fieldset.rows div.hint {
|
||||
|
|
@ -806,7 +806,7 @@ fieldset.rows .inputnote {
|
|||
background-repeat : no-repeat;
|
||||
}
|
||||
|
||||
#editpatron a, #editmenuc .first-child, #editshelf a, #edit a, #editsupplier a {
|
||||
#editpatron a, #editmenuc .first-child, #editshelf a, #edit a, #editsupplier a, #managelabel a, #managetemplate a, #managelabelbatch a, #manageprofile a {
|
||||
padding-left : 34px;
|
||||
background-image: url("../../img/toolbar-edit.gif");
|
||||
background-position : center left;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// prepare DOM for YUI Toolbar
|
||||
$(document).ready(function() {
|
||||
yuiToolbar();
|
||||
});
|
||||
// YUI Toolbar Functions
|
||||
function yuiToolbar() {
|
||||
new YAHOO.widget.Button("newlabel");
|
||||
new YAHOO.widget.Button("newtemplate");
|
||||
new YAHOO.widget.Button("newprofile");
|
||||
new YAHOO.widget.Button("newlabelbatch");
|
||||
new YAHOO.widget.Button("managelabel");
|
||||
new YAHOO.widget.Button("managetemplate");
|
||||
new YAHOO.widget.Button("manageprofile");
|
||||
new YAHOO.widget.Button("managelabelbatch");
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div id="toolbar">
|
||||
<ul class="toolbar">
|
||||
<li><a id="newlabel" href="/cgi-bin/koha/labels/label-edit-layout.pl">New Layout</a></li>
|
||||
<li><a id="newtemplate" href="/cgi-bin/koha/labels/label-create-template.pl?op=blank">New Template</a></li>
|
||||
<li><a id="newprofile" href="/cgi-bin/koha/labels/label-create-profile.pl?op=blank">New Profile</a></li>
|
||||
<li><a id="newlabelbatch" href="/cgi-bin/koha/labels/label-manager.pl?op=add_batch&type=labels">New Batch</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="toolbar">
|
||||
<ul class="toolbar">
|
||||
<li><a id="managelabel" href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage Layouts</a></li>
|
||||
<li><a id="managetemplate" href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Manage Templates</a></li>
|
||||
<li><a id="manageprofile" href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Manage Profiles</a></li>
|
||||
<li><a id="managelabelbatch" href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Manage Batches</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<div id="navmenu"><ul id="navmenulist">
|
||||
<li><a href="/cgi-bin/koha/labels/label-home.pl">Labels Home</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-layout.pl">Layouts</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-templates.pl">Templates</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-profiles.pl">Printer Profiles</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=layout">Manage Layouts</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=template">Manage Templates</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-manage.pl?label_element=profile">Manage Printer Profiles</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-manager.pl?type=labels">Manage Label Batches</a></li>
|
||||
<li><a href="/cgi-bin/koha/labels/label-manager.pl?type=patroncards">Manage Patron Card Batches</a></li>
|
||||
<!-- <li><a href="/cgi-bin/koha/labels/label-manager.pl?type=patroncards">Manage Patron Card Batches</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,78 +1,19 @@
|
|||
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><title>Koha › Tools › Labels</title>
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
||||
</head>
|
||||
<body>
|
||||
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
|
||||
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Labels</div>
|
||||
|
||||
<div id="doc3" class="yui-t2">
|
||||
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
|
||||
<!-- TMPL_INCLUDE NAME="tools-labels-toolbar.inc" -->
|
||||
|
||||
<!-- TMPL_IF NAME="layout_loop" -->
|
||||
<div class="yui-gc">
|
||||
<div class="yui-u first">
|
||||
<form name="input" action="/cgi-bin/koha/labels/label-manager.pl" method="get">
|
||||
<h2>Set Active Layout</h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Layout</th>
|
||||
<th>Barcode Type</th>
|
||||
<th>Print Type</th>
|
||||
<th>Fields to Print</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
<th>Active</th>
|
||||
</tr>
|
||||
<!-- TMPL_LOOP NAME="layout_loop" -->
|
||||
<tr>
|
||||
<td><!-- TMPL_VAR NAME="layoutname" --> </td>
|
||||
<td> <!-- TMPL_VAR NAME="barcodetype" --> </td>
|
||||
<td> <!-- TMPL_VAR NAME="printingtype" --> </td>
|
||||
|
||||
<td>
|
||||
<!-- TMPL_VAR NAME="fieldlist" -->
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/labels/label-edit-layout.pl?layout_id=<!-- TMPL_VAR NAME="id" -->">Edit</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/cgi-bin/koha/labels/label-home.pl?op=delete_layout&layout_id=<!-- TMPL_VAR NAME="id"-->">Delete</a>
|
||||
</td>
|
||||
<td> <!-- TMPL_IF NAME="active" -->
|
||||
<input type="radio" name="layout_id" value="<!-- TMPL_VAR NAME="id" -->" checked="checked" />
|
||||
<!-- TMPL_ELSE -->
|
||||
<input type="radio" name="layout_id" value="<!-- TMPL_VAR NAME="id" -->" />
|
||||
<!-- /TMPL_IF -->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- /TMPL_LOOP -->
|
||||
|
||||
</table>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Save" />
|
||||
<input type="hidden" name="op" value="set_active_layout" /></fieldset>
|
||||
</form></div>
|
||||
<div class="yui-u">
|
||||
<!-- TMPL_INCLUDE NAME="label-status.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_ELSE -->
|
||||
<!-- TMPL_INCLUDE NAME="label-status.inc" -->
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
||||
<!-- TMPL_INCLUDE NAME="cat-search.inc" -->
|
||||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › Labels</div>
|
||||
<div id="doc3" class="yui-t2">
|
||||
<div id="bd">
|
||||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-home-toolbar.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="yui-b">
|
||||
<!-- TMPL_INCLUDE NAME="labels-menu.inc" -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
|
||||
|
|
|
|||
|
|
@ -4,18 +4,14 @@ use strict;
|
|||
use CGI;
|
||||
use C4::Auth;
|
||||
use C4::Output;
|
||||
use C4::Labels;
|
||||
use C4::Output;
|
||||
use C4::Context;
|
||||
use HTML::Template::Pro;
|
||||
|
||||
# use Smart::Comments;
|
||||
|
||||
my $query = new CGI;
|
||||
my $cgi = new CGI;
|
||||
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
||||
{
|
||||
template_name => "labels/label-home.tmpl",
|
||||
query => $query,
|
||||
query => $cgi,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { catalogue => 1 },
|
||||
|
|
@ -23,64 +19,4 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
}
|
||||
);
|
||||
|
||||
# little block for displaying active layout/template/batch in templates
|
||||
# ----------
|
||||
my $batch_id = $query->param('batch_id');
|
||||
my $active_layout = get_active_layout();
|
||||
my $active_template = GetActiveLabelTemplate();
|
||||
my $active_layout_name = $active_layout->{'layoutname'};
|
||||
my $active_template_name = $active_template->{'tmpl_code'};
|
||||
# ----------
|
||||
|
||||
my $data = get_label_options();
|
||||
my $op = $query->param('op');
|
||||
my $layout_id = $query->param('layout_id');
|
||||
|
||||
my @label_templates = GetAllLabelTemplates();
|
||||
my @printingtypes = get_printingtypes();
|
||||
my @layouts = get_layouts();
|
||||
my @barcode_types = get_barcode_types();
|
||||
#my @batches = get_batches(); #This is not used afaics -fbcit
|
||||
|
||||
if ($op eq 'delete_layout') { # had been assignment! serious error!
|
||||
delete_layout($layout_id);
|
||||
}
|
||||
|
||||
### $data
|
||||
|
||||
$template->param( guidebox => 1 ) if ( $data->{'guidebox'} );
|
||||
$template->param( "papertype_$data->{'papertype'}" => 1 );
|
||||
$template->param( "$data->{'barcodetype'}_checked" => 1 );
|
||||
$template->param( "startrow" . $data->{'startrow'} . "_checked" => 1 );
|
||||
$template->param(
|
||||
op => $op,
|
||||
active_layout_name => $active_layout_name,
|
||||
active_template_name => $active_template_name,
|
||||
|
||||
label_templates => \@label_templates,
|
||||
barcode_types => \@barcode_types,
|
||||
printingtypes => \@printingtypes,
|
||||
layout_loop => \@layouts,
|
||||
|
||||
#batches => \@batches, #This is not used afaics -fbcit
|
||||
id => $data->{'id'},
|
||||
barcodetype => $data->{'barcodetype'},
|
||||
papertype => $data->{'papertype'},
|
||||
|
||||
tx_author => $data->{'author'},
|
||||
tx_barcode => $data->{'barcode'},
|
||||
tx_title => $data->{'title'},
|
||||
tx_isbn => $data->{'isbn'},
|
||||
tx_issn => $data->{'issn'},
|
||||
tx_itemtype => $data->{'itemtype'},
|
||||
tx_dewey => $data->{'dewey'},
|
||||
tx_class => $data->{'class'},
|
||||
tx_subclass => $data->{'subclass'},
|
||||
tx_itemcallnumber => $data->{'itemcallnumber'},
|
||||
|
||||
startlabel => $data->{'startlabel'},
|
||||
fontsize => $active_template->{'fontsize'},
|
||||
|
||||
);
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
output_html_with_http_headers $cgi, $cookie, $template->output;
|
||||
|
|
|
|||
Loading…
Reference in New Issue