From 77a307e4ff8cfb4afcd34990b147f0ad38dfc558 Mon Sep 17 00:00:00 2001 From: ashbike Date: Mon, 9 Feb 2015 21:30:08 +0530 Subject: - Markdown supported in column description. - Project > Edit Board and Project Summary pages now show description as tooltip. - Project > Edit Board shows textarea with markdown preview. Edit column also shows markdown preview. - Fixed bug while adding a new column inserts description as column limit. --- app/Controller/Board.php | 2 +- app/Model/Board.php | 4 ++-- app/Template/board/edit.php | 34 +++++++++++++++++++++++++++++----- app/Template/board/edit_column.php | 19 ++++++++++++++++++- app/Template/board/swimlane.php | 8 +++----- app/Template/project/show.php | 11 +++++++---- 6 files changed, 60 insertions(+), 18 deletions(-) (limited to 'app') diff --git a/app/Controller/Board.php b/app/Controller/Board.php index c9622f86..758dea1e 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -283,7 +283,7 @@ class Board extends Base if ($valid) { - if ($this->board->addColumn($project['id'], $data['title'],$data['description'])) { + if ($this->board->addColumn($project['id'], $data['title'],$data['task_limit'],$data['description'])) { $this->session->flash(t('Board updated successfully.')); $this->response->redirect('?controller=board&action=edit&project_id='.$project['id']); } diff --git a/app/Model/Board.php b/app/Model/Board.php index 2b07ca46..8a344f7f 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -118,7 +118,7 @@ class Board extends Base $values = array( 'project_id' => $project_id, 'title' => $title, - 'task_limit' => $task_limit, + 'task_limit' => intval($task_limit), 'position' => $this->getLastColumnPosition($project_id) + 1, 'description' => $description, ); @@ -140,7 +140,7 @@ class Board extends Base { return $this->db->table(self::TABLE)->eq('id', $column_id)->update(array( 'title' => $title, - 'task_limit' => $task_limit, + 'task_limit' => intval($task_limit), 'description' => $description, )); } diff --git a/app/Template/board/edit.php b/app/Template/board/edit.php index 25a8eded..75f2b4f5 100644 --- a/app/Template/board/edit.php +++ b/app/Template/board/edit.php @@ -6,16 +6,20 @@ - - - + -
e($column['title']) ?>e($column['description']) ?>e($column['title']) ?> + + + + + + e($column['task_limit']) ?> +
  • a(t('Edit'), 'board', 'editColumn', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> @@ -48,8 +52,28 @@ formLabel(t('Title'), 'title') ?> formText('title', $values, $errors, array('required', 'maxlength="50"')) ?> + + formLabel(t('Task limit'), 'task_limit') ?> + formNumber('task_limit', $values, $errors) ?> + formLabel(t('Description'), 'description') ?> - formTextarea('description', $values, $errors) ?> + +
    +
      +
    • + +
    • +
    • + +
    • +
    +
    + formTextarea('description', $values, $errors) ?> +
    +
    +
    +
    +
    diff --git a/app/Template/board/edit_column.php b/app/Template/board/edit_column.php index 0d41bfbe..397e1d23 100644 --- a/app/Template/board/edit_column.php +++ b/app/Template/board/edit_column.php @@ -16,7 +16,24 @@ formNumber('task_limit', $values, $errors) ?> formLabel(t('Description'), 'description') ?> - formTextarea('description', $values, $errors) ?> + +
    +
      +
    • + +
    • +
    • + +
    • +
    +
    + formTextarea('description', $values, $errors) ?> +
    +
    +
    +
    +
    +
    diff --git a/app/Template/board/swimlane.php b/app/Template/board/swimlane.php index 3e808bf2..23e170d9 100644 --- a/app/Template/board/swimlane.php +++ b/app/Template/board/swimlane.php @@ -24,13 +24,11 @@ a('+', 'task', 'create', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'task-creation-popover', t('Add a new task')) ?>
    - + e($column['title']) ?> - - e($column['title']) ?> + + - - e($column['title']) ?> diff --git a/app/Template/project/show.php b/app/Template/project/show.php index 486be643..888eea2a 100644 --- a/app/Template/project/show.php +++ b/app/Template/project/show.php @@ -41,15 +41,18 @@
    - - + - - + -- cgit v1.2.3
    e($column['title']) ?>e($column['description']) ?>e($column['title']) ?> + + + + +