Improve link labels pages navigation
This commit is contained in:
@@ -22,9 +22,9 @@
|
||||
<?= $this->url->link(t('Tags management'), 'TagController', 'index') ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('LinkController') ?>>
|
||||
<?= $this->url->link(t('Link settings'), 'LinkController', 'index') ?>
|
||||
<?= $this->url->link(t('Link labels'), 'LinkController', 'show') ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('CurrencyController', 'show') ?>>
|
||||
<li <?= $this->app->checkMenuSelection('CurrencyController') ?>>
|
||||
<?= $this->url->link(t('Currency rates'), 'CurrencyController', 'show') ?>
|
||||
</li>
|
||||
<li <?= $this->app->checkMenuSelection('ConfigController', 'integrations') ?>>
|
||||
|
||||
@@ -1,18 +1,12 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Add a new link') ?></h2>
|
||||
<h2><?= t('Add link label') ?></h2>
|
||||
</div>
|
||||
|
||||
<form action="<?= $this->url->href('LinkController', 'save') ?>" method="post" autocomplete="off">
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<?= $this->form->label(t('Label'), 'label') ?>
|
||||
<?= $this->form->text('label', $values, $errors, array('required')) ?>
|
||||
|
||||
<?= $this->form->text('label', $values, $errors, array('required', 'autofocus')) ?>
|
||||
<?= $this->form->label(t('Opposite label'), 'opposite_label') ?>
|
||||
<?= $this->form->text('opposite_label', $values, $errors) ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
|
||||
</div>
|
||||
<?= $this->modal->submitButtons() ?>
|
||||
</form>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Link labels') ?></h2>
|
||||
</div>
|
||||
<?php if (! empty($links)): ?>
|
||||
<table class="table-striped table-scrolling">
|
||||
<tr>
|
||||
<th class="column-70"><?= t('Link labels') ?></th>
|
||||
<th><?= t('Actions') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($links as $link): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?= t($link['label']) ?></strong>
|
||||
|
||||
<?php if (! empty($link['opposite_label'])): ?>
|
||||
| <?= t($link['opposite_label']) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<?= $this->modal->medium('edit', t('Edit'), 'LinkController', 'edit', array('link_id' => $link['id'])) ?>
|
||||
<?= t('or') ?>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'LinkController', 'confirm', array('link_id' => $link['id'])) ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<?= t('There is no link.') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->render('link/create', array('values' => $values, 'errors' => $errors)) ?>
|
||||
36
app/Template/link/show.php
Normal file
36
app/Template/link/show.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('Link labels') ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->modal->medium('plus', t('Add link label'), 'LinkController', 'create') ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if (! empty($links)): ?>
|
||||
<table class="table-striped table-scrolling">
|
||||
<tr>
|
||||
<th class="column-70"><?= t('Link labels') ?></th>
|
||||
<th><?= t('Actions') ?></th>
|
||||
</tr>
|
||||
<?php foreach ($links as $link): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<strong><?= t($link['label']) ?></strong>
|
||||
|
||||
<?php if (! empty($link['opposite_label'])): ?>
|
||||
| <?= t($link['opposite_label']) ?>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<?= $this->modal->medium('edit', t('Edit'), 'LinkController', 'edit', array('link_id' => $link['id'])) ?>
|
||||
<?= t('or') ?>
|
||||
<?= $this->modal->confirm('trash-o', t('Remove'), 'LinkController', 'confirm', array('link_id' => $link['id'])) ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<?= t('There is no link.') ?>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user