Skip to content

Commit

Permalink
Fixed issue: Page Header and TopBar: Settings - Homepage Settings
Browse files Browse the repository at this point in the history
- Added Green Bar
- Added Shadow under Top Bar
- Adjusted content
  • Loading branch information
thedirtypanda committed Jun 10, 2021
1 parent 0f5a6f7 commit b62a9d0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
14 changes: 13 additions & 1 deletion application/controllers/HomepageSettingsController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

/**
* Class HomepageSettingsController
*/
class HomepageSettingsController extends LSBaseController
{
/**
Expand Down Expand Up @@ -50,7 +53,16 @@ public function actionIndex()

$dataProviderBox = new CActiveDataProvider('Box');

$this->aData = [];
$this->aData = [
'fullpagebar' => [
'boxbuttons' => true,
'returnbutton' => [
'url'=>'admin/index',
'text'=>gT('Close'),
],
],
'pageTitle' => 'Home page settings',
];

$this->render('index', [
'dataProviderBox' => $dataProviderBox,
Expand Down
4 changes: 3 additions & 1 deletion application/views/admin/super/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</a>
<?php endif;?>


<!-- Save and Close -->
<?php if(isset($fullpagebar['saveandclosebutton']['form'])):?>
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>">
<span class="fa fa-saved"></span>
Expand All @@ -37,6 +37,7 @@
</a>
<?php endif;?>

<!-- Box Buttons -->
<?php if(isset($fullpagebar['boxbuttons'])):?>
<a href="<?php echo $this->createUrl('homepageSettings/createBox/');?>" class="btn btn-default">
<span class="icon-add text-success"></span>
Expand All @@ -48,6 +49,7 @@
</a>
<?php endif;?>

<!-- Manage your Key -->
<?php if(isset($fullpagebar['update'])):?>
<a href="<?php echo $this->createUrl('admin/update/sa/managekey/');?>" class="btn btn-default" style="margin-top:10px;">
<span class="fa fa-key text-success"></span>
Expand Down
14 changes: 1 addition & 13 deletions application/views/homepageSettings/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,7 @@
strOK='<?php eT('OK','js');?>';
</script>

<div class="col-lg-12 list-surveys">

<?php $this->renderPartial('//admin/super/fullpagebar_view', array(
'fullpagebar' => array(
'boxbuttons'=>true,
'returnbutton'=>array(
'url'=>'admin/index',
'text'=>gT('Close'),
),
)
)); ?>

<h3><?php eT('Home page settings'); ?></h3>
<div class="col-lg-12 list-surveys" style="margin-top: 10px;">

<div class="row">
<label class="col-sm-2 control-label"><?php eT("Display logo:");?> </label>
Expand Down
14 changes: 8 additions & 6 deletions application/views/layouts/fullpagebar_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
?>

<!-- Full page menu bar -->
<div class='menubar' id="fullpagebar">
<div class='menubar' id="fullpagebar" style="box-shadow: 3px 3px 3px #35363f; margin-bottom: 10px;">
<div class='row container-fluid'>
<div class="col-md-6 text-left">
</div>


<!-- Right actions -->
<div class="col-md-6 text-right">
<div class="col-md-6 text-right" style="margin-bottom: 10px;">

<!-- Save -->
<?php if (isset($fullpagebar['savebutton']['form'])) :?>
Expand All @@ -24,7 +24,7 @@
</a>
<?php endif;?>


<!-- Save and Close -->
<?php if (isset($fullpagebar['saveandclosebutton']['form'])) :?>
<a class="btn btn-default" href="#" role="button" id="save-and-close-form-button" onclick="$(this).addClass('disabled').attr('onclick', 'return false;');" data-form-id="<?php echo $fullpagebar['saveandclosebutton']['form']; ?>">
<span class="fa fa-saved"></span>
Expand All @@ -40,17 +40,19 @@
</a>
<?php endif;?>

<!-- Box Buttons -->
<?php if (isset($fullpagebar['boxbuttons'])) :?>
<a href="<?php echo $this->createUrl('admin/homepagesettings/sa/create/');?>" class="btn btn-default">
<a href="<?php echo $this->createUrl('admin/homepagesettings/sa/create/');?>" class="btn btn-default" style="margin-top: 10px;">
<span class="icon-add text-success"></span>
<?php eT("Create a new box");?>
</a>
<a href="<?php echo $this->createUrl('admin/homepagesettings/sa/resetall/');?>" class="btn btn-danger" data-confirm="<?php eT('This will delete all current boxes to restore the default ones. Are you sure you want to continue?'); ?>">
<a href="<?php echo $this->createUrl('admin/homepagesettings/sa/resetall/');?>" class="btn btn-danger" data-confirm="<?php eT('This will delete all current boxes to restore the default ones. Are you sure you want to continue?'); ?>" style="margin-top: 10px;">
<span class="fa fa-refresh"></span>
<?php eT("Reset to default boxes");?>
</a>
<?php endif;?>

<!-- Manage your Key -->
<?php if (isset($fullpagebar['update'])) :?>
<a href="<?php echo $this->createUrl('admin/update/sa/managekey/');?>" class="btn btn-default" style="margin-top:10px;">
<span class="fa fa-key text-success"></span>
Expand All @@ -60,7 +62,7 @@

<!-- Return -->
<?php if (isset($fullpagebar['returnbutton']['url'])) :?>
<a class="btn btn-default" href="<?php echo $this > createUrl($fullpagebar['returnbutton']['url']); ?>" role="button" style="margin-top:10px;" >
<a class="btn btn-default" href="<?php echo $this->createUrl($fullpagebar['returnbutton']['url']); ?>" role="button" style="margin-top:10px;" >
<span class="fa fa-backward"></span>
&nbsp;&nbsp;
<?php echo $fullpagebar['returnbutton']['text']; ?>
Expand Down

0 comments on commit b62a9d0

Please sign in to comment.