layout tweaks
[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
4 <script>
5     function formatName(inDatum) {
6         for(var i in svCache){
7             var sv = svCache[i];
8             var id = sv.id();
9             if (inDatum  == sv.name()){
10                 return '<a href="[% ctx.base_path %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
11             }
12         }
13     }
14 </script>
15    <div dojoType="dijit.layout.ContentPane" layoutAlign='top'>
16         <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
17             <div>Survey List</div>
18             <div>
19                 <button dojoType='dijit.form.Button' onclick='svNewSurvey();'>Add New Survey</button>
20                 <button dojoType='dijit.form.Button' onclick='deleteFromGrid();'>Delete Selected</button>
21                 <button dojoType='dijit.form.Button' onclick='endSurvey();'>End Selected Surveys</button>
22             </div>
23         </div>
24
25 <!-- grid -->
26 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
27     <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}">
28         <thead>
29             <tr>
30                 <th field="id">Survey ID</th>
31                 <th field="name" formatter='formatName' width='auto'>Name</th>
32                 <th field="description" width='auto'>Description</th>                    
33                 <th field="owner" get='getOrgInfo'>Owning Library</th>
34                 <th field="start_date" width='auto' get='getDateTimeField'>Survey Start Date</th>
35                 <th field="end_date" width='auto' get='getDateTimeField'>End Date</th>
36                 <th field="opac" formatter='formatBool'>OPAC Survey?</th>                
37                 <th field="poll" formatter='formatBool' >Poll Style?</th>
38                 <th field="required" formatter='formatBool'>Is Required?</th>
39                 <th field="usr_summary" formatter='formatBool'>Display in User Summary?</th>
40             </tr>
41         </thead>
42     </table>    
43 </div>
44
45 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='New Survey' execute='svCreate(arguments[0]);'>
46
47         <table id='surveyDialog'>
48             <tr>
49                 <td>Name</td>
50                 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
51             </tr>
52             <tr>
53                 <td>Description</td>
54                 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
55             </tr>
56             <tr>
57                 <td>Owning Library</td>
58                 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'/></td>
59             </tr>
60             <tr>
61                 <td>Start Date</td>
62                 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
63             </tr>
64             <tr>
65                 <td>End Date</td>
66                 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
67             </tr>
68             <tr>
69                 <td>OPAC Survey?</td>
70                 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
71             </tr>
72             <tr>
73                 <td>Poll Style?</td>
74                 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
75             </tr>
76             <tr>
77                 <td>Is Required?</td>
78                 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
79             </tr>
80             <tr>
81                 <td>Display in User Summary?</td>
82                 <td><input dojoType='dijit.form.CheckBox' name='svUsr_summary'></td>
83             </tr>
84             <tr>
85                 <td colspan='2' align='center'>
86                     <button jsId='createSave' dojoType='dijit.form.Button' type='submit'>Save Changes</button>
87
88                     
89                 </td>
90             </tr>
91             
92         </table>
93 </div>
94
95 [% END %]
96
97