]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/default/serial/list_item.tt2
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
[working/Evergreen.git] / Open-ILS / src / templates / default / serial / list_item.tt2
1 [% WRAPPER default/base.tt2 %]
2 [% ctx.page_title = "Items" %]
3 [% BLOCK status_values %]
4                 <option value="Expected">Expected</option>
5                 <option value="Bindery">Bindery</option>
6                 <option value="Bound">Bound</option>
7                 <option value="Claimed">Claimed</option>
8                 <option value="Discarded">Discarded</option>
9                 <option value="Not Held">Not Held</option>
10                 <option value="Not Published">Not Published</option>
11                 <option value="Received">Received</option>
12 [% END %]
13 <style type="text/css">
14     .create-dialog-table td { padding: 0.35em 0; }
15     .create-dialog-table th {
16         padding-right: 1em;
17         text-align: right;
18         font-weight: bold;
19     }
20 </style>
21 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
22     <div dojoType="dijit.layout.ContentPane"
23         layoutAlign="top" class="oils-header-panel">
24         <div>Items</div>
25         <div>
26             <button dojoType="dijit.form.Button"
27                 onClick="create_dialog.show()">New Items</button>
28             <button dojoType="dijit.form.Button"
29                 onClick="sitem_grid.refresh()">Refresh Grid</button>
30             <button dojoType="dijit.form.Button"
31                 onClick="sitem_grid.deleteSelected()">
32                 Delete Selected
33             </button>
34         </div>
35     </div>
36     <div>
37         Showing items attached to the issuance,
38         <em><a href="javascript:void(0);" id="siss_label_here"></a></em>.
39     </div>
40     <table jsId="sitem_grid"
41         dojoType="openils.widget.AutoGrid"
42         query="{id: '*'}"
43         fieldOrder="['id','creator','editor','create_date','edit_date',
44             'stream','date_expected','date_received','status','unit']"
45         suppressFields="['issuance','uri','shadowed']"
46         suppressEditFields="['issuance','uri','shadowed','creator','editor','create_date','edit_date','unit','stream']"
47         showSequenceFields="true"
48         fmClass="sitem"
49         editPaneOnSubmit="update_sitem_safely"
50         showPaginator="true"
51         editOnEnter="true">
52         <thead>
53             <tr>
54                 <th field="creator" get="get_creator" formatter="format_user">
55                 </th>
56                 <th field="editor" get="get_editor" formatter="format_user">
57                 </th>
58                 <th field="stream" get="get_stream" formatter="format_stream">
59                 </th>
60                 <th field="unit" get="get_unit" formatter="format_unit">
61                 </th>
62             </tr>
63         </thead>
64     </table>
65     <div class="hidden">
66         <div jsId="create_dialog" dojoType="dijit.Dialog"
67             title="Create New Items" execute="create_new_items(arguments[0]);">
68             <table class="create-dialog-table">
69                 <tr>
70                     <th>How many items?</th>
71                     <td>
72                         <input dojoType="dijit.form.NumberSpinner" value="1"
73                             name="count" constraints="{min: 1, max: 100}" />
74                     </td>
75                 </tr>
76                 <tr>
77                     <th>Stream</th>
78                     <td>
79                         <input id="stream_selector" />
80                     </td>
81                 </tr>
82                 <tr>
83                     <th>Date Expected</th>
84                     <td>
85                         <input dojoType="dijit.form.DateTextBox"
86                             id="create-date-expected" name="date_expected"
87                             required="false" />
88                     </td>
89                 </tr>
90                 <tr>
91                     <th>Date Received</th>
92                     <td>
93                         <input dojoType="dijit.form.DateTextBox"
94                             name="date_received" required="false" />
95                     </td>
96                 </tr>
97                 <tr>
98                     <th>Status</th>
99                     <td>
100                         <select dojoType="dijit.form.FilteringSelect"
101                             name="status">
102                             [%- PROCESS status_values -%]
103                         </select>
104                     </td>
105                 </tr>
106                 <tr>
107                     <td colspan="2" align="center">
108                         <span dojoType="dijit.form.Button" type="submit">
109                             Create
110                         </span>
111                     </td>
112                 </tr>
113             </table>
114         </div>
115         <select jsId="status_selector" dojoType="dijit.form.FilteringSelect">
116             [%- PROCESS status_values -%]
117         </select>
118         <div dojoType="openils.widget.ProgressDialog" jsId="progress_dialog">
119         </div>
120     </div>
121 </div>
122 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/serial/list_item.js"></script>
123 [% END %]