summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/css/app.css4
-rw-r--r--locales/fr_FR/translations.php1
-rw-r--r--locales/pl_PL/translations.php4
-rw-r--r--templates/board_index.php70
-rw-r--r--templates/board_public.php68
5 files changed, 83 insertions, 64 deletions
diff --git a/assets/css/app.css b/assets/css/app.css
index fb0bba98..ca9f5694 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -426,6 +426,10 @@ nav .active a {
text-align: right;
}
+.public-board {
+ margin-top: 5px;
+}
+
#board th a {
text-decoration: none;
font-size: 150%;
diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php
index 7d021fcc..4e38e052 100644
--- a/locales/fr_FR/translations.php
+++ b/locales/fr_FR/translations.php
@@ -180,4 +180,5 @@ return array(
'%d closed tasks' => '%d tâches terminées',
'no task for this project' => 'aucune tâche pour ce projet',
'Public link' => 'Accès public',
+ 'There is no column in your project!' => 'Il n\'y a aucune colonne dans votre projet !',
);
diff --git a/locales/pl_PL/translations.php b/locales/pl_PL/translations.php
index 2e6211ed..b1ecd1ed 100644
--- a/locales/pl_PL/translations.php
+++ b/locales/pl_PL/translations.php
@@ -180,4 +180,8 @@ return array(
'%d closed tasks' => '%d zamkniętych zadań',
'no task for this project' => 'brak zadań dla tego projektu',
'Public link' => 'Link publiczny',
+
+ /* Missing translations:
+ 'There is no column in your project!' => '',
+ */
);
diff --git a/templates/board_index.php b/templates/board_index.php
index abd511b7..274e8227 100644
--- a/templates/board_index.php
+++ b/templates/board_index.php
@@ -21,44 +21,50 @@
</ul>
</div>
- <table id="board" data-project-id="<?= $current_project_id ?>">
- <tr>
- <?php $column_with = round(100 / count($columns), 2); ?>
- <?php foreach ($columns as $column): ?>
- <th width="<?= $column_with ?>%">
- <a href="?controller=task&amp;action=create&amp;project_id=<?= $column['project_id'] ?>&amp;column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a>
- <?= Helper\escape($column['title']) ?>
- </th>
- <?php endforeach ?>
- </tr>
- <tr>
- <?php foreach ($columns as $column): ?>
- <td id="column-<?= $column['id'] ?>" class="column" data-column-id="<?= $column['id'] ?>" dropzone="copy">
- <?php foreach ($column['tasks'] as $task): ?>
- <div class="draggable-item" draggable="true">
- <div class="task task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>">
+ <?php if (empty($columns)): ?>
+ <p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
+ <?php else: ?>
+
+ <table id="board" data-project-id="<?= $current_project_id ?>">
+ <tr>
+ <?php $column_with = round(100 / count($columns), 2); ?>
+ <?php foreach ($columns as $column): ?>
+ <th width="<?= $column_with ?>%">
+ <a href="?controller=task&amp;action=create&amp;project_id=<?= $column['project_id'] ?>&amp;column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a>
+ <?= Helper\escape($column['title']) ?>
+ </th>
+ <?php endforeach ?>
+ </tr>
+ <tr>
+ <?php foreach ($columns as $column): ?>
+ <td id="column-<?= $column['id'] ?>" class="column" data-column-id="<?= $column['id'] ?>" dropzone="copy">
+ <?php foreach ($column['tasks'] as $task): ?>
+ <div class="draggable-item" draggable="true">
+ <div class="task task-<?= $task['color_id'] ?>" data-task-id="<?= $task['id'] ?>">
- <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>">#<?= $task['id'] ?></a> -
+ <a href="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>">#<?= $task['id'] ?></a> -
- <span class="task-user">
- <?php if (! empty($task['owner_id'])): ?>
- <?= t('Assigned to %s', $task['username']) ?>
- <?php else: ?>
- <span class="task-nobody"><?= t('No body assigned') ?></span>
- <?php endif ?>
- </span>
+ <span class="task-user">
+ <?php if (! empty($task['owner_id'])): ?>
+ <?= t('Assigned to %s', $task['username']) ?>
+ <?php else: ?>
+ <span class="task-nobody"><?= t('No body assigned') ?></span>
+ <?php endif ?>
+ </span>
- <div class="task-title">
- <?= Helper\escape($task['title']) ?>
- </div>
+ <div class="task-title">
+ <?= Helper\escape($task['title']) ?>
+ </div>
+ </div>
</div>
- </div>
+ <?php endforeach ?>
+ </td>
<?php endforeach ?>
- </td>
- <?php endforeach ?>
- </tr>
- </table>
+ </tr>
+ </table>
+
+ <?php endif ?>
</section>
diff --git a/templates/board_public.php b/templates/board_public.php
index d01bae0f..ac9e80ae 100644
--- a/templates/board_public.php
+++ b/templates/board_public.php
@@ -1,41 +1,45 @@
-<section id="main">
+<section id="main" class="public-board">
- <table id="board">
- <tr>
- <?php $column_with = round(100 / count($columns), 2); ?>
- <?php foreach ($columns as $column): ?>
- <th width="<?= $column_with ?>%">
- <?= Helper\escape($column['title']) ?>
- </th>
- <?php endforeach ?>
- </tr>
- <tr>
- <?php foreach ($columns as $column): ?>
- <td class="column">
- <?php foreach ($column['tasks'] as $task): ?>
- <div class="draggable-item">
- <div class="task task-<?= $task['color_id'] ?>">
+ <?php if (empty($columns)): ?>
+ <p class="alert alert-error"><?= t('There is no column in your project!') ?></p>
+ <?php else: ?>
+ <table id="board">
+ <tr>
+ <?php $column_with = round(100 / count($columns), 2); ?>
+ <?php foreach ($columns as $column): ?>
+ <th width="<?= $column_with ?>%">
+ <?= Helper\escape($column['title']) ?>
+ </th>
+ <?php endforeach ?>
+ </tr>
+ <tr>
+ <?php foreach ($columns as $column): ?>
+ <td class="column">
+ <?php foreach ($column['tasks'] as $task): ?>
+ <div class="draggable-item">
+ <div class="task task-<?= $task['color_id'] ?>">
- #<?= $task['id'] ?> -
+ #<?= $task['id'] ?> -
- <span class="task-user">
- <?php if (! empty($task['owner_id'])): ?>
- <?= t('Assigned to %s', $task['username']) ?>
- <?php else: ?>
- <span class="task-nobody"><?= t('No body assigned') ?></span>
- <?php endif ?>
- </span>
+ <span class="task-user">
+ <?php if (! empty($task['owner_id'])): ?>
+ <?= t('Assigned to %s', $task['username']) ?>
+ <?php else: ?>
+ <span class="task-nobody"><?= t('No body assigned') ?></span>
+ <?php endif ?>
+ </span>
- <div class="task-title">
- <?= Helper\escape($task['title']) ?>
- </div>
+ <div class="task-title">
+ <?= Helper\escape($task['title']) ?>
+ </div>
+ </div>
</div>
- </div>
+ <?php endforeach ?>
+ </td>
<?php endforeach ?>
- </td>
- <?php endforeach ?>
- </tr>
- </table>
+ </tr>
+ </table>
+ <?php endif ?>
</section> \ No newline at end of file