diff --git a/application/views/helpers/layout/Container.php b/application/views/helpers/layout/Container.php
new file mode 100644
index 000000000..435d94b23
--- /dev/null
+++ b/application/views/helpers/layout/Container.php
@@ -0,0 +1,140 @@
+view = $view;
+ $this->id = $containerid;
+
+ foreach ($flags as $type => $value) {
+ if ($type === 'elementId') {
+ $this->elementId = $value;
+ continue;
+ }
+ if ($type === 'refreshInterval') {
+ $this->refreshInterval = intval($type);
+ continue;
+ }
+ if ($type == 'detachable' && $value == true) {
+ $this->features["detachable"] = true;
+ continue;
+ }
+ if ($type == 'expandable' && $value == true) {
+ $this->features["expandable"] = true;
+ continue;
+ }
+
+ if ($type == "icingaUrl") {
+ $this->url = $value;
+ continue;
+ }
+ if ($type == "iframeFallback") {
+ $this->iframeFallback = true;
+ }
+ if ($type == 'class') {
+ $this->class = $value;
+ continue;
+ }
+ }
+ return $this;
+ }
+ public function beginContent()
+ {
+ ob_start();
+ return $this;
+
+ }
+
+ public function endContent()
+ {
+ $content = ob_get_contents();
+ ob_end_clean();
+ return $this->buildDOM($content);
+ }
+
+ public function buildDOM($content = "")
+ {
+ $additional = "";
+ if ($this->refreshInterval > 0)
+ $additional .= " container-refresh-interval='{$this->refreshInterval}' ";
+ if ($this->elementId)
+ $additional .= " id='$this->elementId'";
+ $url = "";
+ if ($this->url) {
+ $url = $this->view->baseUrl($this->url);
+ $additional .= "icinga-url='{$url}'";
+ if($this->iframeFallback) {
+ $content = "
+
+ ";
+ }
+ }
+
+ $controls = $this->getControlDOM();
+
+ $html = "
+
+ $controls
+ $content
+
+ ";
+
+ return $html;
+ }
+
+ private function getControlDOM()
+ {
+ if(empty($this->features))
+ return "";
+ $features = "";
+ foreach($this->features as $feature=>$enabled) {
+ if(!$enabled)
+ continue;
+ if($feature == "detachable") {
+ $url = $this->view->baseUrl($this->url ? $this->url : Zend_Controller_Front::getInstance()->getRequest()->getRequestUri());
+ $features .= "
+ ";
+ }
+ if($feature == "expandable") {
+ $url = $this->url ? $this->url : Zend_Controller_Front::getInstance()->getRequest()->getRequestUri();
+ $features .= "
+ ";
+ }
+ }
+ return "$features
";
+ }
+
+ public function registerTabs($tabHelper)
+ {
+
+ }
+
+ public function __toString() {
+ return $this->endContent();
+ }
+}
+
+class Zend_View_Helper_Container extends Zend_View_Helper_Abstract
+{
+
+ /**
+ * @param $id
+ * @param array $flags
+ * @return Zend_View_Helper_Container
+ */
+ public function container($containerid, $flags = array())
+ {
+ return new Zend_View_Helper_Container_State($containerid,$flags,$this->view);
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/application/views/helpers/layout/DetailTabs.php b/application/views/helpers/layout/DetailTabs.php
new file mode 100644
index 000000000..7a33cbdb1
--- /dev/null
+++ b/application/views/helpers/layout/DetailTabs.php
@@ -0,0 +1,65 @@
+ $settings->qlink(
+ 'Host',
+ $module.'/detail/show',
+ $urlParams + array('active' => 'host')
+ ),
+ );
+
+ if ($settings->service) {
+ $tabs['service'] = $settings->qlink(
+ 'Service',
+ $module.'/detail/show',
+ $urlParams
+ );
+ }
+
+ $tabs['history'] = $settings->qlink(
+ 'History',
+ $module.'/history',
+ $urlParams
+ );
+
+
+ $tabs['hostservices'] = $settings->qlink(
+ 'Services',
+ $module.'/hostservices',
+ $urlParams
+ );
+
+
+ $html = '';
+
+ foreach ($tabs as $name => $tab) {
+ $class = $name === $settings->active ? ' class="active"' : '';
+ $html .= "- $tab
";
+ }
+ $html .= "
";
+
+
+ return $html;
+ }
+
+}
diff --git a/application/views/helpers/layout/Expandable.php b/application/views/helpers/layout/Expandable.php
new file mode 100644
index 000000000..3c36bd22f
--- /dev/null
+++ b/application/views/helpers/layout/Expandable.php
@@ -0,0 +1,58 @@
+
+ $title
+ ";
+ }
+ $controls = $this->getControlDOM();
+ $skeleton = "
+
+
$title $controls
+
+
+ $content
+
+
";
+ return $skeleton;
+ }
+
+ public function getControlDOM() {
+
+ $features = "
+
+
+
+
+
+
+ ";
+
+
+ return "$features
";
+ }
+}