Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #104 from C-Lodder/redesign
Browse files Browse the repository at this point in the history
Atum redesign (Phase 1)
  • Loading branch information
C-Lodder committed Nov 2, 2016
2 parents 8293f8c + 93d82b8 commit 156c5c1
Show file tree
Hide file tree
Showing 120 changed files with 1,226 additions and 888 deletions.
11 changes: 9 additions & 2 deletions administrator/components/com_admin/views/profile/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,15 @@ protected function addToolbar()
JFactory::getApplication()->input->set('hidemainmenu', 1);

JToolbarHelper::title(JText::_('COM_ADMIN_VIEW_PROFILE_TITLE'), 'user user-profile');
JToolbarHelper::apply('profile.apply');
JToolbarHelper::save('profile.save');

JToolbarHelper::saveGroup(
[
['apply', 'profile.apply'],
['save', 'profile.save']
],
'btn-success'
);

JToolbarHelper::cancel('profile.cancel', 'JTOOLBAR_CLOSE');
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_ADMIN_USER_PROFILE_EDIT');
Expand Down
15 changes: 11 additions & 4 deletions administrator/components/com_banners/views/banner/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,31 @@ protected function addToolbar()

JToolbarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'bookmark banners');

$toolbarButtons = [];

// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0))
{
JToolbarHelper::apply('banner.apply');
JToolbarHelper::save('banner.save');
$toolbarButtons[] = ['apply', 'banner.apply'];
$toolbarButtons[] = ['save', 'banner.save'];

if ($canDo->get('core.create'))
{
JToolbarHelper::save2new('banner.save2new');
$toolbarButtons[] = ['save2new', 'banner.save2new'];
}
}

// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create'))
{
JToolbarHelper::save2copy('banner.save2copy');
$toolbarButtons[] = ['save2copy', 'banner.save2copy'];
}

JToolbarHelper::saveGroup(
$toolbarButtons,
'btn-success'
);

if (empty($this->item->id))
{
JToolbarHelper::cancel('banner.cancel');
Expand Down
15 changes: 11 additions & 4 deletions administrator/components/com_banners/views/client/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,24 +94,31 @@ protected function addToolbar()
'bookmark banners-clients'
);

$toolbarButtons = [];

// If not checked out, can save the item.
if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create')))
{
JToolbarHelper::apply('client.apply');
JToolbarHelper::save('client.save');
$toolbarButtons[] = ['apply', 'client.apply'];
$toolbarButtons[] = ['save', 'client.save'];
}

if (!$checkedOut && $canDo->get('core.create'))
{
JToolbarHelper::save2new('client.save2new');
$toolbarButtons[] = ['save2new', 'client.save2new'];
}

// If an existing item, can save to a copy.
if (!$isNew && $canDo->get('core.create'))
{
JToolbarHelper::save2copy('client.save2copy');
$toolbarButtons[] = ['save2copy', 'client.save2copy'];
}

JToolbarHelper::saveGroup(
$toolbarButtons,
'btn-success'
);

if (empty($this->item->id))
{
JToolbarHelper::cancel('client.cancel');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,15 @@ protected function addToolbar()
// For new records, check the create permission.
if ($isNew && (count($user->getAuthorisedCategories($component, 'core.create')) > 0))
{
JToolbarHelper::apply('category.apply');
JToolbarHelper::save('category.save');
JToolbarHelper::save2new('category.save2new');
JToolbarHelper::saveGroup(
[
['apply', 'category.apply'],
['save', 'category.save'],
['save2new', 'category.save2new']
],
'btn-success'
);

JToolbarHelper::cancel('category.cancel');
}

Expand All @@ -194,24 +200,31 @@ protected function addToolbar()
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_user_id == $userId);

$toolbarButtons = [];

// Can't save the record if it's checked out and editable
if (!$checkedOut && $itemEditable)
{
JToolbarHelper::apply('category.apply');
JToolbarHelper::save('category.save');
$toolbarButtons[] = ['apply', 'category.apply'];
$toolbarButtons[] = ['save', 'category.save'];

if ($canDo->get('core.create'))
{
JToolbarHelper::save2new('category.save2new');
$toolbarButtons[] = ['save2new', 'category.save2new'];
}
}

// If an existing item, can save to a copy.
if ($canDo->get('core.create'))
{
JToolbarHelper::save2copy('category.save2copy');
$toolbarButtons[] = ['save2copy', 'category.save2copy'];
}

JToolbarHelper::saveGroup(
$toolbarButtons,
'btn-success'
);

if ($componentParams->get('save_history', 0) && $itemEditable)
{
$typeAlias = $extension . '.category';
Expand Down
18 changes: 11 additions & 7 deletions administrator/components/com_config/view/application/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@ public function render()
// Load settings for the FTP layer.
$ftp = JClientHelper::setCredentialsFromRequest('ftp');

$this->form = &$form;
$this->data = &$data;
$this->ftp = &$ftp;
$this->form = &$form;
$this->data = &$data;
$this->ftp = &$ftp;
$this->usersParams = &$usersParams;
$this->mediaParams = &$mediaParams;

$this->components = ConfigHelperConfig::getComponentsWithConfig();
$this->components = ConfigHelperConfig::getComponentsWithConfig();
ConfigHelperConfig::loadLanguageForComponents($this->components);

$this->userIsSuperAdmin = $user->authorise('core.admin');
Expand All @@ -89,8 +88,13 @@ public function render()
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'), 'equalizer config');
JToolbarHelper::apply('config.save.application.apply');
JToolbarHelper::save('config.save.application.save');
JToolbarHelper::saveGroup(
[
['apply', 'config.save.application.apply'],
['save', 'config.save.application.save']
],
'btn-success'
);
JToolbarHelper::divider();
JToolbarHelper::cancel('config.cancel.application');
JToolbarHelper::divider();
Expand Down
9 changes: 7 additions & 2 deletions administrator/components/com_config/view/component/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ public function render()
protected function addToolbar()
{
JToolbarHelper::title(JText::_($this->component->option . '_configuration'), 'equalizer config');
JToolbarHelper::apply('config.save.component.apply');
JToolbarHelper::save('config.save.component.save');
JToolbarHelper::saveGroup(
[
['apply', 'config.save.component.apply'],
['save', 'config.save.component.save']
],
'btn-success'
);
JToolbarHelper::divider();
JToolbarHelper::cancel('config.cancel.component');
JToolbarHelper::divider();
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_contact/views/contact/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,16 @@ protected function addToolbar()
$toolbarButtons[] = ['save2copy', 'contact.save2copy'];
}

if ($this->state->params->get('save_history', 0) && $itemEditable)
{
JToolbarHelper::versions('com_contact.contact', $this->item->id);
}

JToolbarHelper::saveGroup(
$toolbarButtons,
'btn-success'
);

if ($this->state->params->get('save_history', 0) && $itemEditable)
{
JToolbarHelper::versions('com_contact.contact', $this->item->id);
}

JToolbarHelper::cancel('contact.cancel', 'JTOOLBAR_CLOSE');
}

Expand Down
27 changes: 20 additions & 7 deletions administrator/components/com_content/views/article/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,35 +133,48 @@ protected function addToolbar()
// For new records, check the create permission.
if ($isNew && (count($user->getAuthorisedCategories('com_content', 'core.create')) > 0))
{
JToolbarHelper::apply('article.apply');
JToolbarHelper::save('article.save');
JToolbarHelper::save2new('article.save2new');
JToolbarHelper::saveGroup(
[
['apply', 'article.apply'],
['save', 'article.save'],
['save2new', 'article.save2new']
],
'btn-success'
);

JToolbarHelper::cancel('article.cancel');
}
else
{
// Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
$itemEditable = $canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId);

$toolbarButtons = [];

// Can't save the record if it's checked out and editable
if (!$checkedOut && $itemEditable)
{
JToolbarHelper::apply('article.apply');
JToolbarHelper::save('article.save');
$toolbarButtons[] = ['apply', 'article.apply'];
$toolbarButtons[] = ['save', 'article.save'];

// We can save this record, but check the create permission to see if we can return to make a new one.
if ($canDo->get('core.create'))
{
JToolbarHelper::save2new('article.save2new');
$toolbarButtons[] = ['save2new', 'article.save2new'];
}
}

// If checked out, we can still save
if ($canDo->get('core.create'))
{
JToolbarHelper::save2copy('article.save2copy');
$toolbarButtons[] = ['save2copy', 'article.save2copy'];
}

JToolbarHelper::saveGroup(
$toolbarButtons,
'btn-success'
);

if ($this->state->params->get('save_history', 0) && $itemEditable)
{
JToolbarHelper::versions('com_content.article', $this->item->id);
Expand Down
87 changes: 43 additions & 44 deletions administrator/components/com_cpanel/views/cpanel/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,35 @@

$user = JFactory::getUser();
?>

<?php if ($user->authorise('core.manage', 'com_postinstall') && $this->postinstall_message_count) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-info">
<h4>
<?php echo JText::_('COM_CPANEL_MESSAGES_TITLE'); ?>
</h4>
<p>
<?php echo JText::_('COM_CPANEL_MESSAGES_BODY_NOCLOSE'); ?>
</p>
<p>
<?php echo JText::_('COM_CPANEL_MESSAGES_BODYMORE_NOCLOSE'); ?>
</p>
<p>
<a href="index.php?option=com_postinstall&amp;eid=700" class="btn btn-primary">
<?php echo JText::_('COM_CPANEL_MESSAGES_REVIEW'); ?>
</a>
</p>
</div>
</div>
</div>
<?php endif; ?>

<div class="row">

<?php $iconmodules = JModuleHelper::getModules('icon');
if ($iconmodules) : ?>
<div class="col-md-3">
<div class="col-md-12">
<div class="cpanel-links">
<?php
// Display the submenu position modules
Expand All @@ -28,50 +53,24 @@
</div>
</div>
<?php endif; ?>
<div class="col-md-<?php echo ($iconmodules) ? 9 : 12; ?>">
<?php if ($user->authorise('core.manage', 'com_postinstall') && $this->postinstall_message_count) : ?>
<div class="row">
<div class="col-md-12">
<div class="alert alert-info">
<h4>
<?php echo JText::_('COM_CPANEL_MESSAGES_TITLE'); ?>
</h4>
<p>
<?php echo JText::_('COM_CPANEL_MESSAGES_BODY_NOCLOSE'); ?>
</p>
<p>
<?php echo JText::_('COM_CPANEL_MESSAGES_BODYMORE_NOCLOSE'); ?>
</p>
<p>
<a href="index.php?option=com_postinstall&amp;eid=700" class="btn btn-primary">
<?php echo JText::_('COM_CPANEL_MESSAGES_REVIEW'); ?>
</a>
</p>
</div>
</div>
</div>
<?php endif; ?>
<div class="row">
<?php
$cols = 0;

foreach ($this->modules as $module)
{
// Get module parameters
$params = new Registry;
$params->loadString($module->params);
$bootstrapSize = $params->get('bootstrap_size', 6);
<?php
$cols = 0;
foreach ($this->modules as $module)
{
// Get module parameters
$params = new Registry;
$params->loadString($module->params);
$bootstrapSize = $params->get('bootstrap_size', 6);

$cols += $bootstrapSize;
if ($cols > 12)
{
echo '</div><div class="row">';
$cols = $bootstrapSize;
}
$cols += $bootstrapSize;
if ($cols > 12)
{
echo '</div><div class="row">';
$cols = $bootstrapSize;
}

echo JModuleHelper::renderModule($module, array('style' => 'well'));
}
?>
</div>
</div>
echo JModuleHelper::renderModule($module, array('style' => 'well'));
}
?>
</div>

0 comments on commit 156c5c1

Please sign in to comment.