diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-05-17 17:35:39 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-05-17 17:35:39 -0400 |
commit | 5e4b40665fa11ce0fd0fe957a19e2b7e63f47446 (patch) | |
tree | b0e458788f84c03608154866ec3e964ec89ccb14 /templates/board_index.php | |
parent | 09da5720e8dccaa2437a7b25d992eaa104753684 (diff) |
Rewrite board drag and drop with jquery (touch devices, IE, auto-update)
Diffstat (limited to 'templates/board_index.php')
-rw-r--r-- | templates/board_index.php | 82 |
1 files changed, 2 insertions, 80 deletions
diff --git a/templates/board_index.php b/templates/board_index.php index 764020de..523e3392 100644 --- a/templates/board_index.php +++ b/templates/board_index.php @@ -27,88 +27,10 @@ </ul> </div> - <?php if (empty($columns)): ?> + <?php if (empty($board)): ?> <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&action=create&project_id=<?= $column['project_id'] ?>&column_id=<?= $column['id'] ?>" title="<?= t('Add a new task') ?>">+</a> - <?= Helper\escape($column['title']) ?> - <?php if ($column['task_limit']): ?> - <span title="<?= t('Task limit') ?>" class="task-limit"> - ( - <span id="task-number-column-<?= $column['id'] ?>"><?= count($column['tasks']) ?></span> - / - <?= Helper\escape($column['task_limit']) ?> - ) - </span> - <?php endif ?> - </th> - <?php endforeach ?> - </tr> - <tr> - <?php foreach ($columns as $column): ?> - <td - id="column-<?= $column['id'] ?>" - class="column <?= $column['task_limit'] && count($column['tasks']) > $column['task_limit'] ? 'task-limit-warning' : '' ?>" - data-column-id="<?= $column['id'] ?>" - data-task-limit="<?= $column['task_limit'] ?>" - 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'] ?>" - data-owner-id="<?= $task['owner_id'] ?>" - data-due-date="<?= $task['date_due'] ?>" - title="<?= t('View this task') ?>"> - - <a href="?controller=task&action=edit&task_id=<?= $task['id'] ?>" title="<?= t('Edit this task') ?>">#<?= $task['id'] ?></a> - - - <span class="task-user"> - <?php if (! empty($task['owner_id'])): ?> - <a href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>"><?= t('Assigned to %s', $task['username']) ?></a> - <?php else: ?> - <a href="?controller=board&action=assign&task_id=<?= $task['id'] ?>" title="<?= t('Change assignee') ?>" class="task-nobody"><?= t('Nobody assigned') ?></a> - <?php endif ?> - </span> - - <?php if ($task['score']): ?> - <span class="task-score"><?= Helper\escape($task['score']) ?></span> - <?php endif ?> - - <div class="task-title"> - <a href="?controller=task&action=show&task_id=<?= $task['id'] ?>" title="<?= t('View this task') ?>"><?= Helper\escape($task['title']) ?></a> - </div> - - <div class="task-footer"> - <?php if (! empty($task['date_due'])): ?> - <div class="task-date"> - <?= dt('%B %e, %G', $task['date_due']) ?> - </div> - <?php endif ?> - - <div class="task-icons"> - <?php if (! empty($task['nb_comments'])): ?> - <?= $task['nb_comments'] ?> <i class="fa fa-comment-o" title="<?= p($task['nb_comments'], t('%d comment', $task['nb_comments']), t('%d comments', $task['nb_comments'])) ?>"></i> - <?php endif ?> - - <?php if (! empty($task['description'])): ?> - <i class="fa fa-file-text-o" title="<?= t('Description') ?>"></i> - <?php endif ?> - </div> - </div> - </div> - </div> - <?php endforeach ?> - </td> - <?php endforeach ?> - </tr> - </table> - + <?= Helper\template('board_show', array('current_project_id' => $current_project_id, 'board' => $board)) ?> <?php endif ?> </section> |