1 [% WRAPPER default/base.tt2 %]
2 <script src='[% ctx.media_prefix %]/js/ui/default/conify/global/action/survey.js'> </script>
5 function formatName(inDatum) {
9 if (inDatum == sv.name()){
10 return '<a href="[% ctx.base_path %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
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>
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>
26 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
27 <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}">
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>
45 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='New Survey' execute='svCreate(arguments[0]);'>
47 <table id='surveyDialog'>
50 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
54 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
57 <td>Owning Library</td>
58 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'/></td>
62 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
66 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
70 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
74 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
78 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
81 <td>Display in User Summary?</td>
82 <td><input dojoType='dijit.form.CheckBox' name='svUsr_summary'></td>
85 <td colspan='2' align='center'>
86 <button jsId='createSave' dojoType='dijit.form.Button' type='submit'>Save Changes</button>