],
"aoColumns": [
null,null,null,null,null,null,null,null,{ "sType": "title-string" },null,null,null,[% IF (usecache) %]null,[% END %]null,null
+ null,null,null,null,null,null,null,null,{ "sType": "title-string" },null,null,null,[% IF (usecache) %]null,[% END %]null,null[% IF has_obsolete_reports %],null[% END %]
],
'oLanguage': {
'sZeroRecords': _("No matching reports found")
return false;
}
});
+
+ $("body").on("click", ".update_sql", function(e){
+ e.preventDefault();
+ var ltitle = $(this).text();
+ var report_id = $(this).data("report_id");
+ var page = $(this).attr("href");
+ $("#update_sql .modal-body").load(page + " div");
+ $('#update_sql').modal({show:true});
+ $("#update_sql_button").attr("href", "/cgi-bin/koha/reports/guided_reports.pl?phase=Use saved&op=convert&report_id=" + report_id);
+ });
+ $("#update_sql").on("hidden", function(){
+ $("#update_sql_label").html("");
+ $("#update_sql .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
+ });
[% END %]
[% IF ( showsql ) %]
[% END %]
</div>
+<div id="update_sql" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="update_sql_label" aria-hidden="true">
+ <div class="modal-header">
+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3 id="update_sql_label">Update SQL</h3>
+ </div>
+ <div class="modal-body">
+ <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
+ </div>
+ <div class="modal-footer">
+ <a href="#" class="btn" id="update_sql_button" role="button" data-toggle="modal">Update</a>
+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
+ </div>
+</div>
+
<div id="doc3" class="yui-t1">
<div id="bd">
<div id="yui-main">
</form>
[% END %]
+[% IF report_converted %]
+ <div class="dialog message">
+ The report "[% report_converted %]" has been converted.
+ </div>
+[% END %]
+
[% IF ( saved1 ) %]
[% IF ( savedreports ) %]<h1>Saved reports</h1>
<th>Public</th>
[% IF (usecache) %] <th>Cache expiry (seconds)</th> [% END %]
<th>Saved results</th>
+ [% IF has_obsolete_reports %]<th>Update</th>[% END %]
<th> </th>
</tr>
</thead>
<br/>
[% END %]
</td>
+ [% IF has_obsolete_reports %]
+ <td>
+ [% IF savedreport.seems_obsolete %]
+ This report seems obsolete, it uses biblioitems.marcxml field.
+ <a href="/cgi-bin/koha/svc/convert_report?report_id=[% savedreport.id %]" data-report_id="[% savedreport.id %]" class="update_sql btn btn-mini" title="Update SQL"><i class="fa fa-eye"></i> Update SQL</a>
+ [% END %]
+ </td>
+ [% END %]
<td>
<div class="dropup">
<div class="btn-group">