3 [% USE AuthorisedValues %]
6 [% INCLUDE 'doc-head-open.inc' %]
8 [% IF op =='add_form' %]
9 [% IF issue.issue_id %]
13 [% END %] › [% ELSE %]
14 [% IF op == 'delete_confirm' %]
15 Confirm deletion of vendor issue › [% END %]
17 Vendor issue › Acquisition › Koha
19 [% INCLUDE 'doc-head-close.inc' %]
22 <body id="acq_supplier_issues" class="acq">
23 [% WRAPPER 'header.inc' %]
24 [% INCLUDE 'acquisitions-search.inc' %]
27 [% WRAPPER 'sub-header.inc' %]
28 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
31 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
34 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
37 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% vendor.id | uri %]">[% vendor.name | html %]</a>
41 <a href="#" aria-current="page">Issues</a>
45 <a href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% vendor.id | uri %]">Issues</a>
48 <a href="#" aria-current="page">
50 Issue #[% issue.issue_id| html %]
61 <div class="main container-fluid">
63 <div class="col-sm-10 col-sm-push-2">
66 [% FOR m IN messages %]
67 <div class="dialog [% m.type | html %]">
69 [% CASE 'error_on_update' %]
70 <span>An error occurred when updating this issue.</span>
71 [% CASE 'error_on_insert' %]
72 <span>An error occurred when adding this issue</span>
73 [% CASE 'error_on_delete' %]
74 <span>An error occurred when deleting this issue. Check the logs.</span>
75 [% CASE 'success_on_update' %]
76 <span>Issue updated successfully.</span>
77 [% CASE 'success_on_insert' %]
78 <span>Issue created successfully.</span>
79 [% CASE 'success_on_delete' %]
80 <span>Issue deleted successfully.</span>
82 <span>[% m.code | html %]</span>
87 [% IF op == 'add_form' %]
89 <h1>Modify a vendor issue</h1>
91 <h1>New vendor issue</h1>
94 <form action="/cgi-bin/koha/acqui/vendor_issues.pl" name="Aform" method="post" class="validated">
95 <input type="hidden" name="op" value="add_validate" />
96 <input type="hidden" name="booksellerid" value="[% vendor.id | html %]" />
97 <input type="hidden" name="issue_id" value="[% issue.issue_id| html %]" />
99 <fieldset class="rows">
102 <li><span class="label">Issue ID: </span>[% issue.issue_id | html %]</li>
105 <label for="issue_type">Type: </label>
106 [% PROCESS 'av-build-dropbox.inc' name="type", category="VENDOR_ISSUE_TYPE", default=issue.type, empty=1, size = 20 %]
109 <label for="started_on">Started on: </label>
110 <input type="text" size="10" id="from" name="started_on" value="[% issue.started_on| html %]" class="flatpickr" data-date_to="to" />
111 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
114 <label for="ended_on">Ended on: </label>
115 <input type="text" size="10" id="to" name="ended_on" value="[% issue.ended_on | html %]" class="flatpickr" />
116 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
119 <label for="notes">Notes: </label>
120 <textarea name="notes" id="notes" rows="3" cols="50">[% issue.notes | html %]</textarea>
125 <fieldset class="action">
126 <input type="submit" class="btn btn-primary" value="Submit" />
127 <a class="cancel" href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% vendor.id | uri %]">Cancel</a>
132 [% IF op == 'delete_confirm' %]
133 <div class="dialog alert">
134 <h1>Delete issue #[% issue.issue_id | html %]?<h1>
135 <form action="/cgi-bin/koha/acqui/vendor_issues.pl" method="post">
136 <input type="hidden" name="op" value="delete_confirmed" />
137 <input type="hidden" name="issue_id" value="[% issue.issue_id | html %]" />
138 <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete</button>
140 <form action="/cgi-bin/koha/acqui/vendor_issues.pl" method="get">
141 <input type="hidden" name="booksellerid" value="[% vendor.id | html %]" />
142 <button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button>
147 [% IF op == 'show' %]
148 <h1>Vendor issue #[% issue.issue_id | html %]</h1>
150 <fieldset class="rows">
153 <li><span class="label">Issue ID: </span>[% issue.issue_id | html %]</li>
156 <label for="issue_type">Type: </label>
157 [% AuthorisedValues.GetByCode( 'VENDOR_ISSUE_TYPE', issue.type, 0 ) | html %]
160 <label for="started_on">Started on: </label>
161 [% issue.started_on | $KohaDates %]
164 <label for="ended_on">Ended on: </label>
165 [% issue.ended_on | $KohaDates %]
168 <label for="notes">Notes: </label>
169 [% issue.notes | html %]
174 <fieldset class="action">
175 <a href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% vendor.id | uri %]">Back</a>
179 [% IF op == 'list' %]
181 <div id="toolbar" class="btn-toolbar">
182 <a class="btn btn-default" id="new_issue" href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% vendor.id | uri %]&op=add_form"><i class="fa fa-plus"></i> New issue</a>
185 <h1>Vendor issues</h1>
187 [% IF issues_count > 0 %]
188 <div class="page-section">
189 <div class="table_vendor_issues_table_controls"></div>
190 <table id="vendor_issues">
197 <th data-class-name="actions noExport">Actions</th>
201 </div><!-- /.page-section -->
203 <div class="dialog message">
204 There are no issues defined. <a href="/cgi-bin/koha/acqui/vendor_issues.pl?booksellerid=[% vendor.id | uri %]&op=add_form">Create a new issue</a>.
210 </div> <!-- /.col-sm-10.col-sm-push-2 -->
212 <div class="col-sm-2 col-sm-pull-10">
214 [% INCLUDE 'vendor-menu.inc' %]
216 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
217 </div> <!-- /.row -->
219 [% MACRO jsinclude BLOCK %]
220 [% Asset.js("js/acquisitions-menu.js") | $raw %]
221 [% INCLUDE 'calendar.inc' %]
222 [% INCLUDE 'datatables.inc' %]
225 $(document).ready(function() {
226 var issues_table_url = '/api/v1/acquisitions/vendors/[% vendor.id | uri %]/issues?';
228 var issues_table = $("#vendor_issues").kohaTable({
230 url: issues_table_url
233 order: [[ 0, "desc" ]],
239 render: function(data, type, row, meta) {
240 return '<a href="/cgi-bin/koha/acqui/vendor_issues.pl?op=show&issue_id=' + encodeURIComponent(row.issue_id) +'">' + escape_str(row.issue_id) + '</a>';
247 render: function(data, type, row, meta) {
248 return row._strings.type ? escape_str(row._strings.type.str) : "";
255 render: function(data, type, row, meta) {
256 return $date(row.started_on);
263 render: function(data, type, row, meta) {
264 return $date(row.ended_on);
268 data: function( row, type, val, meta ) {
270 var result = '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/acqui/vendor_issues.pl?op=add_form&issue_id='+ encodeURIComponent(row.issue_id) +'"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</a>'+"\n";
271 result += '<a class="btn btn-default btn-xs" role="button" href="/cgi-bin/koha/acqui/vendor_issues.pl?op=delete_confirm&issue_id='+ encodeURIComponent(row.issue_id) +'"><i class="fa fa-trash" aria-hidden="true"></i> '+_("Delete")+'</a>';
283 [% INCLUDE 'intranet-bottom.inc' %]