a79f72fa9c6154f0f9e1a5be0c5071f99f0fa0ee
[working/Evergreen.git] / Open-ILS / web / templates / default / acq / picklist / list.tt2
1 [% WRAPPER 'default/base.tt2' %]
2 <div id='oils-acq-list-header' class='container'>
3     <div id='oils-acq-picklist-my-list-header'>
4         <div id='oils-acq-list-header-label'>My Selection Lists</div>
5     </div>
6     <div id='oils-acq-picklist-all-list-header'>
7         <div id='oils-acq-list-header-label'>All Selection Lists</div>
8     </div>
9 </div>
10
11 <script src='[% ctx.media_prefix %]/js/ui/default/acq/picklist/view_list.js'> </script>
12
13 <script>
14     if(location.href.match(/listall$/)) {
15         listAll = true;
16         dojo.style('oils-acq-picklist-my-list-header', 'visibility', 'hidden');
17         dojo.style('oils-acq-picklist-my-list-header', 'display', 'none');
18     } else {
19         dojo.style('oils-acq-picklist-all-list-header', 'visibility', 'hidden');
20         dojo.style('oils-acq-picklist-all-list-header', 'display', 'none');
21     }
22 </script>
23 <script>
24     function formatName(inDatum) {
25         for(var i in plCache){
26             var pl = plCache[i];
27             var id = pl.id();
28             if (inDatum  == pl.name()){
29                 return '<a href="[% ctx.base_uri %]/acq/picklist/view/'+id+'">'+inDatum+'</a>';
30             }
31         }
32     }
33 </script>
34
35 <div class='oils-acq-actions-div'>
36
37     <div dojoType="dijit.form.DropDownButton">
38         <span>New Selection List</span>
39         <div dojoType="dijit.TooltipDialog" execute="createPL(arguments[0]);">
40             <table class='dijitTooltipTable'>
41                 <tr>
42                     <td><label for="name">Name:</label></td>
43                     <td><input dojoType="dijit.form.TextBox" name="name"/></td>
44                 </tr>
45                 <tr>
46                     <td colspan='2' align='center'>
47                         <button dojoType='dijit.form.Button' type="submit">Create</button>
48                     </td>
49                 </tr>
50             </table>
51         </div>
52     </div>
53
54     <div dojoType="dijit.form.DropDownButton">
55         <span>Clone Selected</span>
56         <div dojoType="dijit.TooltipDialog" execute="cloneSelectedPl(arguments[0]);">
57             <table class='dijitTooltipTable'>
58                 <tr>
59                     <td><label for="name">New Name:</label></td>
60                     <td><input dojoType="dijit.form.TextBox" name="name"/></td>
61                 </tr>
62                 <tr>
63                     <td colspan='2' align='center'>
64                         <button dojoType='dijit.form.Button' type="submit">Clone</button>
65                     </td>
66                 </tr>
67             </table>
68         </div>
69     </div>
70
71     <div dojoType="dijit.form.DropDownButton">
72         <span>Merge Selected</span>
73         <div dojoType="dijit.TooltipDialog" execute="mergeSelectedPl(arguments[0]);" jsId='plMergeDialog'>
74             <table class='dijitTooltipTable'>
75                 <tr>
76                     <td><label for="name">Choose the Lead Selection List:</label></td>
77                     <td><input jsId='plMergeLeadSelector' dojoType="dijit.form.FilteringSelect" name="lead"/></td>
78                 </tr>
79                 <tr>
80                     <td colspan='2' align='center'>
81                         <button dojoType='dijit.form.Button' type="submit">Merge</button>
82                     </td>
83                 </tr>
84             </table>
85         </div>
86     </div>
87
88     <button dojoType="dijit.form.Button" onclick="deleteFromGrid();">Delete Selected</button>
89 </div>
90
91 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
92     <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
93         <table 
94                 jsId="plListGrid" 
95                 dojoType="openils.widget.AutoGrid" 
96                 query="{id: '*'}" 
97                 fieldOrder="['name', 'owner', 'entry_count', 'create_time', 'edit_time']"
98                 suppressFields="['editor', 'creator']"
99                 query="{id: '*'}"
100                 defaultCellWidth='"auto"'
101                 fmClass='acqpl'
102                 editOnEnter='true'>
103             <thead>
104                 <tr>
105                     <th field="name" formatter='formatName'/>
106                     <th field="owner" get='getOwnerName'/>
107                     <th field="entry_count">Entry Count</th>
108                 </tr>
109             </thead>
110         </table>
111     </div>
112 </div>
113
114 <div class='hidden'>
115     <div jsId='progressDialog' dojoType='openils.widget.ProgressDialog'/>
116 </div>
117
118 [% END %]