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