Params/_render: get rid of it, start with iframe

This commit is contained in:
Thomas Gelf 2014-06-22 16:18:23 +02:00
parent bb23d0636c
commit 3b84078b2f
4 changed files with 5 additions and 4 deletions

View File

@ -13,7 +13,7 @@ if (array_key_exists('_dev', $_GET)) {
$ie8jsfile = 'js/icinga.ie8.js';
$lang = Translator::getLanguage();
$isIframe = isset($_GET['_render']) && $_GET['_render'] === 'iframe';
$isIframe = isset($_GET['isIframe']);
$iframeClass = $isIframe ? ' iframe' : '';
?><!DOCTYPE html>

View File

@ -396,7 +396,7 @@ class Url
*
* @return self
*/
public function setParam($param, $value)
public function setParam($param, $value = true)
{
$this->params->set($param, $value);
return $this;

View File

@ -165,9 +165,9 @@ EOD;
{
$view = $this->view();
$url = clone($this->url);
$url->addParams(array('view' => 'compact'));
$url->setParam('view', 'compact');
$iframeUrl = clone($url);
$iframeUrl->addParams(array('_render' => 'iframe'));
$iframeUrl->setParam('isIframe');
$html = str_replace('{URL}', $url, $this->template);
$html = str_replace('{IFRAME_URL}', $iframeUrl, $html);

View File

@ -442,6 +442,7 @@ class Monitoring_ListController extends Controller
$params = clone $this->params;
$params->shift('_render');
$params->shift('isIframe');
$limit = $params->shift('limit');
$sort = $params->shift('sort');
$dir = $params->shift('dir');