Example #1
0
<?php

/**
 * Part of Component {{extension.name.cap}} files.
 *
 * @copyright   Copyright (C) 2016 {ORGANIZATION}. All rights reserved.
 * @license     GNU General Public License version 2 or later.
 */
use Windwalker\View\Layout\FileLayout;
// No direct access
defined('_JEXEC') or die;
// Prepare script
JHtmlBootstrap::tooltip();
JHtmlFormbehavior::chosen('select');
JHtmlDropdown::init();
/**
 * Prepare data for this template.
 *
 * @var $this      \Windwalker\View\Engine\PhpEngine
 * @var $container \Windwalker\DI\Container
 */
$container = $this->getContainer();
$grid = $data->grid;
?>

<div id="{{extension.name.lower}}" class="windwalker {{controller.list.name.lower}} tablelist row-fluid">
	<form action="<?php 
echo JUri::getInstance();
?>
" method="post" name="adminForm" id="adminForm" enctype="multipart/form-data">
Example #2
0
 /**
  * Append a custom item to current dropdown menu
  *
  * @param   string   $label           The label of item
  * @param   string   $link            The link of item
  * @param   string   $linkAttributes  Custom link attributes
  * @param   string   $className       Class name of item
  * @param   boolean  $ajaxLoad        True if using ajax load when item clicked
  * @param   string   $jsCallBackFunc  Javascript function name, called when ajax load successfully
  *
  * @return  void
  *
  * @since   3.0
  */
 public static function addCustomItem($label, $link = 'javascript:void(0)', $linkAttributes = '', $className = '', $ajaxLoad = false, $jsCallBackFunc = null)
 {
     self::start();
     if ($ajaxLoad) {
         $href = ' href = "javascript:void(0)" onclick="loadAjax(\'' . $link . '\', \'' . $jsCallBackFunc . '\')"';
     } else {
         $href = ' href = "' . $link . '" ';
     }
     $dropDownList = self::$dropDownList;
     $dropDownList .= '<li class="' . $className . '"><a ' . $linkAttributes . $href . ' >';
     $dropDownList .= $label;
     $dropDownList .= '</a></li>';
     self::$dropDownList = $dropDownList;
     return;
 }