Example #1
0
 function _displaylist($tpl = null)
 {
     $document = JFactory::getDocument();
     $logo = '<img src="' . JURI::root() . 'administrator/components/com_alphauserpoints/assets/images/icon-48-alphauserpoints.png" />&nbsp;&nbsp;';
     JToolBarHelper::title($logo . 'AlphaUserPoints :: ' . JText::_('AUP_COUPON_CODES'), 'thememanager');
     getCpanelToolbar();
     if (JFactory::getUser()->authorise('core.edit', 'com_alphauserpoints')) {
         JToolBarHelper::editList('editcoupon');
     }
     if (JFactory::getUser()->authorise('core.create', 'com_alphauserpoints')) {
         JToolBarHelper::addNew('editcoupon');
     }
     if (JFactory::getUser()->authorise('core.delete', 'com_alphauserpoints')) {
         JToolBarHelper::custom('deletecoupon', 'delete.png', 'delete.png', JText::_('AUP_DELETE'));
     }
     JToolBarHelper::divider();
     //JToolBarHelper::custom( 'qrcodestats', 'qrcode-stats.png', 'qrcode-stats.png', JText::_('AUP_QRCODE'), false );
     $bar = JToolBar::getInstance('toolbar');
     JHtml::_('bootstrap.modal', 'collapseModal');
     $title = JText::_('AUP_GENERATOR');
     $dhtml = "<button data-toggle=\"modal\" data-target=\"#generatorModal\" class=\"btn btn-small\">\r\n\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\r\n\t\t\t\t\t{$title}</button>";
     $bar->appendButton('Custom', $dhtml, 'coupongenerator');
     //$bar->appendButton( 'Popup', 'upload', JText::_('AUP_GENERATOR'), 'index.php?option=com_alphauserpoints&task=coupongenerator&layout=modal&tmpl=component', 800, 560, 0, 0, 'window.top.location.reload(true);document.location.reload(true);' );
     if (JFactory::getUser()->authorise('core.create', 'com_alphauserpoints')) {
         JToolBarHelper::custom('exportcoupons', 'upload.png', 'upload.png', JText::_('AUP_EXPORT'), false);
     }
     getPrefHelpToolbar();
     isIEAdm();
     $this->assignRef('couponcodes', $this->couponcodes);
     $this->assignRef('lists', $this->lists);
     $pagination = new JPagination($this->total, $this->limitstart, $this->limit);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Example #2
0
 public function _displaylist($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->addStyleDeclaration(".icon-32-plugin-add {background-image: url(components/com_alphauserpoints/assets/images/icon-32-plugin-add.png);}", "text/css");
     $logo = '<img src="' . JURI::root() . 'administrator/components/com_alphauserpoints/assets/images/icon-48-alphauserpoints.png" />&nbsp;&nbsp;';
     JToolBarHelper::title($logo . 'AlphaUserPoints :: ' . JText::_('AUP_RULES'), 'article');
     getCpanelToolbar();
     JToolBarHelper::publishList();
     JToolBarHelper::unpublishList();
     JToolBarHelper::divider();
     /*
     if (JFactory::getUser()->authorise('core.plugins', 'com_alphauserpoints')) {
     	JToolBarHelper::custom( 'plugins', 'power-cord.png', 'power-cord.png', JText::_('AUP_PLUGINS'), false );
     	JToolBarHelper::divider();
     }
     */
     if (JFactory::getUser()->authorise('core.create', 'com_alphauserpoints')) {
         JToolBarHelper::addNew('editrule');
     }
     JToolBarHelper::custom('copyrule', 'copy.png', 'copy.png', JText::_('AUP_COPY'));
     if (JFactory::getUser()->authorise('core.edit', 'com_alphauserpoints')) {
         JToolBarHelper::editList('editrule');
     }
     if (JFactory::getUser()->authorise('core.delete', 'com_alphauserpoints')) {
         JToolBarHelper::custom('deleterule', 'delete.png', 'delete.png', JText::_('AUP_DELETE'));
     }
     getPrefHelpToolbar();
     isIEAdm();
     $this->assignRef('rules', $this->rules);
     $pagination = new JPagination($this->total, $this->limitstart, $this->limit);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('lists', $this->lists);
     parent::display($tpl);
 }