]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/acq/picklist/list.tt2
implemented list clone and merge
[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 <div class='oils-acq-actions-div'>
35
36     <div dojoType="dijit.form.DropDownButton">
37         <span>New Selection List</span>
38         <div dojoType="dijit.TooltipDialog" execute="createPL(arguments[0]);">
39             <table class='dijitTooltipTable'>
40                 <tr>
41                     <td><label for="name">Name:</label></td>
42                     <td><input dojoType="dijit.form.TextBox" name="name"/></td>
43                 </tr>
44                 <tr>
45                     <td colspan='2' align='center'>
46                         <button dojoType='dijit.form.Button' type="submit">Create</button>
47                     </td>
48                 </tr>
49             </table>
50         </div>
51     </div>
52
53     <button dojoType="dijit.form.Button" onclick="deleteFromGrid();">Delete Selected</button>
54
55     <div dojoType="dijit.form.DropDownButton">
56         <span>Clone Selected</span>
57         <div dojoType="dijit.TooltipDialog" execute="cloneSelectedPl(arguments[0]);">
58             <table class='dijitTooltipTable'>
59                 <tr>
60                     <td><label for="name">New Name:</label></td>
61                     <td><input dojoType="dijit.form.TextBox" name="name"/></td>
62                 </tr>
63                 <tr>
64                     <td colspan='2' align='center'>
65                         <button dojoType='dijit.form.Button' type="submit">Clone</button>
66                     </td>
67                 </tr>
68             </table>
69         </div>
70     </div>
71
72     <div dojoType="dijit.form.DropDownButton">
73         <span>Merge Selected</span>
74         <div dojoType="dijit.TooltipDialog" execute="mergeSelectedPl(arguments[0]);" jsId='plMergeDialog'>
75             <table class='dijitTooltipTable'>
76                 <tr>
77                     <td><label for="name">Choose the Lead Selection List:</label></td>
78                     <td><input jsId='plMergeLeadSelector' dojoType="dijit.form.FilteringSelect" name="lead"/></td>
79                 </tr>
80                 <tr>
81                     <td colspan='2' align='center'>
82                         <button dojoType='dijit.form.Button' type="submit">Merge</button>
83                     </td>
84                 </tr>
85             </table>
86         </div>
87     </div>
88
89 </div>
90
91 <div dojoType="dijit.layout.ContentPane" layoutAlign="top">
92     <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
93         <table jsId="plListGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" rowSelector='20px'>
94             <thead>
95                 <tr>
96                     <th field="id">ID</th>
97                     <th field="name" width='auto' editable='true'
98                         cellType='dojox.grid.cells._Widget'
99                         widgetClass='dijit.form.TextBox' formatter='formatName'>Name</th>
100                     <th field="owner" get='getOwnerName'>Selector</th>
101                     <th field="create_time" width='auto' get='getDateTimeField'>Create Time</th>
102                     <th field="edit_time" width='auto' get='getDateTimeField'>Edit Time</th>
103                     <th field="entry_count">Entry Count</th>
104                 </tr>
105             </thead>
106         </table>
107     </div>
108 </div>
109
110 <div class='hidden'><div jsId='progressDialog' dojoType='openils.widget.ProgressDialog'/></div>
111
112 [% END %]