Do not mark relative urls as absolute

refs #5600
refs #10169
This commit is contained in:
Johannes Meyer 2015-09-22 14:12:08 +02:00
parent 8239ec8fb5
commit 57e08e92d4
12 changed files with 18 additions and 18 deletions

View File

@ -32,7 +32,7 @@ class PreferenceController extends BasePreferenceController
array(
'title' => t('Adjust the preferences of Icinga Web 2 according to your needs'),
'label' => t('Preferences'),
'url' => Url::fromPath('/preference')
'url' => Url::fromPath('preference')
)
)
);

View File

@ -22,7 +22,7 @@ if ($this->layout()->autorefreshInterval) {
<?php if (Auth::getInstance()->isAuthenticated()): ?>
<?= $this->qlink(
'',
'/dashboard',
'dashboard',
null,
array(
'icon' => '../logo_icinga-inv.png',

View File

@ -63,7 +63,7 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml';
<!--<![endif]-->
<script type="text/javascript">
var icinga = new Icinga({
baseUrl: '<?= $this->href('/') ?>'
baseUrl: '<?= $this->baseUrl(); ?>'
});
</script>
</body>

View File

@ -2,7 +2,7 @@
<?= $tabs; ?>
</div>
<div class="content" data-base-target="_next">
<a href="<?= $this->href('/config/createresource'); ?>">
<a href="<?= $this->href('config/createresource'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create A New Resource'); ?>
</a>
<table class="action alternating" id="resource-edit-table">

View File

@ -2,7 +2,7 @@
<?= $tabs; ?>
</div>
<div class="content" data-base-target="_next">
<a href="<?= $this->href('/config/createuserbackend'); ?>">
<a href="<?= $this->href('config/createuserbackend'); ?>">
<?= $this->icon('plus'); ?><?= $this->translate('Create A New User Backend'); ?>
</a>
<div id="authentication-reorder-form">

View File

@ -5,7 +5,7 @@
<div class="content" data-base-target="_next">
<p>
<a href="<?= $this->href('/monitoring/config/createbackend'); ?>">
<a href="<?= $this->href('monitoring/config/createbackend'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create New Monitoring Backend'); ?>
</a>
</p>
@ -20,7 +20,7 @@
<td>
<?= $this->qlink(
$backendName,
'/monitoring/config/editbackend',
'monitoring/config/editbackend',
array('backend-name' => $backendName),
array(
'icon' => 'edit',
@ -35,7 +35,7 @@
<td>
<?= $this->qlink(
'',
'/monitoring/config/removebackend',
'monitoring/config/removebackend',
array('backend-name' => $backendName),
array(
'icon' => 'trash',
@ -49,7 +49,7 @@
</table>
<h1><?= $this->translate('Command Transports') ?></h1>
<p>
<a href="<?= $this->href('/monitoring/config/createtransport'); ?>">
<a href="<?= $this->href('monitoring/config/createtransport'); ?>">
<?= $this->icon('plus'); ?> <?= $this->translate('Create New Transport'); ?>
</a>
</p>
@ -64,7 +64,7 @@
<td>
<?= $this->qlink(
$transportName,
'/monitoring/config/edittransport',
'monitoring/config/edittransport',
array('transport' => $transportName),
array(
'icon' => 'edit',
@ -79,7 +79,7 @@
<td>
<?= $this->qlink(
'',
'/monitoring/config/removetransport',
'monitoring/config/removetransport',
array('transport' => $transportName),
array(
'icon' => 'trash',

View File

@ -14,7 +14,7 @@
<div class="content">
<table data-base-target="_next"
class="action comments multiselect"
data-icinga-multiselect-url="/icingaweb2/monitoring/comments/show"
data-icinga-multiselect-url="<?= $this->href('monitoring/comments/show'); ?>"
data-icinga-multiselect-data="comment_id">
<tbody>
<?php foreach ($comments->peekAhead($this->compact) as $comment): ?>

View File

@ -27,7 +27,7 @@ if (count($groupData) === 0) {
<div class="box contents">
<?php foreach ($groupInfo['contacts'] as $c): ?>
<div class="box entry">
<?= $this->img('/static/gravatar', array('email' => $c->contact_email)); ?>
<?= $this->img('static/gravatar', array('email' => $c->contact_email)); ?>
<?= $this->qlink(
$c->contact_alias,
'monitoring/show/contact',

View File

@ -10,7 +10,7 @@
<div data-base-target="_next" class="content contacts">
<?php foreach ($contacts->peekAhead($this->compact) as $contact): ?>
<div class="contact">
<?= $this->img('/static/gravatar', array('email' => $contact->contact_email)); ?>
<?= $this->img('static/gravatar', array('email' => $contact->contact_email)); ?>
<strong><?= $this->qlink(
$contact->contact_name,
'monitoring/show/contact',

View File

@ -20,7 +20,7 @@ if (! $this->compact): ?>
<div class="content">
<table data-base-target="_next"
class="action multiselect"
data-icinga-multiselect-url="/icingaweb2/monitoring/downtimes/show"
data-icinga-multiselect-url="<?= $this->href('monitoring/downtimes/show'); ?>"
data-icinga-multiselect-data="downtime_id">
<tbody>
<?php foreach ($downtimes as $downtime): ?>

View File

@ -65,7 +65,7 @@ if (! $beingExtended && !$this->compact): ?>
<div class="timeframe">
<span><?= $this->qlink(
$timeInfo[0]->end->format($intervalFormat),
'/monitoring/list/eventhistory',
'monitoring/list/eventhistory',
array(
'timestamp<' => $timeInfo[0]->start->getTimestamp(),
'timestamp>' => $timeInfo[0]->end->getTimestamp()

View File

@ -263,11 +263,11 @@ $dashboard->add(
);
$dashboard->add(
N_('Service Groups'),
'/monitoring/list/servicegroups'
'monitoring/list/servicegroups'
);
$dashboard->add(
N_('Host Groups'),
'/monitoring/list/hostgroups'
'monitoring/list/hostgroups'
);
/*