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) {
8 if (inDatum == sv.name()){
9 return '<a href="[% ctx.base_path %]/conify/global/action/survey/edit/'+id+'">'+inDatum+'</a>';
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>
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>
25 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style='height:400px'>
26 <table jsId="svGrid" dojoType="dojox.grid.DataGrid" query="{id: '*'}">
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>
44 <div style='display:none;' dojoType="dijit.Dialog" jsId='svSurveyDialog' title='New Survey' execute='svCreate(arguments[0]);'>
46 <table id='surveyDialog'>
49 <td><input dojoType='dijit.form.TextBox' name='svName'/></td>
53 <td><input dojoType='dijit.form.TextBox' name='svDescription'></td>
56 <td>Owning Library</td>
57 <td><select dojoType='openils.widget.OrgUnitFilteringSelect' name='svOwner' jsId='asvOwningOrg' searchAttr='shortname' labelAttr='shortname'/></td>
61 <td><input dojoType='dijit.form.TextBox' name='svStart_date'></td>
65 <td><input dojoType='dijit.form.TextBox' name='svEnd_date'></td>
69 <td><input dojoType='dijit.form.CheckBox' name='svOpac'></td>
73 <td><input dojoType='dijit.form.CheckBox' name='svPoll'></td>
77 <td><input dojoType='dijit.form.CheckBox' name='svRequired'></td>
80 <td>Display in User Summary?</td>
81 <td><input dojoType='dijit.form.CheckBox' name='svUsr_summary'></td>
84 <td colspan='2' align='center'>
85 <button jsId='createSave' dojoType='dijit.form.Button' type='submit'>Save Changes</button>