Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding a new component menu to catch all component items, unless move…

…d around
  • Loading branch information...
commit 15130f453093e13e31c7004d90737e1555fa0c40 1 parent 9db5c11
@gnomeontherun authored
Showing with 349 additions and 70 deletions.
  1. +0 −1  administrator/components/com_categories/views/category/tmpl/edit.xml
  2. +9 −0 administrator/components/com_login/views/login/tmpl/logout.xml
  3. +40 −6 administrator/components/com_menus/controllers/item.php
  4. +10 −1 administrator/components/com_menus/models/fields/menuordering.php
  5. +10 −1 administrator/components/com_menus/models/fields/menuparent.php
  6. +10 −3 administrator/components/com_menus/models/fields/menutitle.php
  7. +12 −0 administrator/components/com_menus/models/fields/menutype.php
  8. +23 −0 administrator/components/com_menus/models/forms/item_componentlist.xml
  9. +23 −0 administrator/components/com_menus/models/forms/item_logout.xml
  10. +23 −0 administrator/components/com_menus/models/forms/item_menus.xml
  11. +18 −1 administrator/components/com_menus/models/item.php
  12. +2 −0  administrator/components/com_menus/models/items.php
  13. +9 −7 administrator/components/com_menus/views/item/tmpl/edit.php
  14. +2 −2 administrator/components/com_menus/views/items/view.html.php
  15. +45 −35 administrator/components/com_menus/views/menutypes/tmpl/default.php
  16. +3 −2 administrator/language/en-GB/en-GB.com_admin.sys.ini
  17. +2 −0  administrator/language/en-GB/en-GB.com_cache.sys.ini
  18. +2 −1  administrator/language/en-GB/en-GB.com_checkin.sys.ini
  19. +1 −0  administrator/language/en-GB/en-GB.com_config.sys.ini
  20. +1 −0  administrator/language/en-GB/en-GB.com_cpanel.sys.ini
  21. +2 −1  administrator/language/en-GB/en-GB.com_joomlaupdate.sys.ini
  22. +1 −0  administrator/language/en-GB/en-GB.com_login.sys.ini
  23. +7 −0 administrator/language/en-GB/en-GB.com_users.sys.ini
  24. +41 −1 administrator/language/en-GB/en-GB.menu.ini
  25. +2 −0  administrator/modules/mod_menu/tmpl/default.php
  26. +30 −0 administrator/modules/mod_menu/tmpl/default_componentlist.php
  27. +14 −0 administrator/modules/mod_menu/tmpl/default_logout.php
  28. +1 −1  administrator/modules/mod_menu/tmpl/default_menus.php
  29. +6 −7 libraries/joomla/installer/adapters/component.php
View
1  administrator/components/com_categories/views/category/tmpl/edit.xml
@@ -5,5 +5,4 @@
<![CDATA[*Add Category]]>
</message>
</layout>
-
</metadata>
View
9 administrator/components/com_login/views/login/tmpl/logout.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<metadata>
+ <layout title="*Logout">
+ <message>
+ <![CDATA[*Logout]]>
+ </message>
+ </layout>
+
+</metadata>
View
46 administrator/components/com_menus/controllers/item.php
@@ -158,6 +158,7 @@ public function save($key = null, $urlVar = null)
// Populate the row id from the session.
$data['id'] = $recordId;
+ $data['title'] = 'MOD_MENU_ITEM_'.$data['id'];
// The save2copy task needs to be handled slightly differently.
if ($task == 'save2copy')
@@ -248,22 +249,38 @@ public function save($key = null, $urlVar = null)
return false;
}
+ // if a new item, then need to get the ID for the language string
+ if ($data['id'])
+ {
+ // Update menu title string with ID
+ $data['title'] = 'MOD_MENU_ITEM_' . $model->getState($this->context . '.id');
+ $data['id'] = $model->getState($this->context . '.id');
+ // Resave item with updated title
+ if (!$model->save($data))
+ {
+ $this->setMessage('NO!');
+
+ return false;
+ }
+ }
+
// Saved, update the menu language strings
$titles = JRequest::getVar('titles', array(), 'post', 'array');
- $langstring = 'MOD_MENU_ITEM_'.$data['id'];
+
+ // Loop through the languages
foreach ($titles as $tag => $title)
{
$filename = JPATH_ADMINISTRATOR.'/language/'.$tag.'/'.$tag.'.menu.ini';
$strings = MenusLanguageHelper::parseFile($filename);
- if (isset($strings[$langstring]))
+ if (isset($strings[$data['title']]))
{
// If yes, simply override it
- $strings[$langstring] = $title;
+ $strings[$data['title']] = $title;
}
else
{
// If it is a new override simply prepend it
- $strings = array($langstring => $title) + $strings;
+ $strings = array($data['title'] => $title) + $strings;
}
foreach ($strings as $key => $string) {
@@ -349,7 +366,6 @@ function setType()
// Get the posted values from the request.
$data = JRequest::getVar('jform', array(), 'post', 'array');
- $recordId = JRequest::getInt('id');
// Get the type.
$type = $data['type'];
@@ -358,7 +374,7 @@ function setType()
$title = isset($type->title) ? $type->title : null;
$recordId = isset($type->id) ? $type->id : 0;
- if ($title != 'alias' && $title != 'separator' && $title != 'url')
+ if ($title != 'alias' && $title != 'separator' && $title != 'url' && $title != 'menus' && $title != 'logout' && $title != 'componentlist')
{
$title = 'component';
}
@@ -379,6 +395,24 @@ function setType()
{
$app->setUserState('com_menus.edit.item.link', 'index.php?Itemid=');
}
+ elseif ($title == 'logout')
+ {
+ $app->setUserState('com_menus.edit.item.link', 'index.php?option=com_login&task=logout');
+ $component = JComponentHelper::getComponent('com_login');
+ $data['component_id'] = $component->id;
+ }
+ elseif ($title == 'menus')
+ {
+ $app->setUserState('com_menus.edit.item.link', '');
+ $component = JComponentHelper::getComponent('com_menus');
+ $data['component_id'] = $component->id;
+ }
+ elseif ($title == 'componentlist')
+ {
+ $app->setUserState('com_menus.edit.item.link', '');
+ $component = JComponentHelper::getComponent('com_menus');
+ $data['component_id'] = $component->id;
+ }
unset($data['request']);
$data['type'] = $title;
View
11 administrator/components/com_menus/models/fields/menuordering.php
@@ -46,7 +46,7 @@ protected function getOptions()
$db = JFactory::getDbo();
$query = $db->getQuery(true);
- $query->select('a.id AS value, a.title AS text');
+ $query->select('a.id AS value, a.title AS text, a.client_id');
$query->from('#__menu AS a');
$query->where('a.published >= 0');
@@ -64,6 +64,15 @@ protected function getOptions()
$db->setQuery($query);
$options = $db->loadObjectList();
+
+ // Translate options for admin items
+ foreach ($options as $i => $option)
+ {
+ if ($option->client_id == 1)
+ {
+ $options[$i]->text = JText::_($options[$i]->text);
+ }
+ }
// Check for a database error.
if ($db->getErrorNum()) {
View
11 administrator/components/com_menus/models/fields/menuparent.php
@@ -39,7 +39,7 @@ protected function getOptions()
$db = JFactory::getDbo();
$query = $db->getQuery(true);
- $query->select('a.id AS value, a.title AS text, a.level');
+ $query->select('a.id AS value, a.title AS text, a.level, a.client_id');
$query->from('#__menu AS a');
$query->join('LEFT', $db->quoteName('#__menu').' AS b ON a.lft > b.lft AND a.rgt < b.rgt');
@@ -64,6 +64,15 @@ protected function getOptions()
$db->setQuery($query);
$options = $db->loadObjectList();
+
+ // Translate options for admin items
+ foreach ($options as $i => $option)
+ {
+ if ($option->client_id == 1)
+ {
+ $options[$i]->text = JText::_($options[$i]->text);
+ }
+ }
// Check for a database error.
if ($db->getErrorNum()) {
View
13 administrator/components/com_menus/models/fields/menutitle.php
@@ -7,7 +7,7 @@ class JFormFieldMenutitle extends JFormFieldText
{
public function getInput() {
// Return normal if frontend item
- if ($this->form->getField('client_id', 0) != 1) return parent::getInput();
+ if ($this->form->getField('client_id')->value != 1) return parent::getInput();
$html = '<input type="hidden" name="'.$this->name.'" value="'.$this->value.'" />';
@@ -25,7 +25,14 @@ public function getInput() {
}
// Locate strings from active language files
$file = MenusLanguageHelper::parseFile(JPATH_ADMINISTRATOR.'/language/'.$tag.'/'.$tag.'.menu.ini');
- $languages[$i]['title'] = $file[$this->value];
+ if (isset($file[$this->value]))
+ {
+ $languages[$i]['title'] = $file[$this->value];
+ }
+ else
+ {
+ $languages[$i]['title'] = '';
+ }
}
// Store in user session
@@ -37,7 +44,7 @@ public function getInput() {
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
$html .= '<input type="text" name="titles['.$language->getTag().']" value="'.JText::_($this->value).'" ' . $class . $size. ' />';
- $html .= '<span>'.$language->getName().'</span>';
+ if (count($languages) > 1) $html .= '<input type="text" class="readonly" readonly="readonly" value="'.$language->getName().'"/>';
return $html;
}
}
View
12 administrator/components/com_menus/models/fields/menutype.php
@@ -57,7 +57,19 @@ protected function getInput()
case 'separator':
$value = JText::_('COM_MENUS_TYPE_SEPARATOR');
break;
+
+ case 'logout':
+ $value = JText::_('JLOGOUT');
+ break;
+ case 'menus':
+ $value = JText::_('JMENUS');
+ break;
+
+ case 'componentlist':
+ $value = JText::_('*Component List');
+ break;
+
default:
$link = $this->form->getValue('link');
// Clean the link back to the option, view and layout
View
23 administrator/components/com_menus/models/forms/item_componentlist.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<form>
+ <fields name="params">
+ <fieldset name="menu-options"
+ label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
+ >
+
+ <field name="menu_image" type="media"
+ label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
+ description="COM_MENUS_ITEM_FIELD_MENU_IMAGE_DESC" />
+
+ <field name="menu_text" type="radio"
+ label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"
+ description="COM_MENUS_ITEM_FIELD_MENU_TEXT_DESC"
+ default="1" filter="integer"
+ >
+ <option value="0">JNO</option>
+ <option value="1">JYES</option>
+ </field>
+
+ </fieldset>
+ </fields>
+</form>
View
23 administrator/components/com_menus/models/forms/item_logout.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<form>
+ <fields name="params">
+ <fieldset name="menu-options"
+ label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
+ >
+
+ <field name="menu_image" type="media"
+ label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
+ description="COM_MENUS_ITEM_FIELD_MENU_IMAGE_DESC" />
+
+ <field name="menu_text" type="radio"
+ label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"
+ description="COM_MENUS_ITEM_FIELD_MENU_TEXT_DESC"
+ default="1" filter="integer"
+ >
+ <option value="0">JNO</option>
+ <option value="1">JYES</option>
+ </field>
+
+ </fieldset>
+ </fields>
+</form>
View
23 administrator/components/com_menus/models/forms/item_menus.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<form>
+ <fields name="params">
+ <fieldset name="menu-options"
+ label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
+ >
+
+ <field name="menu_image" type="media"
+ label="COM_MENUS_ITEM_FIELD_MENU_IMAGE_LABEL"
+ description="COM_MENUS_ITEM_FIELD_MENU_IMAGE_DESC" />
+
+ <field name="menu_text" type="radio"
+ label="COM_MENUS_ITEM_FIELD_MENU_TEXT_LABEL"
+ description="COM_MENUS_ITEM_FIELD_MENU_TEXT_DESC"
+ default="1" filter="integer"
+ >
+ <option value="0">JNO</option>
+ <option value="1">JYES</option>
+ </field>
+
+ </fieldset>
+ </fields>
+</form>
View
19 administrator/components/com_menus/models/item.php
@@ -655,10 +655,27 @@ public function getItem($pk = null)
case 'url':
$table->component_id = 0;
-
parse_str(parse_url($table->link, PHP_URL_QUERY));
break;
+ case 'logout':
+ $component = JComponentHelper::getComponent('com_login');
+ $table->component_id = $component->id;
+ $table->link = 'index.php?option=com_login&task=logout';
+ break;
+
+ case 'menus':
+ $component = JComponentHelper::getComponent('com_menus');
+ $table->component_id = $component->id;
+ $table->link = '';
+ break;
+
+ case 'componentlist':
+ $component = JComponentHelper::getComponent('com_menus');
+ $table->component_id = $component->id;
+ $table->link = '';
+ break;
+
case 'component':
default:
// Enforce a valid type.
View
2  administrator/components/com_menus/models/items.php
@@ -174,6 +174,8 @@ protected function getListQuery()
' WHEN ' . $db->quote('url') . ' THEN a.published+2 ' .
' WHEN ' . $db->quote('alias') . ' THEN a.published+4 ' .
' WHEN ' . $db->quote('separator') . ' THEN a.published+6 ' .
+ ' WHEN ' . $db->quote('menus') . ' THEN a.published+2*(e.enabled-1) ' .
+ ' WHEN ' . $db->quote('logout') . ' THEN a.published+2*(e.enabled-1) ' .
' END AS published');
$query->from($db->quoteName('#__menu').' AS a');
View
16 administrator/components/com_menus/views/item/tmpl/edit.php
@@ -45,13 +45,15 @@
<script type="text/javascript">
// Hide/show all rows which are not assigned.
window.addEvent('domready', function(){
- document.id('showmods').addEvent('click', function(e) {
- if ($$('.adminlist tr.no').getStyle('display')[0] == 'none') {
- $$('.adminlist tr.no').show();
- } else {
- $$('.adminlist tr.no').hide();
- }
- });
+ if (document.id('showmods')) {
+ document.id('showmods').addEvent('click', function(e) {
+ if ($$('.adminlist tr.no').getStyle('display')[0] == 'none') {
+ $$('.adminlist tr.no').show();
+ } else {
+ $$('.adminlist tr.no').hide();
+ }
+ });
+ }
// Set the client_id if the menutype changes
$('jform_menutype').addEvent('change', function() {
Joomla.submitform('item.setMenutype')
View
4 administrator/components/com_menus/views/items/view.html.php
@@ -49,9 +49,9 @@ public function display($tpl = null)
// Preprocess the list of items to find ordering divisions.
foreach ($this->items as $item) {
$this->ordering[$item->parent_id][] = $item->id;
- $client = JSITE;
+ $client = 0;
if ($item->client_id == 1) {
- $client = JADMINISTRATOR;
+ $client = 1;
}
// item type text
View
80 administrator/components/com_menus/views/menutypes/tmpl/default.php
@@ -19,43 +19,53 @@
<h2 class="modal-title"><?php echo JText::_('COM_MENUS_TYPE_CHOOSE'); ?></h2>
<ul class="menu_types">
<?php foreach ($this->types as $name => $list): ?>
- <li><dl class="menu_type">
- <dt><?php echo JText::_($name) ;?></dt>
- <dd><ul>
- <?php foreach ($list as $item): ?>
- <li><a class="choose_type" href="#" title="<?php echo JText::_($item->description); ?>"
- onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => $item->title, 'request' => $item->request))); ?>')">
- <?php echo JText::_($item->title);?>
- </a>
- </li>
- <?php endforeach; ?>
- </ul>
- </dd>
- </dl>
+ <li>
+ <h4><?php echo JText::_($name) ;?>
+ <ul>
+ <?php foreach ($list as $item): ?>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_($item->description); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title' => $item->title, 'request' => $item->request))); ?>')">
+ <?php echo JText::_($item->title);?>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ </ul>
</li>
<?php endforeach; ?>
- <li><dl class="menu_type">
- <dt><?php echo JText::_('COM_MENUS_TYPE_SYSTEM'); ?></dt>
- <dd>
- <ul>
- <li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_EXTERNAL_URL_DESC'); ?>"
- onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'url'))); ?>')">
- <?php echo JText::_('COM_MENUS_TYPE_EXTERNAL_URL'); ?>
- </a>
- </li>
- <li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_ALIAS_DESC'); ?>"
- onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'alias'))); ?>')">
- <?php echo JText::_('COM_MENUS_TYPE_ALIAS'); ?>
- </a>
- </li>
- <li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_SEPARATOR_DESC'); ?>"
- onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'separator'))); ?>')">
- <?php echo JText::_('COM_MENUS_TYPE_SEPARATOR'); ?>
- </a>
- </li>
- </ul>
- </dd>
- </dl>
+ <li>
+ <h4><?php echo JText::_('COM_MENUS_TYPE_SYSTEM'); ?></h4>
+ <ul>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_EXTERNAL_URL_DESC'); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'url'))); ?>')">
+ <?php echo JText::_('COM_MENUS_TYPE_EXTERNAL_URL'); ?>
+ </a>
+ </li>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_ALIAS_DESC'); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'alias'))); ?>')">
+ <?php echo JText::_('COM_MENUS_TYPE_ALIAS'); ?>
+ </a>
+ </li>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_('COM_MENUS_TYPE_SEPARATOR_DESC'); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'separator'))); ?>')">
+ <?php echo JText::_('COM_MENUS_TYPE_SEPARATOR'); ?>
+ </a>
+ </li>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_('*Logout'); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'logout'))); ?>')">
+ <?php echo JText::_('*Logout'); ?>
+ </a>
+ </li>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_('*Menu List'); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'menus'))); ?>')">
+ <?php echo JText::_('*Menu List'); ?>
+ </a>
+ </li>
+ <li><a class="choose_type" href="#" title="<?php echo JText::_('*Component List'); ?>"
+ onclick="javascript:setmenutype('<?php echo base64_encode(json_encode(array('id' => $this->recordId, 'title'=>'componentlist'))); ?>')">
+ <?php echo JText::_('*Component List'); ?>
+ </a>
+ </li>
+ </ul>
</li>
</ul>
View
5 administrator/language/en-GB/en-GB.com_admin.sys.ini
@@ -3,5 +3,6 @@
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8
-COM_ADMIN="Admin - System Infos"
-COM_ADMIN_XML_DESCRIPTION="Administration system infos component"
+COM_ADMIN="Admin - System Info"
+COM_ADMIN_XML_DESCRIPTION="Administration system info component"
+COM_ADMIN_SYSINFO_VIEW_DEFAULT_TITLE="System Info"
View
2  administrator/language/en-GB/en-GB.com_cache.sys.ini
@@ -5,3 +5,5 @@
COM_CACHE="Cache Manager"
COM_CACHE_XML_DESCRIPTION="Component for cache management"
+COM_CACHE_CACHE_VIEW_DEFAULT_TITLE="Cache Manager"
+COM_CACHE_PURGE_VIEW_DEFAULT_TITLE="Purge Cache"
View
3  administrator/language/en-GB/en-GB.com_checkin.sys.ini
@@ -4,4 +4,5 @@
; Note : All ini files need to be saved as UTF-8
COM_CHECKIN="Checkin"
-COM_CHECKIN_XML_DESCRIPTION="Checkin Component"
+COM_CHECKIN_XML_DESCRIPTION="Checkin Component"
+COM_CHECKIN_CHECKIN_VIEW_DEFAULT_TITLE="Check In"
View
1  administrator/language/en-GB/en-GB.com_config.sys.ini
@@ -5,3 +5,4 @@
COM_CONFIG="Configuration Manager"
COM_CONFIG_XML_DESCRIPTION="Configuration Manager"
+COM_CONFIG_APPLICATION_VIEW_DEFAULT_TITLE="Configuration"
View
1  administrator/language/en-GB/en-GB.com_cpanel.sys.ini
@@ -5,3 +5,4 @@
COM_CPANEL="Control Panel"
COM_CPANEL_XML_DESCRIPTION="Control panel component"
+COM_CPANEL_CPANEL_VIEW_DEFAULT_TITLE="Cache"
View
3  administrator/language/en-GB/en-GB.com_joomlaupdate.sys.ini
@@ -4,4 +4,5 @@
; Note : All ini files need to be saved as UTF-8
COM_JOOMLAUPDATE="Joomla! Update"
-COM_JOOMLAUPDATE_XML_DESCRIPTION="One-click update to the latest Joomla! release"
+COM_JOOMLAUPDATE_XML_DESCRIPTION="One-click update to the latest Joomla! release"
+COM_JOOMLAUPDATE_DEFAULT_VIEW_DEFAULT_TITLE="Joomla! Update"
View
1  administrator/language/en-GB/en-GB.com_login.sys.ini
@@ -5,3 +5,4 @@
COM_LOGIN="Login"
COM_LOGIN_XML_DESCRIPTION="This component lets users login to the site."
+COM_LOGIN_LOGIN_VIEW_DEFAULT_TITLE="Login"
View
7 administrator/language/en-GB/en-GB.com_users.sys.ini
@@ -23,3 +23,10 @@ COM_USER_RESET_VIEW_DEFAULT_OPTION="Default"
COM_USER_RESET_VIEW_DEFAULT_TITLE="Password Reset"
COM_USERS="Users Manager"
COM_USERS_XML_DESCRIPTION="Component for managing users"
+COM_USERS_USERS_VIEW_DEFAULT_TITLE="Users"
+COM_USERS_USER_VIEW_DEFAULT_TITLE="Edit User"
+COM_USERS_GROUPS_VIEW_DEFAULT_TITLE="Groups"
+COM_USERS_GROUP_VIEW_DEFAULT_TITLE="Edit Group"
+COM_USERS_LEVELS_VIEW_DEFAULT_TITLE="Access Levels"
+COM_USERS_LEVEL_VIEW_DEFAULT_TITLE="Edit Access Level"
+COM_USERS_MAIL_VIEW_DEFAULT_TITLE="Mass Mail"
View
42 administrator/language/en-GB/en-GB.menu.ini
@@ -1 +1,41 @@
-MOD_MENU_ITEM_109="Start2"
+MOD_MENU_ITEM_156="Akeeba Backup"
+MOD_MENU_ITEM_154="Components"
+MOD_MENU_ITEM_0="Components"
+MOD_MENU_ITEM_140="Menus"
+MOD_MENU_ITEM_132="Media Manager"
+MOD_MENU_ITEM_131="Featured Articles"
+MOD_MENU_ITEM_130="Add New Category"
+MOD_MENU_ITEM_133="Extensions"
+MOD_MENU_ITEM_134="Extension Manager"
+MOD_MENU_ITEM_135="Module Manager"
+MOD_MENU_ITEM_136="Plugin Manager"
+MOD_MENU_ITEM_137="Template Manager"
+MOD_MENU_ITEM_129="Categories"
+MOD_MENU_ITEM_108="Add New Article"
+MOD_MENU_ITEM_138="Language Manager"
+MOD_MENU_ITEM_107="Article Manager"
+MOD_MENU_ITEM_128="Content"
+MOD_MENU_ITEM_126="Menu Manager"
+MOD_MENU_ITEM_127="Add New Menu"
+MOD_MENU_ITEM_125="Menus"
+MOD_MENU_ITEM_146="Add New Category"
+MOD_MENU_ITEM_145="User Note Categories"
+MOD_MENU_ITEM_144="Add User Note"
+MOD_MENU_ITEM_143="User Notes"
+MOD_MENU_ITEM_124="Mail Users"
+MOD_MENU_ITEM_123="Add Access Level"
+MOD_MENU_ITEM_122="Access Levels"
+MOD_MENU_ITEM_121="Add New Group"
+MOD_MENU_ITEM_120="Groups"
+MOD_MENU_ITEM_119="Add New User"
+MOD_MENU_ITEM_118="User Manager"
+MOD_MENU_ITEM_117="Users"
+MOD_MENU_ITEM_112="Logout"
+MOD_MENU_ITEM_142="Joomla! Update"
+MOD_MENU_ITEM_116="Purge Cache"
+MOD_MENU_ITEM_115="Clear Cache"
+MOD_MENU_ITEM_114="Global Check In"
+MOD_MENU_ITEM_113="Maintenence"
+MOD_MENU_ITEM_111="System Information"
+MOD_MENU_ITEM_110="Global Configuration"
+MOD_MENU_ITEM_109="Control Panel"
View
2  administrator/modules/mod_menu/tmpl/default.php
@@ -44,6 +44,8 @@
case 'url':
case 'component':
case 'menus':
+ case 'logout':
+ case 'componentlist':
case 'placeholder' :
require JModuleHelper::getLayoutPath('mod_menu', 'default_'.$item->type);
break;
View
30 administrator/modules/mod_menu/tmpl/default_componentlist.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * @package Square One
+ * @link www.squareonecms.org
+ * @copyright Copyright 2011 Square One and Open Source Matters. All Rights Reserved.
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+// Manually load a new menu module with the component list
+$module = new stdClass();
+$module->id = 0;
+$module->title = $item->title;
+$module->module = 'mod_menu';
+$module->position = '';
+$module->content = '';
+$module->showtitle = 0;
+$module->params = '{"menutype":"components"}';
+$module->menuid = 0;
+$module->user = 0;
+$module->name = '';
+$module->style = '';
+
+$class = ((strpos($item->img, 'class:') === 0) ? 'class="icon-16-'. str_replace('class:', '', $item->img).'"' : 'style="background-image: url('.$item->img.');"');
+
+?>
+<li><a href="#" <?php echo $class; ?>"><?php echo JText::_($item->title); ?></a>
+ <?php echo JModuleHelper::renderModule($module); ?>
+</li>
View
14 administrator/modules/mod_menu/tmpl/default_logout.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * @package Square One
+ * @link www.squareonecms.org
+ * @copyright Copyright 2011 Square One and Open Source Matters. All Rights Reserved.
+ */
+
+// No direct access.
+defined('_JEXEC') or die;
+
+// Note. It is important to remove spaces between elements.
+$class = ((strpos($item->img, 'class:') === 0) ? 'class="icon-16-'. str_replace('class:', '', $item->img).'"' : 'style="background-image: url('.$item->img.');"');
+?>
+<a <?php echo $class; ?>href="index.php?option=com_login&task=logout&<?php echo JUtility::getToken(); ?>=1" title="<?php echo JText::_($item->title); ?>"><?php echo JText::_($item->title); ?></a>
View
2  administrator/modules/mod_menu/tmpl/default_menus.php
@@ -20,7 +20,7 @@
for ($i = 0; $i < count($menus); $i++) :
$link = JRoute::_('index.php?option=com_menus&view=items&menutype='.$menus[$i]->menutype);
if ($i > 0) : ?><li class="node"><?php endif; ?>
- <a <?php echo $linkclass; ?> href="<?php echo $link; ?>" title="<?php echo $menus[$i]->title; ?>"><?php echo $menus[$i]->title; ?></a>
+ <a <?php echo $linkclass; ?> href="<?php echo $link; ?>" title="<?php echo $menus[$i]->title; ?>"><?php echo $menus[$i]->title; ?> (<?php echo JText::_(($menus[$i]->client_id) ? 'JADMINISTRATOR' : 'JSITE'); ?>)</a>
<ul>
<li>
<a class="icon-16-newarticle" title="<?php echo JText::_('MOD_MENU_MENU_MANAGER_NEW_MENU') ?>" href="<?php echo JRoute::_('index.php?option=com_menus&view=item&menutype='.$menus[$i]->menutype.'&layout=edit') ?>"><?php echo JText::_('MOD_MENU_MENU_MANAGER_NEW_MENU') ?></a>
View
13 libraries/joomla/installer/adapters/component.php
@@ -1386,8 +1386,7 @@ protected function _buildAdminMenus()
$query->select('m.id, e.extension_id');
$query->from('#__menu AS m');
$query->leftJoin('#__extensions AS e ON m.component_id = e.extension_id');
- $query->where('m.parent_id = 1');
- $query->where("m.client_id = 1");
+ $query->where('m.client_id = 1');
$query->where('e.element = ' . $db->quote($option));
$db->setQuery($query);
@@ -1431,13 +1430,13 @@ protected function _buildAdminMenus()
if ($menuElement)
{
$data = array();
- $data['menutype'] = 'main';
+ $data['menutype'] = 'components';
$data['client_id'] = 1;
$data['title'] = (string) $menuElement;
$data['alias'] = (string) $menuElement;
$data['link'] = 'index.php?option=' . $option;
$data['type'] = 'component';
- $data['published'] = 0;
+ $data['published'] = 1;
$data['parent_id'] = 1;
$data['component_id'] = $component_id;
$data['img'] = ((string) $menuElement->attributes()->img) ? (string) $menuElement->attributes()->img : 'class:component';
@@ -1466,7 +1465,7 @@ protected function _buildAdminMenus()
$data['alias'] = $option;
$data['link'] = 'index.php?option=' . $option;
$data['type'] = 'component';
- $data['published'] = 0;
+ $data['published'] = 1;
$data['parent_id'] = 1;
$data['component_id'] = $component_id;
$data['img'] = 'class:component';
@@ -1502,12 +1501,12 @@ protected function _buildAdminMenus()
foreach ($this->manifest->administration->submenu->menu as $child)
{
$data = array();
- $data['menutype'] = 'main';
+ $data['menutype'] = 'components';
$data['client_id'] = 1;
$data['title'] = (string) $child;
$data['alias'] = (string) $child;
$data['type'] = 'component';
- $data['published'] = 0;
+ $data['published'] = 1;
$data['parent_id'] = $parent_id;
$data['component_id'] = $component_id;
$data['img'] = ((string) $child->attributes()->img) ? (string) $child->attributes()->img : 'class:component';
Please sign in to comment.
Something went wrong with that request. Please try again.