Main Koha release repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

146 lines
8.4 KiB

[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% SET footerjs = 1 %]
[% INCLUDE '' %]
<title>Koha &rsaquo; Administration &rsaquo; Audio alerts</title>
[% INCLUDE '' %]
<body id="admin_audio_alerts" class="admin">
[% INCLUDE '' %]
[% INCLUDE '' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/">Administration</a> &rsaquo; Audio alerts</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-default" id="newalert" href="/cgi-bin/koha/admin/"><i class="fa fa-plus"></i> New alert</a>
<form id="new-alert-form" action="" method="post" class="validated">
<fieldset class="rows">
<legend><span class="create-alert">Add new alert</span><span class="edit-alert">Edit alert</span></legend>
<input id="id" name="id" type="hidden" value="" />
<label for="selector" class="required">Selector: </label>
<input id="selector" name="selector" type="text" class="required input-large" placeholder="selector" />
<span class="required">Required</span>
<label for="sound" class="required">Sound: </label>
<input id="sound" name="sound" type="text" class="required input-large" placeholder="sound" />
<button id="play-sound" class="btn btn-default btn-xs disabled"><i class="fa fa-play"></i> Play sound</button>
<span class="required">Required</span>
<label for="koha-sounds">Select a built-in sound: </label>
<select id="koha-sounds">
<option value=""> -- Choose one -- </option>
<option value="beep.ogg">beep.ogg</option>
<option value="call.ogg">call.ogg</option>
<option value="critical.ogg">critical.ogg</option>
<option value="device_connect.ogg">device_connect.ogg</option>
<option value="device_disconnect.ogg">device_disconnect.ogg</option>
<option value="ending.ogg">ending.ogg</option>
<option value="fail.ogg">fail.ogg</option>
<option value="IM_notification.ogg">IM_notification.ogg</option>
<option value="incoming_call.ogg">incoming_call.ogg</option>
<option value="loading.ogg">loading.ogg</option>
<option value="loading_2.ogg">loading_2.ogg</option>
<option value="maximize.ogg">maximize.ogg</option>
<option value="minimize.ogg">minimize.ogg</option>
<option value="new_mail_notification.ogg">new_mail_notification.ogg</option>
<option value="opening.ogg">opening.ogg</option>
<option value="panic.ogg">panic.ogg</option>
<option value="popup.ogg">popup.ogg</option>
<option value="warning.ogg">warning.ogg</option>
<fieldset class="action">
<input id="save-alert" type="submit" value="Submit" />
<a href="#" id="cancel-edit" class="cancel cancel-edit">Cancel</a>
<form id="delete-alert-form" action="" method="post">
<h3>Audio alerts</h3>
[%IF !( Koha.Preference('AudioAlerts') ) %]
<div class="dialog alert">
<h3>Audio alerts are disabled</h3>
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
<p>Please enable system preference <a href="/cgi-bin/koha/admin/">AudioAlerts</a> to activate sounds.</p>
[% ELSE %]
<p>The system preference <strong>AudioAlerts</strong> must be enabled to activate sounds.</p>
[% END %]
[% END %]
<table id="audio-alerts-table">
<thead id="audio-alerts-table-head">
<th>Change order</th>
<tbody id="audio-alerts-table-body">
[% FOREACH a IN audio_alerts %]
<td><input type="checkbox" name="delete" value="[% | html %]" /></td>
<td>[% a.precedence | html %]</td>
<td style="white-space:nowrap;">
<a title="Move alert up" href=";where=up&amp;id=[% | html %]">
<i class="fa fa-arrow-up fa-lg order-control"></i>
<a title="Move alert to top" href=";where=top&amp;id=[% | html %]">
<i class="fa fa-arrow-up fa-lg overline order-control"></i>
<a title="Move alert to bottom" href=";where=bottom&amp;id=[% | html %]">
<i class="fa fa-arrow-down fa-lg underline order-control"></i>
<a title="Move alert down" href=";where=down&amp;id=[% | html %]">
<i class="fa fa-arrow-down fa-lg order-control"></i>
<td>[% a.selector | html %]</td>
<td>[% a.sound | html %]</td>
<a class="btn btn-default btn-xs edit" data-soundid="[% | html %]" data-precedence="[% a.precedence | html %]" data-selector="[% a.selector | html %]" data-sound="[% a.sound | html %]"><i class="fa fa-pencil"></i> Edit</a></td>
[% END %]
<button id="delete-alerts" type="submit" class="btn btn-default disabled"><i class="fa fa-trash"></i> Delete selected alerts</button>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
[% INCLUDE '' %]
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% Asset.js("js/admin-menu.js") | $raw %]
[% Asset.js("js/audio_alerts.js") | $raw %]
[% END %]
[% INCLUDE '' %]