4 [% USE TablesSettings %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Catalog concerns › Cataloging › Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="cat_concerns" class="cat">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cataloging-search.inc' %]
14 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20 <a href="/cgi-bin/koha/cataloguing/cataloging-home.pl">Cataloging</a>
23 <a href="#" aria-current="page">
30 <div class="main container-fluid">
32 <div class="col-sm-10 col-sm-push-2">
36 <div class="page-section">
37 <fieldset class="action" style="cursor:pointer;">
38 <a id="hideResolved"><i class="fa fa-minus-square"></i> Hide resolved</a>
39 | <a id="showAll"><i class="fa fa-bars"></i> Show all</a>
42 <table id="table_concerns">
49 <th data-class-name="actions noExport">Actions</th>
55 </div> <!-- /.col-sm-10.col-sm-push-2 -->
57 <div class="col-sm-2 col-sm-pull-10">
59 [% INCLUDE 'cat-menu.inc' %]
61 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
64 [% INCLUDE 'modals/display_ticket.inc' %]
66 [% MACRO jsinclude BLOCK %]
67 [% INCLUDE 'datatables.inc' %]
68 [% INCLUDE 'columns_settings.inc' %]
69 [% INCLUDE 'js-date-format.inc' %]
70 [% INCLUDE 'js-patron-format.inc' %]
71 [% INCLUDE 'js-biblio-format.inc' %]
73 $(document).ready(function() {
75 logged_in_user_borrowernumber = [% logged_in_user.borrowernumber | html %];
77 var table_settings = [% TablesSettings.GetTableSettings('cataloguing', 'concerns', 'table_concerns', 'json') | $raw %];
80 let additional_filters = {
81 resolved_date: function(){
90 var tickets_url = '/api/v1/tickets';
91 var tickets = $("#table_concerns").kohaTable({
101 'emptyTable': '<div class="dialog message">' + _("Congratulations, there are no catalog concerns.") + '</div>',
103 "targets": [0, 1, 2, 3],
104 "render": function(data, type, row, meta) {
105 if (type == 'display') {
107 return data.escapeHtml();
116 "data": "reported_date:reporter.firstname",
117 "render": function(data, type, row, meta) {
118 let reported = '<span class="date clearfix">' + $datetime(row.reported_date) + '</span>';
119 reported += '<span class="reporter clearfix">' + $patron_to_html(row.reporter, {
120 display_cardnumber: false,
129 "data": "title:body",
130 "render": function(data, type, row, meta) {
131 let resolved = ( row.resolved_date ) ? true : false;
132 let result = '<a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'">' + row.title + '</a>';
133 if (row.updates_count) {
134 result += '<span class="pull-right"><a role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'"><i class="fa fa-comment" aria-hidden="true"></i> ' + row.updates_count + '</a></span>';
136 result += '<div id="detail_' + row.ticket_id + '" class="hidden">' + row.body + '</div>';
143 "data": "biblio.title",
144 "render": function(data, type, row, meta) {
145 return $biblio_to_html(row.biblio, {
153 "data": "resolver.firstname:resolver.surname:resolved_date",
154 "render": function(data, type, row, meta) {
156 if (row.resolved_date) {
157 result += _("Resolved by:") + ' <span>' + $patron_to_html(row.resolver, {
158 display_cardnumber: false,
161 result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
171 "data": function(row, type, val, meta) {
172 let resolved = ( row.resolved_date ) ? true : false;
173 let result = '<a class="btn btn-default btn-xs" role="button" href="#" data-toggle="modal" data-target="#ticketDetailsModal" data-concern="' + encodeURIComponent(row.ticket_id) + '" data-resolved="'+resolved+'"><i class="fa fa-eye" aria-hidden="true"></i> ' + _("Details") + '</a>';
180 }, table_settings, 1, additional_filters);
182 $('#hideResolved').on("click", function() {
184 tickets.DataTable().draw();
187 $('#showAll').on("click", function() {
189 tickets.DataTable().draw();
193 [% Asset.js("js/modals/display_ticket.js") | $raw %]
195 [% INCLUDE 'intranet-bottom.inc' %]