]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/conify/global/action/survey.tt2
moved CSS out to skin/them files
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / action / survey.tt2
1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/action/survey.js'> </script>
3 <h1>Survey List</h1><br/>
4
5 <script>
6     function formatName(inDatum) {
7         for(var i in svCache){
8             var sv = svCache[i];
9             var id = sv.id();
10             if (inDatum  == sv.name()){
11                 return '<a href="[% ctx.base_uri %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
12             }
13         }
14     }
15 </script>
16
17 <button dojoType='dijit.form.Button' onclick='svNewSurvey();'>Add New Survey</button>
18 <button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>Delete Selected</button>
19 <button dojoType='dijit.form.Button' onclick='endSurvey();'>End Selected Surveys</button>
20 <script>dojo.require('openils.widget.GridColumnPicker');</script>
21
22 <!-- column picker menu-->
23 <div dojoType="openils.widget.GridColumnPicker" jsid="svGridMenu" id="svGridMenu" style="display: none;" grid='svGrid'>
24     <div dojoType="dojox.widget.PlaceholderMenuItem" label="GridColumns"></div> 
25 </div>
26 <!-- grid -->
27 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:600px;'>
28     <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}" 
29            rowSelector='20px' columnReordering='true' headerMenu="svGridMenu">
30         <thead>
31             <tr>
32                 <th field="id">Survey ID</th>
33                 <th field="name" formatter='formatName' width='auto'>Name</th>
34                 <th field="description" width='auto'>Description</th>                    
35                 <th field="owner" get='getOrgInfo'>Owning Library</th>
36                 <th field="start_date" width='auto' get='getDateTimeField'>Survey Start Date</th>
37                 <th field="end_date" width='auto' get='getDateTimeField'>End Date</th>
38                 <th field="opac" formatter='formatBool'>OPAC Survey?</th>                
39                 <th field="poll" formatter='formatBool' >Poll Style?</th>
40                 <th field="required" formatter='formatBool'>Is Required?</th>
41                 <th field="usr_summary" formatter='formatBool'>Display in User Summary?</th>
42             </tr>
43         </thead>
44     </table>    
45 </div>
46
47 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='New Survey' execute='svCreate(arguments[0]);'>
48
49         <table id='surveyDialog'>
50             <tr>
51                 <td>Name</td>
52                 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
53             </tr>
54             <tr>
55                 <td>Description</td>
56                 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
57             </tr>
58             <tr>
59                 <td>Owning Library</td>
60                 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'/></td>
61             </tr>
62             <tr>
63                 <td>Start Date</td>
64                 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
65             </tr>
66             <tr>
67                 <td>End Date</td>
68                 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
69             </tr>
70             <tr>
71                 <td>OPAC Survey?</td>
72                 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
73             </tr>
74             <tr>
75                 <td>Poll Style?</td>
76                 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
77             </tr>
78             <tr>
79                 <td>Is Required?</td>
80                 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
81             </tr>
82             <tr>
83                 <td>Display in User Summary?</td>
84                 <td><input dojoType='dijit.form.CheckBox' name='svUsr_summary'></td>
85             </tr>
86             <tr>
87                 <td colspan='2' align='center'>
88                     <button jsId='createSave' dojoType='dijit.form.Button' type='submit'>Save Changes</button>
89
90                     
91                 </td>
92             </tr>
93             
94         </table>
95 </div>
96
97 [% END %]
98
99