Owen Leonard
679fdaebb1
This patch makes many changes to templates and JavaScript related to the integration of Mana with serials reports: - Many incorrect uses of the raw filter with html - Corrections to Bootstrap modal markup - Untranslatable strings moved out of JavaScript - Removed markup and JavaScript related to reports comments, a feature which doesn't exist in this version. New include file: mana/mana-comment-status.inc This file contains hidden-by-default messages which are shown during the process of submitting a comment on a subscription. New include file: mana/mana-share-report.inc This file contains the "Share report" modal markup formerly in guided_reports_start.tt New JavaScript file: mana.js Previously mana.inc, an include file containing only JavaScript which didn't include any template processing. Changed: mana/mana-report-search-result.inc This include file is now a full template so that jQuery's load() function can be used to pull its contents into the reports search modal. Changed: svc/mana/search This script was returning json-encoded HTML. Now it returns regular HTML. To test you must have Mana configured and enabled. Apply the patch and go to Reports -> Saved reports. - Choose New report -> New SQL from Mana. A "Mana search" modal should appear. - Perform a search which will return results, e.g. "circulation." - A "Loading" indicator should appear while the results are being retrieved. It should disappear when results appear. - Results should appear in the DataTable with sorting, paging, and search options. - In the "Notes" column, notes longer than 200 characters should be truncated with a "Show more" link. Clicking it should expand the comment and reveal a "Show less" link in its place. - Click the "Import" button (previously "Use"). The button icon should change to a loading indicator. - When the import is complete you should be redirected to a view of your new report. Go to Serials and click the "Search on Mana" link in the sidebar. - Perform a search for a serial - Results should appear in a DataTable with sorting, paging, and search options. - Sorting by title should ignore articles "a," "an," and "the." Create a new subscription or edit an existing subscription which will match a record in Mana. - On the second step of adding/editing the subscription a message should appear at the top of the form, "Searching for subscription in Mana Knowledge Base," with a loading icon. - When searching has completed a "Show Mana results" link should appear. - Clicking the link should trigger a modal showing search results which match your subscription, displayed in a DataTable with sorting, paging, and search options. - The last column of the table should contain "Import" and "Report" buttons. - Clicking the "Report" button should trigger a menu. Any existing comments will be listed as well as a "New comment" item. - Clicking an existing comment should cause the menu to close and a "Submitting comment" message to appear. It should be shortly replaced with a "Your comment has been submitted" message. - Clicking "New comment" should reveal a comment form. - It should not be possible to submit an empty comment. - Clicking the "cancel" link should redisplay the search results. - Submitting a new comment should trigger a "Submitting comment" message followed by a "Your comment has been submitted" message. - In the table of search results, click the "Import" button (previously "Use"). The button icon should change to a loading indicator. - The modal should close and the data from Mana should be loaded into the subscription entry form. View the detail page of a subscription which has saved with Mana data. - There should be a "Report mistake" button in the toolbar. Clicking it should reveal a menu of comments like the one you saw previously. - Clicking an existing comment should cause the menu to close and a "Submitting comment" message to appear. It should be shortly replaced with a "Your comment has been submitted" message. - Clicking "New comment" should reveal a comment form modal. - It should not be possible to submit an empty comment. - Clicking the "cancel" link should hide the modal. - Submitting a new comment should trigger a "Submitting comment" message followed by a "Your comment has been submitted" message. Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
543 lines
40 KiB
Text
543 lines
40 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% USE Koha %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Serials › [% IF ( modify ) %][% bibliotitle | html %] › Modify subscription[% ELSE %]New subscription[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% Asset.css("css/datatables.css") | $raw %]
|
|
<style>
|
|
fieldset.rows li.radio { width: 100%; } /* override staff-global.css */
|
|
#mana_comment_errortext { font-weight: bold; font-family: monospace;}
|
|
/* Prevents Bootstrap menus from being hidden inside modal */
|
|
#mana_search_result .modal { overflow: visible; }
|
|
#mana_search_result .modal-body { overflow-y: visible; }
|
|
</style>
|
|
</head>
|
|
|
|
<body id="ser_subscription-add" class="ser">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'serials-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
› <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
|
|
[% UNLESS blocking_error %]
|
|
› [% IF ( modify ) %]<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscriptionid | uri %]"><i>[% bibliotitle | html %]</i></a> › Modify subscription[% ELSE %]New subscription[% END %]
|
|
[% END %]
|
|
</div>
|
|
[% INCLUDE 'blocking_errors.inc' %]
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle | html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1>
|
|
</div>
|
|
<form method="post" id="subscription_add_form" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated">
|
|
[% IF ( modify ) %]
|
|
<input type="hidden" name="op" value="modsubscription" />
|
|
<input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
|
|
[% ELSE %]
|
|
<input type="hidden" name="op" value="addsubscription" />
|
|
[% END %]
|
|
<input type="hidden" name="user" value="[% logged_in_user.userid | html %]" />
|
|
<input type="hidden" name="irreg_check" value="0" />
|
|
|
|
<div id="page_1">
|
|
<div class="col-md-6">
|
|
<fieldset id="subscription_add_information" class="rows">
|
|
<legend>Subscription details</legend>
|
|
<ol>
|
|
[% IF ( subscriptionid ) %]
|
|
<li><span class="label">Subscription #</span> [% subscriptionid | html %]</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="aqbooksellerid">Vendor: </label>
|
|
<input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid | html %]" size="8" /> (<input type="text" name="aqbooksellername" id="aqbooksellername" value="[% aqbooksellername | html %]" disabled="disabled" readonly="readonly" />) <a href="#" id="vendor_search"><i class="fa fa-search"></i> Search for a vendor</a>
|
|
</li>
|
|
<li>
|
|
<label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label>
|
|
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum | html %]" size="8" />
|
|
(<input type="text" name="title" value="[% bibliotitle | html %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
|
|
<div class="inputnote"> <a href="#" id="record_search"><i class="fa fa-search"></i> Search for record</a>
|
|
[% IF ( CAN_user_editcatalogue ) %]
|
|
[% IF ( modify ) %]
|
|
| <a href="#" id="biblio_add_edit" data-biblionumber="[% bibnum | html %]"><i class="fa fa-pencil"></i> Edit record</a>
|
|
[% ELSE %]
|
|
| <a href="#" id="biblio_add_edit"><i class="fa fa-plus"></i> Create record</a>
|
|
[% END %]
|
|
[% END %]
|
|
</div>
|
|
</li>
|
|
<li class="radio">
|
|
[% IF ( serialsadditems ) %]
|
|
<p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1" checked="checked" /><label class="widelabel" for="serialsadditems-yes">create an item record when receiving this serial</label></p>
|
|
<p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial </label></p>
|
|
[% ELSE %]
|
|
<p><input type="radio" id="serialsadditems-yes" name="serialsadditems" value="1"/><label class="widelabel" for="serialsadditems-yes">create an item record when receiving this serial</label></p>
|
|
<p><input type="radio" id="serialsadditems-no" name="serialsadditems" value="0" checked="checked" /><label class="widelabel" for="serialsadditems-no">do not create an item record when receiving this serial</label></p>
|
|
[% END %]
|
|
</li>
|
|
<li class="radio">
|
|
<p>When there is an irregular issue:</p>
|
|
[% IF (skip_serialseq) %]
|
|
<p>
|
|
<input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" checked="checked" />
|
|
<label for="skip_serialseq_yes">Skip issue number</label>
|
|
</p>
|
|
<p>
|
|
<input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" />
|
|
<label for="skip_serialseq_no">Keep issue number</label>
|
|
</p>
|
|
[% ELSE %]
|
|
<p>
|
|
<input type="radio" id="skip_serialseq_yes" name="skip_serialseq" value="1" />
|
|
<label for="skip_serialseq_yes">Skip issue number</label>
|
|
</p>
|
|
<p>
|
|
<input type="radio" id="skip_serialseq_no" name="skip_serialseq" value="0" checked="checked" />
|
|
<label for="skip_serialseq_no">Keep issue number</label>
|
|
</p>
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="manualhistory">Manual history:</label>
|
|
[% IF (manualhistory) %]
|
|
<input type="checkbox" id="manualhistory" name="manualhist" checked="checked" />
|
|
[% ELSE %]
|
|
<input type="checkbox" id="manualhistory" name="manualhist" />
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="callnumber">Call number:</label>
|
|
<input type="text" name="callnumber" id="callnumber" value="[% callnumber | html %]" size="20" />
|
|
</li>
|
|
<li>
|
|
<label for="branchcode">Library:</label>
|
|
<select name="branchcode" id="branchcode" style="width: 20em;">
|
|
[% UNLESS ( Independentbranches ) %]
|
|
<option value="">None</option>
|
|
[% END %]
|
|
[% IF CAN_user_serials_superserials %]
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1 ) %]
|
|
[% ELSE %]
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode ) %]
|
|
[% END %]
|
|
</select> (select a library)
|
|
</li>
|
|
<li>
|
|
<label for="notes">Public note:</label>
|
|
<textarea name="notes" id="notes" cols="30" rows="2">[% notes | html %]</textarea>
|
|
</li>
|
|
<li>
|
|
<label for="internalnotes">Nonpublic note:</label>
|
|
<textarea name="internalnotes" id="internalnotes" cols="30" rows="2">[% internalnotes | html %]</textarea>
|
|
</li>
|
|
<li>
|
|
[% IF ( letterloop ) %]
|
|
<label for="letter">Patron notification: </label>
|
|
<select name="letter" id="letter">
|
|
<option value="">None</option>
|
|
[% FOREACH letterloo IN letterloop %]
|
|
[% IF ( letterloo.selected ) %]
|
|
<option value="[% letterloo.value | html %]" selected="selected">[% letterloo.lettername | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% letterloo.value | html %]">[% letterloo.lettername | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<div class="hint">Selecting a notice will allow patrons to subscribe to notifications when a new issue is received.</div>
|
|
[% ELSE %]
|
|
<span class="label">Patron notification: </span>
|
|
<div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div>
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="location">Location:</label>
|
|
<select name="location" id="location">
|
|
<option value="">None</option>
|
|
[% FOREACH locations_loo IN locations_loop %]
|
|
[% IF locations_loo.authorised_value == location %]
|
|
<option value="[% locations_loo.authorised_value | html %]" selected="selected">[% locations_loo.lib | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% locations_loo.authorised_value | html %]">[% locations_loo.lib | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="itemtype">Item type:</label>
|
|
<select name="itemtype" id="itemtype">
|
|
<option value=""></option>
|
|
[% FOREACH type IN typeloop %]
|
|
[% IF ( type.selected ) %]
|
|
<option value="[% type.code | html %]" selected="selected">[% type.value | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% type.code | html %]">[% type.value | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[%IF makePreviousSerialAvailable %]
|
|
<li>
|
|
<label for="previousitemtype">item type for older issues:</label>
|
|
<select name="previousitemtype" id="previousitemtype">
|
|
<option value=""></option>
|
|
[% FOREACH previous IN previoustypeloop %]
|
|
[% IF ( previous.selected ) %]
|
|
<option value="[% previous.code | html %]" selected="selected">[% previous.value | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% previous.code | html %]">[% previous.value | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="graceperiod">Grace period:</label>
|
|
<input type="text" name="graceperiod" id="graceperiod" value="[% graceperiod | html %]" size="5"/> day(s)
|
|
</li>
|
|
<li>
|
|
<label class="widelabel" for="staffdisplaycount">Number of issues to display to staff: </label>
|
|
<input type="text" name="staffdisplaycount" id="staffdisplaycount" value="[% staffdisplaycount | html %]" size="4"/>
|
|
</li>
|
|
<li>
|
|
<label class="widelabel" for="opacdisplaycount">Number of issues to display to the public: </label>
|
|
<input type="text" name="opacdisplaycount" id="opacdisplaycount" value="[% opacdisplaycount | html %]" size="4"/>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
<fieldset class="action">
|
|
<input type="button" value="Next >>" id="subscription_add_next" style="float:right;" />
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="page_2">
|
|
<div class="col-md-6">
|
|
[% IF ( Koha.Preference('Mana') == 1) && !mana_url %]
|
|
<fieldset>
|
|
<p><center>The Mana Knowledge Base can be used to import subscription patterns submitted by other libraries and save you extra work. Ask your system administrator to configure this service and complete the configuration, or remove this message by disabling the system preference
|
|
<a href=/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=request+to+mana+webservice>here</a></center></p>
|
|
</fieldset>
|
|
[% END %]
|
|
<div hidden id="mana_search" class="dialog message">
|
|
</div>
|
|
<div id="subscription_form_planning">
|
|
<fieldset class="rows">
|
|
<legend>Serials planning</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="acqui_date" class="required">First issue publication date:</label>
|
|
[% UNLESS (more_than_one_serial) %]
|
|
<input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
|
|
[% ELSE %]
|
|
[% firstacquidate | $KohaDates %]
|
|
<input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
|
|
[% END %]
|
|
</li>
|
|
[% IF (more_than_one_serial) %]
|
|
<li>
|
|
<label for="nextacquidate">Next issue publication date:</label>
|
|
<input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
|
|
</li>
|
|
[% END %]
|
|
<li>
|
|
<label for="frequency" class="required">Frequency:</label>
|
|
<select name="frequency" size="1" id="frequency" class="required" required="required">
|
|
<option value="">-- please choose --</option>
|
|
[% FOREACH frequency IN frequencies %]
|
|
[% IF (frequency.selected) %]
|
|
<option value="[% frequency.id | html %]" selected="selected">
|
|
[% ELSE %]
|
|
<option value="[% frequency.id | html %]">
|
|
[% END %]
|
|
[% frequency.label | html %]
|
|
</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="subtype">Subscription length:</label>
|
|
<select name="subtype" id="subtype">
|
|
[% FOREACH st IN subtypes %]
|
|
[% SWITCH st %]
|
|
[% CASE 'numberlength' %]
|
|
[% IF st == subtype %]
|
|
<option value="issues" selected="selected">
|
|
[% ELSE %]
|
|
<option value="issues">
|
|
[% END %]
|
|
issues
|
|
[% CASE 'weeklength' %]
|
|
[% IF st == subtype %]
|
|
<option value="weeks" selected="selected">
|
|
[% ELSE %]
|
|
<option value="weeks">
|
|
[% END %]
|
|
weeks
|
|
[% CASE 'monthlength' %]
|
|
[% IF st == subtype %]
|
|
<option value="months" selected="selected">
|
|
[% ELSE %]
|
|
<option value="months">
|
|
[% END %]
|
|
months
|
|
[% CASE %][% st | html %]
|
|
[% END %]
|
|
</option>
|
|
[% END %]
|
|
</select>
|
|
<input type="text" name="sublength" id="sublength" value="[% sublength | html %]" size="3" /> (enter amount in numerals)
|
|
<input type="hidden" name="issuelengthcount">
|
|
</li>
|
|
<li>
|
|
<label for="from" class="required"> Subscription start date:</label>
|
|
<input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
|
|
</li>
|
|
<li>
|
|
<label for="to">Subscription end date:</label>
|
|
<input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
|
|
</li>
|
|
<li>
|
|
<label for="numberpattern" class="required">Numbering pattern:</label>
|
|
<select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
|
|
<option value="">-- please choose --</option>
|
|
[% FOREACH numberpattern IN numberpatterns %]
|
|
[% IF (numberpattern.selected) %]
|
|
<option value="[% numberpattern.id | html %]" selected="selected">
|
|
[% ELSE %]
|
|
<option value="[% numberpattern.id | html %]">
|
|
[% END %]
|
|
[% numberpattern.label | html %]
|
|
</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label for="locale">Locale:</label>
|
|
<select id="locale" name="locale">
|
|
<option value=""></option>
|
|
[% FOREACH l IN locales %]
|
|
[% IF l.language == locale %]
|
|
<option value="[% l.language | html %]" selected="selected">[% l.description | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% l.language | html %]">[% l.description | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
<span class="hint">If empty, English is used</span>
|
|
</li>
|
|
<li id="more_options">
|
|
<table id="moreoptionst">
|
|
<thead>
|
|
<tr>
|
|
<th> </th>
|
|
<th id="headerX"> </th>
|
|
<th id="headerY"> </th>
|
|
<th id="headerZ"> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
[% IF (more_than_one_serial) %]
|
|
Last value
|
|
[% ELSE %]
|
|
Begins with
|
|
[% END %]
|
|
</td>
|
|
<td id="beginsX"><input type="text" id="lastvaluetemp1" name="lastvaluetemp1" value="[% lastvalue1 | html %]" /></td>
|
|
<td id="beginsY"><input type="text" id="lastvaluetemp2" name="lastvaluetemp2" value="[% lastvalue2 | html %]" /></td>
|
|
<td id="beginsZ"><input type="text" id="lastvaluetemp3" name="lastvaluetemp3" value="[% lastvalue3 | html %]" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Inner counter</td>
|
|
<td id="innerX"><input type="text" id="innerlooptemp1" name="innerlooptemp1" value="[% innerloop1 | html %]" /></td>
|
|
<td id="innerY"><input type="text" id="innerlooptemp2" name="innerlooptemp2" value="[% innerloop2 | html %]" /></td>
|
|
<td id="innerZ"><input type="text" id="innerlooptemp3" name="innerlooptemp3" value="[% innerloop3 | html %]" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
<li>
|
|
<a href="#" class="toggle_advanced_pattern show_advanced_pattern"><i class="fa fa-plus-square"></i> Show advanced pattern</a>
|
|
<a href="#" style="display:none;" class="toggle_advanced_pattern hide_advanced_pattern"><i class="fa fa-minus-square"></i> Hide advanced pattern</a>
|
|
</li>
|
|
<div id="advancedpredictionpattern" style="display:none">
|
|
<li>
|
|
<label for="patternname" class="required">Pattern name:</label>
|
|
<input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
|
|
</li>
|
|
<li>
|
|
<label for="numberingmethod">Numbering formula:</label>
|
|
<input readonly="readonly" type="text" name="numberingmethod" id="numberingmethod" size="50" value="[% numberingmethod | html %]" />
|
|
</li>
|
|
<table id="advancedpredictionpatternt">
|
|
<thead>
|
|
<tr>
|
|
<th colspan="4">Advanced prediction pattern</th>
|
|
</tr>
|
|
<tr>
|
|
<th> </th>
|
|
<th>X</th>
|
|
<th>Y</th>
|
|
<th>Z</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Label</td>
|
|
<td><input type="text" readonly="readonly" id="label1" name="label1" /></td>
|
|
<td><input type="text" readonly="readonly" id="label2" name="label2" /></td>
|
|
<td><input type="text" readonly="readonly" id="label3" name="label3" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Begins with</td>
|
|
<td><input type="text" readonly="readonly" id="lastvalue1" name="lastvalue1" /></td>
|
|
<td><input type="text" readonly="readonly" id="lastvalue2" name="lastvalue2" /></td>
|
|
<td><input type="text" readonly="readonly" id="lastvalue3" name="lastvalue3" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Add</td>
|
|
<td><input type="text" readonly="readonly" id="add1" name="add1" /></td>
|
|
<td><input type="text" readonly="readonly" id="add2" name="add2" /></td>
|
|
<td><input type="text" readonly="readonly" id="add3" name="add3" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Every</td>
|
|
<td><input type="text" readonly="readonly" id="every1" name="every1" /></td>
|
|
<td><input type="text" readonly="readonly" id="every2" name="every2" /></td>
|
|
<td><input type="text" readonly="readonly" id="every3" name="every3" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Set back to</td>
|
|
<td><input type="text" readonly="readonly" id="setto1" name="setto1" /></td>
|
|
<td><input type="text" readonly="readonly" id="setto2" name="setto2" /></td>
|
|
<td><input type="text" readonly="readonly" id="setto3" name="setto3" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>When more than</td>
|
|
<td><input type="text" readonly="readonly" id="whenmorethan1" name="whenmorethan1" /></td>
|
|
<td><input type="text" readonly="readonly" id="whenmorethan2" name="whenmorethan2" /></td>
|
|
<td><input type="text" readonly="readonly" id="whenmorethan3" name="whenmorethan3" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Inner counter</td>
|
|
<td><input type="text" readonly="readonly" id="innerloop1" name="innerloop1" /></td>
|
|
<td><input type="text" readonly="readonly" id="innerloop2" name="innerloop2" /></td>
|
|
<td><input type="text" readonly="readonly" id="innerloop3" name="innerloop3" /></td>
|
|
</tr>
|
|
<tr>
|
|
[% BLOCK numbering_select %]
|
|
<select disabled="disabled" id="[% name | html %]" name="[% name | html %]">
|
|
<option value=""></option>
|
|
<option value="dayname">Name of day</option>
|
|
<option value="dayabrv">Name of day (abbreviated)</option>
|
|
<option value="monthname">Name of month</option>
|
|
<option value="monthabrv">Name of month (abbreviated)</option>
|
|
<option value="season">Name of season</option>
|
|
<option value="seasonabrv">Name of season (abbreviated)</option>
|
|
</select>
|
|
[% END %]
|
|
<td>Formatting</td>
|
|
<td>[% PROCESS numbering_select name="numbering1" %]</td>
|
|
<td>[% PROCESS numbering_select name="numbering2" %]</td>
|
|
<td>[% PROCESS numbering_select name="numbering3" %]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<input id="modifyadvancedpatternbutton" type="button" value="Modify pattern" />
|
|
<input id="restoreadvancedpatternbutton" type="button" value="Cancel modifications" style="display:none" />
|
|
<input id="saveadvancedpatternbutton" type="button" value="Save as new pattern" style="display:none" />
|
|
</div>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
[% IF additional_fields %]
|
|
<div id="subscription_additional_fields">
|
|
[% INCLUDE 'additional-fields-entry.inc' available=additional_fields values=additional_field_values %]
|
|
</div>
|
|
[% END %]
|
|
|
|
<input type="hidden" id="mana_id" name="mana_id" value=""/>
|
|
<input type="hidden" id="sndescription" name="sndescription" value=""/>
|
|
<input type="hidden" id="sfdescription" name="sfdescription" value=""/>
|
|
<input type="hidden" id="unit" name="unit" value=""/>
|
|
<input type="hidden" id="unitsperissue" name="unitsperissue" value=""/>
|
|
<input type="hidden" id="issuesperunit" name="issuesperunit" value=""/>
|
|
<fieldset class="action">
|
|
<input type="button" id="subscription_add_previous" value="<< Previous" style="float:left;"/>
|
|
<input id="testpatternbutton" type="button" value="Test prediction pattern" />
|
|
<input id="save-subscription" type="submit" value="Save subscription" style="float:right;" accesskey="w"/>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<li id="displayexample"></li>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Mana Search Result Modal -->
|
|
<div class="modal" id="mana_search_result" tabindex="-1" role="dialog" aria-labelledby="mana_search_result_label">
|
|
<div class="modal-dialog modal-lg" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title" id="mana_search_result_label">Modal title</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% Asset.js("js/mana.js") | $raw %]
|
|
<script>
|
|
var subscriptionid = "[% subscriptionid | html %]";
|
|
var irregularity = "[% irregularity | html %]";
|
|
var more_than_one_serial = "[% more_than_one_serial | html %]";
|
|
var tags = [];
|
|
var interface = "[% interface | html %]";
|
|
var theme = "[% theme | html %]";
|
|
[% FOREACH field IN dont_export_field_loop %]
|
|
tags.push("[% field.fieldid | html %]");
|
|
[% END %]
|
|
var mana_enabled = [% IF (Koha.Preference('Mana') == 1 && mana_url) %]1[% ELSE %]0[% END %];
|
|
var MSG_LINK_TO_VENDOR = _("If you wish to claim late or missing issues you must link this subscription to a vendor. Click OK to ignore or Cancel to return and enter a vendor");
|
|
var MSG_LINK_BIBLIO = _("You must choose or create a bibliographic record");
|
|
var MSG_REQUIRED_SUB_LENGTH = _("You must choose a subscription length or an end date.");
|
|
var MSG_TEST_PREDICTION = _("Please click on 'Test prediction pattern' before saving subscription.");
|
|
var MSG_REQUIRED_PUB_DATE = _("You must choose a first publication date");
|
|
var MSG_SAVE_PREDICTION_PATTERN = _("You have modified the advanced prediction pattern. Please save your work or cancel modifications.");
|
|
var MSG_PATTERN_IRREG = _("Warning! Present pattern has planned irregularities. Click on 'Test prediction pattern' to check if it's still valid")
|
|
var MSG_PATTERN_NAME = _("Please enter a name for this pattern");
|
|
var MSG_PATTERN_NAME_EXISTS = _("This pattern name already exists. Do you want to modify it?");
|
|
var MSG_OVERWRITE_PATTERNS = _("Warning: This will modify the pattern for all subscriptions that are using it.");
|
|
var MSG_PATTERN_CREATE_FAILED = _("Something went wrong. Unable to create a new numbering pattern.");
|
|
var MSG_PATTERN_TEST_FAILED = _("Cannot test prediction pattern for the following reason(s): %s");
|
|
var MSG_FREQUENCY_UNDEFINED = _("Frequency is not defined");
|
|
var MSG_PUB_DATE_UNDEFINED = _("First publication date is not defined");
|
|
var MSG_NEXT_ISSUE_UNDEFINED = _("Next issue publication date is not defined");
|
|
var MSG_MANA_SEARCHING = _("Searching for subscription in Mana Knowledge Base");
|
|
var MSG_MANA_RESULTS = _("Results from Mana Knowledge Base");
|
|
var MSG_MANA_SUBSCRIPTION_FOUND = _("Subscription found on Mana Knowledge Base:");
|
|
var MSG_MANA_SHOW_DETAILS = _("Show Mana results");
|
|
var MSG_MANA_NO_SUBSCRIPTION_FOUND = _("No subscription found on Mana Knowledge Base");
|
|
var MSG_MANA_SHARE_PATTERN = _("Please feel free to share your pattern with all others librarians once you are done");
|
|
</script>
|
|
[% Asset.js("js/subscription-add.js") | $raw %]
|
|
[% Asset.js("js/showpredictionpattern.js") | $raw %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|