29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-07-16 08:53:41 +00:00

^+ [#29896] Switch JHtmlIcons to render with JLayout, update quickicons

module to suit. Thanks Michael.
This commit is contained in:
Michael Babker 2013-02-08 19:18:34 +01:00 committed by Jean-Marie Simonet
parent c8d87080a2
commit 299ccf6db1
14 changed files with 99 additions and 21 deletions

View File

@ -51,72 +51,84 @@ abstract class modQuickIconHelper
array(
'link' => JRoute::_('index.php?option=com_content&task=article.add'),
'image' => 'file-add',
'icon' => 'header/icon-48-article-add.png',
'text' => JText::_('MOD_QUICKICON_ADD_NEW_ARTICLE'),
'access' => array('core.manage', 'com_content', 'core.create', 'com_content', )
),
array(
'link' => JRoute::_('index.php?option=com_content'),
'image' => 'pencil-2',
'icon' => 'header/icon-48-article.png',
'text' => JText::_('MOD_QUICKICON_ARTICLE_MANAGER'),
'access' => array('core.manage', 'com_content')
),
array(
'link' => JRoute::_('index.php?option=com_categories&extension=com_content'),
'image' => 'folder',
'icon' => 'header/icon-48-category.png',
'text' => JText::_('MOD_QUICKICON_CATEGORY_MANAGER'),
'access' => array('core.manage', 'com_content')
),
array(
'link' => JRoute::_('index.php?option=com_media'),
'image' => 'pictures',
'icon' => 'header/icon-48-media.png',
'text' => JText::_('MOD_QUICKICON_MEDIA_MANAGER'),
'access' => array('core.manage', 'com_media')
),
array(
'link' => JRoute::_('index.php?option=com_menus'),
'image' => 'list-view',
'icon' => 'header/icon-48-menumgr.png',
'text' => JText::_('MOD_QUICKICON_MENU_MANAGER'),
'access' => array('core.manage', 'com_menus')
),
array(
'link' => JRoute::_('index.php?option=com_users'),
'image' => 'address',
'icon' => 'header/icon-48-user.png',
'text' => JText::_('MOD_QUICKICON_USER_MANAGER'),
'access' => array('core.manage', 'com_users')
),
array(
'link' => JRoute::_('index.php?option=com_modules'),
'image' => 'cube',
'icon' => 'header/icon-48-module.png',
'text' => JText::_('MOD_QUICKICON_MODULE_MANAGER'),
'access' => array('core.manage', 'com_modules')
),
array(
'link' => JRoute::_('index.php?option=com_installer'),
'image' => 'puzzle',
'icon' => 'header/icon-48-extension.png',
'text' => JText::_('MOD_QUICKICON_EXTENSION_MANAGER'),
'access' => array('core.manage', 'com_installer')
),
array(
'link' => JRoute::_('index.php?option=com_languages'),
'image' => 'comments-2',
'icon' => 'header/icon-48-language.png',
'text' => JText::_('MOD_QUICKICON_LANGUAGE_MANAGER'),
'access' => array('core.manage', 'com_languages')
),
array(
'link' => JRoute::_('index.php?option=com_config'),
'image' => 'cog',
'icon' => 'header/icon-48-config.png',
'text' => JText::_('MOD_QUICKICON_GLOBAL_CONFIGURATION'),
'access' => array('core.manage', 'com_config', 'core.admin', 'com_config')
),
array(
'link' => JRoute::_('index.php?option=com_templates'),
'image' => 'eye',
'icon' => 'header/icon-48-themes.png',
'text' => JText::_('MOD_QUICKICON_TEMPLATE_MANAGER'),
'access' => array('core.manage', 'com_templates')
),
array(
'link' => JRoute::_('index.php?option=com_admin&task=profile.edit&id='.JFactory::getUser()->id),
'image' => 'vcard',
'icon' => 'header/icon-48-user-profile.png',
'text' => JText::_('MOD_QUICKICON_PROFILE'),
'access' => true
),

View File

@ -158,7 +158,7 @@ else
<div class="adminform">
<!-- Display the Quick Icon Shortcuts -->
<div class="cpanel-icons well">
<div class="cpanel-icons">
<?php if ($this->countModules('icon') > 1):?>
<?php echo JHtml::_('sliders.start', 'position-icon', array('useCookie' => 1));?>
<jdoc:include type="modules" name="icon" />

View File

@ -925,10 +925,10 @@ h3.pane-toggler a:focus {
.pane-slider.pane-hide {
display: none;
}
div#position-icon.pane-sliders div.pane-down div.icon-wrapper {
div#position-icon.pane-sliders div.pane-down div.quickicon-wrapper {
margin: 5px 0 5px 0;
}
div#position-icon.pane-sliders div.pane-down .icon-wrapper .icon {
div#position-icon.pane-sliders div.pane-down .quickicon-wrapper .icon {
padding: 5px 0 5px 10px;
margin: 0;
}
@ -1162,10 +1162,11 @@ p.tab-description {
text-align: center;
}
div.cpanel-icons {
width: 54%;
float: left;
}
div.cpanel-component {
width: 75%;
width: 45%;
float: right;
}
div.col {

View File

@ -0,0 +1,26 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage Template.hathor
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$id = empty($displayData['id']) ? '' : (' id="' . $displayData['id'] . '"');
$target = empty($displayData['target']) ? '' : (' target="' . $displayData['target'] . '"');
$onclick = empty($displayData['onclick']) ? '' : (' onclick="' . $displayData['onclick'] . '"');
$title = empty($displayData['title']) ? '' : (' title="' . $this->escape($displayData['title']) . '"');
$text = empty($displayData['text']) ? '' : ('<span>' . $displayData['text'] . '</span>')
?>
<div class="quickicon-wrapper"<?php echo $id; ?>>
<div class="icon">
<a href="<?php echo $displayData['link']; ?>"<?php echo $target . $onclick . $title; ?>>
<?php echo JHtml::_('image', empty($displayData['icon']) ? '' : $displayData['icon'], empty($displayData['alt']) ? null : htmlspecialchars($displayData['alt']), null, true); ?>
<?php echo $text; ?>
</a>
</div>
</div>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,18 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage mod_quickicon
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$html = JHtml::_('icons.buttons', $buttons);
?>
<?php if (!empty($html)): ?>
<div class="cpanel">
<?php echo $html;?>
</div>
<?php endif;?>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -503,11 +503,11 @@ h3.pane-toggler a:focus {
display: none;
}
div#position-icon.pane-sliders div.pane-down div.icon-wrapper {
div#position-icon.pane-sliders div.pane-down div.quickicon-wrapper {
margin: 5px 0 5px 0;
}
div#position-icon.pane-sliders div.pane-down .icon-wrapper .icon {
div#position-icon.pane-sliders div.pane-down .quickicon-wrapper .icon {
padding: 5px 0 5px 10px;
margin: 0;
}
@ -796,11 +796,12 @@ p.tab-description {
}
div.cpanel-icons {
width: 54%;
float: left;
}
div.cpanel-component {
width: 75%;
width: 45%;
float: right;
}

View File

@ -31,7 +31,7 @@ $ -> Language fix or change
# [#29737] If a user is blocked while logged in, he or she stays logged in. Thanks Alexander
# [#29736] Bootstrap carousel undefined method JHtmlBootstrap::_getJSObject in bootstrap.php. Thanks Michael and Robert.
# [#30063] Disabled template positions shown in module available positions. Thanks Roberto
#$ [#30079] * Improving cookie handling in languagefilter plugin
^+ [#29896] Switch JHtmlIcons to render with JLayout, update quickicons module to suit. Thanks Michael.
06-February-2013 Jean-Marie Simonet
# [#29965] Add pagination in COM_SEARCH component

View File

@ -0,0 +1,25 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$id = empty($displayData['id']) ? '' : (' id="' . $displayData['id'] . '"');
$target = empty($displayData['target']) ? '' : (' target="' . $displayData['target'] . '"');
$onclick = empty($displayData['onclick']) ? '' : (' onclick="' . $displayData['onclick'] . '"');
$title = empty($displayData['title']) ? '' : (' title="' . $this->escape($displayData['title']) . '"');
$text = empty($displayData['text']) ? '' : ('<span>' . $displayData['text'] . '</span>')
?>
<div class="row-fluid"<?php echo $id; ?>>
<div class="span12">
<a href="<?php echo $displayData['link']; ?>"<?php echo $target . $onclick . $title; ?>>
<i class="icon-<?php echo $displayData['image']; ?>"></i> <?php echo $text; ?>
</a>
</div>
</div>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -72,18 +72,8 @@ abstract class JHtmlIcons
}
}
$html[] = '<div class="row-fluid"' . (empty($button['id']) ? '' : (' id="' . $button['id'] . '"')) . '>';
$html[] = '<div class="span12">';
$html[] = '<a href="' . $button['link'] . '"';
$html[] = (empty($button['target']) ? '' : (' target="' . $button['target'] . '"'));
$html[] = (empty($button['onclick']) ? '' : (' onclick="' . $button['onclick'] . '"'));
$html[] = (empty($button['title']) ? '' : (' title="' . htmlspecialchars($button['title']) . '"'));
$html[] = '>';
$html[] = '<i class="icon-' . $button['image'] . '"></i> ';
$html[] = (empty($button['text'])) ? '' : ('<span>' . $button['text'] . '</span>');
$html[] = '</a>';
$html[] = '</div>';
$html[] = '</div>';
return implode($html);
// Instantiate a new JLayoutFile instance and render the layout
$layout = new JLayoutFile('joomla.quickicons.icon');
return $layout->render($button);
}
}

View File

@ -65,6 +65,7 @@ class plgQuickiconExtensionupdate extends JPlugin
return array(array(
'link' => 'index.php?option=com_installer&view=update',
'image' => 'asterisk',
'icon' => 'header/icon-48-extension.png',
'text' => JText::_('PLG_QUICKICON_EXTENSIONUPDATE_CHECKING'),
'id' => 'plg_quickicon_extensionupdate'
));

View File

@ -72,6 +72,7 @@ class plgQuickiconJoomlaupdate extends JPlugin
return array(array(
'link' => 'index.php?option=com_joomlaupdate',
'image' => 'download',
'icon' => 'header/icon-48-download.png',
'text' => JText::_('PLG_QUICKICON_JOOMLAUPDATE_CHECKING'),
'id' => 'plg_quickicon_joomlaupdate'
));