Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Commit

Permalink
UI improve
Browse files Browse the repository at this point in the history
user interface improved.
* re-arrange menu items
* change data toolbar text & button position
  • Loading branch information
ve3 committed Apr 26, 2014
1 parent 9d29440 commit e8fe9b7
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 30 deletions.
2 changes: 1 addition & 1 deletion fuel/app/classes/controller/basecontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Base Controller of Fuel Start
*
* @package FuelStart
* @version 1.5.4
* @version 1.5.5
* @author Vee W.
* @license http://opensource.org/licenses/MIT
* @link http://okvee.net/th/web-resources/download/fuel-start
Expand Down
2 changes: 1 addition & 1 deletion fuel/app/classes/library/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function listAdminNavbar()
unset($class_name_with_namespace, $file, $handle, $module_path, $obj);

if ($output != null) {
$output = '<ul>' . "\n" . $output . '</ul>' . "\n";
$output = "\n" . '<ul>' . "\n" . $output . '</ul>' . "\n";
}

return $output;
Expand Down
77 changes: 55 additions & 22 deletions public/public/themes/system/admin/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="fs-admin-navbar-collapse">
<ul id="admin-nav-menu" class="nav navbar-nav sm sm-bsblack navbar-smart-menu">
<!--website menu-->
<li>
<a href="#" onclick="return false;"><?php echo \Lang::get('admin_website'); ?></a>
<a href="#" onclick="return false;"><?php echo __('admin_website'); ?></a>
<ul>
<li><?php echo \Html::anchor('admin', \Lang::get('admin_admin_home')); ?>
<li><?php echo \Html::anchor('admin', __('admin_admin_home')); ?>
<?php if (isset($fs_list_sites) && $fs_list_sites != null) { ?>
<ul>
<?php
Expand All @@ -46,7 +47,7 @@
</ul>
<?php }// endif; ?>
</li>
<li><?php echo \Html::anchor('', \Lang::get('admin_visit_site')); ?>
<li><?php echo \Html::anchor('', __('admin_visit_site')); ?>
<?php if (isset($fs_list_sites) && $fs_list_sites != null) { ?>
<ul>
<?php
Expand All @@ -60,43 +61,75 @@
</ul>
<?php }// endif; ?>
</li>
<?php if (checkAdminPermission('config_global', 'config_global')) { ?><li><?php echo \Html::anchor('admin/config', \Lang::get('admin_global_configuration')); ?></li><?php } ?>
<?php if (checkAdminPermission('config_global', 'config_global')) { ?><li><?php echo \Html::anchor('admin/config', __('admin_global_configuration')); ?></li><?php } ?>
<?php if (checkAdminPermission('cacheman_perm', 'cacheman_clearcache_perm')) { ?>
<li>
<a href="#" onclick="return false;"><?php echo \Lang::get('admin_nav_tools'); ?></a>
<a href="#" onclick="return false;"><?php echo __('admin_nav_tools'); ?></a>
<ul>
<?php if (checkAdminPermission('cacheman_perm', 'cacheman_clearcache_perm')) { ?><li><?php echo \Html::anchor('admin/cacheman', \Lang::get('admin_nav_cacheman')); ?></li><?php } ?>
<?php if (checkAdminPermission('cacheman_perm', 'cacheman_clearcache_perm')) { ?><li><?php echo \Html::anchor('admin/cacheman', __('admin_nav_cacheman')); ?></li><?php } ?>
</ul>
</li>
<?php } ?>
</ul>
</li>
<!--end website menu-->
<?php
// permission check for top parent menu.
if (checkAdminPermission('account_perm', 'account_viewusers_perm')
|| checkAdminPermission('account_perm', 'account_add_perm')
|| checkAdminPermission('account_perm', 'account_edit_perm')
|| checkAdminPermission('accountlv_perm', 'accountlv_viewlevels_perm')
|| checkAdminPermission('acperm_perm', 'acperm_manage_perm')
) { ?><!--accounts, levels, permissions menu-->
<li>
<a href="#" onclick="return false;"><?php echo \Lang::get('admin_users_roles_permissions'); ?></a>
<a href="#" onclick="return false;"><?php echo __('admin_users_roles_permissions'); ?></a>
<ul>
<?php if (checkAdminPermission('account_perm', 'account_viewusers_perm')) { ?><li><?php echo \Html::anchor('admin/account', \Lang::get('admin_users')); ?></li><?php } ?>
<?php if (checkAdminPermission('account_perm', 'account_add_perm')) { ?><li><?php echo \Html::anchor('admin/account/add', \Lang::get('admin_add_user')); ?></li><?php } ?>
<?php if (checkAdminPermission('account_perm', 'account_edit_perm')) { ?><li><?php echo \Html::anchor('admin/account/edit', \Lang::get('admin_edit_my_account')); ?></li><?php } ?>
<?php if (checkAdminPermission('accountlv_perm', 'accountlv_viewlevels_perm') || checkAdminPermission('acperm_perm', 'acperm_manage_perm')) { ?>
<li>
<a href="#" onclick="return false;"><?php echo \Lang::get('admin_roles_permissions'); ?></a>
<a<?php if (checkAdminPermission('account_perm', 'account_viewusers_perm')) { ?> href="<?php echo \Uri::create('admin/account'); ?>"<?php } else { ?> href="#" onclick="return false;"<?php } ?>><?php echo __('admin_users'); ?></a>
<?php
// check permission for parent menu
if (checkAdminPermission('account_perm', 'account_add_perm')
|| checkAdminPermission('account_perm', 'account_edit_perm')
) { ?>
<ul>
<?php if (checkAdminPermission('accountlv_perm', 'accountlv_viewlevels_perm')) { ?><li><?php echo \Html::anchor('admin/account-level', \Lang::get('admin_roles')); ?></li><?php } ?>
<?php if (checkAdminPermission('acperm_perm', 'acperm_manage_perm')) { ?><li><?php echo \Html::anchor('admin/account-level-permission', \Lang::get('admin_permissions_for_roles')); ?></li><?php } ?>
<?php if (checkAdminPermission('acperm_perm', 'acperm_manage_perm')) { ?><li><?php echo \Html::anchor('admin/account-permission', \Lang::get('admin_permissions_for_users')); ?></li><?php } ?>
<?php if (checkAdminPermission('account_perm', 'account_add_perm')) { ?><li><?php echo \Html::anchor('admin/account/add', __('admin_add_user')); ?></li><?php } ?>
<?php if (checkAdminPermission('account_perm', 'account_edit_perm')) { ?><li><?php echo \Html::anchor('admin/account/edit', __('admin_edit_my_account')); ?></li><?php } ?>
</ul>
<?php }// end check permission for parent menu ?>
</li>
<?php } ?>
<?php
// check permission for parent menu
if (checkAdminPermission('accountlv_perm', 'accountlv_viewlevels_perm')
|| checkAdminPermission('acperm_perm', 'acperm_manage_perm')
) { ?>
<li>
<a href="#" onclick="return false;"><?php echo __('admin_roles_permissions'); ?></a>
<ul>
<?php if (checkAdminPermission('accountlv_perm', 'accountlv_viewlevels_perm')) { ?><li><?php echo \Html::anchor('admin/account-level', __('admin_roles')); ?></li><?php } ?>
<?php if (checkAdminPermission('acperm_perm', 'acperm_manage_perm')) { ?><li><?php echo \Html::anchor('admin/account-level-permission', __('admin_permissions_for_roles')); ?></li><?php } ?>
<?php if (checkAdminPermission('acperm_perm', 'acperm_manage_perm')) { ?><li><?php echo \Html::anchor('admin/account-permission', __('admin_permissions_for_users')); ?></li><?php } ?>
</ul>
</li>
<?php }// end check permission for parent menu ?>
</ul>
</li>
<li><a href="#" onclick="return false;"><?php echo \Lang::get('admin_components'); ?></a>
<?php }// end permission check for top parent menu ?><!--end accounts, levels, permissions menu-->
<!--components menu-->
<li><a href="#" onclick="return false;"><?php echo __('admin_components'); ?></a>
<?php echo \Library\Modules::forge()->listAdminNavbar(); ?>
</li>
<li><a href="#" onclick="return false;"><?php echo \Lang::get('admin_extensions'); ?></a>
<!--end components menu-->
<?php
// permission check for top parent menu.
if (
checkAdminPermission('siteman_perm', 'siteman_viewsites_perm')
) { ?><!--extensions menu-->
<li><a href="#" onclick="return false;"><?php echo __('admin_extensions'); ?></a>
<ul>
<?php if (checkAdminPermission('siteman_perm', 'siteman_viewsites_perm')) { ?><li><?php echo \Html::anchor('admin/siteman', \Lang::get('admin_multisite_manager')); ?></li><?php } ?>
<?php if (checkAdminPermission('siteman_perm', 'siteman_viewsites_perm')) { ?><li><?php echo \Html::anchor('admin/siteman', __('admin_multisite_manager')); ?></li><?php } ?>
</ul>
</li>
<?php }// end permission check for top parent menu ?><!--end extensions menu-->
</ul>
<ul class="nav navbar-nav navbar-right sm sm-bsblack navbar-smart-menu">
<li class="language-switch"><?php echo languageSwitchAdminNavbar(); ?></li>
Expand All @@ -106,8 +139,8 @@
</a>
<ul>
<li><a href="#" onclick="return false;"><?php echo $cookie_admin['account_display_name']; ?></a></li>
<?php if (checkAdminPermission('account_perm', 'account_edit_perm')) { ?><li><?php echo \Html::anchor('admin/account/edit', \Lang::get('admin_edit_my_account')); ?></li><?php } ?>
<li><?php echo \Html::anchor('admin/logout', \Lang::get('admin_logout')); ?></li>
<?php if (checkAdminPermission('account_perm', 'account_edit_perm')) { ?><li><?php echo \Html::anchor('admin/account/edit', __('admin_edit_my_account')); ?></li><?php } ?>
<li><?php echo \Html::anchor('admin/logout', __('admin_logout')); ?></li>
</ul>
</li>

Expand All @@ -133,7 +166,7 @@
</div><!--.the-page-inner-container-->
</div><!--.the-page-container-->
<div class="the-page-footer">
<?php echo \Lang::get('fslang_credit'); // you can remove credit or change it. ?>
<?php echo __('fslang_credit'); // you can remove credit or change it. ?>
</div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

<div class="row cmds">
<div class="col-sm-6">
<?php if (\Model_AccountLevelPermission::checkAdminPermission('account_perm', 'account_add_perm')) {echo \Html::anchor('admin/account/add', \Lang::get('admin_add'), array('class' => 'btn btn-default'));} ?>
| <?php printf(\Lang::get('admin_total', array('total' => (isset($list_accounts['total']) ? $list_accounts['total'] : '0')))); ?>
<ul class="actions-inline">
<li><?php printf(\Lang::get('admin_total', array('total' => (isset($list_accounts['total']) ? $list_accounts['total'] : '0')))); ?></li>
<?php if (\Model_AccountLevelPermission::checkAdminPermission('account_perm', 'account_add_perm')) { ?><li><?php echo \Html::anchor('admin/account/add', \Lang::get('admin_add'), array('class' => 'btn btn-default')); ?></li><?php } ?>
</ul>
</div>
<div class="col-sm-6">
<form method="get" class="form-inline pull-right">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

<div class="row cmds">
<div class="col-sm-6">
<?php if (\Model_AccountLevelPermission::checkAdminPermission('accountlv_perm', 'accountlv_add_perm')) {echo \Html::anchor('admin/account-level/add', \Lang::get('admin_add'), array('class' => 'btn btn-default'));} ?>
| <?php printf(\Lang::get('admin_total', array('total' => (isset($list_levels['total']) ? $list_levels['total'] : '0')))); ?>
<ul class="actions-inline">
<li><?php printf(\Lang::get('admin_total', array('total' => (isset($list_levels['total']) ? $list_levels['total'] : '0')))); ?></li>
<?php if (\Model_AccountLevelPermission::checkAdminPermission('accountlv_perm', 'accountlv_add_perm')) { ?><li><?php echo \Html::anchor('admin/account-level/add', \Lang::get('admin_add'), array('class' => 'btn btn-default')); ?></li><?php } ?>
</ul>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

<div class="row cmds">
<div class="col-sm-6">
<?php if (\Model_AccountLevelPermission::checkAdminPermission('siteman_perm', 'siteman_add_perm')) {echo \Html::anchor('admin/siteman/add', \Lang::get('admin_add'), array('class' => 'btn btn-default'));} ?>
| <?php printf(\Lang::get('admin_total', array('total' => (isset($list_sites['total']) ? $list_sites['total'] : '0')))); ?>
<ul class="actions-inline">
<li><?php printf(\Lang::get('admin_total', array('total' => (isset($list_sites['total']) ? $list_sites['total'] : '0')))); ?></li>
<?php if (\Model_AccountLevelPermission::checkAdminPermission('siteman_perm', 'siteman_add_perm')) { ?><li><?php echo \Html::anchor('admin/siteman/add', \Lang::get('admin_add'), array('class' => 'btn btn-default')); ?></li><?php } ?>
</ul>
</div>
</div>

Expand Down

0 comments on commit e8fe9b7

Please sign in to comment.