You've already forked joomla_test
first commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,167 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_languages
|
||||
*
|
||||
* @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;
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('behavior.multiselect');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$userId = $user->get('id');
|
||||
$n = count($this->items);
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
$canOrder = $user->authorise('core.edit.state', 'com_languages');
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
?>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_languages&view=languages'); ?>" method="post" name="adminForm" id="adminForm">
|
||||
<?php if (!empty( $this->sidebar)) : ?>
|
||||
<div id="j-sidebar-container" class="span2">
|
||||
<?php echo $this->sidebar; ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span10">
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
<div id="filter-bar" class="btn-toolbar">
|
||||
<div class="filter-search btn-group pull-left">
|
||||
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_LANGUAGES_SEARCH_IN_TITLE'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_LANGUAGES_HEADING_TITLE_NATIVE', 'a.title_native', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_LANGUAGES_FIELD_LANG_TAG_LABEL', 'a.lang_code', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_LANGUAGES_FIELD_LANG_CODE_LABEL', 'a.sef', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_LANGUAGES_HEADING_LANG_IMAGE', 'a.image', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'a.ordering', $listDirn, $listOrder); ?>
|
||||
<?php if ($canOrder && $saveOrder) :?>
|
||||
<?php echo JHtml::_('grid.order', $this->items, 'filesave.png', 'languages.saveorder'); ?>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<th width="5%" class="center nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_LANGUAGES_HOMEPAGE', '', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="center nowrap">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.lang_id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ($this->items as $i => $item) :
|
||||
$ordering = ($listOrder == 'a.ordering');
|
||||
$canCreate = $user->authorise('core.create', 'com_languages');
|
||||
$canEdit = $user->authorise('core.edit', 'com_languages');
|
||||
$canChange = $user->authorise('core.edit.state', 'com_languages');
|
||||
?>
|
||||
<tr class="row<?php echo $i % 2; ?>">
|
||||
<td>
|
||||
<?php echo JHtml::_('grid.id', $i, $item->lang_id); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'languages.', $canChange);?>
|
||||
<span class="editlinktip hasTooltip" title="<?php echo JHtml::tooltipText(JText::_('JGLOBAL_EDIT_ITEM'), $item->title, 0); ?>">
|
||||
<?php if ($canEdit) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_languages&task=language.edit&lang_id='.(int) $item->lang_id); ?>">
|
||||
<?php echo $this->escape($item->title); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->title); ?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $this->escape($item->title_native); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $this->escape($item->lang_code); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $this->escape($item->sef); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $this->escape($item->image); ?> <?php echo JHtml::_('image', 'mod_languages/'.$item->image.'.gif', $item->image, array('title' => $item->image), true); ?>
|
||||
</td>
|
||||
<td class="order">
|
||||
<?php if ($canChange) : ?>
|
||||
<div class="input-prepend">
|
||||
<?php if ($saveOrder) :?>
|
||||
<?php if ($listDirn == 'asc') : ?>
|
||||
<span class="add-on"><?php echo $this->pagination->orderUpIcon($i, true, 'languages.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?></span><span class="add-on"><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'languages.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
|
||||
<?php elseif ($listDirn == 'desc') : ?>
|
||||
<span class="add-on"><?php echo $this->pagination->orderUpIcon($i, true, 'languages.orderdown', 'JLIB_HTML_MOVE_UP', $ordering); ?></span><span class="add-on"><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'languages.orderup', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?>
|
||||
<?php if (!$disabled = $saveOrder) : echo "<span class=\"add-on tip\" title=\"".JText::_('JDISABLED')."\"><i class=\"icon-ban-circle\"></i></span>"; endif;?><input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>" <?php echo $disabled ?> class="width-20 text-area-order" />
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php echo $item->ordering; ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo $this->escape($item->access_level); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($item->home == '1') : ?>
|
||||
<?php echo JText::_('JYES');?>
|
||||
<?php else:?>
|
||||
<?php echo JText::_('JNO');?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo $this->escape($item->lang_id); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_languages
|
||||
*
|
||||
* @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 Languages View class for the Languages component
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_languages
|
||||
* @since 1.6
|
||||
*/
|
||||
class LanguagesViewLanguages extends JViewLegacy
|
||||
{
|
||||
protected $items;
|
||||
|
||||
protected $pagination;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
LanguagesHelper::addSubmenu('languages');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
$this->sidebar = JHtmlSidebar::render();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
require_once JPATH_COMPONENT.'/helpers/languages.php';
|
||||
$canDo = LanguagesHelper::getActions();
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_LANGUAGES_VIEW_LANGUAGES_TITLE'), 'langmanager.png');
|
||||
|
||||
if ($canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::addNew('language.add');
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::editList('language.edit');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
if ($canDo->get('core.edit.state'))
|
||||
{
|
||||
if ($this->state->get('filter.published') != 2)
|
||||
{
|
||||
JToolbarHelper::publishList('languages.publish');
|
||||
JToolbarHelper::unpublishList('languages.unpublish');
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'languages.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
JToolbarHelper::divider();
|
||||
} elseif ($canDo->get('core.edit.state'))
|
||||
{
|
||||
JToolbarHelper::trash('languages.trash');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
// Add install languages link to the lang installer component
|
||||
$bar = JToolbar::getInstance('toolbar');
|
||||
$bar->appendButton('Link', 'upload', 'COM_LANGUAGES_INSTALL', 'index.php?option=com_installer&view=languages');
|
||||
JToolbarHelper::divider();
|
||||
|
||||
JToolbarHelper::preferences('com_languages');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
JToolbarHelper::help('JHELP_EXTENSIONS_LANGUAGE_MANAGER_CONTENT');
|
||||
|
||||
JHtmlSidebar::setAction('index.php?option=com_languages&view=languages');
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_PUBLISHED'),
|
||||
'filter_published',
|
||||
JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true)
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user