From 22c5e32def94560881ad9ec032158cd570be44f4 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 5 Mar 2016 17:40:49 -0500 Subject: Improve automatic action creation --- app/Template/action/event.php | 25 -------- app/Template/action/index.php | 130 +++++++++++++++++++---------------------- app/Template/action/params.php | 49 ---------------- 3 files changed, 60 insertions(+), 144 deletions(-) delete mode 100644 app/Template/action/event.php delete mode 100644 app/Template/action/params.php (limited to 'app/Template/action') diff --git a/app/Template/action/event.php b/app/Template/action/event.php deleted file mode 100644 index f4f12db3..00000000 --- a/app/Template/action/event.php +++ /dev/null @@ -1,25 +0,0 @@ - - -

-
- - form->csrf() ?> - - form->hidden('project_id', $values) ?> - form->hidden('action_name', $values) ?> - - form->label(t('Event'), 'event_name') ?> - form->select('event_name', $events, $values) ?> - -
- -
- -
- - - url->link(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?> -
-
\ No newline at end of file diff --git a/app/Template/action/index.php b/app/Template/action/index.php index 1cc14782..63d63887 100644 --- a/app/Template/action/index.php +++ b/app/Template/action/index.php @@ -3,79 +3,69 @@ - - -

- - - - - - - - - - - - - - -
-
    -
  • - = - text->in($action['event_name'], $available_events) ?> -
  • -
  • - = - text->in($action['action_name'], $available_actions) ?> -
  • -
      -
-
    - $param_value): ?> -
  • - text->in($param_name, $available_params[$action['action_name']]) ?> = - - text->contains($param_name, 'column_id')): ?> - text->in($param_value, $columns_list) ?> - text->contains($param_name, 'user_id')): ?> - text->in($param_value, $users_list) ?> - text->contains($param_name, 'project_id')): ?> - text->in($param_value, $projects_list) ?> - text->contains($param_name, 'color_id')): ?> - text->in($param_value, $colors_list) ?> - text->contains($param_name, 'category_id')): ?> - text->in($param_value, $categories_list) ?> - text->contains($param_name, 'link_id')): ?> - text->in($param_value, $links_list) ?> - - text->e($param_value) ?> - - -
  • - -
-
- url->link(t('Remove'), 'action', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id']), false, 'popover') ?> -
- - - -

-
- form->csrf() ?> - form->hidden('project_id', $values) ?> - - form->label(t('Action'), 'action_name') ?> - form->select('action_name', $available_actions, $values) ?> + +

+ + + + + + + -
- -
- \ No newline at end of file + + + + + + + +
+
    +
  • + = + text->in($action['event_name'], $available_events) ?> +
  • +
  • + = + text->in($action['action_name'], $available_actions) ?> +
  • +
      +
+
    + $param_value): ?> +
  • + text->in($param_name, $available_params[$action['action_name']]) ?> = + + text->contains($param_name, 'column_id')): ?> + text->in($param_value, $columns_list) ?> + text->contains($param_name, 'user_id')): ?> + text->in($param_value, $users_list) ?> + text->contains($param_name, 'project_id')): ?> + text->in($param_value, $projects_list) ?> + text->contains($param_name, 'color_id')): ?> + text->in($param_value, $colors_list) ?> + text->contains($param_name, 'category_id')): ?> + text->in($param_value, $categories_list) ?> + text->contains($param_name, 'link_id')): ?> + text->in($param_value, $links_list) ?> + + text->e($param_value) ?> + + +
  • + +
+
+ url->link(t('Remove'), 'action', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id']), false, 'popover') ?> +
+ \ No newline at end of file diff --git a/app/Template/action/params.php b/app/Template/action/params.php deleted file mode 100644 index 99e9206f..00000000 --- a/app/Template/action/params.php +++ /dev/null @@ -1,49 +0,0 @@ - - -

-
- - form->csrf() ?> - - form->hidden('project_id', $values) ?> - form->hidden('event_name', $values) ?> - form->hidden('action_name', $values) ?> - - $param_desc): ?> - - text->contains($param_name, 'column_id')): ?> - form->label($param_desc, $param_name) ?> - form->select('params['.$param_name.']', $columns_list, $values) ?> - text->contains($param_name, 'user_id')): ?> - form->label($param_desc, $param_name) ?> - form->select('params['.$param_name.']', $users_list, $values) ?> - text->contains($param_name, 'project_id')): ?> - form->label($param_desc, $param_name) ?> - form->select('params['.$param_name.']', $projects_list, $values) ?> - text->contains($param_name, 'color_id')): ?> - form->label($param_desc, $param_name) ?> - form->select('params['.$param_name.']', $colors_list, $values) ?> - text->contains($param_name, 'category_id')): ?> - form->label($param_desc, $param_name) ?> - form->select('params['.$param_name.']', $categories_list, $values) ?> - text->contains($param_name, 'link_id')): ?> - form->label($param_desc, $param_name) ?> - form->select('params['.$param_name.']', $links_list, $values) ?> - text->contains($param_name, 'duration')): ?> - form->label($param_desc, $param_name) ?> - form->number('params['.$param_name.']', $values) ?> - - form->label($param_desc, $param_name) ?> - form->text('params['.$param_name.']', $values) ?> - - - - -
- - - url->link(t('cancel'), 'action', 'index', array('project_id' => $project['id'])) ?> -
-
\ No newline at end of file -- cgit v1.2.3