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