]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/serial/list_stream.tt2
LP#1832897: add miscellaneous carousels functionality to staff interface
[working/Evergreen.git] / Open-ILS / src / templates / serial / list_stream.tt2
1 [% USE CGI; -%]
2 [% WRAPPER base.tt2 %]
3 [% ctx.page_title = l("Streams") %]
4 <style type="text/css">
5     #new-srlu-table { width: 100%; }
6     #new-srlu-table th { text-align: left; padding-left: 1em; }
7     #new-srlu-table td { text-align: center; padding-right: 1em; }
8     #list-source { border: 1px #666 dashed; }
9 </style>
10 [% IF CGI.param('context') == 'scv' -%]
11 <!-- links in the frame have no style at all, let's give them one -->
12 <style type="text/css">
13     a { color: #1155CC; text-decoration: underline }
14     a:hover { text-decoration: none }
15 </style>
16 [%- END %]
17 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
18     <div dojoType="dijit.layout.ContentPane"
19         layoutAlign="top" class="oils-header-panel">
20         <div>[% l('Streams') %]</div>
21         <div>
22             <button dojoType="dijit.form.Button"
23                 onClick="sstr_grid.showCreateDialog()">[% l('New Stream') %]</button>
24             <button dojoType="dijit.form.Button"
25                 onClick="multi_stream_dialog.show()">
26                 [% l('Create Many Streams') %]
27             </button>
28             <button dojoType="dijit.form.Button" onClick="rlu_editor.show()">
29                 [% l('Routing List For Selected Stream') %]
30             </button>
31             <button dojoType="dijit.form.Button"
32                 onClick="sstr_grid.refresh()">[% l('Refresh Grid') %]</button>
33             <button dojoType="dijit.form.Button"
34                 onClick="sstr_grid.deleteSelected()">[% l('Delete Selected') %]</button>
35         </div>
36     </div>
37     <div>
38         [% l('Showing streams attached to the distribution, [_1] ([_2]).',
39         '<em><a href="javascript:void(0);" id="sdist_label_here"></a></em>',
40         '<span id="sdist_org_unit_name_here"></span>') %]
41     </div>
42     <table jsId="sstr_grid"
43         dojoType="openils.widget.AutoGrid"
44         query="{id: '*'}"
45         fieldOrder="['id','distribution','routing_label']"
46         suppressFields="['distribution']"
47         showSequenceFields="true"
48         onPostSubmit="attempt_reload_opac"
49         fmClass="sstr"
50         showPaginator="true"
51         editOnEnter="true">
52         <thead>
53             <tr>
54                 <th width="90%" field="routing_label"
55                     formatter="format_routing_label"></th>
56             </tr>
57         </thead>
58     </table>
59 </div>
60 <div class="hidden">
61
62     <div id="routing_list_user_template_reader">
63         [% l('Reader: ${0} / ${1}, ${2} ${3} (${4})') %]
64     </div>
65     <div id="routing_list_user_template_department">[% l('Department: ${0}') %]</div>
66     <div id="routing_list_user_template_note"><br />&nbsp; <em>${0}</em></div>
67     <div id="routing_list_user_template_remove">[X]</div>
68
69     <div dojoType="dijit.Dialog" id="routing_list_dialog"
70         execute="rlu_editor.save()" title="[% l('Manage Routing List') %]">
71         <ol id="list-source" dojoType="dojo.dnd.Source"
72             jsId="routing_list_source"></ol>
73         <table id="new-srlu-table">
74             <tbody>
75                 <tr>
76                     <td>
77                         <input type="radio" name="reader_xor_dept"
78                             dojoType="dijit.form.RadioButton"
79                             value="reader" id="reader_xor_dept-reader" />
80                     </td>
81                     <th>
82                         <label for="reader_xor_dept-reader">
83                             [% l('Reader (barcode):') %]
84                         </label>
85                     </th>
86                     <td>
87                         <input dojoType="dijit.form.TextBox" id="reader"
88                             name="reader" disabled="disabled" />
89                     </td>
90                     <td rowspan="3">
91                         <button dojoType="dijit.form.Button"
92                             id="routing_list_add_button"
93                             onClick="rlu_editor.new_user()">[% l('Add') %]</button>
94                     </td>
95                 </tr>
96                 <tr>
97                     <td>
98                         <input type="radio" name="reader_xor_dept"
99                             dojoType="dijit.form.RadioButton"
100                             value="department"
101                             id="reader_xor_dept-department" />
102                     </td>
103                     <th>
104                         <label for="reader_xor_dept-department">
105                             [% l('Department:') %]
106                         </label>
107                     </th>
108                     <td>
109                         <input dojoType="dijit.form.TextBox" id="department"
110                             name="department" disabled="disabled" />
111                     </td>
112                 </tr>
113                 <tr>
114                     <td></td>
115                     <th><label for="note">[% l('Note:') %]</label></th>
116                     <td>
117                         <input id="note" name="note"
118                             dojoType="dijit.form.TextBox" />
119                     </td>
120                 </tr>
121                 <tr>
122                     <td colspan="4" style="padding-top: 1em;">
123                         <button id="routing_list_save_button"
124                             dojoType="dijit.form.Button" type="submit">
125                             [% l('Save Changes') %]
126                         </button>
127                     </td>
128                 </td>
129             </tbody>
130         </table>
131     </div>
132
133     <div dojoType="dijit.Dialog"
134         execute="create_many_streams(arguments[0]);"
135         title="[% l('Create Streams') %]"
136         jsId="multi_stream_dialog">
137         <table class="serial-dialog-table">
138             <tr>
139                 <th>[% l('How many?') %]</th>
140                 <td>
141                     <input dojoType="dijit.form.NumberSpinner"
142                         value="1" smallDelta="1" name="quantity"
143                         constraints="{'min': 1, 'max': 1000}" />
144                 </td>
145             </tr>
146             <tr>
147                 <td colspan="2">
148                     <button dojoType="dijit.form.Button" type="submit">
149                         [% l('Create') %]
150                     </button>
151                 </td>
152             </tr>
153         </table>
154     </div>
155     <div dojoType="openils.widget.ProgressDialog" jsId="progress_dialog"></div>
156 </div>
157 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/serial/common.js"> </script>
158 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/serial/list_stream.js"> </script>
159 [% END %]