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/>
6 function formatName(inDatum) {
10 if (inDatum == sv.name()){
11 return '<a href="[% ctx.base_path %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
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>
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>
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">
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>
47 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='New Survey' execute='svCreate(arguments[0]);'>
49 <table id='surveyDialog'>
52 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
56 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
59 <td>Owning Library</td>
60 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'/></td>
64 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
68 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
72 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
76 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
80 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
83 <td>Display in User Summary?</td>
84 <td><input dojoType='dijit.form.CheckBox' name='svUsr_summary'></td>
87 <td colspan='2' align='center'>
88 <button jsId='createSave' dojoType='dijit.form.Button' type='submit'>Save Changes</button>