コード例 #1
0
 function render_region($region_id, $panes)
 {
     // Pass through to normal rendering if not in admin mode.
     if (!$this->admin) {
         return parent::render_region($region_id, $panes);
     }
     $content = implode('', $panes);
     $panel_buttons = $this->get_region_links($region_id);
     $output = "<div class='panel-region' id='panel-region-{$region_id}'>";
     $output .= $panel_buttons;
     $output .= "<h2 class='label'>" . check_plain($this->plugins['layout']['regions'][$region_id]) . "</h2>";
     $output .= $content;
     $output .= "</div>";
     return $output;
 }
コード例 #2
0
 function render_region($region_id, $panes)
 {
     // Pass through to normal rendering if not in admin mode.
     if (!$this->admin) {
         return parent::render_region($region_id, $panes);
     }
     $content = implode('', $panes);
     $panel_buttons = $this->get_region_links($region_id);
     // @todo this should be panel-region not panels-display -- but CSS and .js has to be updated.
     $output = "<div class='panels-display' id='panel-pane-{$region_id}'>";
     $output .= $panel_buttons;
     $output .= "<h2 class='label'>" . $this->plugins['layout']['panels'][$region_id] . "</h2>";
     $output .= $content;
     $output .= "</div>";
     return $output;
 }