/** * @param $renderOnClickEvent boolean * In the event of a portlet refresh, you do not want to render the onClick event * since this will already be rendered in the page. Doing so would add an extra unneeded * modal dialog. */ public static function renderPortlet($item, $uniqueLayoutId, $moduleId, $renderOnClickEvent = true) { $content = "<div class=\"juiportlet-widget-head\">\n"; if (isset($item['removable']) && $item['removable'] == true) { $content .= "<a href=\"#\" class=\"remove\">CLOSE<span class=\"icon\"></span></a>"; //must be CLOSE - do not translate } $content .= "<h3>" . $item['title'] . "</h3>"; if (isset($item['editable']) && $item['editable'] == true) { $content .= JuiPortlets::renderEditLink($item['id'], $uniqueLayoutId, $moduleId, $renderOnClickEvent) . "\n"; } if (isset($item['collapsed']) && $item['collapsed']) { $widgetContentStyle = "style=\"display:none;\""; } else { $widgetContentStyle = ''; } $content .= "</div>\n"; $content .= "<div class=\"juiportlet-widget-content\" {$widgetContentStyle} >\n"; $content .= $item['content'] . "\n"; $content .= "</div>\n"; return $content; }