Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt
Owen Leonard 81c90ba3bf Bug 8913 [Revised] Improve acquisitions navigation
This patch adds a new menu for vendor-related pages in which
vendor related "views" can be linked to: baskets, basket groups,
contracts, invoices, uncertain prices.

The acquisitions toolbar is pared down to vendor-related actions:
New basket, contract, or vendor; edit vendor, delete vendor,
receive shipment.

Other small improvements have been made to other pages: corrections
to breadcrumbs and title tags, adding useful links betweeen pages.

Vendor menu and toolbar are added to booksellers.pl
when there is only one "search result" (i.e. a vendor id is passed).

- Menu appears when booksellerid variable is present
- Redundant heading removed
- Additional variables added to enable proper display of the toolbar

- Revision corrects broken links pointed out by QA.
- Revision adds check of existing baskets and subscriptions as a
  condition on display of the vendor delete button.

TODO: Add coverage of Basket groups page.

To test, navigate Acquisitions pages and test as many links and buttons
as you can, confirming that nothing is broken on vendor pages, invoice
pages, contract pages, uncertain price pages, etc.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

All tests pass - I like this very much!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Tests done:
1) New toolbar - vendor search
  - no results = button to create new vendor shows
  - 1 result = additional new options show
  - more than one result = button to create new vendor shows

2) Vendor views
  - acq toolbar consistent with 1 result in vendor search
  - new tabs on the left
  - checked all links have the needed parameters and work correctly

3) New toolbar - different pages
  - Toolbar is formatted consistently
  - Delete vendor shows only up when it should - no baskets or
    subscriptions
  - Links work correctly

Works nicely, great groundwork for further improvements.

TODO Add new toolbar to (new) invoices page.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-20 09:17:21 -05:00

147 lines
6.3 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Acquisitions &rsaquo;
[% IF ( add_form ) %]
[% IF ( basketno ) %]Edit basket '[% basketname %]'
[% ELSE %]Add a basket to [% booksellername %]
[% END %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
<script type="text/javascript">
//<![CDATA[
// to check if the data are correctly entered.
function Check(ff) {
var ok=0;
var _alertString="Form not submitted because of the following problem(s)";
_alertString +="\n-------------------------------------------------------------------\n\n";
if (!(isNotNull(ff.basketname,0))){
ok=1;
_alertString += "- name missing\n";
}
if (ok) { // if there is a problem
alert(_alertString);
return false;
}
// if all is good
ff.submit();
}
//]]>
</script>
</head>
<body id="acq_basketheader" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo;
[% IF ( add_form ) %]
[% IF ( basketno ) %]Edit basket '[% basketname %]'
[% ELSE %]Add a basket to [% booksellername %]
[% END %]
[% END %]
</div>
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
[% IF ( add_form ) %]
[% IF ( basketno ) %]
<h1>Edit basket [% basketname %]</h1>
[% ELSE %]<h1>Add a basket to [% booksellername %]</h1>
[% END %]
<form name="Aform" action="[% script_name %]" method="post">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<fieldset class="rows">
<ol>
[% IF ( basketno ) %]
<li>
<input type="hidden" name="basketno" value="[% basketno %]" />
<input type="hidden" name="is_an_edit" value="1" />
</li>
[% END %]
<li>
<label for="basketname" class="required">Basket name</label> &nbsp;
<input type="text" name="basketname" id="basketname" size="40" maxlength="80" value="[% basketname %]" />
</li>
<li>
<label for="billingplace">Billing place:</label>
<select name="billingplace" id="billingplace">
<option value="">--</option>
[% FOREACH billingplace IN billingplaceloop %]
[% IF ( billingplace.selected ) %]
<option value="[% billingplace.value %]" selected="selected">
[% ELSE %]
<option value="[% billingplace.value %]">
[% END %]
[% billingplace.branchname %]
</option>
[% END %]
</select>
</li>
<li>
<label for="deliveryplace">Delivery place:</label>
<select name="deliveryplace" id="deliveryplace">
<option value="">--</option>
[% FOREACH deliveryplace IN deliveryplaceloop %]
[% IF ( deliveryplace.selected ) %]
<option value="[% deliveryplace.value %]" selected="selected">
[% ELSE %]
<option value="[% deliveryplace.value %]">
[% END %]
[% deliveryplace.branchname %]
</option>
[% END %]
</select>
</li>
<li>
<label for="basketbooksellerid">Vendor</label> &nbsp;
<select name="basketbooksellerid" id="basketbooksellerid">
[% FOREACH b IN booksellers %]
[% IF booksellerid == b.id %]
<option value="[% b.id %]" selected="selected">[% b.name %]</option>
[% ELSE %]
<option value="[% b.id %]">[% b.name %]</option>
[% END %]
[% END %]
</select>
</li>
<li>
<label for="basketnote">Internal note</label> &nbsp;
<textarea name="basketnote" id="basketnote" rows="5" cols="40">[% basketnote %]</textarea>
</li>
<li>
<label for="basketbooksellernote">Vendor note</label> &nbsp;
<textarea name="basketbooksellernote" id="basketbooksellernote" rows="5" cols="40">[% basketbooksellernote %]</textarea>
</li>
[% IF ( contractloop ) %]
<li><label for="basketcontractnumber">Contract</label>
<select id="basketcontractnumber" name="basketcontractnumber">
<option value=""></option>
[% FOREACH contractloo IN contractloop %]
[% IF ( contractloo.selected ) %]
<option value="[% contractloo.contractnumber %]" selected="selected">[% contractloo.contractname %]</option>
[% ELSE %]
<option value="[% contractloo.contractnumber %]">[% contractloo.contractname %]</option>
[% END %]
[% END %]
</select>
</li>
[% END %]
</ol>
</fieldset>
<fieldset class="action">
<input type="hidden" name="op" value="add_validate" />
<input type="button" value="Save" onclick="Check(this.form);" />
<a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a>
</fieldset>
</form>
[% END %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]