Skip to content

Commit

Permalink
Dev #L41-T938: 3.Top Bar removed custom surveybar css and synced css …
Browse files Browse the repository at this point in the history
…properties, fixed surveybar buttons and urls
  • Loading branch information
ptelu committed Jul 30, 2021
1 parent 7e3d62d commit 576a6e1
Show file tree
Hide file tree
Showing 55 changed files with 705 additions and 684 deletions.
8 changes: 3 additions & 5 deletions application/controllers/QuestionAdministrationController.php
Expand Up @@ -309,9 +309,7 @@ public function actionListQuestions($surveyid, $landOnSideMenuTab = 'settings')
$aData['display']['menu_bars']['listquestions'] = true;
$aData['sidemenu']['listquestions'] = true;
$aData['sidemenu']['landOnSideMenuTab'] = $landOnSideMenuTab;
$aData['surveybar']['returnbutton']['url'] = $this->createUrl(
"/surveyAdministration/listsurveys"
);
$aData['surveybar']['returnbutton']['url'] = "/surveyAdministration/listsurveys";

$aData["surveyHasGroup"] = $oSurvey->groups;
$aData['subaction'] = gT("Questions in this survey");
Expand Down Expand Up @@ -1239,10 +1237,10 @@ public function actionEditdefaultvalues($surveyid, $gid, $qid)

$aData['topBar']['name'] = 'baseTopbar_view';
$aData['topBar']['leftSideView'] = 'editQuestionTopbarLeft_view';
$aData['topBar']['rightSideView'] = 'questionTopbarRight_view';
$aData['topBar']['rightSideView'] = 'surveyTopbarRight_view';
$aData['showSaveButton'] = true;
$aData['showSaveAndCloseButton'] = true;
$aData['showCloseButton'] = true;
$aData['showWhiteCloseButton'] = true;
$aData['closeUrl'] = Yii::app()->createUrl(
'questionAdministration/view/',
[
Expand Down
4 changes: 2 additions & 2 deletions application/extensions/TopbarWidget/views/baseTopbar_view.php
Expand Up @@ -12,7 +12,7 @@
?>

<div class='menubar surveybar' id="<?= !(empty($topbarId)) ? $topbarId : 'surveybarid' ?>">
<div class='row container-fluid' style="margin-bottom: 8px;">
<div class='row'>
<?php if (!empty($leftSideContent)): ?>
<!-- Left Side -->
<div class="<?= !empty($rightSideContent) ? 'col-md-6' : 'col-md-12'?>">
Expand All @@ -22,7 +22,7 @@

<?php if (!empty($rightSideContent)): ?>
<!-- Right Side -->
<div class="<?= !empty($leftSideContent) ? 'col-md-6' : 'col-md-12'?> pull-right text-right">
<div class="<?= !empty($leftSideContent) ? 'col-md-6' : 'col-md-12' ?> pull-right text-right">
<?= $rightSideContent ?>
</div>
<?php endif; ?>
Expand Down
@@ -1,24 +1,21 @@
<!-- Save -->
<a id="save-button" style="margin-left: 5px;" class="btn btn-success pull-right" role="button">
<a id="save-button" class="btn btn-success pull-right" role="button">
<i class="fa fa-check"></i>
<?php eT("Save");?>
<?php eT("Save"); ?>
</a>

<!-- Back Button -->
<a class="btn btn-default" href="<?php echo $backUrl ?>" role="button">
<span class="fa fa-backward"></span>
&nbsp;&nbsp;
<?php eT('Back') ?>
</a>

<!-- Save and add question -->
<a class="btn btn-default" id='save-and-new-question-button' role="button">
<span class="fa fa-plus"></span>
<?php eT("Save & add question"); ?>
</a>

<!-- Save and new group -->
<a class="btn btn-default" id='save-and-new-button' role="button">
<span class="fa fa-plus"></span>
<?php eT("Save & add group"); ?>
</a>
</a>
@@ -1,19 +1,19 @@
<!-- Delete -->
<?php if(!empty($showDeleteButton)):?>
<?php if($oSurvey->active!='Y'): ?>
<?php if (!empty($showDeleteButton)) : ?>
<?php if ($oSurvey->active != 'Y') : ?>
<button class="btn btn-danger"
data-toggle="modal"
data-target="#confirmation-modal"
data-btnclass="btn-danger"
data-title="<?= gt('Delete this question')?>"
data-btntext="<?= gt('Delete')?>"
data-title="<?= gt('Delete this question') ?>"
data-btntext="<?= gt('Delete') ?>"
data-onclick='(function() { <?php echo convertGETtoPOST(Yii::app()->createUrl("questionAdministration/delete/", ["qid" => $qid, "redirectTo" => "groupoverview"])); ?>})'
data-message="<?php eT("Deleting this question will also delete any answer options and subquestions it includes. Are you sure you want to continue?","js"); ?>"
data-message="<?php eT("Deleting this question will also delete any answer options and subquestions it includes. Are you sure you want to continue?", "js"); ?>"
>
<span class="fa fa-trash"></span>
<?php eT("Delete"); ?>
</button>
<?php else: ?>
<?php else : ?>
<button class="btn btn-danger btntooltip" disabled data-toggle="tooltip" data-placement="bottom" title="<?php eT("You can't delete a question if the survey is active."); ?>">
<span class="fa fa-trash"></span>
<?php eT("Delete"); ?>
Expand Down
Expand Up @@ -11,7 +11,7 @@
<a class="btn btn-default"
href="<?php echo $closeUrl; ?>"
role="button"
id="save-and-close-form-button"
id="save-and-close-button"
onclick="$(this).addClass('disabled').attr('onclick', 'return false;');">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
Expand All @@ -23,7 +23,7 @@
<a class="btn btn-success"
href="<?php echo $closeUrl; ?>"
role="button"
id="save-and-close-form-button"
id="save-and-close-button"
onclick="$(this).addClass('disabled').attr('onclick', 'return false;');">
<span class="fa fa-saved"></span>
<?php eT("Save and close");?>
Expand All @@ -32,7 +32,7 @@

<!-- Save -->
<?php if(!empty($showSaveButton)): ?>
<a id="save-button" class="btn btn-success pull-right" style="margin-left: 5px;" role="button">
<a id="save-button" class="btn btn-success pull-right" role="button">
<i class="fa fa-check"></i>
<?php eT("Save");?>
</a>
Expand Down Expand Up @@ -69,4 +69,4 @@
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
<?php endif;?>
<?php endif;?>
Expand Up @@ -7,23 +7,23 @@

<!-- Download CSV -->
<?php if(!empty($showDownloadButton)):?>
<a class="btn btn-success pull-right" style="margin-left: 5px;" href="#" role="button" id="save-button">
<a class="btn btn-success pull-right" href="#" role="button" id="save-button">
<span class="fa fa fa-export" ></span>
<?php eT("Download CSV file"); ?>
</a>
<?php endif;?>

<!-- Send invitations buttons -->
<?php if(!empty($showSendInvitationButton)):?>
<a class="btn btn-success pull-right" style="margin-left: 5px;" href="#" role="button" id="send-invitation-button">
<a class="btn btn-success pull-right" href="#" role="button" id="send-invitation-button">
<span class="icon-invite" ></span>
<?php eT("Send invitations");?>
</a>
<?php endif;?>

<!-- Send reminder buttons -->
<?php if(!empty($showSendReminderButton)):?>
<a class="btn btn-success pull-right" style="margin-left: 5px;" href="#" role="button" id="send-reminders-button">
<a class="btn btn-success pull-right" href="#" role="button" id="send-reminders-button">
<span class="icon-invite" ></span>
<?php eT("Send reminders");?>
</a>
Expand Down
Expand Up @@ -15,7 +15,7 @@
<!-- Question Top Bar -->
<div class='menubar surveybar' id="<?= !(empty($topbarId)) ? $topbarId : 'surveybarid' ?>">
<?php if ($oQuestion->qid !== 0): ?>
<div id="question-summary-topbar" class='row container-fluid' style="margin-bottom: 8px;">
<div id="question-summary-topbar" class='row'>
<!-- Left Side -->
<div class="col-md-6">
<?= $leftSideContentSummary ?>
Expand All @@ -26,7 +26,7 @@
</div>
</div>
<?php endif; ?>
<div id="question-create-edit-topbar" class='row container-fluid' style="display: none; margin-bottom: 8px;">
<div id="question-create-edit-topbar" class='row' style="display: none;">
<!-- Left Side -->
<div class="<?= !empty($rightSideContent) ? 'col-md-6' : 'col-md-12'?>">
<?= $leftSideContentEditor ?>
Expand Down
53 changes: 26 additions & 27 deletions application/views/admin/labels/exportmulti_view.php
@@ -1,35 +1,34 @@
<?php
/**
* @var array $labelsets
*/
?>
<script type='text/javascript'>
<!--
var strSelectLabelset='<?php eT('You have to select at least one label set.','js');?>';
//-->
var strSelectLabelset = '<?php eT('You have to select at least one label set.', 'js');?>';
</script>

<div class="col-lg-12 list-surveys" style="margin-top: 10px;">
<div class="col-lg-12 list-surveys">
<div class="row">
<div class="col-lg-12 content-right text-center">

<?php echo CHtml::form(array("admin/export/sa/dumplabel"), 'post', array('id'=>'exportlabelset','class'=>'')); ?>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for='labelsets'><?php eT('Please choose the label sets you want to export:');?><br /><?php eT('(Select multiple label sets by using the Ctrl key)');?></label>
<div class="col-sm-3">
<select id='labelsets' multiple='multiple' name='lids[]' size='20' class="form-control">
<?php if (count($labelsets)>0)
{
foreach ($labelsets as $lb)
{
echo "<option value='{$lb[0]}'>{$lb[0]}: {$lb[1]}</option>\n";
}
} ?>

</select>
</div>
<p>
<br/>
<input type='submit' id='btnDumpLabelSets' value='<?php eT('Export selected label sets');?>' class="hidden"/>
<input type='hidden' name='action' value='dumplabel' />
</p>
</div>
</form>
<?php echo CHtml::form(["admin/export/sa/dumplabel"], 'post', ['id' => 'exportlabelset', 'class' => '']); ?>
<div class="form-group row">
<label class="col-sm-3 form-control-label" for='labelsets'><?php eT('Please choose the label sets you want to export:'); ?><br/><?php eT('(Select multiple label sets by using the Ctrl key)'); ?></label>
<div class="col-sm-3">
<select id='labelsets' multiple='multiple' name='lids[]' size='20' class="form-control">
<?php if (count($labelsets) > 0) {
foreach ($labelsets as $lb) {
echo "<option value='{$lb[0]}'>{$lb[0]}: {$lb[1]}</option>\n";
}
} ?>
</select>
</div>
<p>
<br/>
<input type='submit' id='btnDumpLabelSets' value='<?php eT('Export selected label sets'); ?>' class="hidden"/>
<input type='hidden' name='action' value='dumplabel'/>
</p>
</div>
<?php echo CHtml::endForm() ?>
</div>
</div>
</div>
Expand Down
30 changes: 14 additions & 16 deletions application/views/admin/labels/labelsetsbar_view.php
Expand Up @@ -6,17 +6,17 @@
</script>

<!-- Label Bar menu -->
<div class='menubar' id="labelbar" style="box-shadow: 3px 3px 3px #35363f; margin-bottom: 10px;">
<div class='row container-fluid'>
<div class='menubar surveybar' id="labelbar">
<div class='row'>

<div class="col-lg-6" style="margin-bottom: 10px;">
<div class="col-lg-6">

<!-- View buttons -->
<?php if (isset($labelbar['buttons']['view'])):?>
<?php if (Permission::model()->hasGlobalPermission('labelsets','create') || Permission::model()->hasGlobalPermission('labelsets','import')):?>

<!-- Create or Import -->
<a class="btn btn-default" href="<?php echo $this->createUrl("admin/labels/sa/newlabelset");?>" role="button" style="margin-top: 10px;">
<a class="btn btn-default" href="<?php echo $this->createUrl("admin/labels/sa/newlabelset");?>" role="button">
<span class="icon-add text-success"></span>
<?php eT("Create or import new label set(s)"); ?>
</a>
Expand Down Expand Up @@ -60,8 +60,7 @@
data-btnclass='btn-danger'
data-btntext="<?= gt('Delete')?>"
data-onclick='(function() { <?php echo convertGETtoPOST(Yii::app()->createUrl("admin/labels/sa/delete/", ["lid" => $lid])); ?> })'
data-message="<?php eT("Do you really want to delete this label set?","js"); ?>"
style="margin-top: 10px;">
data-message="<?php eT("Do you really want to delete this label set?","js"); ?>">
<span class="fa fa-trash text-danger"></span>
<?php eT("Delete label set"); ?>
</button>
Expand All @@ -79,7 +78,6 @@
<?php if (Permission::model()->hasGlobalPermission('labelsets','export')):?>
<a class="btn btn-default"
href="<?php echo $this->createUrl("admin/labels/sa/exportmulti");?>"
style="margin-top: 10px;"
role="button">
<span class="icon-export text-success"></span>
<?php eT("Export"); ?>
Expand All @@ -88,7 +86,7 @@
<?php else:?>
<?php if (Permission::model()->hasGlobalPermission('labelsets','export')):?>
<span title="<?php eT("No label sets available"); ?>" data-toggle="tooltip" data-placement="bottom" style="display: inline-block">
<a class="btn btn-default disabled" role="button" style="margin-top: 10px;">
<a class="btn btn-default disabled" role="button">
<span class="icon-export text-success"></span>
<?php eT("Export multiple label sets"); ?>
</a>
Expand All @@ -98,7 +96,7 @@

<!-- return to admin panel -->
<?php if (isset($labelbar['buttons']['return'])):?>
<a class="btn btn-default" href="<?php echo $this->createUrl('admin/index'); ?>" role="button" style="margin-right: 5px;">
<a class="btn btn-default" href="<?php echo $this->createUrl('admin/index'); ?>" role="button">
<span class="fa fa-backward"></span>
&nbsp;&nbsp;
<?php eT('Back'); ?>
Expand All @@ -107,7 +105,7 @@

<!-- Close -->
<?php if(isset($labelbar['closebutton']['url'])):?>
<a class="btn btn-danger" href="<?php echo $labelbar['closebutton']['url']; ?>" role="button" style="margin: 10px 0 10px 0;">
<a class="btn btn-danger" href="<?php echo $labelbar['closebutton']['url']; ?>" role="button">
<span class="fa fa-close"></span>
<?php eT("Close");?>
</a>
Expand All @@ -131,14 +129,14 @@

<?php if (isset($labelbar['buttons']['edition'])):?>
<!-- Save -->
<a class="btn btn-success"
href="#"
role="button"
id="save-form-button"
<a class="btn btn-success"
href="#"
role="button"
id="save-form-button"
data-form-id="<?php echo $labelbar['savebutton']['form']; ?>"
style="margin: 10px 0 10px 0;">
>
<span class="fa fa-floppy-o"></span>
<?php echo $labelbar['savebutton']['text'];?>
<?php echo $labelbar['savebutton']['text']; ?>
</a>
<?php endif;?>
</div>
Expand Down
Expand Up @@ -5,7 +5,7 @@
echo viewHelper::getViewTestTag('participantsAttributeControl');

?>
<div id="pjax-content" style="margin-top: 20px;">
<div id="pjax-content">

<div class="row">
<div class="container-fluid">
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/participants/blacklist_view.php
Expand Up @@ -7,7 +7,7 @@
?>
<script src="<?php echo Yii::app()->getConfig('adminscripts') . "userControl.js" ?>" type="text/javascript"></script>
<div id="pjax-content">
<div class="col-lg-12 list-surveys" style="margin-top: 20px;">
<div class="col-lg-12 list-surveys">
<div class="row">
<div class="col-lg-12 content-right">

Expand Down
Expand Up @@ -6,7 +6,7 @@

?>
<div id="pjax-content">
<div class="row" style="margin-top: 30px;margin-bottom: 100px;">
<div class="row">
<div class="container-fluid">
<?php
$hiddenFilterValues = "";
Expand Down
Expand Up @@ -51,7 +51,7 @@
</script>

<!-- Participant Bar -->
<div class='menubar surveybar' id="participantbar" style="box-shadow: 3px 3px 3px #35363f;">
<div class='menubar surveybar' id="participantbar">
<div class='row'>

<div class="col-md-9">
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/participants/sharePanel_view.php
Expand Up @@ -7,7 +7,7 @@
?>
<div id="pjax-content">
<div class="col-lg-12 list-surveys">
<div class="row" style="margin-top: 10px; margin-bottom: 100px">
<div class="row">
<div class="container-fluid">
<div class="row">
<?php
Expand Down

0 comments on commit 576a6e1

Please sign in to comment.