Example #1
0
                ?>
							<a href="#category-<?php 
                echo $item->id;
                ?>
" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right">
								<i class="fa fa-plus"></i>
							</a>
						<?php 
            }
            ?>
						
						<?php 
            if ($this->params->get('show_cat_num_articles_cat') == 1) {
                ?>
							<span class="badge badge-info tip hasTooltip" title="<?php 
                echo T3J::tooltipText('COM_CONTENT_NUM_ITEMS');
                ?>
">
								<?php 
                echo $item->numitems;
                ?>
							</span>
						<?php 
            }
            ?>
					</h3>
					
					<?php 
            if ($this->params->get('show_subcat_desc_cat') == 1) {
                ?>
						<?php 
Example #2
0
File: icon.php Project: lazarch/t3
 /**
  * Display an edit icon for the article.
  *
  * This icon will not display in a popup window, nor if the article is trashed.
  * Edit access checks must be performed in the calling code.
  *
  * @param   object     $article  The article information
  * @param   JRegistry  $params   The item parameters
  * @param   array      $attribs  Optional attributes for the link
  * @param   boolean    $legacy   True to use legacy images, false to use icomoon based graphic
  *
  * @return  string	The HTML for the article edit icon.
  * @since   1.6
  */
 public static function edit($article, $params, $attribs = array(), $legacy = false)
 {
     $user = JFactory::getUser();
     $uri = JUri::getInstance();
     // Ignore if in a popup window.
     if ($params && $params->get('popup')) {
         return;
     }
     // Ignore if the state is negative (trashed).
     if ($article->state < 0) {
         return;
     }
     JHtml::_('bootstrap.tooltip');
     // Show checked_out icon if the article is checked out by a different user
     if (property_exists($article, 'checked_out') && property_exists($article, 'checked_out_time') && $article->checked_out > 0 && $article->checked_out != $user->get('id')) {
         $checkoutUser = JFactory::getUser($article->checked_out);
         $date = JHtml::_('date', $article->checked_out_time);
         $tooltip = JText::_('JLIB_HTML_CHECKED_OUT') . ' :: ' . JText::sprintf('COM_CONTENT_CHECKED_OUT_BY', $checkoutUser->name) . ' <br /> ' . $date;
         if ($legacy) {
             $button = JHtml::_('image', 'system/checked_out.png', null, null, true);
             $text = '<span class="hasTooltip" title="' . JHtml::tooltipText($tooltip . '', 0) . '">' . $button . '</span> ' . JText::_('JLIB_HTML_CHECKED_OUT');
         } else {
             $text = '<span class="hasTooltip icon-lock" title="' . T3J::tooltipText($tooltip . '', 0) . '"></span> ' . JText::_('JLIB_HTML_CHECKED_OUT');
         }
         $output = JHtml::_('link', '#', $text, $attribs);
         return $output;
     }
     $url = 'index.php?option=com_content&task=article.edit&a_id=' . $article->id . '&return=' . base64_encode($uri);
     if ($article->state == 0) {
         $overlib = JText::_('JUNPUBLISHED');
     } else {
         $overlib = JText::_('JPUBLISHED');
     }
     $date = JHtml::_('date', $article->created);
     $author = $article->created_by_alias ? $article->created_by_alias : $article->author;
     $overlib .= '&lt;br /&gt;';
     $overlib .= $date;
     $overlib .= '&lt;br /&gt;';
     $overlib .= JText::sprintf('COM_CONTENT_WRITTEN_BY', htmlspecialchars($author, ENT_COMPAT, 'UTF-8'));
     if ($legacy) {
         $icon = $article->state ? 'edit.png' : 'edit_unpublished.png';
         if (strtotime($article->publish_up) > strtotime(JFactory::getDate()) || strtotime($article->publish_down) < strtotime(JFactory::getDate()) && $article->publish_down != JFactory::getDbo()->getNullDate()) {
             $icon = 'edit_unpublished.png';
         }
         $text = JHtml::_('image', 'system/' . $icon, JText::_('JGLOBAL_EDIT'), null, true);
     } else {
         $icon = $article->state ? 'edit' : 'eye-close';
         if (strtotime($article->publish_up) > strtotime(JFactory::getDate()) || strtotime($article->publish_down) < strtotime(JFactory::getDate()) && $article->publish_down != JFactory::getDbo()->getNullDate()) {
             $icon = 'eye-close';
         }
         $text = '<span class="hasTooltip fa fa-' . $icon . ' tip" title="' . T3J::tooltipText(JText::_('COM_CONTENT_EDIT_ITEM'), $overlib, 0) . '"></span>&#160;' . JText::_('JGLOBAL_EDIT') . '&#160;';
     }
     $output = JHtml::_('link', JRoute::_($url), $text, $attribs);
     return $output;
 }
Example #3
0
File: bar.php Project: grlf/eyedock
		</div>
		<?php 
        if ($filterButton) {
            ?>
			<div class="btn-wrapper hidden-phone">
				<button type="button" class="btn hasTooltip js-stools-btn-filter" title="<?php 
            echo T3J::tooltipText('JSEARCH_TOOLS_DESC');
            ?>
">
					<?php 
            echo JText::_('JSEARCH_TOOLS');
            ?>
 <i class="caret"></i>
				</button>
			</div>
		<?php 
        }
        ?>
		<div class="btn-wrapper">
			<button type="button" class="btn hasTooltip js-stools-btn-clear" title="<?php 
        echo T3J::tooltipText('JSEARCH_FILTER_CLEAR');
        ?>
">
				<?php 
        echo JText::_('JSEARCH_FILTER_CLEAR');
        ?>
			</button>
		</div>
	<?php 
    }
}
// Add class, editing URL and tooltip, and if module of type menu, also the tooltip for editing the menu item:
$count = 0;
$moduleHtml = preg_replace(
	// Replace first tag of module with a class
	'/^(\s*<(?:div|span|nav|ul|ol|h\d) [^>]*class="[^"]*)"/',
	// By itself, adding class jmoddiv and data attributes for the url and tooltip:
	'\\1 jmoddiv" data-jmodediturl="' . $editUrl . '" data-jmodtip="'
	.	T3J::tooltipText(
			JText::_('JLIB_HTML_EDIT_MODULE'),
			htmlspecialchars($mod->title) . '<br />' . sprintf(JText::_('JLIB_HTML_EDIT_MODULE_IN_POSITION'), htmlspecialchars($position)),
			0
		)
	. '"'
	// And if menu editing is enabled and allowed and it's a menu module, add data attributes for menu editing:
	.	($menusEditing && $mod->module == 'mod_menu' ?
			'" data-jmenuedittip="' . T3J::tooltipText('JLIB_HTML_EDIT_MENU_ITEM', 'JLIB_HTML_EDIT_MENU_ITEM_ID') . '"'
			:
			''
		),
	$moduleHtml,
	1,
	$count
);

if ($count)
{
	// Load once booststrap tooltip and add stylesheet and javascript to head:
	JHtml::_('bootstrap.tooltip');
	JHtml::_('bootstrap.popover');

	JHtml::_('stylesheet', 'system/frontediting.css', array(), true);
Example #5
0
            $class = ' class="category-item"';
            ?>
		<h3 class="page-header item-title">
			<a href="<?php 
            echo JRoute::_(WeblinksHelperRoute::getCategoryRoute($item->id));
            ?>
">
				<?php 
            echo $this->escape($item->title);
            ?>
</a>
			<?php 
            if ($this->params->get('show_cat_num_articles_cat') == 1) {
                ?>
				<span class="badge badge-info tip hasTooltip" title="<?php 
                echo T3J::tooltipText('COM_WEBLINKS_NUM_ITEMS');
                ?>
">
					<?php 
                echo $item->numitems;
                ?>
				</span>
			<?php 
            }
            ?>
			<?php 
            if (count($item->getChildren()) > 0) {
                ?>
				<a href="#category-<?php 
                echo $item->id;
                ?>
Example #6
0
<?php

/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_BASE') or die;
$data = $displayData;
$metatitle = T3J::tooltipText(JText::_($data->tip ? $data->tip : $data->title), JText::_('JGLOBAL_CLICK_TO_SORT_THIS_COLUMN'), 0);
JHtml::_('bootstrap.tooltip');
?>
<a href="#" onclick="return false;" class="js-stools-column-order hasTooltip" data-order="<?php 
echo $data->order;
?>
" data-direction="<?php 
echo strtoupper($data->direction);
?>
" data-name="<?php 
echo JText::_($data->title);
?>
" title="<?php 
echo $metatitle;
?>
">
	<?php 
if (!empty($data->icon)) {
    ?>
		<i class="<?php 
Example #7
0
<?php

/**
 * @package     Joomla.Site
 * @subpackage  Layout
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
// JLayout for standard handling of the edit modules:
$moduleHtml =& $displayData['moduleHtml'];
$mod = $displayData['module'];
$position = $displayData['position'];
$menusEditing = $displayData['menusediting'];
if (preg_match('/<(?:div|span|nav|ul|ol|h\\d) [^>]*class="[^"]* jmoddiv"/', $moduleHtml)) {
    // Module has already module edit button:
    return;
}
// Add css class jmoddiv and data attributes for module-editing URL and for the tooltip:
$editUrl = JUri::base() . 'administrator/index.php?option=com_modules&view=module&layout=edit&id=' . (int) $mod->id;
// Add class, editing URL and tooltip, and if module of type menu, also the tooltip for editing the menu item:
$count = 0;
$moduleHtml = preg_replace('/^(\\s*<(?:div|span|nav|ul|ol|h\\d) [^>]*class="[^"]*)"/', '\\1 jmoddiv" data-jmodediturl="' . $editUrl . '" data-jmodtip="' . T3J::tooltipText(JText::_('JLIB_HTML_EDIT_MODULE'), htmlspecialchars($mod->title) . '<br />' . sprintf(JText::_('JLIB_HTML_EDIT_MODULE_IN_POSITION'), htmlspecialchars($position)), 0) . '"' . ($menusEditing && $mod->module == 'mod_menu' ? '" data-jmenuedittip="' . T3J::tooltipText('JLIB_HTML_EDIT_MENU_ITEM', 'JLIB_HTML_EDIT_MENU_ITEM_ID') . '"' : ''), $moduleHtml, 1, $count);
if ($count) {
    // Load once booststrap tooltip and add stylesheet and javascript to head:
    JHtml::_('bootstrap.tooltip');
    JHtml::_('bootstrap.popover');
    JHtml::_('stylesheet', 'system/frontediting.css', array(), true);
    JHtml::_('script', 'system/frontediting.js', false, true);
}