/
organizeGroupsAndQuestions_view.php
37 lines (36 loc) · 1.87 KB
/
organizeGroupsAndQuestions_view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
App()->getClientScript()->registerPackage('jquery-nestedSortable');
App()->getClientScript()->registerScriptFile(Yii::app()->getConfig('adminscripts') . 'organize.js');
?>
<div class='header ui-widget-header'><?php $clang->eT('Organize question groups/questions');?></div>
<p>
<?php $clang->eT("To reorder questions/questiongroups just drag the question/group with your mouse to the desired position.");?><br />
<?php $clang->eT("After you are done please click the bottom 'Save' button to save your changes.");?>
</p>
<div class='movableList'>
<ol class="organizer">
<?php
foreach ($aGroupsAndQuestions as $aGroupAndQuestions)
{?>
<li id='list_g<?php echo $aGroupAndQuestions['gid'];?>'><div class='ui-widget-header'> <?php echo $aGroupAndQuestions['group_name'];?></div>
<?php if (isset ($aGroupAndQuestions['questions']))
{?>
<ol>
<?php
foreach($aGroupAndQuestions['questions'] as $aQuestion)
{?>
<li id='list_q<?php echo $aQuestion['qid'];?>'><div><b><a href='<?php echo Yii::app()->getController()->createUrl('admin/questions/sa/editquestion/surveyid/'.$surveyid.'/gid/'.$aQuestion['gid'].'/qid/'.$aQuestion['qid']);?>'><?php echo $aQuestion['title'];?></a></b>: <?php echo flattenText($aQuestion['question'],true);?></div></li>
<?php }?>
</ol>
<?php }?>
</li>
<?php
}?>
</ol>
</div>
<?php echo CHtml::form(array("admin/survey/sa/organize/surveyid/{$surveyid}"), 'post', array('id'=>'frmOrganize')); ?>
<p>
<input type='hidden' id='orgdata' name='orgdata' value='' />
<button id='btnSave'><?php echo $clang->eT('Save'); ?></button>
</p>
</form>