| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/articles.tar |
tmpl/modal.php 0000604 00000015256 15245662410 0007337 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$app = JFactory::getApplication();
if ($app->isClient('site'))
{
JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN'));
}
JLoader::register('ContentHelperRoute', JPATH_ROOT . '/components/com_content/helpers/route.php');
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.core');
JHtml::_('behavior.polyfill', array('event'), 'lt IE 9');
JHtml::_('script', 'com_content/admin-articles-modal.min.js', array('version' => 'auto', 'relative' => true));
JHtml::_('bootstrap.tooltip', '.hasTooltip', array('placement' => 'bottom'));
JHtml::_('bootstrap.popover', '.hasPopover', array('placement' => 'bottom'));
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', 'select');
// Special case for the search field tooltip.
$searchFilterDesc = $this->filterForm->getFieldAttribute('search', 'description', null, 'filter');
JHtml::_('bootstrap.tooltip', '#filter_search', array('title' => JText::_($searchFilterDesc), 'placement' => 'bottom'));
$function = $app->input->getCmd('function', 'jSelectArticle');
$editor = $app->input->getCmd('editor', '');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$onclick = $this->escape($function);
if (!empty($editor))
{
// This view is used also in com_menus. Load the xtd script only if the editor is set!
JFactory::getDocument()->addScriptOptions('xtd-articles', array('editor' => $editor));
$onclick = "jSelectArticle";
}
?>
<div class="container-popup">
<form action="<?php echo JRoute::_('index.php?option=com_content&view=articles&layout=modal&tmpl=component&function=' . $function . '&' . JSession::getFormToken() . '=1&editor=' . $editor); ?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<div class="clearfix"></div>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped table-condensed">
<thead>
<tr>
<th width="1%" class="center nowrap">
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th class="title">
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php
$iconStates = array(
-2 => 'icon-trash',
0 => 'icon-unpublish',
1 => 'icon-publish',
2 => 'icon-archive',
);
?>
<?php foreach ($this->items as $i => $item) : ?>
<?php if ($item->language && JLanguageMultilang::isEnabled())
{
$tag = strlen($item->language);
if ($tag == 5)
{
$lang = substr($item->language, 0, 2);
}
elseif ($tag == 6)
{
$lang = substr($item->language, 0, 3);
}
else {
$lang = '';
}
}
elseif (!JLanguageMultilang::isEnabled())
{
$lang = '';
}
?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center">
<span class="<?php echo $iconStates[$this->escape($item->state)]; ?>" aria-hidden="true"></span>
</td>
<td>
<?php $attribs = 'data-function="' . $this->escape($onclick) . '"'
. ' data-id="' . $item->id . '"'
. ' data-title="' . $this->escape($item->title) . '"'
. ' data-cat-id="' . $this->escape($item->catid) . '"'
. ' data-uri="' . $this->escape(ContentHelperRoute::getArticleRoute($item->id, $item->catid, $item->language)) . '"'
. ' data-language="' . $this->escape($lang) . '"';
?>
<a class="select-link" href="javascript:void(0)" <?php echo $attribs; ?>>
<?php echo $this->escape($item->title); ?></a>
<span class="small break-word">
<?php if (empty($item->note)) : ?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
<?php else : ?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note)); ?>
<?php endif; ?>
</span>
<div class="small">
<?php echo JText::_('JCATEGORY') . ': ' . $this->escape($item->category_title); ?>
</div>
</td>
<td class="small hidden-phone">
<?php echo $this->escape($item->access_level); ?>
</td>
<td class="small">
<?php echo JLayoutHelper::render('joomla.content.language', $item); ?>
</td>
<td class="nowrap small hidden-phone">
<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?>
</td>
<td class="nowrap small hidden-phone">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="forcedLanguage" value="<?php echo $app->input->get('forcedLanguage', '', 'CMD'); ?>" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div>
tmpl/default_batch_body.php 0000604 00000001745 15245662410 0012043 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$published = (int) $this->state->get('filter.published');
?>
<div class="container-fluid">
<div class="row-fluid">
<div class="control-group span6">
<div class="controls">
<?php echo JHtml::_('batch.language'); ?>
</div>
</div>
<div class="control-group span6">
<div class="controls">
<?php echo JHtml::_('batch.access'); ?>
</div>
</div>
</div>
<div class="row-fluid">
<?php if ($published >= 0) : ?>
<div class="control-group span6">
<div class="controls">
<?php echo JHtml::_('batch.item', 'com_content'); ?>
</div>
</div>
<?php endif; ?>
<div class="control-group span6">
<div class="controls">
<?php echo JHtml::_('batch.tag'); ?>
</div>
</div>
</div>
</div>
tmpl/default.php 0000604 00000034312 15245662410 0007661 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', '.multipleTags', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_TAG')));
JHtml::_('formbehavior.chosen', '.multipleCategories', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_CATEGORY')));
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_ACCESS')));
JHtml::_('formbehavior.chosen', '.multipleAuthors', null, array('placeholder_text_multiple' => JText::_('JOPTION_SELECT_AUTHOR')));
JHtml::_('formbehavior.chosen', 'select');
$app = JFactory::getApplication();
$user = JFactory::getUser();
$userId = $user->get('id');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';
$columns = 10;
if (strpos($listOrder, 'publish_up') !== false)
{
$orderingColumn = 'publish_up';
}
elseif (strpos($listOrder, 'publish_down') !== false)
{
$orderingColumn = 'publish_down';
}
elseif (strpos($listOrder, 'modified') !== false)
{
$orderingColumn = 'modified';
}
else
{
$orderingColumn = 'created';
}
if ($saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_content&task=articles.saveOrderAjax&tmpl=component';
JHtml::_('sortablelist.sortable', 'articleList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
}
$assoc = JLanguageAssociations::isEnabled();
?>
<form action="<?php echo JRoute::_('index.php?option=com_content&view=articles'); ?>" 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; ?>
<?php
// Search tools bar
echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this));
?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
</div>
<?php else : ?>
<table class="table table-striped" id="articleList">
<thead>
<tr>
<th width="1%" class="nowrap center hidden-phone">
<?php echo JHtml::_('searchtools.sort', '', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING', 'icon-menu-2'); ?>
</th>
<th width="1%" class="center">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th width="1%" class="nowrap center">
<?php echo JHtml::_('searchtools.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?>
</th>
<th style="min-width:100px" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
</th>
<?php if ($assoc) : ?>
<?php $columns++; ?>
<th width="5%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'COM_CONTENT_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JAUTHOR', 'a.created_by', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
</th>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'COM_CONTENT_HEADING_DATE_' . strtoupper($orderingColumn), 'a.' . $orderingColumn, $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<?php if ($this->vote) : ?>
<?php $columns++; ?>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_VOTES', 'rating_count', $listDirn, $listOrder); ?>
</th>
<?php $columns++; ?>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGLOBAL_RATINGS', 'rating', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="<?php echo $columns; ?>">
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) :
$item->max_ordering = 0;
$ordering = ($listOrder == 'a.ordering');
$canCreate = $user->authorise('core.create', 'com_content.category.' . $item->catid);
$canEdit = $user->authorise('core.edit', 'com_content.article.' . $item->id);
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0;
$canEditOwn = $user->authorise('core.edit.own', 'com_content.article.' . $item->id) && $item->created_by == $userId;
$canChange = $user->authorise('core.edit.state', 'com_content.article.' . $item->id) && $canCheckin;
$canEditCat = $user->authorise('core.edit', 'com_content.category.' . $item->catid);
$canEditOwnCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->catid) && $item->category_uid == $userId;
$canEditParCat = $user->authorise('core.edit', 'com_content.category.' . $item->parent_category_id);
$canEditOwnParCat = $user->authorise('core.edit.own', 'com_content.category.' . $item->parent_category_id) && $item->parent_category_uid == $userId;
?>
<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid; ?>">
<td class="order nowrap center hidden-phone">
<?php
$iconClass = '';
if (!$canChange)
{
$iconClass = ' inactive';
}
elseif (!$saveOrder)
{
$iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::_('tooltipText', 'JORDERINGDISABLED');
}
?>
<span class="sortable-handler<?php echo $iconClass ?>">
<span class="icon-menu" aria-hidden="true"></span>
</span>
<?php if ($canChange && $saveOrder) : ?>
<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order" />
<?php endif; ?>
</td>
<td class="center">
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
</td>
<td class="center">
<div class="btn-group">
<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
<?php echo JHtml::_('contentadministrator.featured', $item->featured, $i, $canChange); ?>
<?php // Create dropdown items and render the dropdown list.
if ($canChange)
{
JHtml::_('actionsdropdown.' . ((int) $item->state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'articles');
JHtml::_('actionsdropdown.' . ((int) $item->state === -2 ? 'un' : '') . 'trash', 'cb' . $i, 'articles');
echo JHtml::_('actionsdropdown.render', $this->escape($item->title));
}
?>
</div>
</td>
<td class="has-context">
<div class="pull-left break-word">
<?php if ($item->checked_out) : ?>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?>
<?php endif; ?>
<?php if ($canEdit || $canEditOwn) : ?>
<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" title="<?php echo JText::_('JACTION_EDIT'); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php else : ?>
<span title="<?php echo JText::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span>
<?php endif; ?>
<span class="small break-word">
<?php if (empty($item->note)) : ?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias)); ?>
<?php else : ?>
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS_NOTE', $this->escape($item->alias), $this->escape($item->note)); ?>
<?php endif; ?>
</span>
<div class="small">
<?php
$ParentCatUrl = JRoute::_('index.php?option=com_categories&task=category.edit&id=' . $item->parent_category_id . '&extension=com_content');
$CurrentCatUrl = JRoute::_('index.php?option=com_categories&task=category.edit&id=' . $item->catid . '&extension=com_content');
$EditCatTxt = JText::_('COM_CONTENT_EDIT_CATEGORY');
echo JText::_('JCATEGORY') . ': ';
if ($item->category_level != '1') :
if ($item->parent_category_level != '1') :
echo ' » ';
endif;
endif;
if (JFactory::getLanguage()->isRtl())
{
if ($canEditCat || $canEditOwnCat) :
echo '<a class="hasTooltip" href="' . $CurrentCatUrl . '" title="' . $EditCatTxt . '">';
endif;
echo $this->escape($item->category_title);
if ($canEditCat || $canEditOwnCat) :
echo '</a>';
endif;
if ($item->category_level != '1') :
echo ' « ';
if ($canEditParCat || $canEditOwnParCat) :
echo '<a class="hasTooltip" href="' . $ParentCatUrl . '" title="' . $EditCatTxt . '">';
endif;
echo $this->escape($item->parent_category_title);
if ($canEditParCat || $canEditOwnParCat) :
echo '</a>';
endif;
endif;
}
else
{
if ($item->category_level != '1') :
if ($canEditParCat || $canEditOwnParCat) :
echo '<a class="hasTooltip" href="' . $ParentCatUrl . '" title="' . $EditCatTxt . '">';
endif;
echo $this->escape($item->parent_category_title);
if ($canEditParCat || $canEditOwnParCat) :
echo '</a>';
endif;
echo ' » ';
endif;
if ($canEditCat || $canEditOwnCat) :
echo '<a class="hasTooltip" href="' . $CurrentCatUrl . '" title="' . $EditCatTxt . '">';
endif;
echo $this->escape($item->category_title);
if ($canEditCat || $canEditOwnCat) :
echo '</a>';
endif;
}
?>
</div>
</div>
</td>
<td class="small hidden-phone">
<?php echo $this->escape($item->access_level); ?>
</td>
<?php if ($assoc) : ?>
<td class="hidden-phone">
<?php if ($item->association) : ?>
<?php echo JHtml::_('contentadministrator.association', $item->id); ?>
<?php endif; ?>
</td>
<?php endif; ?>
<td class="small hidden-phone">
<?php if ((int) $item->created_by != 0) : ?>
<?php if ($item->created_by_alias) : ?>
<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_users&task=user.edit&id=' . (int) $item->created_by); ?>" title="<?php echo JText::_('JAUTHOR'); ?>">
<?php echo $this->escape($item->author_name); ?></a>
<div class="smallsub"><?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->created_by_alias)); ?></div>
<?php else : ?>
<a class="hasTooltip" href="<?php echo JRoute::_('index.php?option=com_users&task=user.edit&id=' . (int) $item->created_by); ?>" title="<?php echo JText::_('JAUTHOR'); ?>">
<?php echo $this->escape($item->author_name); ?></a>
<?php endif; ?>
<?php else : ?>
<?php if ($item->created_by_alias) : ?>
<?php echo JText::_('JNONE'); ?>
<div class="smallsub"><?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->created_by_alias)); ?></div>
<?php else : ?>
<?php echo JText::_('JNONE'); ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td class="small hidden-phone">
<?php echo JLayoutHelper::render('joomla.content.language', $item); ?>
</td>
<td class="nowrap small hidden-phone">
<?php
$date = $item->{$orderingColumn};
echo $date > 0 ? JHtml::_('date', $date, JText::_('DATE_FORMAT_LC4')) : '-';
?>
</td>
<td class="hidden-phone center">
<span class="badge badge-info">
<?php echo (int) $item->hits; ?>
</span>
</td>
<?php if ($this->vote) : ?>
<td class="hidden-phone center">
<span class="badge badge-success" >
<?php echo (int) $item->rating_count; ?>
</span>
</td>
<td class="hidden-phone center">
<span class="badge badge-warning" >
<?php echo (int) $item->rating; ?>
</span>
</td>
<?php endif; ?>
<td class="hidden-phone">
<?php echo (int) $item->id; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php // Load the batch processing form. ?>
<?php if ($user->authorise('core.create', 'com_content')
&& $user->authorise('core.edit', 'com_content')
&& $user->authorise('core.edit.state', 'com_content')) : ?>
<?php echo JHtml::_(
'bootstrap.renderModal',
'collapseModal',
array(
'title' => JText::_('COM_CONTENT_BATCH_OPTIONS'),
'footer' => $this->loadTemplate('batch_footer'),
),
$this->loadTemplate('batch_body')
); ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->pagination->getListFooter(); ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHtml::_('form.token'); ?>
</div>
</form>
tmpl/default.xml 0000604 00000003607 15245662410 0007675 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_CONTENT_ARTICLES_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_CONTENT_ARTICLES_VIEW_DEFAULT_DESC]]>
</message>
</layout>
<!-- Add fields to the request variables for the layout. -->
<fields name="request">
<fieldset name="request"
addfieldpath="/administrator/components/com_categories/models/fields"
>
<field
name="filter_category_id"
type="modal_category"
label="COM_MENUS_ADMIN_CATEGORY_LABEL"
description="COM_MENUS_ADMIN_CATEGORY_DESC"
extension="com_content"
select="true"
new="true"
edit="true"
clear="true"
filter="integer"
/>
<field
name="filter_level"
type="integer"
label="COM_MENUS_ADMIN_LEVEL_LABEL"
description="COM_MENUS_ADMIN_LEVEL_DESC"
first="1"
last="10"
step="1"
languages="*"
filter="integer"
>
<option value="">JOPTION_SELECT_MAX_LEVELS</option>
</field>
<field
name="filter_author_id"
type="author"
label="COM_MENUS_ADMIN_AUTHOR_LABEL"
description="COM_MENUS_ADMIN_AUTHOR_DESC"
multiple="true"
class="multipleAuthors"
filter="int_array"
>
<option value="0">JNONE</option>
</field>
<field
name="filter_tag"
type="tag"
label="COM_MENUS_ADMIN_TAGS_LABEL"
description="COM_MENUS_ADMIN_TAGS_DESC"
multiple="true"
filter="int_array"
mode="nested"
/>
<field
name="filter_access"
type="accesslevel"
label="COM_MENUS_ADMIN_ACCESS_LABEL"
description="COM_MENUS_ADMIN_ACCESS_DESC"
multiple="true"
filter="int_array"
/>
<field
name="filter_language"
type="contentlanguage"
label="COM_MENUS_ADMIN_LANGUAGE_LABEL"
description="COM_MENUS_ADMIN_LANGUAGE_DESC"
>
<option value="">JOPTION_SELECT_LANGUAGE</option>
<option value="*">JALL</option>
</field>
</fieldset>
</fields>
</metadata>
tmpl/default_batch_footer.php 0000604 00000001443 15245662410 0012377 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<button type="button" class="btn" onclick="document.getElementById('batch-category-id').value='';document.getElementById('batch-access').value='';document.getElementById('batch-language-id').value='';document.getElementById('batch-user-id').value='';document.getElementById('batch-tag-id').value=''" data-dismiss="modal">
<?php echo JText::_('JCANCEL'); ?>
</button>
<button type="submit" class="btn btn-success" onclick="Joomla.submitbutton('article.batch');return false;">
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>
view.html.php 0000604 00000014760 15245662410 0007203 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage com_content
*
* @copyright (C) 2008 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View class for a list of articles.
*
* @since 1.6
*/
class ContentViewArticles extends JViewLegacy
{
/**
* The item authors
*
* @var stdClass
*
* @deprecated 4.0 To be removed with Hathor
*/
protected $authors;
/**
* An array of items
*
* @var array
*/
protected $items;
/**
* The pagination object
*
* @var JPagination
*/
protected $pagination;
/**
* The model state
*
* @var object
*/
protected $state;
/**
* Form object for search filters
*
* @var JForm
*/
public $filterForm;
/**
* The active search filters
*
* @var array
*/
public $activeFilters;
/**
* The sidebar markup
*
* @var string
*/
protected $sidebar;
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
if ($this->getLayout() !== 'modal')
{
ContentHelper::addSubmenu('articles');
}
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
$this->authors = $this->get('Authors');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
$this->vote = JPluginHelper::isEnabled('content', 'vote');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
throw new Exception(implode("\n", $errors), 500);
}
// Levels filter - Used in Hathor.
// @deprecated 4.0 To be removed with Hathor
$this->f_levels = array(
JHtml::_('select.option', '1', JText::_('J1')),
JHtml::_('select.option', '2', JText::_('J2')),
JHtml::_('select.option', '3', JText::_('J3')),
JHtml::_('select.option', '4', JText::_('J4')),
JHtml::_('select.option', '5', JText::_('J5')),
JHtml::_('select.option', '6', JText::_('J6')),
JHtml::_('select.option', '7', JText::_('J7')),
JHtml::_('select.option', '8', JText::_('J8')),
JHtml::_('select.option', '9', JText::_('J9')),
JHtml::_('select.option', '10', JText::_('J10')),
);
// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal')
{
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
}
else
{
// In article associations modal we need to remove language filter if forcing a language.
// We also need to change the category filter to show show categories with All or the forced language.
if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD'))
{
// If the language is forced we can't allow to select the language, so transform the language selector filter into a hidden field.
$languageXml = new SimpleXMLElement('<field name="language" type="hidden" default="' . $forcedLanguage . '" />');
$this->filterForm->setField($languageXml, 'filter', true);
// Also, unset the active language filter so the search tools is not open by default with this filter.
unset($this->activeFilters['language']);
// One last changes needed is to change the category filter to just show categories with All language or with the forced language.
$this->filterForm->setFieldAttribute('category_id', 'language', '*,' . $forcedLanguage, 'filter');
}
}
return parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = JHelperContent::getActions('com_content', 'category', $this->state->get('filter.category_id'));
$user = JFactory::getUser();
// Get the toolbar object instance
$bar = JToolbar::getInstance('toolbar');
JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'stack article');
if ($canDo->get('core.create') || count($user->getAuthorisedCategories('com_content', 'core.create')) > 0)
{
JToolbarHelper::addNew('article.add');
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own'))
{
JToolbarHelper::editList('article.edit');
}
if ($canDo->get('core.edit.state'))
{
JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolbarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURE', true);
JToolbarHelper::custom('articles.unfeatured', 'unfeatured.png', 'featured_f2.png', 'JUNFEATURE', true);
JToolbarHelper::archiveList('articles.archive');
JToolbarHelper::checkin('articles.checkin');
}
// Add a batch button
if ($user->authorise('core.create', 'com_content')
&& $user->authorise('core.edit', 'com_content')
&& $user->authorise('core.edit.state', 'com_content'))
{
$title = JText::_('JTOOLBAR_BATCH');
// Instantiate a new JLayoutFile instance and render the batch button
$layout = new JLayoutFile('joomla.toolbar.batch');
$dhtml = $layout->render(array('title' => $title));
$bar->appendButton('Custom', $dhtml, 'batch');
}
if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete'))
{
JToolbarHelper::deleteList('JGLOBAL_CONFIRM_DELETE', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
}
elseif ($canDo->get('core.edit.state'))
{
JToolbarHelper::trash('articles.trash');
}
if ($user->authorise('core.admin', 'com_content') || $user->authorise('core.options', 'com_content'))
{
JToolbarHelper::preferences('com_content');
}
JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
}
/**
* Returns an array of fields the table can be sorted by
*
* @return array Array containing the field name to sort by as the key and display text as value
*
* @since 3.0
*/
protected function getSortFields()
{
return array(
'a.ordering' => JText::_('JGRID_HEADING_ORDERING'),
'a.state' => JText::_('JSTATUS'),
'a.title' => JText::_('JGLOBAL_TITLE'),
'category_title' => JText::_('JCATEGORY'),
'access_level' => JText::_('JGRID_HEADING_ACCESS'),
'a.created_by' => JText::_('JAUTHOR'),
'language' => JText::_('JGRID_HEADING_LANGUAGE'),
'a.created' => JText::_('JDATE'),
'a.id' => JText::_('JGRID_HEADING_ID'),
'a.featured' => JText::_('JFEATURED')
);
}
}