From 34d7450d3c13342715e90ec21bceaa13e1baa876 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 28 Dec 2014 11:28:50 -0500 Subject: Template helpers refactoring --- app/Template/swimlane/edit.php | 12 ++++++------ app/Template/swimlane/index.php | 26 +++++++++++++------------- app/Template/swimlane/remove.php | 4 ++-- app/Template/swimlane/table.php | 14 +++++++------- 4 files changed, 28 insertions(+), 28 deletions(-) (limited to 'app/Template/swimlane') diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php index fca555f7..ea842f31 100644 --- a/app/Template/swimlane/edit.php +++ b/app/Template/swimlane/edit.php @@ -2,15 +2,15 @@

-
+ - + formCsrf() ?> - - + formHidden('id', $values) ?> + formHidden('project_id', $values) ?> - - + formLabel(t('Name'), 'name') ?> + formText('name', $values, $errors, array('autofocus required')) ?>
diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php index ec822c15..2bcddf75 100644 --- a/app/Template/swimlane/index.php +++ b/app/Template/swimlane/index.php @@ -2,19 +2,19 @@ - $active_swimlanes, 'project' => $project)) ?> +render('swimlane/table', array('swimlanes' => $active_swimlanes, 'project' => $project)) ?> - + - - + formCsrf() ?> + formHidden('project_id', $values) ?> - - + formLabel(t('Name'), 'name') ?> + formText('name', $values, $errors, array('autofocus required')) ?>
@@ -24,15 +24,15 @@ - + - - + formCsrf() ?> + formHidden('id', $default_swimlane) ?> - -
+ formLabel(t('Rename'), 'default_swimlane') ?> + formText('default_swimlane', $default_swimlane, array(), array('autofocus required')) ?>
- + formCheckbox('show_default_swimlane', t('Show default swimlane'), 1, isset($default_swimlane['show_default_swimlane']) && $default_swimlane['show_default_swimlane'] == 1) ?>
@@ -43,5 +43,5 @@ - $inactive_swimlanes, 'project' => $project, 'hide_position' => true)) ?> +render('swimlane/table', array('swimlanes' => $inactive_swimlanes, 'project' => $project, 'hide_position' => true)) ?> \ No newline at end of file diff --git a/app/Template/swimlane/remove.php b/app/Template/swimlane/remove.php index edf8803c..3268f51f 100644 --- a/app/Template/swimlane/remove.php +++ b/app/Template/swimlane/remove.php @@ -9,9 +9,9 @@

- $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?> + a(t('Yes'), 'swimlane', 'remove', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?> - $project['id'])) ?> + a(t('cancel'), 'swimlane', 'index', array('project_id' => $project['id'])) ?>
\ No newline at end of file diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index ac7ed835..32870ecc 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -11,31 +11,31 @@ # - + e($swimlane['name']) ?>
  • - $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> + a(t('Move Up'), 'swimlane', 'moveup', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
  • - $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> + a(t('Move Down'), 'swimlane', 'movedown', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
  • - $project['id'], 'swimlane_id' => $swimlane['id'])) ?> + a(t('Rename'), 'swimlane', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
  • - $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> + a(t('Disable'), 'swimlane', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> - $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> + a(t('Enable'), 'swimlane', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?>
  • - $project['id'], 'swimlane_id' => $swimlane['id'])) ?> + a(t('Remove'), 'swimlane', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?>
-- cgit v1.2.3