Skip to content

Commit

Permalink
Revert "Merge branch 'feature/organize-headings-7976'"
Browse files Browse the repository at this point in the history
This reverts commit ea2a17a, reversing
changes made to e72de8d.

refs #7976
fixes #8647
  • Loading branch information
lippserd committed Mar 12, 2015
1 parent 8295d6d commit 90971f2
Show file tree
Hide file tree
Showing 34 changed files with 117 additions and 251 deletions.
1 change: 0 additions & 1 deletion application/controllers/ConfigController.php
Expand Up @@ -72,7 +72,6 @@ public function init()
$allowedActions[] = 'roles';
}
$this->firstAllowedAction = array_shift($allowedActions);
$this->getTabs()->setTitle($this->translate('Config Navigation'));
}

public function devtoolsAction()
Expand Down
1 change: 0 additions & 1 deletion application/controllers/RolesController.php
Expand Up @@ -51,7 +51,6 @@ public function init()
'label' => $this->translate('Roles'),
'url' => 'roles'
));
$this->getTabs()->setTitle($this->translate('Role Configuration'));
}

/**
Expand Down
17 changes: 3 additions & 14 deletions application/views/scripts/config/authentication/reorder.phtml
Expand Up @@ -2,20 +2,9 @@
<?= $tabs; ?>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1" id="authentication-configuration">
<?= $this->translate('Authentication Configuration'); ?>
</h1>
<h2 tabindex="-1" id="authentication-new-backend" class="sr-only">
<?= t('New Authentication Backend'); ?>
</h2>
<p>
<a href="<?= $this->href('/config/createAuthenticationBackend'); ?>">
<?= $this->icon('plus'); ?><?= $this->translate('Create A New Authentication Backend'); ?>
</a>
</p>
<h2 tabindex="-1" id="authentication-reorder" class="sr-only">
<?= t('Reorder Authentication Backends'); ?>
</h2>
<a href="<?= $this->href('/config/createAuthenticationBackend'); ?>">
<?= $this->icon('plus'); ?><?= $this->translate('Create A New Authentication Backend'); ?>
</a>
<div id="authentication-reorder-form">
<?= $form; ?>
</div>
Expand Down
3 changes: 0 additions & 3 deletions application/views/scripts/config/module.phtml
Expand Up @@ -11,9 +11,6 @@
$permissions = $module->getProvidedPermissions();
$state = $moduleData->enabled ? ($moduleData->loaded ? 'enabled' : 'failed') : 'disabled'
?>
<h1 tabindex="-1">
<?= $this->escape($module->getTitle()) ?>
</h1>
<table class="avp">
<tr>
<th><?= $this->escape($this->translate('Name')) ?></th>
Expand Down
1 change: 0 additions & 1 deletion application/views/scripts/config/modules.phtml
Expand Up @@ -4,7 +4,6 @@
</div>

<div class="content">
<h1 tabindex="-1"><?= $this->translate('Installed Modules') ?></h1>
<table class="action" data-base-target="_next">
<tbody>
<?php foreach ($modules as $module): ?>
Expand Down
17 changes: 3 additions & 14 deletions application/views/scripts/config/resource.phtml
Expand Up @@ -2,20 +2,9 @@
<?= $tabs; ?>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1" id="resource-index">
<?= t('Resource Configuration'); ?>
</h1>
<h2 tabindex="-1" id="resource-new-resource" class="sr-only">
<?= t('Create New Resource'); ?>
</h2>
<p>
<a href="<?= $this->href('/config/createresource'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?>
</a>
</p>
<h2 tabindex="-1" id="resource-edit-resource" class="sr-only">
<?= t('Edit Existing Resources'); ?>
</h2>
<a href="<?= $this->href('/config/createresource'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?>
</a>
<table class="action" id="resource-edit-table">
<thead>
<th><?= $this->translate('Resource'); ?></th>
Expand Down
6 changes: 0 additions & 6 deletions application/views/scripts/roles/index.phtml
Expand Up @@ -2,9 +2,6 @@
<?= $tabs ?>
</div>
<div class="content">
<h1 tabindex="-1" id="roles-index">
<?= $this->translate('Roles') ?>
</h1>
<div>
<?php /** @var \Icinga\Application\Config $roles */ if ($roles->isEmpty()): ?>
<?= $this->translate('No roles found.') ?>
Expand Down Expand Up @@ -70,9 +67,6 @@
</tbody>
</table>
<?php endif ?>
<h2 tabindex="-1" id="roles-index-new" class="sr-only">
<?= $this->translate('Create New Role'); ?>
</h2>
<a data-base-target="_next" href="<?= $this->href('roles/new') ?>">
<?= $this->translate('Create a New Role') ?>
</a>
Expand Down
36 changes: 14 additions & 22 deletions library/Icinga/Web/Widget/FilterEditor.php
Expand Up @@ -678,28 +678,20 @@ public function renderSearch()
public function render()
{
if (! $this->preservedUrl()->getParam('modifyFilter')) {
$filterEditor = $this->renderSearch() . $this->shorten($this->filter, 50);
} else {
$filterEditor = $this->renderSearch()
. '<form action="'
. Url::fromRequest()
. '" class="filterEditor" method="POST">'
. '<ul class="tree widgetFilter"><li>'
. $this->renderFilter($this->filter)
. '</li></ul>'
. '<div style="float: right">'
. '<input type="submit" name="submit" value="Apply" />'
. '<input type="submit" name="cancel" value="Cancel" />'
. '</div>'
. '</form>';
}

return sprintf(
'<div class="filter-editor dontprint">'
. '<h2 tabindex="-1" class="sr-only">%s</h2>%s</div>',
t('Filters'),
$filterEditor
);
return $this->renderSearch() . $this->shorten($this->filter, 50);
}
return $this->renderSearch()
. '<form action="'
. Url::fromRequest()
. '" class="filterEditor" method="POST">'
. '<ul class="tree widgetFilter"><li>'
. $this->renderFilter($this->filter)
. '</li></ul>'
. '<div style="float: right">'
. '<input type="submit" name="submit" value="Apply" />'
. '<input type="submit" name="cancel" value="Cancel" />'
. '</div>'
. '</form>';
}

protected function shorten($string, $length)
Expand Down
9 changes: 1 addition & 8 deletions library/Icinga/Web/Widget/SortBox.php
Expand Up @@ -133,13 +133,6 @@ public function render()
if ($this->request) {
$form->populate($this->request->getParams());
}

return sprintf(
'<div class="sort-box dontprint">'
. '<h2 tabindex="-1" class="sr-only">%s</h2>%s%s</div>',
t('Sort Criteria'),
t('Sort by'),
(string) $form
);
return $form;
}
}
47 changes: 2 additions & 45 deletions library/Icinga/Web/Widget/Tabs.php
Expand Up @@ -20,7 +20,6 @@ class Tabs extends AbstractWidget implements Countable
* @var string
*/
private $baseTpl = <<< 'EOT'
{HEADER}
<ul class="tabs">
{TABS}
{DROPDOWN}
Expand All @@ -29,13 +28,6 @@ class Tabs extends AbstractWidget implements Countable
</ul>
EOT;

/**
* Template used for the header
*
* @type string
*/
private $headerTpl = '<h2 class="sr-only">{TITLE}</h2>';

/**
* Template used for the tabs dropdown
*
Expand Down Expand Up @@ -109,13 +101,6 @@ class Tabs extends AbstractWidget implements Countable
*/
private $closeTab = true;

/**
* Title of the tab navigation
*
* @type string
*/
private $title;

/**
* Set whether the current tab is closable
*/
Expand Down Expand Up @@ -381,15 +366,13 @@ public function render()
'{TABS}',
'{DROPDOWN}',
'{REFRESH}',
'{CLOSE}',
'{HEADER}'
'{CLOSE}'
),
array(
$tabs,
$drop,
$close,
$refresh,
$this->renderHeader()
$refresh
),
$this->baseTpl
);
Expand Down Expand Up @@ -451,30 +434,4 @@ public function extend(Tabextension $tabextension)
$tabextension->apply($this);
return $this;
}

/**
* Set the title of the tab navigation
*
* @param string $title
* @return self
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}

/**
* Render the title into the header template
*
* @return string
*/
public function renderHeader()
{
if (! $this->title) {
return '';
}

return str_replace('{TITLE}', $this->title, $this->headerTpl);
}
}
Expand Up @@ -44,7 +44,7 @@ public function indexAction()
'label' => $this->translate('Alert Summary'),
'url' => Url::fromRequest()
)
)->activate('alertsummary')->setTitle($this->translate('Alertsummary Navigation'));
)->activate('alertsummary');
$this->view->title = $this->translate('Alert Summary');

$this->view->intervalBox = $this->createIntervalBox();
Expand Down
Expand Up @@ -727,7 +727,6 @@ protected function addTitleTab($action, $title, $tip)
private function createTabs()
{
$tabs = $this->getTabs();
$tabs->setTitle($this->translate('Monitoring Navigation'));
if (in_array($this->_request->getActionName(), array(
'hosts',
'services',
Expand Down
Expand Up @@ -29,7 +29,7 @@ public function init()
'label' => $this->translate('Monitoring Health'),
'url' =>'monitoring/process/info'
)
)->setTitle($this->translate('Process Information'));
);
}

/**
Expand Down
@@ -1,43 +1,32 @@
<div class="controls">
<?= $this->tabs ?>
<div style="margin: 1em;" class="dontprint">
<h2 tabindex="-1" class="sr-only">
<?= $this->translate('Filters'); ?>
</h2>
<?= $intervalBox; ?>
</div>
<?= $this->widget('limiter') ?>
<?= $this->paginationControl($notifications, null, null, array('preserve' => $this->preserve)) ?>
</div>

<div class="content alertsummary">
<h1 tabindex="-1">
<?= $this->translate('Alert summary'); ?>
</h1>
<!-- <h1><?= $this->translate('Alert summary'); ?></h1> -->

<div class="hbox">
<div class="hbox-item">
<h2 tabindex="-1" id="alertsummary-notifications">
<?= $this->translate('Notifications and Problems'); ?>
</h2>
<h2><?= $this->translate('Notifications and Problems'); ?></h2>
<div style="width: 400px; height: 400px;">
<?= $defectChart->render(); ?>
</div>
</div>

<div class="hbox-item">
<h2 tabindex="-1" id="alertsummary-reaction-time">
<?= $this->translate('Time to Reaction (Ack, Recover)'); ?>
</h2>
<h2><?= $this->translate('Time to Reaction (Ack, Recover)'); ?></h2>
<div style="width: 400px; height: 400px;">
<?= $healingChart->render(); ?>
</div>
</div>
</div>

<h2 tabindex="-1" id="alertsummary-trend">
<?= $this->translate('Trend'); ?>
</h2>
<h2><?= $this->translate('Trend'); ?></h2>

<div class="alertsummary-flex-container">
<div class="alertsummary-flex">
Expand All @@ -64,9 +53,7 @@
</div>

<?php if ($this->recentAlerts): ?>
<h2 tabindex="-1" id="alertsummary-top5">
<?= $this->translate('Top 5 Recent Alerts'); ?>
</h2>
<h1><?= $this->translate('Top 5 Recent Alerts'); ?></h1>

<div class="alertsummary-flex-container">
<div class="alertsummary-flex">
Expand All @@ -79,9 +66,7 @@
</div>
<?php endif; ?>

<h2 tabindex="-1" id="alertsummary-history">
<?= $this->translate('History'); ?>
</h2>
<h1><?= $this->translate('History'); ?></h1>
<div class="alertsummary-flex-container">
<div class="alertsummary-flex">
<?= $this->partial('list/notifications.phtml', array(
Expand Down
Expand Up @@ -3,7 +3,6 @@
<?= $this->render('partials/host/servicesummary.phtml') ?>
</div>
<div class="content" data-base-target="_next">
<h1 tabindex="-1"><?= $this->translate('Host Detail Information') ?></h1>
<?= $this->render('show/components/output.phtml') ?>
<?= $this->render('show/components/grapher.phtml') ?>

Expand Down
15 changes: 8 additions & 7 deletions modules/monitoring/application/views/scripts/list/comments.phtml
@@ -1,14 +1,15 @@
<?php if (false === $this->compact): ?>
<div class="controls">
<?= $this->tabs ?>
<?= $this->sortControl ?>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
<?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
</div>
<div class="controls">
<?= $this->tabs->render($this); ?>
<div style="margin: 1em" class="dontprint">
<?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
</div>
<?= $this->widget('limiter', array('url' => $this->url, 'max' => $comments->count())); ?>
<?= $this->paginationControl($comments, null, null, array('preserve' => $this->preserve)); ?>
</div>
<?php endif ?>

<div class="content">
<h1 tabindex="-1"><?= $this->translate('Comments') ?></h1>
<?php if (count($comments) === 0): ?>
<?= $this->translate('No comments matching the filter'); ?>
</div>
Expand Down
Expand Up @@ -4,9 +4,6 @@
</div>
<?php endif ?>
<div class="content">
<h1 tabindex="-1">
<?= $this->translate('Contact Groups'); ?>
</h1>
<div class="boxview" data-base-target="_next">

<?php
Expand Down

0 comments on commit 90971f2

Please sign in to comment.