Skip to content

Commit

Permalink
Dev: few fixes for home page settings
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Feb 11, 2016
1 parent 24775da commit a901398
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions application/extensions/PannelBoxWidget/PannelBoxWidget.php
Expand Up @@ -153,8 +153,8 @@ protected function canSeeBox( $box='')
return false;
}
}
// If usergroup is set to -1, nobody can see the box
elseif ( $usergroupid=='-1' )
// If usergroup is set to -3, nobody can see the box
elseif ( $usergroupid=='-3' )
{
return false;
}
Expand Down
6 changes: 5 additions & 1 deletion application/models/Boxes.php
Expand Up @@ -116,13 +116,17 @@ public function getUsergroupname()
{
return gT('Everybody');
}
elseif ( $usergroupid=='-3' )
{
return gT('Nobody');
}
else
{
$oUsergroup = UserGroup::model()->findByPk($usergroupid);

// The group doesn't exist anymore
if(!is_object($oUsergroup))
return gT('Only admin');
return gT("Can't find group ! Only admin");

return $oUsergroup->name;
}
Expand Down
5 changes: 3 additions & 2 deletions application/views/admin/homepagesettings/_form.php
Expand Up @@ -57,7 +57,7 @@
<div class='col-sm-2'>
<div class='btn-group'>
<button type='button' class='btn btn-default dropdown-toggle limebutton form-control' data-toggle='dropdown' aria-hashpopup='true' aria-expanded='false'>
Icon
<?php eT('Icon'); ?>
<span class='caret'></span>
</button>
<ul class='dropdown-menu'>
Expand All @@ -66,7 +66,7 @@
<div class='col-sm-4'>
<ul class='list-unstyled'>
<?php for ($i = 0; $i < $icons_length / 3; $i++): ?>
<li class='icon-'><a href="#"><span data-icon='<?php echo $icons[$i]; ?>' class='option-icon <?php echo $icons[$i]; ?>'></span></a></li>
<li class='icon-'><a href="#"><span data-icon='<?php echo $icons[$i]; ?>' class='option-icon <?php echo $icons[$i]; ?>'></span></a></li>
<?php endfor; ?>
</ul>
</div>
Expand Down Expand Up @@ -122,6 +122,7 @@
$options_array = CHtml::listData(UserGroup::model()->findAll(), 'ugid', 'name');
$options_array[-1]=gT('Everybody');
$options_array[-2]=gT('Only admin');
$options_array[-3]=gT('Nobody');
?>
<?php echo $form->dropDownList(
$model,
Expand Down

0 comments on commit a901398

Please sign in to comment.