You've already forked joomla_test
first commit
This commit is contained in:
1
administrator/components/com_newsfeeds/views/index.html
Normal file
1
administrator/components/com_newsfeeds/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,203 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
|
||||
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.id('newsfeed-form')))
|
||||
{
|
||||
Joomla.submitform(task, document.getElementById('newsfeed-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_newsfeeds&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="newsfeed-form" class="form-validate form-horizontal">
|
||||
|
||||
<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?>
|
||||
|
||||
<div class="row-fluid">
|
||||
<!-- Begin Newsfeed -->
|
||||
<div class="span10 form-horizontal">
|
||||
|
||||
<fieldset>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', empty($this->item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED', true) : JText::sprintf('COM_NEWSFEEDS_EDIT_NEWSFEED', $this->item->id, true)); ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('name'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('name'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('link'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('link'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('catid'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('catid'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('description'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('description'); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="span6">
|
||||
<h4><?php echo JText::_('COM_NEWSFEEDS_FIELDSET_IMAGES');?></h4>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach ($this->form->getGroup('images') as $field) : ?>
|
||||
<div class="control-group">
|
||||
<?php if (!$field->hidden) : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('alias'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('alias'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('id'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('id'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('created_by'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('created_by'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('created_by_alias'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('created_by_alias'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('created'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('created'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('publish_up'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('publish_up'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('publish_down'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('publish_down'); ?></div>
|
||||
</div>
|
||||
|
||||
<?php if ($this->item->modified_by) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('modified_by'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('modified_by'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('modified'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('modified'); ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->version) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('version'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('version'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->hits) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('hits'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('hits'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('ordering'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('ordering'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('numarticles'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('numarticles'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('cache_time'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('cache_time'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('rtl'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('rtl'); ?></div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php $fieldSets = $this->form->getFieldsets('params'); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<?php $paramstabs = 'params-' . $name; ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label, true)); ?>
|
||||
<?php echo $this->loadTemplate('params'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php $fieldSets = $this->form->getFieldsets('metadata'); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<?php $metadatatabs = 'metadata-' . $name; ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $metadatatabs, JText::_($fieldSet->label, true)); ?>
|
||||
<?php echo $this->loadTemplate('metadata'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php if ($assoc) : ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'associations', JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS', true)); ?>
|
||||
<?php echo $this->loadTemplate('associations'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
</fieldset>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
<!-- End Newsfeed -->
|
||||
<!-- Begin Sidebar -->
|
||||
<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?>
|
||||
<!-- End Sidebar -->
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
echo JLayoutHelper::render('joomla.edit.associations', $this);
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
echo JLayoutHelper::render('joomla.edit.metadata', $this);
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
$fieldSets = $this->form->getFieldsets('params');
|
||||
foreach ($fieldSets as $name => $fieldSet) :
|
||||
?>
|
||||
<div class="tab-pane" id="params-<?php echo $name;?>">
|
||||
<?php
|
||||
if (isset($fieldSet->description) && trim($fieldSet->description)) :
|
||||
echo '<p class="alert alert-info">'.$this->escape(JText::_($fieldSet->description)).'</p>';
|
||||
endif;
|
||||
?>
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label; ?></div>
|
||||
<div class="controls"><?php echo $field->input; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
require_once JPATH_ROOT . '/components/com_newsfeeds/helpers/route.php';
|
||||
|
||||
// Include the HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
|
||||
JHtml::_('behavior.tooltip');
|
||||
JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('behavior.keepalive');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task)
|
||||
{
|
||||
if (task == 'newsfeed.cancel' || document.formvalidator.isValid(document.id('newsfeed-form')))
|
||||
{
|
||||
if (window.opener && (task == 'newsfeed.save' || task == 'newsfeed.cancel'))
|
||||
{
|
||||
window.opener.document.closeEditWindow = self;
|
||||
window.opener.setTimeout('window.document.closeEditWindow.close()', 1000);
|
||||
}
|
||||
|
||||
Joomla.submitform(task, document.getElementById('newsfeed-form'));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="container-popup">
|
||||
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('newsfeed.apply');"><?php echo JText::_('JTOOLBAR_APPLY') ?></button>
|
||||
<button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('newsfeed.save');"><?php echo JText::_('JTOOLBAR_SAVE') ?></button>
|
||||
<button class="btn" type="button" onclick="Joomla.submitbutton('newsfeed.cancel');"><?php echo JText::_('JCANCEL') ?></button>
|
||||
</div>
|
||||
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_newsfeeds&layout=modal&tmpl=component&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="newsfeed-form" class="form-validate form-horizontal">
|
||||
<div class="row-fluid">
|
||||
<!-- Begin Newsfeed -->
|
||||
<div class="span10 form-horizontal">
|
||||
|
||||
<fieldset>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', empty($this->item->id) ? JText::_('COM_NEWSFEEDS_NEW_NEWSFEED', true) : JText::sprintf('COM_NEWSFEEDS_EDIT_NEWSFEED', $this->item->id, true)); ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('name'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('name'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('link'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('link'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('catid'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('catid'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('description'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('description'); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="span6">
|
||||
<h4><?php echo JText::_('COM_NEWSFEEDS_FIELDSET_IMAGES');?></h4>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('images'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('images'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach ($this->form->getGroup('images') as $field) : ?>
|
||||
<div class="control-group">
|
||||
<?php if (!$field->hidden) : ?>
|
||||
<div class="control-label">
|
||||
<?php echo $field->label; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="controls">
|
||||
<?php echo $field->input; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('JGLOBAL_FIELDSET_PUBLISHING', true)); ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('alias'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('alias'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('id'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('id'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('created_by'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('created_by'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('created_by_alias'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('created_by_alias'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('created'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('created'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('publish_up'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('publish_up'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('publish_down'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('publish_down'); ?></div>
|
||||
</div>
|
||||
|
||||
<?php if ($this->item->modified_by) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('modified_by'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('modified_by'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('modified'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('modified'); ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->version) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('version'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('version'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($this->item->hits) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<?php echo $this->form->getLabel('hits'); ?>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->form->getInput('hits'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('ordering'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('ordering'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('numarticles'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('numarticles'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('cache_time'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('cache_time'); ?></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $this->form->getLabel('rtl'); ?></div>
|
||||
<div class="controls"><?php echo $this->form->getInput('rtl'); ?></div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php $fieldSets = $this->form->getFieldsets('params'); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<?php $paramstabs = 'params-' . $name; ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $paramstabs, JText::_($fieldSet->label, true)); ?>
|
||||
<?php echo $this->loadTemplate('params'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php $fieldSets = $this->form->getFieldsets('metadata'); ?>
|
||||
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
|
||||
<?php $metadatatabs = 'metadata-' . $name; ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $metadatatabs, JText::_($fieldSet->label, true)); ?>
|
||||
<?php echo $this->loadTemplate('metadata'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
</fieldset>
|
||||
|
||||
<div class="hidden">
|
||||
<?php echo $this->loadTemplate('associations'); ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
<!-- End Newsfeed -->
|
||||
<!-- Begin Sidebar -->
|
||||
<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?>
|
||||
<!-- End Sidebar -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
echo JLayoutHelper::render('joomla.edit.associations', $this);
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
echo JLayoutHelper::render('joomla.edit.metadata', $this);
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
$fieldSets = $this->form->getFieldsets('params');
|
||||
foreach ($fieldSets as $name => $fieldSet) :
|
||||
?>
|
||||
<div class="tab-pane" id="params-<?php echo $name;?>">
|
||||
<?php
|
||||
if (isset($fieldSet->description) && trim($fieldSet->description)) :
|
||||
echo '<p class="alert alert-info">'.$this->escape(JText::_($fieldSet->description)).'</p>';
|
||||
endif;
|
||||
?>
|
||||
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
|
||||
<div class="control-group">
|
||||
<div class="control-label"><?php echo $field->label; ?></div>
|
||||
<div class="controls"><?php echo $field->input; ?></div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* View to edit a newsfeed.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
* @since 1.6
|
||||
*/
|
||||
class NewsfeedsViewNewsfeed extends JViewLegacy
|
||||
{
|
||||
protected $item;
|
||||
|
||||
protected $form;
|
||||
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$this->state = $this->get('State');
|
||||
$this->item = $this->get('Item');
|
||||
$this->form = $this->get('Form');
|
||||
|
||||
// Check for errors.
|
||||
if (count($errors = $this->get('Errors')))
|
||||
{
|
||||
JError::raiseError(500, implode("\n", $errors));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->getLayout() == 'modal')
|
||||
{
|
||||
$this->form->setFieldAttribute('language', 'readonly', 'true');
|
||||
$this->form->setFieldAttribute('catid', 'readonly', 'true');
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
JFactory::getApplication()->input->set('hidemainmenu', true);
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$isNew = ($this->item->id == 0);
|
||||
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
|
||||
// Since we don't track these assets at the item level, use the category id.
|
||||
$canDo = NewsfeedsHelper::getActions($this->item->catid, 0);
|
||||
|
||||
JToolbarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png');
|
||||
|
||||
// If not checked out, can save the item.
|
||||
if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0))
|
||||
{
|
||||
JToolbarHelper::apply('newsfeed.apply');
|
||||
JToolbarHelper::save('newsfeed.save');
|
||||
}
|
||||
if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0){
|
||||
JToolbarHelper::save2new('newsfeed.save2new');
|
||||
}
|
||||
// If an existing item, can save to a copy.
|
||||
if (!$isNew && $canDo->get('core.create'))
|
||||
{
|
||||
JToolbarHelper::save2copy('newsfeed.save2copy');
|
||||
}
|
||||
|
||||
if (empty($this->item->id))
|
||||
{
|
||||
JToolbarHelper::cancel('newsfeed.cancel');
|
||||
}
|
||||
else
|
||||
{
|
||||
JToolbarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE');
|
||||
}
|
||||
|
||||
JToolbarHelper::divider();
|
||||
JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT');
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,263 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
// Include the component HTML helpers.
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('behavior.multiselect');
|
||||
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'));
|
||||
$archived = $this->state->get('filter.published') == 2 ? true : false;
|
||||
$trashed = $this->state->get('filter.published') == -2 ? true : false;
|
||||
$canOrder = $user->authorise('core.edit.state', 'com_newsfeeds.category');
|
||||
$saveOrder = $listOrder == 'a.ordering';
|
||||
if ($saveOrder)
|
||||
{
|
||||
$saveOrderingUrl = 'index.php?option=com_newsfeeds&task=newsfeeds.saveOrderAjax&tmpl=component';
|
||||
JHtml::_('sortablelist.sortable', 'articleList', 'adminForm', strtolower($listDirn), $saveOrderingUrl);
|
||||
}
|
||||
$sortFields = $this->getSortFields();
|
||||
$assoc = isset($app->item_associations) ? $app->item_associations : 0;
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
Joomla.orderTable = function()
|
||||
{
|
||||
table = document.getElementById("sortTable");
|
||||
direction = document.getElementById("directionTable");
|
||||
order = table.options[table.selectedIndex].value;
|
||||
if (order != '<?php echo $listOrder; ?>')
|
||||
{
|
||||
dirn = 'asc';
|
||||
}
|
||||
else
|
||||
{
|
||||
dirn = direction.options[direction.selectedIndex].value;
|
||||
}
|
||||
Joomla.tableOrdering(order, dirn, '');
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_newsfeeds&view=newsfeeds'); ?>" 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">
|
||||
<label for="filter_search" class="element-invisible"><?php echo JText::_('COM_NEWSFEEDS_FILTER_SEARCH_DESC');?></label>
|
||||
<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_NEWSFEEDS_SEARCH_IN_TITLE'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left hidden-phone">
|
||||
<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 class="btn-group pull-right hidden-phone">
|
||||
<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
|
||||
<?php echo $this->pagination->getLimitBox(); ?>
|
||||
</div>
|
||||
<div class="btn-group pull-right hidden-phone">
|
||||
<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC');?></label>
|
||||
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC');?></option>
|
||||
<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING');?></option>
|
||||
<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="btn-group pull-right">
|
||||
<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY');?></label>
|
||||
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
|
||||
<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option>
|
||||
<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder);?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"> </div>
|
||||
<table class="table table-striped" id="articleList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?>
|
||||
</th>
|
||||
<th width="1%" class="hidden-phone">
|
||||
<?php echo JHtml::_('grid.checkall'); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th class="title">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="10%" class="nowrap hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_NEWSFEEDS_NUM_ARTICLES_HEADING', 'numarticles', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_NEWSFEEDS_CACHE_TIME_HEADING', 'a.cache_time', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php if ($assoc) : ?>
|
||||
<th width="5%" class="nowrap hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'COM_NEWSFEEDS_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<?php endif;?>
|
||||
<th width="5%" class="nowrap hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'a.language', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="nowrap center hidden-phone">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<?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_newsfeeds.category.' . $item->catid);
|
||||
$canEdit = $user->authorise('core.edit', 'com_newsfeeds.category.' . $item->catid);
|
||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id') || $item->checked_out == 0;
|
||||
$canChange = $user->authorise('core.edit.state', 'com_newsfeeds.category.' . $item->catid) && $canCheckin;
|
||||
?>
|
||||
<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 ?>">
|
||||
<i class="icon-menu"></i>
|
||||
</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 hidden-phone">
|
||||
<?php echo JHtml::_('grid.id', $i, $item->id); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'newsfeeds.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?>
|
||||
</td>
|
||||
<td class="nowrap has-context">
|
||||
<div class="pull-left">
|
||||
<?php if ($item->checked_out) : ?>
|
||||
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'newsfeeds.', $canCheckin); ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($canEdit) : ?>
|
||||
<a href="<?php echo JRoute::_('index.php?option=com_newsfeeds&task=newsfeed.edit&id='.(int) $item->id); ?>">
|
||||
<?php echo $this->escape($item->name); ?></a>
|
||||
<?php else : ?>
|
||||
<?php echo $this->escape($item->name); ?>
|
||||
<?php endif; ?>
|
||||
<span class="small">
|
||||
<?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->alias));?>
|
||||
</span>
|
||||
<div class="small">
|
||||
<?php echo $this->escape($item->category_title); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<?php
|
||||
// Create dropdown items
|
||||
JHtml::_('dropdown.edit', $item->id, 'newsfeed.');
|
||||
JHtml::_('dropdown.divider');
|
||||
if ($item->published) :
|
||||
JHtml::_('dropdown.unpublish', 'cb' . $i, 'newsfeeds.');
|
||||
else :
|
||||
JHtml::_('dropdown.publish', 'cb' . $i, 'newsfeeds.');
|
||||
endif;
|
||||
|
||||
JHtml::_('dropdown.divider');
|
||||
|
||||
if ($archived) :
|
||||
JHtml::_('dropdown.unarchive', 'cb' . $i, 'newsfeeds.');
|
||||
else :
|
||||
JHtml::_('dropdown.archive', 'cb' . $i, 'newsfeeds.');
|
||||
endif;
|
||||
|
||||
if ($item->checked_out) :
|
||||
JHtml::_('dropdown.checkin', 'cb' . $i, 'newsfeeds.');
|
||||
endif;
|
||||
|
||||
if ($trashed) :
|
||||
JHtml::_('dropdown.untrash', 'cb' . $i, 'newsfeeds.');
|
||||
else :
|
||||
JHtml::_('dropdown.trash', 'cb' . $i, 'newsfeeds.');
|
||||
endif;
|
||||
|
||||
// render dropdown list
|
||||
echo JHtml::_('dropdown.render');
|
||||
?>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class="small hidden-phone">
|
||||
<?php echo $this->escape($item->access_level); ?>
|
||||
</td>
|
||||
<td class="center hidden-phone">
|
||||
<?php echo (int) $item->numarticles; ?>
|
||||
</td>
|
||||
<td class="center hidden-phone">
|
||||
<?php echo (int) $item->cache_time; ?>
|
||||
</td>
|
||||
<?php if ($assoc) : ?>
|
||||
<td class="hidden-phone">
|
||||
<?php if ($item->association) : ?>
|
||||
<?php echo JHtml::_('newsfeed.association', $item->id); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td class="small hidden-phone">
|
||||
<?php if ($item->language == '*'):?>
|
||||
<?php echo JText::alt('JALL', 'language'); ?>
|
||||
<?php else:?>
|
||||
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td class="center hidden-phone">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php //Load the batch processing form. ?>
|
||||
<?php echo $this->loadTemplate('batch'); ?>
|
||||
|
||||
<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,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
$published = $this->state->get('filter.published');
|
||||
?>
|
||||
<div class="modal hide fade" id="collapseModal">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">x</button>
|
||||
<h3><?php echo JText::_('COM_NEWSFEEDS_BATCH_OPTIONS');?></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p><?php echo JText::_('COM_NEWSFEEDS_BATCH_TIP'); ?></p>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo JHtml::_('batch.access');?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo JHtml::_('batch.language'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo JHtml::_('batch.tag');?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($published >= 0) : ?>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<?php echo JHtml::_('batch.item', 'com_newsfeeds');?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" type="button" onclick="document.id('batch-category-id').value='';document.id('batch-access').value='';document.id('batch-language-id').value='';document.id('batch-tag-id)').value=''" data-dismiss="modal">
|
||||
<?php echo JText::_('JCANCEL'); ?>
|
||||
</button>
|
||||
<button class="btn btn-primary" type="submit" onclick="Joomla.submitbutton('newsfeed.batch');">
|
||||
<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
require_once JPATH_ROOT . '/components/com_newsfeeds/helpers/route.php';
|
||||
|
||||
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$input = JFactory::getApplication()->input;
|
||||
$function = JFactory::getApplication()->input->getCmd('function', 'jSelectNewsfeed');
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
?>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_newsfeeds&view=newsfeeds&layout=modal&tmpl=component&function='.$function);?>" method="post" name="adminForm" id="adminForm" class="form-inline">
|
||||
<fieldset class="filter clearfix">
|
||||
<div class="btn-toolbar">
|
||||
<div class="btn-group pull-left">
|
||||
<label for="filter_search">
|
||||
<?php echo JText::_('JSEARCH_FILTER_LABEL'); ?>
|
||||
</label>
|
||||
<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" size="30" title="<?php echo JText::_('COM_NEWSFEEDS_FILTER_SEARCH_DESC'); ?>" />
|
||||
</div>
|
||||
<div class="btn-group pull-left">
|
||||
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>" data-placement="bottom">
|
||||
<i class="icon-search"></i></button>
|
||||
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" data-placement="bottom" onclick="document.id('filter_search').value='';this.form.submit();">
|
||||
<i class="icon-remove"></i></button>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<hr class="hr-condensed" />
|
||||
|
||||
<div class="filters pull-left">
|
||||
<select name="filter_access" class="input-medium" onchange="this.form.submit()">
|
||||
<option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS');?></option>
|
||||
<?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?>
|
||||
</select>
|
||||
|
||||
<select name="filter_published" class="input-medium" onchange="this.form.submit()">
|
||||
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
|
||||
<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>
|
||||
</select>
|
||||
|
||||
<?php if ($this->state->get('filter.forcedLanguage')) : ?>
|
||||
<select name="filter_category_id" class="input-medium" onchange="this.form.submit()">
|
||||
<option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY');?></option>
|
||||
<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_newsfeeds', array('filter.language' => array('*', $this->state->get('filter.forcedLanguage')))), 'value', 'text', $this->state->get('filter.category_id'));?>
|
||||
</select>
|
||||
<input type="hidden" name="forcedLanguage" value="<?php echo $this->escape($this->state->get('filter.forcedLanguage')); ?>" />
|
||||
<input type="hidden" name="filter_language" value="<?php echo $this->escape($this->state->get('filter.language')); ?>" />
|
||||
<?php else : ?>
|
||||
<select name="filter_category_id" class="input-medium" onchange="this.form.submit()">
|
||||
<option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY');?></option>
|
||||
<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_newsfeeds'), 'value', 'text', $this->state->get('filter.category_id'));?>
|
||||
</select>
|
||||
<select name="filter_language" class="input-medium" onchange="this.form.submit()">
|
||||
<option value=""><?php echo JText::_('JOPTION_SELECT_LANGUAGE');?></option>
|
||||
<?php echo JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'));?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="title">
|
||||
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.name', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="15%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="15%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JCATEGORY', 'a.catid', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="5%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
<th width="1%" class="nowrap center">
|
||||
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="15">
|
||||
<?php echo $this->pagination->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?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>
|
||||
<a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->name)); ?>', '<?php echo $this->escape($item->catid); ?>', null, '<?php echo $this->escape(NewsfeedsHelperRoute::getNewsfeedRoute($item->id, $item->catid, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);">
|
||||
<?php echo $this->escape($item->name); ?></a>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo $this->escape($item->access_level); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php echo $this->escape($item->category_title); ?>
|
||||
</td>
|
||||
<td class="center">
|
||||
<?php if ($item->language == '*'):?>
|
||||
<?php echo JText::alt('JALL', 'language'); ?>
|
||||
<?php else:?>
|
||||
<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<td align="center">
|
||||
<?php echo (int) $item->id; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<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,160 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
*
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* View class for a list of newsfeeds.
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_newsfeeds
|
||||
* @since 1.6
|
||||
*/
|
||||
class NewsfeedsViewNewsfeeds 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');
|
||||
|
||||
NewsfeedsHelper::addSubmenu('newsfeeds');
|
||||
|
||||
// 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()
|
||||
{
|
||||
$state = $this->get('State');
|
||||
$canDo = NewsfeedsHelper::getActions($state->get('filter.category_id'));
|
||||
$user = JFactory::getUser();
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
JToolbarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEEDS'), 'newsfeeds.png');
|
||||
if (count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)
|
||||
{
|
||||
JToolbarHelper::addNew('newsfeed.add');
|
||||
}
|
||||
if ($canDo->get('core.edit'))
|
||||
{
|
||||
JToolbarHelper::editList('newsfeed.edit');
|
||||
}
|
||||
if ($canDo->get('core.edit.state'))
|
||||
{
|
||||
JToolbarHelper::publish('newsfeeds.publish', 'JTOOLBAR_PUBLISH', true);
|
||||
JToolbarHelper::unpublish('newsfeeds.unpublish', 'JTOOLBAR_UNPUBLISH', true);
|
||||
JToolbarHelper::archiveList('newsfeeds.archive');
|
||||
}
|
||||
if ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolbarHelper::checkin('newsfeeds.checkin');
|
||||
}
|
||||
if ($state->get('filter.published') == -2 && $canDo->get('core.delete'))
|
||||
{
|
||||
JToolbarHelper::deleteList('', 'newsfeeds.delete', 'JTOOLBAR_EMPTY_TRASH');
|
||||
} elseif ($canDo->get('core.edit.state'))
|
||||
{
|
||||
JToolbarHelper::trash('newsfeeds.trash');
|
||||
}
|
||||
// Add a batch button
|
||||
if ($user->authorise('core.create', 'com_newsfeeds') && $user->authorise('core.edit', 'com_newsfeeds') && $user->authorise('core.edit.state', 'com_newsfeeds'))
|
||||
{
|
||||
JHtml::_('bootstrap.modal', 'collapseModal');
|
||||
$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 ($canDo->get('core.admin'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_newsfeeds');
|
||||
}
|
||||
JToolbarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS');
|
||||
|
||||
JHtmlSidebar::setAction('index.php?option=com_newsfeeds&view=newsfeeds');
|
||||
|
||||
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_CATEGORY'),
|
||||
'filter_category_id',
|
||||
JHtml::_('select.options', JHtml::_('category.options', 'com_newsfeeds'), 'value', 'text', $this->state->get('filter.category_id'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_ACCESS'),
|
||||
'filter_access',
|
||||
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_LANGUAGE'),
|
||||
'filter_language',
|
||||
JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'))
|
||||
);
|
||||
|
||||
JHtmlSidebar::addFilter(
|
||||
JText::_('JOPTION_SELECT_TAG'),
|
||||
'filter_tag',
|
||||
JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag'))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('JGLOBAL_TITLE'),
|
||||
'category_title' => JText::_('JCATEGORY'),
|
||||
'a.access' => JText::_('JGRID_HEADING_ACCESS'),
|
||||
'numarticles' => JText::_('COM_NEWSFEEDS_NUM_ARTICLES_HEADING'),
|
||||
'a.cache_time' => JText::_('COM_NEWSFEEDS_CACHE_TIME_HEADING'),
|
||||
'a.language' => JText::_('JGRID_HEADING_LANGUAGE'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user