]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/conify/global/config/best_hold_order.tt2
Custom best-hold selection sort order
[working/Evergreen.git] / Open-ILS / src / templates / conify / global / config / best_hold_order.tt2
1 [% WRAPPER base.tt2 %]
2 <style type="text/css">
3     h1 { margin-bottom: 0.5ex; }
4     #cbho-loading { text-align: center; }
5     #cbho-edit-space { padding: 0.25ex 0.5em; }
6     #cbho-name { width: 30em; }
7     #cbho-field-order { width: 30em; }
8     #cbho-field-order-space > div { float: left; padding-right: 1em; }
9     #cbho-needs-saved { color: #c00; font-weight: bold; }
10     option.post-rtime, option.post-rtime:focus {
11         font-style: italic; color: #999;
12     }
13     .body-part { margin: 1ex 0; }
14     .clear-both { clear: both; }
15     .show-access-key { font-weight: bold; border-bottom: 1px dashed black; }
16 </style>
17 <h1>[% l('Best-Hold Selection Sort Order') %]</h1>
18
19 <!-- Hidden after JS load. Prevents early clicks from breaking anything. -->
20 <div id="cbho-loading">
21     <img src="[% ctx.media_prefix %]/opac/images/progressbar_green-old.gif"
22         alt="[% l('Interface loading') %]" />
23     <!-- <audio src="knight rider theme ;)" /> -->
24 </div>
25
26 <div id="cbho-main-body" class="hidden"><!-- main body -->
27     <div class="body-part">
28         <span dojoType="dijit.form.Button" onClick="module.new_cbho()">[% l('Create New') %]</span>
29         [% l('or') %]
30         <span dojoType="dijit.form.Button" onClick="module.edit_cbho()">[% l('Edit Existing') %]</span>
31     </div>
32
33     <div class="body-part hidden" id="cbho-edit-space"><!-- editing space -->
34         <p>
35             <span id="cbho-editing"></span>
36             <span id="cbho-needs-saved">[% l('You have unsaved changes.') %]</span>
37         </p>
38         <div id="cbho-name-edit-space">
39             <label for="cbho-name">[% l('Name:') %]</label>
40             <input id="cbho-name" type="text" onchange="module.editor_changed(true);" />
41         </div>
42         <div id="cbho-field-order-space" class="body-part">
43             <div>
44                 <label for="cbho-field-order">[% l('Order:') %]</label>
45             </div>
46             <div>
47                 <select id="cbho-field-order" size="10"> </select>
48             </div>
49             <div>
50                 <input type="button"
51                     onclick="module.editor_move(-1); return false;"
52                     accesskey="[% l('k') %]"
53                     value="&uarr; [% l('Move Up') %]" />
54                 <span class="show-access-key">[% l('k') %]</span>
55                 <br />
56                 <input type="button"
57                     onclick="module.editor_move(1); return false;"
58                     accesskey="[% l('j') %]"
59                     value="&darr; [% l('Move Down') %]" />
60                 <span class="show-access-key">[% l('j') %]</span>
61             </div>
62         </div>
63
64         <div class="clear-both"></div>
65
66         <div class="body-part"><!-- save changes -->
67             <p><em>[% l('Because rtime, a high-precision timestamp, is ' _
68                 'essentially unique among holds, ' _
69                 'no fields arranged after rtime really have any effect in ' _
70                 'determining best-hold selection.') %]</em></p>
71
72             <p>[% l('To choose which Best-Hold Selection Sort Order will be ' _
73                 'used by Evergreen at copy capture time, see the Library ' _
74                 'Settings interface.') %]</p>
75
76             <button id="cbho-save-changes"
77                 onclick="module.editor_save(); return false" disabled="disabled">
78                 [% l('Save Changes') %]
79             </button>
80         </div><!-- save changes -->
81     </div><!-- editing space -->
82
83 </div><!-- main body -->
84
85 <div class="hidden">
86     <div dojoType="openils.widget.ProgressDialog" id="progress-dialog"></div>
87     <div dojoType="dijit.Dialog" id="cbho-existing" title="[% l('Choose a best-hold order') %]">
88         <div class="body-part">
89             <label for="cbho-existing-selector">
90                 [% l('Choose a best-hold order') %]
91             </label>
92             <span id="cbho-existing-selector"></span>
93         </div>
94         <div class="body-part">
95             <span dojoType="dijit.form.Button" type="submit"
96                 id="cbho-existing-edit-go">
97                 [% l('Edit') %]
98             </span>
99         </div>
100     </div>
101 </div>
102
103 <script type="text/javascript">
104     dojo.require("dijit.form.Button");
105     dojo.require("dijit.form.TextBox");
106     dojo.require("dijit.Dialog");
107     dojo.require("openils.widget.ProgressDialog");
108     dojo.require("openils.conify.BestHoldOrder");
109
110     var module;
111
112     openils.Util.addOnLoad(
113         function() {
114             module = openils.conify.BestHoldOrder;
115             module.init();
116         }
117     );
118 </script>
119 [% END %]