Exemplo n.º 1
0
 function render(Zikula_Form_View $view)
 {
     $scripts = array('javascript/ajax/prototype.js', 'modules/Content/javascript/ajax.js');
     PageUtil::addVar('javascript', $scripts);
     $output = "<div class=\"z-formrow\">";
     $output .= parent::render($view);
     $output .= "</div>";
     $descr = array();
     $contentTypes = ModUtil::apiFunc('Content', 'Content', 'getContentTypes');
     foreach ($contentTypes as $type) {
         $descr[] = "\"{$type['module']}:{$type['name']}\" : \"" . htmlspecialchars($type['description']) . '"';
     }
     $descr = '<script type="text/javascript">/* <![CDATA[ */ var contentDescriptions = {' . implode(', ', $descr) . '} /* ]]> */</script>';
     $descr0 = count($contentTypes) > 0 ? $contentTypes[0]['description'] : '';
     $descr0 = htmlspecialchars($descr0);
     $output .= "<div class=\"z-formrow\" id=\"{$this->id}_descr\">{$descr0}</div>";
     $output .= $descr;
     return $output;
 }
Exemplo n.º 2
0
 /**
  * Render event handler.
  *
  * @param Zikula_Form_View $view Reference to Form render object.
  *
  * @return string The rendered output
  */
 function render(Zikula_Form_View $view)
 {
     $result = parent::render($view);
     if ($this->editLink && !empty($this->category) && SecurityUtil::checkPermission('Categories::', "{$this->category}[id]::", ACCESS_EDIT)) {
         $url = DataUtil::formatForDisplay(ModUtil::url('Categories', 'user', 'edit', array('dr' => $this->category['id'])));
         $result .= "&nbsp;&nbsp;<a href=\"{$url}\"><img src=\"images/icons/extrasmall/xedit.png\" title=\"" . __('Edit') . '" alt="' . __('Edit') . '" /></a>';
     }
     return $result;
 }
Exemplo n.º 3
0
 /**
  * Render event handler.
  *
  * @param Zikula_Form_View $view Reference to Form render object.
  *
  * @return string The rendered output
  */
 public function render(Zikula_Form_View $view)
 {
     $result = parent::render($view);
     if ($this->editLink && !empty($this->category) && SecurityUtil::checkPermission('ZikulaCategoriesModule::', "{$this->category['id']}::", ACCESS_EDIT)) {
         $url = DataUtil::formatForDisplay(ModUtil::url('ZikulaCategoriesModule', 'user', 'edit', array('dr' => $this->category['id'])));
         $result .= '&nbsp;&nbsp;<a href="' . $url . '"><i class="fa fa-pencil fa-lg text-danger" title="' . __('Edit') . '"></i></a>';
     }
     return $result;
 }