-
Notifications
You must be signed in to change notification settings - Fork 988
/
surveybar_view.php
666 lines (580 loc) · 36.8 KB
/
surveybar_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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
<?php
/**
* Display the survey bar.
* Used for all survey editing action, and group / questions lists.
* @var AdminController $this
* @var Survey $oSurvey
*/
?>
<?php
/*
<topbar></topbar>
*/
?>
<div class='menubar surveybar' id="surveybarid">
<div class='row container-fluid row-button-margin-bottom'>
<?php // If there are no save or close buttons, take up some more space (useful for 1366x768 screens) ?>
<?php if (!isset($surveybar['savebutton']['form']) && (!isset($surveybar['saveandclosebutton'])) && (!isset($surveybar['closebutton']))): ?>
<div class="col-md-12 col-xs-6">
<?php else: ?>
<div class="col-md-8 col-xs-6">
<?php endif; ?>
<!-- Add a new group -->
<?php if(isset($surveybar['buttons']['newgroup'])):?>
<?php if ($oSurvey->isActive): ?>
<span class="btntooltip" data-toggle="tooltip" data-placement="bottom" title="<?php eT("This survey is currently active."); ?>" style="display: inline-block" data-toggle="tooltip" data-placement="bottom" title="<?php eT('Survey cannot be activated. Either you have no permission or there are no questions.'); ?>">
<button type="button" class="btn btn-default btntooltip" disabled="disabled">
<span class="icon-add"></span>
<?php eT("Add new group"); ?>
</button>
</span>
<?php elseif(Permission::model()->hasSurveyPermission($surveyid,'surveycontent','create')): ?>
<a class="btn btn-default" href="<?php echo $this->createUrl("admin/questiongroups/sa/add/surveyid/$surveyid"); ?>" role="button">
<span class="icon-add"></span>
<?php eT("Add new group");?>
</a>
<a class="btn btn-default" href="<?php echo $this->createUrl("admin/questiongroups/sa/importview/surveyid/$surveyid"); ?>" role="button">
<span class="icon-import"></span>
<?php eT("Import a group");?>
</a>
<?php endif;?>
<?php endif;?>
<!-- Add a new question -->
<?php if(isset($surveybar['buttons']['newquestion'])):?>
<?php if ($oSurvey->isActive): ?>
<span class="btntooltip" data-toggle="tooltip" data-placement="bottom" title="<?php eT("This survey is currently active."); ?>" style="display: inline-block" data-toggle="tooltip" data-placement="bottom" title="<?php eT('Survey cannot be activated. Either you have no permission or there are no questions.'); ?>">
<button type="button" class="btn btn-default btntooltip" disabled="disabled">
<span class="icon-add"></span>
<?php eT("Add new question"); ?>
</button>
</span>
<?php elseif(Permission::model()->hasSurveyPermission($surveyid,'surveycontent','create')): ?>
<?php if(!$surveyHasGroup): ?>
<span class="btntooltip" data-toggle="tooltip" data-placement="bottom" title="<?php eT("You must first create a question group."); ?>" style="display: inline-block" data-toggle="tooltip" data-placement="bottom" title="<?php eT('Survey cannot be activated. Either you have no permission or there are no questions.'); ?>">
<button type="button" class="btn btn-default btntooltip" disabled="disabled">
<span class="icon-add"></span>
<?php eT("Add new question"); ?>
</button>
</span>
<?php else:?>
<a class="btn btn-default" href='<?php echo $this->createUrl("admin/questions/sa/newquestion/surveyid/".$surveyid); ?>' role="button">
<span class="icon-add"></span>
<?php eT("Add new question"); ?>
</a>
<a class="btn btn-default" href='<?php echo $this->createUrl("admin/questions/sa/importview/surveyid/".$surveyid); ?>' role="button">
<span class="icon-import"></span>
<?php eT("Import a question"); ?>
</a>
<?php endif; ?>
<?php endif; ?>
<?php endif;?>
<!-- Left buttons for survey summary -->
<?php if(isset($surveybar['buttons']['view'])):?>
<!-- survey activation -->
<?php if(!$oSurvey->isActive): ?>
<!-- activate -->
<?php if($canactivate): ?>
<a id='ls-activate-survey' class="btn btn-success" href="<?php echo $this->createUrl("admin/survey/sa/activate/surveyid/$surveyid"); ?>" role="button">
<?php eT("Activate this survey"); ?>
</a>
<!-- can't activate -->
<?php elseif (Permission::model()->hasSurveyPermission($surveyid, 'surveyactivation', 'update')): ?>
<span class="btntooltip" style="display: inline-block" data-toggle="tooltip" data-placement="bottom" title="<?php eT('Survey cannot be activated. Either you have no permission or there are no questions.'); ?>">
<button id='ls-activate-survey' type="button" class="btn btn-success btntooltip" disabled="disabled">
<?php eT("Activate this survey"); ?>
</button>
</span>
<?php endif; ?>
<?php else : ?>
<!-- activate expired survey -->
<?php if($expired) : ?>
<span class="btntooltip" style="display: inline-block" data-toggle="tooltip" data-placement="bottom" data-html="true" title="<?php eT('This survey is active but expired.'); ?><br><?php eT('Click to adjust.'); ?>">
<a href='<?php echo $this->createUrl("admin/survey/editlocalsettings/surveyid/$surveyid#publicationoptions");?>'class="btn btn-success btntooltip" >
<span class="fa fa-ban"> </span>
<?php eT("Expired");?>
</a>
</span>
<?php elseif($notstarted) : ?>
<span class="btntooltip" style="display: inline-block" data-toggle="tooltip" data-placement="bottom" title='<?php eT("This survey is active but has a start date."); ?>'>
<button type="button" class="btn btn-success btntooltip" disabled="disabled" >
<span class="fa fa-clock-o"> </span>
<?php eT("Activate this survey"); ?>
</button>
</span>
<?php endif; ?>
<!-- Stop survey -->
<?php if($canactivate): ?>
<a class="btn btn-danger btntooltip" href="<?php echo $this->createUrl("admin/survey/sa/deactivate/surveyid/$surveyid"); ?>" role="button">
<?php eT("Stop this survey"); ?>
</a>
<?php endif; ?>
<?php endif; ?>
<!-- Preview/Execute survey -->
<?php if($oSurvey->isActive || $surveycontent) : ?>
<!-- Multinlinguage -->
<?php if(count($oSurvey->allLanguages)>1): ?>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="icon-do" ></span>
<?php echo $icontext;?> <span class="caret"></span>
</button>
<ul class="dropdown-menu" style="min-width : 252px;">
<?php foreach ($oSurvey->allLanguages as $tmp_lang): ?>
<li>
<a target='_blank' href='<?php echo $this->createUrl("survey/index",array('sid'=>$surveyid,'newtest'=>"Y",'lang'=>$tmp_lang));?>'>
<?php echo getLanguageNameFromCode($tmp_lang,false); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<!-- uniq language -->
<?php else: ?>
<a class="btn btn-default btntooltip" href="<?php echo $this->createUrl("survey/index",array('sid'=>$surveyid,'newtest'=>"Y",'lang'=>$oSurvey->language)); ?>" role="button" accesskey='d' target='_blank'>
<span class="icon-do" ></span>
<?php echo $icontext;?>
</a>
<?php endif;?>
<?php endif; ?>
<!-- Survey Properties -->
<?php if(!isset($surveybar['active_survey_properties']) && $showSurveyPropertiesMenu && 1==2):?>
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="icon-edit" ></span>
<?php eT("Survey properties");?> <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<?php
if($surveylocale || $surveysettings): ?>
<!-- Edit text elements and general settings -->
<li>
<a href='<?php echo $this->createUrl("admin/survey/sa/editlocalsettings/surveyid/$surveyid");?>'>
<span class="icon-edit" ></span>
<?php eT("General settings & texts");?>
</a>
</li>
<?php endif; ?>
<?php if($surveysecurity): ?>
<!-- Survey permissions -->
<li>
<a href='<?php echo $this->createUrl("admin/surveypermission/sa/view/surveyid/$surveyid");?>' >
<span class="icon-security" ></span>
<?php eT("Survey permissions");?>
</a>
</li>
<?php endif; ?>
<?php if($quotas): ?>
<!-- Quotas -->
<li>
<a href='<?php echo $this->createUrl("admin/quotas/sa/index/surveyid/$surveyid/");?>' >
<span class="icon-quota" ></span>
<?php eT("Quotas");?>
</a>
</li>
<?php endif; ?>
<?php if($assessments): ?>
<!-- Assessments -->
<li>
<a href='<?php echo $this->createUrl("admin/assessments/sa/index/surveyid/$surveyid");?>' >
<span class="icon-assessments" ></span>
<?php eT("Assessments");?>
</a>
</li>
<?php endif; ?>
<?php if($surveylocale): ?>
<!-- Email templates -->
<li>
<a href='<?php echo $this->createUrl("admin/emailtemplates/sa/index/surveyid/$surveyid");?>' >
<span class="icon-emailtemplates" ></span>
<?php eT("Email templates");?>
</a>
</li>
<?php endif; ?>
</ul>
</div>
<?php elseif (isset($surveybar['active_survey_properties'])):?>
<button type="button" class="btn btn-default btntooltip active">
<span class="icon-expressionmanagercheck" ></span>
<?php echo $surveybar['active_survey_properties']['txt'];?>
</button>
<?php endif;?>
<!-- TOOLS -->
<?php if ($showToolsMenu): ?>
<div class="btn-group hidden-xs">
<!-- Main button dropdown -->
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="icon-tools" ></span>
<?php eT('Tools');?><span class="caret"></span>
</button>
<!-- dropdown -->
<ul class="dropdown-menu">
<?php if ($surveydelete): ?>
<!-- Delete survey -->
<li>
<a href="<?php echo $this->createUrl("admin/survey/sa/delete/surveyid/{$surveyid}"); ?>">
<span class="fa fa-trash" ></span>
<?php eT("Delete survey");?>
</a>
</li>
<?php endif; ?>
<?php if ($surveytranslate): ?>
<!-- surveytranslate -->
<?php if($hasadditionallanguages): ?>
<!-- Quick-translation -->
<li>
<a href="<?php echo $this->createUrl("admin/translate/sa/index/surveyid/{$surveyid}");?>">
<span class="fa fa-language" ></span>
<?php eT("Quick-translation");?>
</a>
</li>
<?php else: ?>
<!-- Quick-translation disabled -->
<li>
<a href="#" onclick="alert('<?php eT("Currently there are no additional languages configured for this survey.", "js");?>');" >
<span class="fa fa-language" ></span>
<?php eT("Quick-translation");?>
</a>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (Permission::model()->hasSurveyPermission($surveyid,'surveycontent','update')): ?>
<li>
<?php if ($conditionscount>0):?>
<!-- condition -->
<a href="<?php echo $this->createUrl("/admin/conditions/sa/index/subaction/resetsurveylogic/surveyid/{$surveyid}"); ?>">
<span class="icon-resetsurveylogic" ></span>
<?php eT("Reset conditions");?>
</a>
<?php else: ?>
<!-- condition disabled -->
<a href="#" onclick="alert('<?php eT("Currently there are no conditions configured for this survey.", "js"); ?>');" >
<span class="icon-resetsurveylogic" ></span>
<?php eT("Reset conditions");?>
</a>
<?php endif; ?>
</li>
<?php if (isset($extraToolsMenuItems)): ?>
<?php foreach ($extraToolsMenuItems as $menuItem): ?>
<?php if ($menuItem->isDivider()): ?>
<li class="divider"></li>
<?php elseif ($menuItem->isSmallText()): ?>
<li class="dropdown-header"><?php echo $menuItem->getLabel();?></li>
<?php else: ?>
<li>
<a href="<?php echo $menuItem->getHref(); ?>">
<!-- Spit out icon if present -->
<?php if ($menuItem->getIconClass() != ''): ?>
<span class="<?php echo $menuItem->getIconClass(); ?>"> </span>
<?php endif; ?>
<?php echo $menuItem->getLabel(); ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if($surveycontentread): ?>
<!-- survey content -->
<?php if($onelanguage): ?>
<!-- one language -->
<!-- Survey logic file -->
<li>
<a href='<?php echo $this->createUrl("admin/expressions/sa/survey_logic_file/sid/$surveyid/");?>' >
<span class="icon-expressionmanagercheck" ></span>
<?php eT("Survey logic file");?>
</a>
</li>
<?php else : ?>
<!-- multilangue -->
<li role="separator" class="divider"></li>
<!-- Survey logic file -->
<li class="dropdown-header"><?php eT("Survey logic file");?></li>
<?php foreach ($oSurvey->allLanguages as $tmp_lang): ?>
<!-- Languages -->
<li>
<a href='<?php echo $this->createUrl("admin/expressions/sa/survey_logic_file/sid/$surveyid/lang/$tmp_lang");?>'>
<span class="icon-expressionmanagercheck" ></span>
<?php echo getLanguageNameFromCode($tmp_lang,false);?>
</a>
</li>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
<?php if(!$oSurvey->isActive): ?>
<li role="separator" class="divider"></li>
<!-- Regenerate question codes -->
<li class="dropdown-header">
<?php eT("Regenerate question codes");?>
</li>
<!-- Straight -->
<li>
<a href="<?php echo $this->createUrl("/admin/survey/sa/regenquestioncodes/surveyid/{$surveyid}/subaction/straight"); ?>">
<span class="icon-resetsurveylogic" ></span>
<?php eT("Straight");?>
</a>
</li>
<!-- By question group -->
<li>
<a href="<?php echo $this->createUrl("/admin/survey/sa/regenquestioncodes/surveyid/{$surveyid}/subaction/bygroup"); ?>">
<span class="icon-resetsurveylogic" ></span>
<?php eT("By question group");?>
</a>
</li>
<?php endif; ?>
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
<!-- Display / Export -->
<div class="btn-group hidden-xs">
<!-- Main dropdown -->
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="icon-display_export" ></span>
<?php eT("Display / Export");?> <span class="caret"></span>
</button>
<!-- dropdown -->
<ul class="dropdown-menu">
<?php if($surveyexport): ?>
<!-- survey export -->
<!-- Export -->
<li class="dropdown-header"> <?php eT("Export...");?></li>
<?php if($surveyexport): ?>
<!-- Survey structure -->
<li>
<a href='<?php echo $this->createUrl("admin/export/sa/survey/action/exportstructurexml/surveyid/$surveyid");?>' >
<span class="icon-export" ></span>
<?php eT("Survey structure (.lss)");?>
</a>
</li>
<?php endif; ?>
<?php if($respstatsread && $surveyexport): ?>
<?php if ($oSurvey->isActive):?>
<!-- Survey archive -->
<li>
<a href='<?php echo $this->createUrl("admin/export/sa/survey/action/exportarchive/surveyid/$surveyid");?>' >
<span class="icon-export" ></span>
<?php eT("Survey archive (.lsa)");?>
</a>
</li>
<?php else: ?>
<!-- Survey archive unactivated -->
<li>
<a href="#" onclick="alert('<?php eT("You can only archive active surveys.", "js");?>');" >
<span class="icon-export" ></span>
<?php eT("Survey archive (.lsa)");?>
</a>
</li>
<?php endif;?>
<?php endif; ?>
<?php if($surveyexport): ?>
<!-- queXML -->
<li>
<a href='<?php echo $this->createUrl("admin/export/sa/survey/action/exportstructurequexml/surveyid/$surveyid");?>' >
<span class="icon-export" ></span>
<?php eT("queXML format (*.xml)");?>
</a>
</li>
<!-- queXMLPDF -->
<li>
<a href='<?php echo $this->createUrl("admin/export/sa/quexml/surveyid/$surveyid");?>' >
<span class="icon-export" ></span>
<?php eT("queXML PDF export");?>
</a>
</li>
<!-- Tab-separated-values -->
<li>
<a href='<?php echo $this->createUrl("admin/export/sa/survey/action/exportstructuretsv/surveyid/$surveyid");?>' >
<span class="icon-export" ></span>
<?php eT("Tab-separated-values format (*.txt)");?>
</a>
</li>
<!-- Survey printable version -->
<li>
<a href='<?php echo $this->createUrl("admin/export/sa/survey/action/exportprintables/surveyid/$surveyid");?>' >
<span class="icon-export" ></span>
<?php eT("Printable survey (*.html)");?>
</a>
</li>
<?php endif; ?>
<?php endif;?>
<?php if(Permission::model()->hasSurveyPermission($surveyid,'surveycontent','read')): ?>
<?php if($onelanguage):?>
<!-- Printable version -->
<li>
<a target='_blank' href='<?php echo $this->createUrl("admin/printablesurvey/sa/index/surveyid/$surveyid");?>' >
<span class="fa fa-print"></span>
<?php eT("Printable survey");?>
</a>
</li>
<?php else: ?>
<li role="separator" class="divider"></li>
<!-- Printable version multilangue -->
<li class="dropdown-header"><?php eT("Printable version");?></li>
<?php foreach ($oSurvey->allLanguages as $tmp_lang): ?>
<li>
<a accesskey='d' target='_blank' href='<?php echo $this->createUrl("admin/printablesurvey/sa/index/surveyid/$surveyid/lang/$tmp_lang");?>'>
<span class="fa fa-print"></span>
<?php echo getLanguageNameFromCode($tmp_lang,false);?>
</a>
</li>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
</ul>
</div>
<!-- Token -->
<?php if($tokenmanagement):?>
<a class="btn btn-default btntooltip hidden-xs" href="<?php echo $this->createUrl("admin/tokens/sa/index/surveyid/$surveyid"); ?>" role="button">
<span class="fa fa-user"></span>
<?php eT("Survey participants");?>
</a>
<?php endif; ?>
<!-- Statistics -->
<?php if($respstatsread || $responsescreate || $responsesread):?>
<div class="btn-group">
<!-- main dropdown header -->
<?php if($oSurvey->isActive):?>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="icon-responses"></span>
<?php eT("Responses");?><span class="caret"></span>
</button>
<?php else:?>
<button type="button" data-toggle="tooltip" data-placement="bottom" title="<?php eT("This survey is not active - no responses are available.");?>" class="readonly btn btn-default">
<span class="icon-responses"></span>
<?php eT("Responses");?><span class="caret"></span>
</button>
<?php endif; ?>
<!-- dropdown -->
<ul class="dropdown-menu">
<?php if($respstatsread && $oSurvey->isActive):?>
<!-- Responses & statistics -->
<li>
<a href='<?php echo $this->createUrl("admin/responses/sa/index/surveyid/$surveyid/");?>' >
<span class="icon-browse"></span>
<?php eT("Responses & statistics");?>
</a>
</li>
<?php endif; ?>
<?php if($responsescreate && $oSurvey->isActive): ?>
<!-- Data entry screen -->
<li>
<a href='<?php echo $this->createUrl("admin/dataentry/sa/view/surveyid/$surveyid");?>' >
<span class="fa fa-keyboard-o"></span>
<?php eT("Data entry screen");?>
</a>
</li>
<?php endif; ?>
<?php if($responsesread && $oSurvey->isActive): ?>
<!-- Partial (saved) responses -->
<li>
<a href='<?php echo $this->createUrl("admin/saved/sa/view/surveyid/$surveyid");?>' >
<span class="icon-saved"></span>
<?php eT("Partial (saved) responses");?>
</a>
</li>
<?php endif; ?>
</ul>
</div>
<?php endif;?>
<!-- Extra menus from plugins -->
<?php // TODO: This views should be in same module as ExtraMenu and ExtraMenuItem classes (not plugin) ?>
<?php // TODO: Copied from adminmenu.php ?>
<?php foreach ($beforeSurveyBarRender as $menu): ?>
<div class='btn-group'>
<?php if ($menu->isDropDown()): ?>
<button class="dropdown-toggle" data-toggle="dropdown" href="#">
<?php echo $menu->getLabel(); ?>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<?php foreach ($menu->getMenuItems() as $menuItem): ?>
<?php if ($menuItem->isDivider()): ?>
<li class="divider"></li>
<?php elseif ($menuItem->isSmallText()): ?>
<li class="dropdown-header"><?php echo $menuItem->getLabel();?></li>
<?php else: ?>
<li>
<a href="<?php echo $menuItem->getHref(); ?>">
<!-- Spit out icon if present -->
<?php if ($menuItem->getIconClass() != ''): ?>
<span class="<?php echo $menuItem->getIconClass(); ?>"> </span>
<?php endif; ?>
<?php echo $menuItem->getLabel(); ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php else: ?>
<a class='btn btn-default' href="<?php echo $menu->getHref(); ?>">
<?php if ($menu->getIconClass()): ?>
<span class="<?php echo $menu->getIconClass(); ?>"></span>
<?php endif; ?>
<?php echo $menu->getLabel(); ?>
</a>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php if($permission):?>
<!-- List Groups -->
<!-- admin/survey/sa/view/surveyid/838454 listquestiongroups($iSurveyID)-->
<a class="btn btn-default hidden-sm hidden-md hidden-lg" href="<?php echo $this->createUrl("admin/survey/sa/listquestiongroups/surveyid/$surveyid"); ?>">
<span class="fa fa-list"></span>
<?php eT("List question groups");?>
</a>
<!-- List Questions -->
<a class="btn btn-default hidden-sm hidden-md hidden-lg" href="<?php echo $this->createUrl("admin/survey/sa/listquestions/surveyid/$surveyid"); ?>">
<span class="fa fa-list"></span>
<?php eT("List questions");?>
</a>
<?php endif; ?>
<?php endif;?>
<?php if(isset($surveybar['importquestion'])):?>
<a class="btn btn-default" href="<?php echo Yii::App()->createUrl('admin/questions/sa/importview/groupid/'.$groupid.'/surveyid/'.$surveyid);?>" role="button">
<span class="icon-import"></span>
<?php eT('Import a question'); ?>
</a>
<?php endif;?>
<?php if(isset($surveybar['importquestiongroup'])):?>
<a class="btn btn-default" href="<?php echo Yii::App()->createUrl('admin/questiongroups/sa/importview/surveyid/'.$surveyid);?>" role="button">
<span class="icon-import"></span>
<?php eT('Import a group'); ?>
</a>
<?php endif;?>
</div>
<!-- right action buttons -->
<div class=" col-md-4 text-right">
<?php if(isset($surveybar['savebutton']['form'])):?>
<!-- Save -->
<a class="btn btn-success" href="#" role="button" id="save-button" >
<span class="fa fa-floppy-o"></span>
<?php if(isset($surveybar['savebutton']['text']))
{
echo $surveybar['savebutton']['text'];
}
else{
eT("Save");
}?>
</a>
<?php endif;?>
<?php /*
<!-- Save and close -->
<?php if(isset($surveybar['saveandclosebutton'])):?>
<a class="btn btn-default" href="#" role="button" id='save-and-close-button'>
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
</a>
<?php endif; ?>
*/ ?>
<?php /*
<!-- Close -->
<?php if(isset($surveybar['closebutton']['url'])):?>
<a class="btn btn-danger" href="<?php echo $surveybar['closebutton']['url']; ?>" role="button">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>
*/ ?>
</div>
</div>
</div>