Skip to content

Commit

Permalink
Fixed issue #10077: preview group from question
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 8, 2015
1 parent 8806122 commit 35e84ef
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions application/views/admin/survey/Question/questionbar_view.php
Expand Up @@ -8,6 +8,8 @@

<?php if(Permission::model()->hasSurveyPermission($surveyid,'surveycontent','read')): ?>
<?php if (count($languagelist) > 1): ?>

<!-- preview question -->
<!-- Single button -->
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand All @@ -24,11 +26,39 @@
<?php endforeach; ?>
</ul>
</div>


<!-- preview group -->
<!-- Preview multilangue -->
<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 eT("Preview its question group"); ?> <span class="caret"></span>
</button>
<ul class="dropdown-menu" style="min-width : 252px;">
<?php foreach ($languagelist as $tmp_lang): ?>
<li>
<a target="_blank" href="<?php echo $this->createUrl("survey/index/action/previewgroup/sid/{$surveyid}/gid/{$gid}/lang/" . $tmp_lang); ?>" >
<?php echo getLanguageNameFromCode($tmp_lang,false); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>

<?php else:?>

<!-- preview question -->
<a class="btn btn-default" href='<?php echo $this->createUrl("survey/index/action/previewquestion/sid/" . $surveyid . "/gid/" . $gid . "/qid/" . $qid); ?>' role="button" target="_blank">
<span class="icon-do"></span>
<?php eT("Preview ");?>
</a>

<!-- preview question group -->
<a class="btn btn-default" href="<?php echo $this->createUrl("survey/index/action/previewgroup/sid/$surveyid/gid/$gid/"); ?>" role="button" target="_blank">
<span class="icon-do"></span>
<?php eT("Preview its question group");?>
</a>
<?php endif; ?>
<?php else: ?>
<a class="btn disabled" href="#" role="button">
Expand Down

0 comments on commit 35e84ef

Please sign in to comment.