public static function display($disposition_id, $disposition, $page, $zone_id) { global $NeoFrag; $output = display($disposition, NeoFrag::live_editor() ? $zone_id : NULL); if (!NeoFrag::live_editor() && in_string('<div class="module', $output)) { $output .= $NeoFrag->profiler->output(); } if (NeoFrag::live_editor()) { if (NeoFrag::live_editor() & NeoFrag::ZONES) { $output = ' <div class="pull-right"> ' . ($page == '*' ? '<button type="button" class="btn btn-link live-editor-fork" data-enable="0">' . icon('fa-toggle-off') . ' ' . $NeoFrag->lang('common_layout') . '</button>' : '<button type="button" class="btn btn-link live-editor-fork" data-enable="1">' . icon('fa-toggle-on') . ' ' . $NeoFrag->lang('custom_layout') . '</button>') . ' </div> <h3>' . (!empty($NeoFrag->load->theme->zones[$zone_id]) ? $NeoFrag->load->theme->load->lang($NeoFrag->load->theme->zones[$zone_id], NULL) : $NeoFrag->lang('zone', $zone_id)) . ' <div class="btn-group"><button type="button" class="btn btn-xs btn-success live-editor-add-row" data-toggle="tooltip" data-container="body" title="' . $NeoFrag->lang('new_row') . '">' . icon('fa-plus') . '</button></div></h3>' . $output; } $output = '<div' . (NeoFrag::live_editor() & NeoFrag::ZONES ? ' class="live-editor-zone"' : '') . ' data-disposition-id="' . $disposition_id . '">' . $output . '</div>'; } return $output; }
public function display($id = NULL) { $output = ''; if ($live_editor = NeoFrag::live_editor() & NeoFrag::ROWS && !is_null($id)) { $output .= '<div class="live-editor-row-header"> <div class="btn-group"> <button type="button" class="btn btn-sm btn-info live-editor-style" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('design') . '">' . icon('fa-paint-brush') . '</button> <button type="button" class="btn btn-sm btn-danger live-editor-delete" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('remove') . '">' . icon('fa-close') . '</button> </div> <h3>' . NeoFrag::loader()->lang('row') . ' <div class="btn-group"><button type="button" class="btn btn-xs btn-success live-editor-add-col" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('new_col') . '">' . icon('fa-plus') . '</button></div></h3> </div>'; } $cols = array(); foreach ($this->cols as $i => $col) { $cols[] = $col->display(!is_null($id) ? $i : NULL); } $output .= '<div class="row' . (!empty($this->style) ? ' ' . $this->style . ($live_editor ? '" data-original-style="' . $this->style : '') : '') . '"' . (!is_null($id) ? ' data-row-id="' . $id . '"' : '') . '> ' . implode($cols) . ' </div>'; return $live_editor ? '<div class="live-editor-row">' . $output . '</div>' : $output; }
public function display($id = NULL) { $output = ''; foreach ($this->widgets as $i => $widget) { if (!empty($widget->size)) { $this->_size = $widget->size; } $output .= $widget->display(!is_null($id) ? $i : NULL); } if (NeoFrag::live_editor() & NeoFrag::COLS && !is_null($id)) { $output = '<div class="live-editor-col"> <div class="btn-group"> <button type="button" class="btn btn-sm btn-default live-editor-size" data-size="-1" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('reduce') . '">' . icon('fa-compress fa-rotate-45') . '</button> <button type="button" class="btn btn-sm btn-default live-editor-size" data-size="1" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('increase') . '">' . icon('fa-expand fa-rotate-45') . '</button> <button type="button" class="btn btn-sm btn-danger live-editor-delete" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('remove') . '">' . icon('fa-close') . '</button> </div> <h3>' . NeoFrag::loader()->lang('col') . ' <div class="btn-group"><button type="button" class="btn btn-xs btn-success live-editor-add-widget" data-toggle="tooltip" data-container="body" title="' . NeoFrag::loader()->lang('new_widget') . '">' . icon('fa-plus') . '</button></div></h3> ' . $output . ' </div>'; } return '<div class="' . $this->_size . '"' . (!is_null($id) ? ' data-col-id="' . $id . '"' : '') . '>' . $output . '</div>'; }
public function __construct() { parent::__construct(); if (method_exists($this->load->theme, 'load')) { $this->load->theme->load(); } $this->data = $this->load->data; $this->data['page_title'] = $this->config->nf_name . ' :: ' . $this->config->nf_description; $this->data['lang'] = $this->config->lang; if (isset($this->load->module->table) && $this->load->module->table->is_ajax()) { $output = $this->load->module->table->get_output(ob_get_clean(), $this->data); } else { if ($this->config->ajax_url) { $output = $this->load->module->get_output(); } else { if (NeoFrag::live_editor()) { $this->load->css('neofrag.live-editor'); } $this->data['module_actions'] = $this->load->module->get_actions(); $this->data = array_merge($this->data, $this->load->module->load->data); $this->template->parse_data($this->data, $this->load->module->load); $this->data['module'] = ob_get_clean() . $this->template->parse($this->load->module->get_output(), $this->data, $this->load->module->load); if ($this->config->admin_url) { $this->data['module'] = '<div class="module module-admin module-' . $this->load->module->name . '">' . $this->data['module'] . $this->profiler->output() . '</div>'; } if ($this->config->segments_url[0] != 'index' && !empty($this->data['module_title'])) { $this->data['page_title'] = $this->data['module_title'] . ' :: ' . $this->config->nf_name; } if (!empty($this->load->module->icon) || !empty($this->data['module_icon'])) { $this->data['module_title'] = icon(!empty($this->data['module_icon']) ? $this->data['module_icon'] : $this->load->module->icon) . ' ' . $this->data['module_title']; } $this->data['body'] = $this->load->theme->load->view('body', $this->data); if (isset($this->load->css)) { $this->data['css'] = array(); foreach ($this->load->css as $css) { $this->data['css'][] = '<link rel="stylesheet" href="' . path($css[0] . '.css', 'css', $css[2]->paths['assets']) . '" type="text/css" media="' . $css[1] . '" />' . "\r\n"; } $this->data['css'] = implode(array_unique($this->data['css'])); } if (isset($this->load->js)) { $this->data['js'] = array(); foreach ($this->load->js as $js) { $this->data['js'][] = '<script type="text/javascript" src="' . path($js[0] . '.js', 'js', $js[1]->paths['assets']) . '"></script>' . "\r\n"; } $this->data['js'] = implode(array_unique($this->data['js'])); } if (isset($this->load->js_load)) { $this->data['js_load'] = ''; foreach (array_unique($this->load->js_load) as $js) { $this->data['js_load'] .= $js; } } $output = $this->load->theme->load->view('default', $this->data); } } if ($this->config->extension_url == 'json') { header('Content-Type: application/json; charset=UTF-8'); } else { if ($this->config->extension_url == 'xml') { header('Content-Type: application/xml; charset=UTF-8'); $output = '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" . $output; } else { if ($this->config->extension_url == 'txt') { header('Content-Type: text/plain; charset=UTF-8'); $output = utf8_html_entity_decode($output); } else { header('Content-Type: text/html; charset=UTF-8'); } } } echo $output; }