You've already forked joomla_test
first commit
This commit is contained in:
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: default.php 1971 2013-05-01 16:04:17Z lefteris.kavadas $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration("
|
||||
Joomla.submitbutton = function(pressbutton) {
|
||||
if (pressbutton == 'remove') {
|
||||
if (confirm('".JText::_('K2_ARE_YOU_SURE_YOU_WANT_TO_DELETE_SELECTED_GROUPS', true)."')){
|
||||
submitform( pressbutton );
|
||||
}
|
||||
} else {
|
||||
submitform( pressbutton );
|
||||
}
|
||||
}
|
||||
");
|
||||
|
||||
?>
|
||||
|
||||
<form action="index.php" method="post" name="adminForm" id="adminForm">
|
||||
<table class="adminlist table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="hidden-phone center">#</th>
|
||||
<th class="center"><input id="jToggler" type="checkbox" name="toggle" value="" /></th>
|
||||
<th class="title"><?php echo JHTML::_('grid.sort', 'K2_NAME', 'name', @$this->lists['order_Dir'], @$this->lists['order'] ); ?></th>
|
||||
<th class="center hidden-phone"><?php echo JHTML::_('grid.sort', 'K2_USER_COUNT', 'numOfUsers', @$this->lists['order_Dir'], @$this->lists['order'] ); ?></th>
|
||||
<th class="center hidden-phone"><?php echo JHTML::_('grid.sort', 'K2_ID', 'id', @$this->lists['order_Dir'], @$this->lists['order'] ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<?php if(K2_JVERSION == '30'): ?>
|
||||
<div class="k2LimitBox">
|
||||
<?php echo $this->page->getLimitBox(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->page->getListFooter(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php foreach ($this->rows as $key => $row): ?>
|
||||
<tr class="row<?php echo ($key%2); ?>">
|
||||
<td class="k2Center center hidden-phone"><?php echo $key+1; ?></td>
|
||||
<td class="k2Center center"><?php $row->checked_out = 0; echo @JHTML::_('grid.checkedout', $row, $key ); ?></td>
|
||||
<td><a href="<?php echo JRoute::_('index.php?option=com_k2&view=usergroup&cid='.$row->id); ?>"><?php echo $row->name; ?></a></td>
|
||||
<td class="k2Center center hidden-phone"><?php echo $row->numOfUsers; ?></td>
|
||||
<td class="k2Center center hidden-phone"><?php echo $row->id; ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="option" value="com_k2" />
|
||||
<input type="hidden" name="view" value="<?php echo JRequest::getVar('view'); ?>" />
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
|
||||
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
|
||||
<input type="hidden" name="boxchecked" value="0" />
|
||||
<?php echo JHTML::_( 'form.token' ); ?>
|
||||
</form>
|
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* @version $Id: view.html.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
|
||||
* @package K2
|
||||
* @author JoomlaWorks http://www.joomlaworks.net
|
||||
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
|
||||
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
|
||||
*/
|
||||
|
||||
// no direct access
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
class K2ViewUserGroups extends K2View
|
||||
{
|
||||
|
||||
function display($tpl = null)
|
||||
{
|
||||
|
||||
$mainframe = JFactory::getApplication();
|
||||
$user = JFactory::getUser();
|
||||
$option = JRequest::getCmd('option');
|
||||
$view = JRequest::getCmd('view');
|
||||
$limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
|
||||
$limitstart = $mainframe->getUserStateFromRequest($option.$view.'.limitstart', 'limitstart', 0, 'int');
|
||||
$filter_order = $mainframe->getUserStateFromRequest($option.$view.'filter_order', 'filter_order', '', 'cmd');
|
||||
$filter_order_Dir = $mainframe->getUserStateFromRequest($option.$view.'filter_order_Dir', 'filter_order_Dir', '', 'word');
|
||||
|
||||
$model = $this->getModel();
|
||||
$total = $model->getTotal();
|
||||
if ($limitstart > $total - $limit)
|
||||
{
|
||||
$limitstart = max(0, (int)(ceil($total / $limit) - 1) * $limit);
|
||||
JRequest::setVar('limitstart', $limitstart);
|
||||
}
|
||||
$userGroups = $model->getData();
|
||||
|
||||
$this->assignRef('rows', $userGroups);
|
||||
|
||||
jimport('joomla.html.pagination');
|
||||
$pageNav = new JPagination($total, $limitstart, $limit);
|
||||
$this->assignRef('page', $pageNav);
|
||||
|
||||
$lists = array();
|
||||
|
||||
$lists['order_Dir'] = $filter_order_Dir;
|
||||
$lists['order'] = $filter_order;
|
||||
|
||||
$this->assignRef('lists', $lists);
|
||||
|
||||
JToolBarHelper::title(JText::_('K2_USER_GROUPS'), 'k2.png');
|
||||
|
||||
JToolBarHelper::deleteList('', 'remove', 'K2_DELETE');
|
||||
JToolBarHelper::editList();
|
||||
JToolBarHelper::addNew();
|
||||
|
||||
if (K2_JVERSION != '15')
|
||||
{
|
||||
JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS');
|
||||
}
|
||||
else
|
||||
{
|
||||
$toolbar = JToolBar::getInstance('toolbar');
|
||||
$toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings');
|
||||
}
|
||||
|
||||
$this->loadHelper('html');
|
||||
K2HelperHTML::subMenu();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user