Fix position issues on column index template
This commit is contained in:
@@ -2,6 +2,11 @@
|
|||||||
<h2><?= t('Edit the board for "%s"', $project['name']) ?></h2>
|
<h2><?= t('Edit the board for "%s"', $project['name']) ?></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if (! empty($columns)): ?>
|
||||||
|
|
||||||
|
<?php $first_position = $columns[0]['position']; ?>
|
||||||
|
<?php $last_position = $columns[count($columns) - 1]['position']; ?>
|
||||||
|
|
||||||
<h3><?= t('Change columns') ?></h3>
|
<h3><?= t('Change columns') ?></h3>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -24,12 +29,12 @@
|
|||||||
<li>
|
<li>
|
||||||
<?= $this->a(t('Edit'), 'column', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>
|
<?= $this->a(t('Edit'), 'column', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>
|
||||||
</li>
|
</li>
|
||||||
<?php if ($column['position'] != 1): ?>
|
<?php if ($column['position'] != $first_position): ?>
|
||||||
<li>
|
<li>
|
||||||
<?= $this->a(t('Move Up'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'up'), true) ?>
|
<?= $this->a(t('Move Up'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'up'), true) ?>
|
||||||
</li>
|
</li>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?php if ($column['position'] != count($columns)): ?>
|
<?php if ($column['position'] != $last_position): ?>
|
||||||
<li>
|
<li>
|
||||||
<?= $this->a(t('Move Down'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'down'), true) ?>
|
<?= $this->a(t('Move Down'), 'column', 'move', array('project_id' => $project['id'], 'column_id' => $column['id'], 'direction' => 'down'), true) ?>
|
||||||
</li>
|
</li>
|
||||||
@@ -43,6 +48,8 @@
|
|||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<?php endif ?>
|
||||||
|
|
||||||
<h3><?= t('Add a new column') ?></h3>
|
<h3><?= t('Add a new column') ?></h3>
|
||||||
<form method="post" action="<?= $this->u('column', 'create', array('project_id' => $project['id'])) ?>" autocomplete="off">
|
<form method="post" action="<?= $this->u('column', 'create', array('project_id' => $project['id'])) ?>" autocomplete="off">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user