|
Line 0
Link Here
|
|
|
1 |
[% USE Koha %] |
| 2 |
[% USE Asset %] |
| 3 |
[% SET footerjs = 1 %] |
| 4 |
[% INCLUDE 'doc-head-open.inc' %] |
| 5 |
<title>Koha › Tools › Digital signs</title> |
| 6 |
[% INCLUDE 'doc-head-close.inc' %] |
| 7 |
[% Asset.css("css/datatables.css") %] |
| 8 |
</head> |
| 9 |
<body id="tools_signs" class="tools"> |
| 10 |
[% INCLUDE 'header.inc' %] |
| 11 |
[% INCLUDE 'cat-search.inc' %] |
| 12 |
|
| 13 |
[% BLOCK dslink %]<a href="/cgi-bin/koha/tools/signs.pl">Digital signs</a> ›[% END %] |
| 14 |
<div id="breadcrumbs"> |
| 15 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
| 16 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
| 17 |
[% IF op == 'stream_form' %] |
| 18 |
[% IF ( stream.sign_stream_id ) %] |
| 19 |
[% INCLUDE dslink %] Edit "[% stream.name %]" |
| 20 |
[% ELSE %] |
| 21 |
[% INCLUDE dslink %] Add a new stream |
| 22 |
[% END %] |
| 23 |
[% ELSIF op == 'sign_form' %] |
| 24 |
[% IF ( sign.sign_id ) %] |
| 25 |
[% INCLUDE dslink %] Edit "[% sign.name %]" |
| 26 |
[% ELSE %] |
| 27 |
[% INCLUDE dslink %] Add a new sign |
| 28 |
[% END %] |
| 29 |
[% ELSIF op == 'edit_streams' %] |
| 30 |
[% INCLUDE dslink %] Edit streams attached to "[% sign.name %]" |
| 31 |
[% ELSIF op == 'get_params' %] |
| 32 |
[% INCLUDE dslink %] |
| 33 |
<a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&sign_id=[% sign.sign_id %]">Edit streams attached to "[% sign.name %]"</a> › |
| 34 |
Get parameters |
| 35 |
[% ELSIF op == 'del_stream' %] |
| 36 |
[% INCLUDE dslink %] Delete stream "[% stream.name %]" |
| 37 |
[% ELSIF op == 'del_stream_ok' %] |
| 38 |
[% INCLUDE dslink %] Stream deleted |
| 39 |
[% ELSIF op == 'del_sign' %] |
| 40 |
[% INCLUDE dslink %] Delete sign "[% sign.name %]" |
| 41 |
[% ELSIF op == 'del_sign_ok' %] |
| 42 |
[% INCLUDE dslink %] Sign deleted |
| 43 |
[% ELSIF op == 'view_sign' %] |
| 44 |
[% INCLUDE dslink %] View sign |
| 45 |
[% ELSIF op == 'view_stream' %] |
| 46 |
[% INCLUDE dslink %] View stream |
| 47 |
[% ELSE %] |
| 48 |
Digital signs |
| 49 |
[% END %] |
| 50 |
</div> |
| 51 |
|
| 52 |
<div id="doc3" class="yui-t2"> |
| 53 |
<div id="bd"> |
| 54 |
<div id="yui-main"> |
| 55 |
<div class="yui-b"> |
| 56 |
|
| 57 |
[% UNLESS Koha.Preference( 'OPACDigitalSigns' ) %] |
| 58 |
<div class="dialog alert"> |
| 59 |
Digital signs are not enabled. Please enable <a href="/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=OPACDigitalSigns">OPACDigitalSigns</a> for OPAC digital signs to work. |
| 60 |
</div> |
| 61 |
[% END %] |
| 62 |
|
| 63 |
[% IF ( else ) %] |
| 64 |
<div id="toolbar" class="btn-toolbar"> |
| 65 |
<a id="newsign" href="/cgi-bin/koha/tools/signs.pl?op=add_sign" class="btn btn-default"><i class="fa fa-plus"></i> New sign</a> |
| 66 |
<a id="newstream" href="/cgi-bin/koha/tools/signs.pl?op=add_stream" class="btn btn-default"><i class="fa fa-plus"></i> New stream</a> |
| 67 |
</div> |
| 68 |
[% END %] |
| 69 |
|
| 70 |
[% IF op == 'stream_form' %] |
| 71 |
[% UNLESS ( reports ) %] |
| 72 |
<div class="dialog alert"> |
| 73 |
<h3>No reports found</h3> |
| 74 |
No reports with group code "SIGN" were found. Please <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create+report+from+SQL&submit=Create+report+from+SQL">create a new report</a> with group code "SIGN" and try again. |
| 75 |
</div> |
| 76 |
[% END %] |
| 77 |
|
| 78 |
[% IF ( stream.sign_stream_id ) %] |
| 79 |
<h1>Edit stream</h1> |
| 80 |
[% ELSE %] |
| 81 |
<h1>Add stream</h1> |
| 82 |
[% END %] |
| 83 |
<form action="[% script_name %]" name="streamform" id="streamform" method="post"> |
| 84 |
<input type="hidden" name="op" value="save_stream" /> |
| 85 |
[% IF ( stream.sign_stream_id ) %] |
| 86 |
<input type="hidden" name="sign_stream_id" value="[% stream.sign_stream_id %]" /> |
| 87 |
[% END %] |
| 88 |
<fieldset class="rows"> |
| 89 |
<ol> |
| 90 |
<li> |
| 91 |
<label for="name" class="required">Name</label> |
| 92 |
<input type="text" name="name" value="[% stream.name %]" required="required"> |
| 93 |
<span class="required">Required</span> |
| 94 |
</li> |
| 95 |
<li><label for="report" class="required">Report</label> |
| 96 |
<select name="report" id="report" class="required" required="required"> |
| 97 |
[% UNLESS ( stream.sign_stream_id ) %] |
| 98 |
<option value="">Choose report</option> |
| 99 |
[% END %] |
| 100 |
[% FOREACH report IN reports %] |
| 101 |
[% IF ( report.id == stream.saved_sql_id ) %] |
| 102 |
<option value="[% report.id %]" selected="selected">[% report.report_name %]</option> |
| 103 |
[% ELSE %] |
| 104 |
<option value="[% report.id %]">[% report.report_name %]</option> |
| 105 |
[% END %] |
| 106 |
[% END %] |
| 107 |
</select> |
| 108 |
<span class="required">Required</span> |
| 109 |
</li> |
| 110 |
<li> |
| 111 |
</ol> |
| 112 |
</fieldset> |
| 113 |
<fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset> |
| 114 |
</form> |
| 115 |
|
| 116 |
[% ELSIF op == 'sign_form' %] |
| 117 |
[% IF ( sign.sign_id ) %] |
| 118 |
<h1>Edit sign</h1> |
| 119 |
[% ELSE %] |
| 120 |
<h1>Add sign</h1> |
| 121 |
[% END %] |
| 122 |
<form action="[% script_name %]" name="signform" id="signform" method="post"> |
| 123 |
<input type="hidden" name="op" value="save_sign" /> |
| 124 |
[% IF ( sign.sign_id ) %] |
| 125 |
<input type="hidden" name="sign_id" value="[% sign.sign_id %]" /> |
| 126 |
[% END %] |
| 127 |
<fieldset id="sign_general_info" class="rows"> |
| 128 |
<legend id="general_info_lgd">General settings</legend> |
| 129 |
<ol> |
| 130 |
<li><label for="name">Name</label><input type="text" name="name" value="[% sign.name %]" /></li> |
| 131 |
</ol> |
| 132 |
</fieldset> |
| 133 |
<fieldset id="sign_appearance" class="rows"> |
| 134 |
<legend id="appearance_lgd">Appearance</legend> |
| 135 |
<ol> |
| 136 |
<li><label for="webapp">Web-app</label> |
| 137 |
<select name="webapp" id="webapp"> |
| 138 |
<option value="0">Display as a normal page</option> |
| 139 |
[% IF ( sign.webapp ) %] |
| 140 |
<option value="1" selected="selected">Display as a Web-app</option> |
| 141 |
[% ELSE %] |
| 142 |
<option value="1">Display as a Web-app</option> |
| 143 |
[% END %] |
| 144 |
</select> |
| 145 |
</li> |
| 146 |
<li><label for="swatch">Theme (swatch)</label> |
| 147 |
<select name="swatch" id="swatch"> |
| 148 |
<option value="">Default</option> |
| 149 |
[% FOREACH swatch IN Koha.Preference('OPACDigitalSignsSwatches').split('') %] |
| 150 |
[% IF swatch == sign.swatch %] |
| 151 |
<option value="[% swatch %]" selected="selected">[% swatch %]</option> |
| 152 |
[% ELSE %] |
| 153 |
<option value="[% swatch %]">[% swatch %]</option> |
| 154 |
[% END %] |
| 155 |
[% END %] |
| 156 |
</select> |
| 157 |
</li> |
| 158 |
<li><label for="transition">Transition</label> |
| 159 |
<select name="transition" id="transition"> |
| 160 |
[% FOREACH transition IN [ 'none' 'fade' 'pop' 'flip' 'turn' 'flow' 'slidefade' 'slide' 'slideup' 'slidedown' ] %] |
| 161 |
[% IF transition == sign.transition %] |
| 162 |
<option value="[% transition %]" selected="selected">[% transition %]</option> |
| 163 |
[% ELSE %] |
| 164 |
<option value="[% transition %]">[% transition %]</option> |
| 165 |
[% END %] |
| 166 |
[% END %] |
| 167 |
</select> |
| 168 |
</li> |
| 169 |
</ol> |
| 170 |
</fieldset> |
| 171 |
<fieldset id="sign_autopage" class="rows"> |
| 172 |
<legend id="autopage_lgd">Automatic page turning</legend> |
| 173 |
<ol> |
| 174 |
<li><label for="idleafter">Idle after</label> |
| 175 |
<input type="text" name="idleafter" id="idleafter" value="[% sign.idleafter %]" size="4" /> seconds. (Set to 0 to disable automatic page turning.) |
| 176 |
</li> |
| 177 |
<li><label for="pagedelay">Page delay</label> |
| 178 |
<input type="text" name="pagedelay" id="pagedelay" value="[% sign.pagedelay %]" size="4" /> seconds. |
| 179 |
</li> |
| 180 |
<li><label for="reloadafter">Reload after</label> |
| 181 |
<input type="text" name="reloadafter" id="reloadafter" value="[% sign.reloadafter %]" size="4" /> seconds. |
| 182 |
</li> |
| 183 |
</ol> |
| 184 |
</fieldset> |
| 185 |
<fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset> |
| 186 |
</form> |
| 187 |
|
| 188 |
[% ELSIF op == 'edit_streams' %] |
| 189 |
<h1>Edit streams attached to [% sign.name %]</h1> |
| 190 |
<h2>Streams already attached to this sign</h2> |
| 191 |
[% IF ( sts.count ) %] |
| 192 |
<table id="streams_attached"> |
| 193 |
<thead> |
| 194 |
<tr> |
| 195 |
<th>Name</th> |
| 196 |
<th colspan="2">Parameters</th> |
| 197 |
<th> </th> |
| 198 |
</tr> |
| 199 |
</thead> |
| 200 |
<tbody> |
| 201 |
[% FOREACH s IN sts %] |
| 202 |
<tr> |
| 203 |
<td>[% s.sign_stream.name %]</td> |
| 204 |
<td>[% IF s.params %][% s.params %][% ELSE %]None[% END %]</td> |
| 205 |
<td class="actions"> |
| 206 |
[% IF s.params %] |
| 207 |
<a href="/cgi-bin/koha/tools/signs.pl?op=get_params&sign_to_stream_id=[% s.sign_to_stream_id %]&sign_stream_id=[% s.sign_stream_id %]&sign_id=[% s.sign_id %]" class="btn btn-default btn-xs" title="Edit parameters"><i class="fa fa-pencil"></i></a> |
| 208 |
[% ELSE %] |
| 209 |
<a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% s.sign_stream.saved_sql_id %]&phase=Edit SQL" class="btn btn-default btn-xs" title="Edit SQL"><i class="fa fa-pencil"></i></a> |
| 210 |
[% END %] |
| 211 |
</td> |
| 212 |
<td class="actions"><a href="/cgi-bin/koha/tools/signs.pl?op=detach_stream_from_sign&sign_id=[% s.sign_id %]&sign_to_stream_id=[% s.sign_to_stream_id %]" class="btn btn-default btn-xs detach"><i class="fa fa-times"></i> Detach</a></td> |
| 213 |
</tr> |
| 214 |
[% END %] |
| 215 |
</tbody> |
| 216 |
</table> |
| 217 |
[% ELSE %] |
| 218 |
There are no streams attached to this sign. |
| 219 |
[% END %] |
| 220 |
|
| 221 |
<h2>Attach a new stream to this sign</h2> |
| 222 |
<form action="[% script_name %]" name="attach_stream_to_sign_form" id="attach_stream_to_sign_form" method="post"> |
| 223 |
<input type="hidden" name="op" value="attach_stream_to_sign" /> |
| 224 |
<input type="hidden" name="sign_id" value="[% sign_id %]" /> |
| 225 |
<fieldset class="rows"> |
| 226 |
<ol> |
| 227 |
<li><label for="stream">Choose a stream to attach</label> |
| 228 |
<select name="sign_stream_id" id="stream"> |
| 229 |
[% FOREACH s IN streams %] |
| 230 |
<option value="[% s.sign_stream_id %]">[% s.name %]</option> |
| 231 |
[% END %] |
| 232 |
</select> |
| 233 |
</li> |
| 234 |
</ol> |
| 235 |
</fieldset> |
| 236 |
<fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset> |
| 237 |
</form> |
| 238 |
|
| 239 |
[% ELSIF op == 'get_params' %] |
| 240 |
<h1>Parameters for [% stream.name %]</h1> |
| 241 |
Based on report: [% sql.report_name %] | <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% stream.saved_sql_id %]&phase=Edit SQL">Edit this report</a> |
| 242 |
|
| 243 |
<form action="[% script_name %]" name="get_params_form" id="get_params_form" method="post"> |
| 244 |
<input type="hidden" name="op" value="save_params" /> |
| 245 |
<input type="hidden" name="sign_to_stream_id" value="[% sign_to_stream_id %]" /> |
| 246 |
<input type="hidden" name="sign_stream_id" value="[% sign_stream_id %]" /> |
| 247 |
<input type="hidden" name="sign_id" value="[% sign_id %]" /> |
| 248 |
<fieldset class="rows"> |
| 249 |
[% IF ( sts.params ) %] |
| 250 |
<legend id="save_params_lgd">Edit parameters</legend> |
| 251 |
[% ELSE %] |
| 252 |
<legend id="save_params_lgd">Add parameters</legend> |
| 253 |
[% END %] |
| 254 |
<ol> |
| 255 |
<li><label for="stream">Parameters</label> |
| 256 |
<input type="text" size="60" name="parameters" id="parameters" value="[% sts.params %]" /> |
| 257 |
</li> |
| 258 |
</ol> |
| 259 |
</fieldset> |
| 260 |
<fieldset class="action"> <input type="submit" value="Submit" class="submit" /></fieldset> |
| 261 |
</form> |
| 262 |
|
| 263 |
<h2>Raw SQL</h2> |
| 264 |
<pre id="sql_output">[% sql.savedsql | html %]</pre> |
| 265 |
|
| 266 |
<h2>SQL with current parameters replaced</h2> |
| 267 |
<pre id="sql_output">[% newsql | html %]</pre> |
| 268 |
|
| 269 |
[% IF ( has_params ) %] |
| 270 |
Sorry, your SQL still contains placeholders. You need to add more parameters. |
| 271 |
[% ELSE %] |
| 272 |
<h2>Records</h2> |
| 273 |
[% INCLUDE display_records %] |
| 274 |
[% END %] |
| 275 |
|
| 276 |
[% ELSIF op == 'del_stream' %] |
| 277 |
<div class="dialog alert"> |
| 278 |
<h3>Confirm deletion of stream <span class="ex">'[% stream.name %]'</span>?</h3> |
| 279 |
<form action="[% script_name %]" id ="confirm_stream_delete_form" method="post"> |
| 280 |
<input type="hidden" name="op" value="del_stream_ok" /> |
| 281 |
<input type="hidden" name="sign_stream_id" value="[% stream.sign_stream_id %]" /> |
| 282 |
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this stream</button> |
| 283 |
</form> |
| 284 |
|
| 285 |
<form action="[% script_name %]" id="cancel_stream_delete_form" method="get"> |
| 286 |
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button> |
| 287 |
</form> |
| 288 |
</div> |
| 289 |
|
| 290 |
[% ELSIF op == 'del_stream_ok' %] |
| 291 |
<div class="dialog message"> |
| 292 |
<h3>Stream deleted</h3> |
| 293 |
<form action="[% script_name %]" method="get"> |
| 294 |
<input type="submit" value="OK" class="approve" /> |
| 295 |
</form> |
| 296 |
</div> |
| 297 |
|
| 298 |
[% ELSIF op == 'del_sign' %] |
| 299 |
<div class="dialog alert"> |
| 300 |
<h3>Confirm deletion of sign <span class="ex">'[% sign.name %]'</span>?</h3> |
| 301 |
<form action="[% script_name %]" id ="confirm_sign_delete_form" method="post"> |
| 302 |
<input type="hidden" name="op" value="del_sign_ok" /> |
| 303 |
<input type="hidden" name="sign_id" value="[% sign.sign_id %]" /> |
| 304 |
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> Yes, delete this sign</button> |
| 305 |
</form> |
| 306 |
|
| 307 |
<form action="[% script_name %]" id="cancel_sign_delete_form" method="get"> |
| 308 |
<button type="submit" class="deny"><i class="fa fa-fw fa-remove"></i> No, do not delete</button> |
| 309 |
</form> |
| 310 |
</div> |
| 311 |
|
| 312 |
[% ELSIF op == 'del_sign_ok' %] |
| 313 |
<div class="dialog message"> |
| 314 |
<h3>Sign deleted</h3> |
| 315 |
<form action="[% script_name %]" method="get"> |
| 316 |
<button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button> |
| 317 |
</form> |
| 318 |
</div> |
| 319 |
|
| 320 |
[% ELSIF op == 'view_sign' %] |
| 321 |
<h1>[% sign.name %]</h1> |
| 322 |
<h2>Streams</h2> |
| 323 |
|
| 324 |
[% IF ( streams ) %] |
| 325 |
[% FOREACH stream IN streams %] |
| 326 |
<h3>[% stream.sign_stream.name %]</h3> |
| 327 |
<ul> |
| 328 |
[% FOREACH record IN stream.records %] |
| 329 |
<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% record.biblionumber %]">[% record.title %]</a></li> |
| 330 |
[% END %] |
| 331 |
</ul> |
| 332 |
[% END %] |
| 333 |
[% ELSE %] |
| 334 |
No streams attached. |
| 335 |
[% END %] |
| 336 |
|
| 337 |
[% ELSIF op == 'view_stream' %] |
| 338 |
<h1>[% stream.name %]</h1> |
| 339 |
Based on report: [% stream.saved_sql_id.report_name %] | <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% stream.saved_sql_id %]&phase=Edit SQL">Edit this report</a> |
| 340 |
|
| 341 |
<h2>SQL</h2> |
| 342 |
<pre id="sql_output">[% stream.saved_sql_id.savedsql | html %]</pre> |
| 343 |
|
| 344 |
<h2>Records</h2> |
| 345 |
[% IF ( has_params ) %] |
| 346 |
Unable to display records. Check that this stream has been attached to a sign and any parameters have been filled appropriately. |
| 347 |
[% ELSE %] |
| 348 |
[% INCLUDE display_records %] |
| 349 |
[% END %] |
| 350 |
|
| 351 |
[% ELSE %] |
| 352 |
<h1>Digital signs</h1> |
| 353 |
|
| 354 |
[% IF ( error_on_insert_stream ) %] |
| 355 |
<div class="dialog error">Failed to create a new stream.</div> |
| 356 |
[% ELSIF ( success_on_insert_stream ) %] |
| 357 |
<div class="dialog message">New stream added.</div> |
| 358 |
[% END %] |
| 359 |
|
| 360 |
<h2>Signs</h2> |
| 361 |
[% IF signs %] |
| 362 |
<table id="table_signs"> |
| 363 |
<thead> |
| 364 |
<tr> |
| 365 |
<th>Name</th> |
| 366 |
<th>Web-app</th> |
| 367 |
<th>Theme (swatch)</th> |
| 368 |
<th>Transition</th> |
| 369 |
<th>Idle after</th> |
| 370 |
<th>Page delay</th> |
| 371 |
<th>Reload after</th> |
| 372 |
<th> </th> |
| 373 |
</tr> |
| 374 |
</thead> |
| 375 |
<tbody> |
| 376 |
[% FOREACH s IN signs %] |
| 377 |
<tr> |
| 378 |
<td><a href="/cgi-bin/koha/tools/signs.pl?op=view_sign&sign_id=[% s.sign_id %]">[% s.name %]</a></td> |
| 379 |
<td>[% IF ( s.webapp ) %]Yes[% ELSE %]No[% END %]</td> |
| 380 |
<td>[% s.swatch %]</td> |
| 381 |
<td>[% s.transition %]</td> |
| 382 |
<td>[% s.idleafter %]</td> |
| 383 |
<td>[% s.pagedelay %]</td> |
| 384 |
<td>[% s.reloadafter %]</td> |
| 385 |
<td> |
| 386 |
<div class="dropdown"> |
| 387 |
<a class="btn btn-default btn-xs dropdown-toggle" id="opensignsactions[% s.sign_id %]" role="button" data-toggle="dropdown" href="#"> Actions <b class="caret"></b></a> |
| 388 |
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="opensignsactions[% s.sign_id %]"> |
| 389 |
<li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_sign&sign_id=[% s.sign_id %]"><i class="fa fa-pencil"></i> Edit</a></li> |
| 390 |
<li><a href="/cgi-bin/koha/tools/signs.pl?op=edit_streams&sign_id=[% s.sign_id %]"><i class="fa fa-pencil"></i> Edit streams</a></li> |
| 391 |
<li><a href="/cgi-bin/koha/tools/signs.pl?op=del_sign&sign_id=[% s.sign_id %]"><i class="fa fa-trash"></i> Delete</a></li> |
| 392 |
[% IF ( OPACBaseURL ) %]<li><a href="[% OPACBaseURL %]/cgi-bin/koha/opac-signs.pl?sign=[% s.sign_id %]" title="View this sign in the OPAC"><i class="fa fa-eye"></i> View sign</a></li>[% END %] |
| 393 |
</ul> |
| 394 |
</div> |
| 395 |
</td> |
| 396 |
</tr> |
| 397 |
[% END %] |
| 398 |
</tbody> |
| 399 |
</table> |
| 400 |
[% UNLESS ( OPACBaseURL ) %]Please note: Links to view signs in the OPAC will only be displayed if you fill in the OPACBaseURL system preference.[% END %] |
| 401 |
[% ELSE %] |
| 402 |
<div class="dialog message">No signs defined. <a href="/cgi-bin/koha/tools/signs.pl?op=add_sign">Create a new sign.</a></div> |
| 403 |
[% END %] |
| 404 |
|
| 405 |
<h2>Streams</h2> |
| 406 |
[% IF streams %] |
| 407 |
<table id="table_streams"> |
| 408 |
<thead> |
| 409 |
<tr> |
| 410 |
<th>Name</th> |
| 411 |
<th>Report</th> |
| 412 |
<th>Actions</th> |
| 413 |
</tr> |
| 414 |
</thead> |
| 415 |
<tbody> |
| 416 |
[% FOREACH s IN streams %] |
| 417 |
<tr> |
| 418 |
<td><a href="/cgi-bin/koha/tools/signs.pl?op=view_stream&sign_stream_id=[% s.sign_stream_id %]">[% s.name %]</a></td> |
| 419 |
<td title="ID: [% s.saved_sql_id %]">[% s.saved_sql.report_name %]</td> |
| 420 |
<td class="actions"> |
| 421 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/signs.pl?op=edit_stream&sign_stream_id=[% s.sign_stream_id %]"><i class="fa fa-pencil"></i> Edit</a> |
| 422 |
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/signs.pl?op=del_stream&sign_stream_id=[% s.sign_stream_id %]"><i class="fa fa-trash"></i> Delete</a> |
| 423 |
</td> |
| 424 |
</tr> |
| 425 |
[% END %] |
| 426 |
</tbody> |
| 427 |
</table> |
| 428 |
[% ELSE %] |
| 429 |
<div class="dialog message">No streams defined. <a href="/cgi-bin/koha/tools/signs.pl?op=add_stream">Create a new stream.</a></div> |
| 430 |
[% END %] |
| 431 |
|
| 432 |
[% END %] |
| 433 |
|
| 434 |
</div> |
| 435 |
</div> |
| 436 |
|
| 437 |
<div class="yui-b"> |
| 438 |
[% INCLUDE 'tools-menu.inc' %] |
| 439 |
</div> |
| 440 |
|
| 441 |
</div> |
| 442 |
|
| 443 |
[% MACRO jsinclude BLOCK %] |
| 444 |
[% INCLUDE 'datatables.inc' %] |
| 445 |
[% Asset.js("js/tools-menu.js") | $raw %] |
| 446 |
<script> |
| 447 |
//<![CDATA[ |
| 448 |
$(document).ready(function() { |
| 449 |
$("#table_signs").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 450 |
"aoColumnDefs": [ |
| 451 |
{ "aTargets": [ -1 ], "bSearchable": false, "bSortable": false }, |
| 452 |
], |
| 453 |
"sPaginationType": "four_button" |
| 454 |
})); |
| 455 |
$("#table_streams").dataTable($.extend(true, {}, dataTablesDefaults, { |
| 456 |
"aoColumnDefs": [ |
| 457 |
{ "aTargets": [ -1 ], "bSearchable": false, "bSortable": false }, |
| 458 |
], |
| 459 |
"sPaginationType": "four_button" |
| 460 |
})); |
| 461 |
|
| 462 |
$(".detach").on("click", function(){ |
| 463 |
return confirmDelete(_("Are you sure you want to detach this stream from this sign?")); |
| 464 |
}); |
| 465 |
}); |
| 466 |
//]]> |
| 467 |
</script> |
| 468 |
[% END %] |
| 469 |
|
| 470 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 471 |
|
| 472 |
[% BLOCK display_records %] |
| 473 |
[% IF ( records.0 ) %] |
| 474 |
<table> |
| 475 |
<thead> |
| 476 |
<tr> |
| 477 |
<th>biblionumber</th> |
| 478 |
<th>title</th> |
| 479 |
</tr> |
| 480 |
</thead> |
| 481 |
<tbody> |
| 482 |
[% FOREACH r IN records %] |
| 483 |
<tr><td>[% r.biblionumber %]</td><td>[% r.title %]</td></tr> |
| 484 |
[% END %] |
| 485 |
</tbody> |
| 486 |
</table> |
| 487 |
[% ELSE %] |
| 488 |
No records found. |
| 489 |
[% END %] |
| 490 |
[% END %] |