| Current Path : /home/cbequiperp/www/administrator/components/com_flexicontent/views/tagelement/tmpl/ |
| Current File : /home/cbequiperp/www/administrator/components/com_flexicontent/views/tagelement/tmpl/default.php |
<?php
/**
* @package FLEXIcontent
* @version 3.3
*
* @author Emmanuel Danan, Georgios Papadakis, Yannick Berges, others, see contributor page
* @link https://flexicontent.org
* @copyright Copyright © 2018, FLEXIcontent team, All Rights Reserved
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
use Joomla\String\StringHelper;
JHtml::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_flexicontent/helpers/html');
global $globalcats;
$app = JFactory::getApplication();
$jinput = $app->input;
$config = JFactory::getConfig();
$user = JFactory::getUser();
$session = JFactory::getSession();
$document = JFactory::getDocument();
$cparams = JComponentHelper::getParams('com_flexicontent');
$ctrl = 'tags.';
$hlpname = 'Fctagelement';
$isAdmin = $app->isClient('administrator');
$useAssocs= flexicontent_db::useAssociations();
/**
* COMMON CSS classes and COMMON repeated texts
*/
$btn_class = 'btn';
$ico_class = 'fc-man-icon-s';
$out_class = FLEXI_J40GE ? 'btn btn-outline-dark' : 'btn';
/**
* JS for Columns chooser box and Filters box
*/
flexicontent_html::jscode_to_showhide_table(
'mainChooseColBox',
'adminListTableFC' . $this->view,
$start_html = '', //'<span class="badge ' . (FLEXI_J40GE ? 'badge-dark' : 'badge-inverse') . '">' . JText::_('FLEXI_COLUMNS', true) . '<\/span> ',
$end_html = '<div id="fc-columns-slide-btn" class="icon-arrow-up-2 btn btn-outline-secondary" title="' . JText::_('FLEXI_HIDE') . '" style="cursor: pointer;" onclick="fc_toggle_box_via_btn(\\\'mainChooseColBox\\\', document.getElementById(\\\'fc_mainChooseColBox_btn\\\'), \\\'btn-primary\\\');"><\/div>'
);
/**
* Get cookie-based preferences of current user
*/
// Get all managers preferences
$fc_man_name = 'fc_' . $this->getModel()->view_id;
$FcMansConf = $this->getUserStatePrefs($fc_man_name);
// Get specific manager data
$tools_state = isset($FcMansConf->$fc_man_name)
? $FcMansConf->$fc_man_name
: (object) array(
'filters_box' => 0,
);
/**
* ICONS and reusable variables
*/
/**
* Order stuff and table related variables
*/
$list_total_cols = 4;
/**
* Add inline JS
*/
$js = '';
$js .= "
// Delete a specific list filter
function delFilter(name)
{
//if(window.console) window.console.log('Clearing filter:'+name);
var myForm = jQuery('#adminForm');
var filter = jQuery('#'+name);
if (!filter.length)
{
return;
}
else if (filter.attr('type') == 'checkbox')
{
filter.checked = '';
}
else
{
filter.val('');
// Case that input has Calendar JS attached
if (filter.attr('data-alt-value'))
{
filter.attr('data-alt-value', '');
}
}
}
function delAllFilters()
{
delFilter('search');
delFilter('filter_state');
delFilter('filter_assigned');
delFilter('filter_order');
delFilter('filter_order_Dir');
}
";
if ($js)
{
$document->addScriptDeclaration($js);
}
?>
<div id="flexicontent" class="flexicontent">
<form action="index.php?option=<?php echo $this->option; ?>&view=<?php echo $this->view; ?>" method="post" name="adminForm" id="adminForm">
<div id="fc-managers-header">
<?php if (!empty($this->lists['scope_tip'])) : ?>
<div class="fc-filter-head-box filter-search nowrap_box" style="margin: 0;">
<?php echo $this->lists['scope_tip']; ?>
</div>
<?php endif; ?>
<div class="fc-filter-head-box filter-search nowrap_box">
<div class="btn-group <?php echo $this->ina_grp_class; ?>">
<?php
echo !empty($this->lists['scope']) ? $this->lists['scope'] : '';
?>
<input type="text" name="search" id="search" placeholder="<?php echo !empty($this->scope_title) ? $this->scope_title : JText::_('FLEXI_SEARCH'); ?>" value="<?php echo htmlspecialchars($this->lists['search'], ENT_QUOTES, 'UTF-8'); ?>" class="fcfield_textval" />
<button title="" data-original-title="<?php echo JText::_('FLEXI_SEARCH'); ?>" class="<?php echo $btn_class . (FLEXI_J40GE ? ' btn-outline-dark ' : ' ') . $this->tooltip_class; ?>" onclick="if (!!document.adminForm.limitstart) document.adminForm.limitstart.value=0; Joomla.submitform();"><?php echo FLEXI_J30GE ? '<i class="icon-search"></i>' : JText::_('FLEXI_GO'); ?></button>
<div id="fc_filters_box_btn" data-original-title="<?php echo JText::_('FLEXI_FILTERS'); ?>" class="<?php echo $this->tooltip_class . ' ' . ($this->count_filters ? 'btn ' . $this->btn_iv_class : $out_class); ?>" onclick="fc_toggle_box_via_btn('fc-filters-box', this, 'btn-primary', false, undefined, 1);">
<?php echo FLEXI_J30GE ? '<i class="icon-filter"></i>' : JText::_('FLEXI_FILTERS'); ?>
<?php echo ($this->count_filters ? ' <sup>' . $this->count_filters . '</sup>' : ''); ?>
</div>
<div id="fc-filters-box" <?php if (!$this->count_filters || empty($tools_state->filters_box)) echo 'style="display:none;"'; ?> class="fcman-abs" onclick="var event = arguments[0] || window.event; event.stopPropagation();">
<?php echo $this->lists['filter_state']; ?>
<?php echo $this->lists['filter_assigned']; ?>
<div id="fc-filters-slide-btn" class="icon-arrow-up-2 btn btn-outline-secondary" title="<?php echo JText::_('FLEXI_HIDE'); ?>" style="cursor: pointer;" onclick="fc_toggle_box_via_btn('fc-filters-box', document.getElementById('fc_filters_box_btn'), 'btn-primary');"></div>
</div>
<button title="" data-original-title="<?php echo JText::_('FLEXI_RESET_FILTERS'); ?>" class="<?php echo $btn_class . (FLEXI_J40GE ? ' btn-outline-dark ' : ' ') . $this->tooltip_class; ?>" onclick="if (!!document.adminForm.limitstart) document.adminForm.limitstart.value=0; delAllFilters(); Joomla.submitform();"><?php echo FLEXI_J30GE ? '<i class="icon-cancel"></i>' : JText::_('FLEXI_CLEAR'); ?></button>
</div>
</div>
<div class="fc-filter-head-box nowrap_box">
<div class="btn-group">
<div id="fc_mainChooseColBox_btn" class="<?php echo $this->tooltip_class . ' ' . $out_class; ?> hidden-phone" onclick="fc_toggle_box_via_btn('mainChooseColBox', this, 'btn-primary');" title="<?php echo flexicontent_html::getToolTip('FLEXI_COLUMNS', 'FLEXI_ABOUT_AUTO_HIDDEN_COLUMNS', 1, 1); ?>">
<span class="icon-contract"></span><sup id="columnchoose_totals"></sup>
</div>
<?php if (!empty($this->minihelp) && FlexicontentHelperPerm::getPerm()->CanConfig): ?>
<div id="fc-mini-help_btn" class="<?php echo $out_class; ?>" onclick="fc_toggle_box_via_btn('fc-mini-help', this, 'btn-primary');" >
<span class="icon-help"></span>
<?php echo $this->minihelp; ?>
</div>
<?php endif; ?>
</div>
<div id="mainChooseColBox" class="group-fcset fcman-abs" style="display:none;"></div>
</div>
<div class="fc-filter-head-box nowrap_box">
<div class="limit nowrap_box">
<?php
$pagination_footer = $this->pagination->getListFooter();
if (strpos($pagination_footer, '"limit"') === false) echo $this->pagination->getLimitBox();
?>
</div>
<span class="fc_item_total_data nowrap_box fc-mssg-inline fc-info fc-nobgimage hidden-phone hidden-tablet">
<?php echo @$this->resultsCounter ? $this->resultsCounter : $this->pagination->getResultsCounter(); // custom Results Counter ?>
</span>
<?php if (($getPagesCounter = $this->pagination->getPagesCounter())): ?>
<span class="fc_pages_counter nowrap_box fc-mssg-inline fc-info fc-nobgimage">
<?php echo $getPagesCounter; ?>
</span>
<?php endif; ?>
</div>
</div>
<div class="fcclear"></div>
<table id="adminListTableFC<?php echo $this->view; ?>" class="adminlist table fcmanlist" itemscope itemtype="http://schema.org/WebPage">
<thead>
<tr>
<th>
<?php echo JText::_( 'FLEXI_NUM' ); ?>
</th>
<th class="hideOnDemandClass left">
<?php echo JHtml::_('grid.sort', 'FLEXI_STATUS', 'a.' . $this->state_propname, $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th class="hideOnDemandClass title">
<?php echo JHtml::_('grid.sort', 'FLEXI_TITLE', 'a.' . $this->title_propname, $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th class="hideOnDemandClass alias hidden-phone">
<?php echo JHtml::_('grid.sort', 'FLEXI_ALIAS', 'a.alias', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th class="hideOnDemandClass center">
<?php echo JHtml::_('grid.sort', 'FLEXI_ASSIGNED_TO', 'nrassigned', $this->lists['order_Dir'], $this->lists['order'] ); ?>
</th>
<th class="hideOnDemandClass col_id center hidden-phone hidden-tablet">
<?php echo JHtml::_('grid.sort', 'FLEXI_ID', 'a.id', $this->lists['order_Dir'], $this->lists['order']); ?>
</th>
</tr>
</thead>
<tbody>
<?php
// Add 1 collapsed row to the empty table to allow border styling to apply
if (!count($this->rows))
{
echo '<tr class="collapsed_row"><td colspan="'.$list_total_cols.'"></td></tr>';
}
// In the case we skip rows, we need a reliable incrementing counter with no holes, used for e.g. even / odd row class
$k = 0;
foreach ($this->rows as $i => $row)
{
?>
<tr class="<?php echo 'row' . ($k % 2); ?>">
<td class="left col_rowcount hidden-phone">
<?php echo $this->pagination->getRowOffset($i); ?>
</td>
<td class="col_state">
<?php $state = isset($state_icons[$row->published]) ? $row->state : 'u'; ?>
<span class="<?php echo $state_icons[$state]; ?>" title="<?php echo $state_names[$state]; ?>"></span>
</td>
<td align="left">
<a style="cursor:pointer" onclick="window.parent.qfSelectTag('<?php echo $row->id; ?>', '<?php echo str_replace( array("'", "\""), array("\\'", ""), $row->name ); ?>');">
<?php echo htmlspecialchars($row->name, ENT_QUOTES, 'UTF-8'); ?>
</a>
</td>
<td class="alias hidden-phone">
<?php echo StringHelper::strlen($row->alias) > 25
? StringHelper::substr( htmlspecialchars($row->alias, ENT_QUOTES, 'UTF-8'), 0 , 25) . '...'
: htmlspecialchars($row->alias, ENT_QUOTES, 'UTF-8');
?>
</td>
<td class="center">
<?php echo $row->nrassigned ? $row->nrassigned : 0; ?>
</td>
<td class="col_id center hidden-phone hidden-tablet">
<?php echo $row->id; ?>
</td>
</tr>
<?php
$k++;
}
?>
</tbody>
</table>
<div>
<?php echo $pagination_footer; ?>
</div>
<!-- Common management form fields -->
<input type="hidden" name="tmpl" value="component" />
<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
<input type="hidden" name="view" value="<?php echo $this->view; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" id="filter_order" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
<input type="hidden" id="filter_order_Dir" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
<input type="hidden" name="fcform" value="1" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div><!-- #flexicontent end -->