diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Controller/Category.php | 10 | ||||
-rw-r--r-- | app/Template/category/edit.php (renamed from app/Template/category_edit.php) | 4 | ||||
-rw-r--r-- | app/Template/category/index.php (renamed from app/Template/category_index.php) | 6 | ||||
-rw-r--r-- | app/Template/category/remove.php (renamed from app/Template/category_remove.php) | 5 |
4 files changed, 14 insertions, 11 deletions
diff --git a/app/Controller/Category.php b/app/Controller/Category.php index 4a0128f3..d69ed115 100644 --- a/app/Controller/Category.php +++ b/app/Controller/Category.php @@ -38,7 +38,7 @@ class Category extends Base { $project = $this->getProjectManagement(); - $this->response->html($this->projectLayout('category_index', array( + $this->response->html($this->projectLayout('category/index', array( 'categories' => $this->category->getList($project['id'], false), 'values' => array('project_id' => $project['id']), 'errors' => array(), @@ -70,7 +70,7 @@ class Category extends Base } } - $this->response->html($this->projectLayout('category_index', array( + $this->response->html($this->projectLayout('category/index', array( 'categories' => $this->category->getList($project['id'], false), 'values' => $values, 'errors' => $errors, @@ -89,7 +89,7 @@ class Category extends Base $project = $this->getProjectManagement(); $category = $this->getCategory($project['id']); - $this->response->html($this->projectLayout('category_edit', array( + $this->response->html($this->projectLayout('category/edit', array( 'values' => $category, 'errors' => array(), 'project' => $project, @@ -120,7 +120,7 @@ class Category extends Base } } - $this->response->html($this->projectLayout('category_edit', array( + $this->response->html($this->projectLayout('category/edit', array( 'values' => $values, 'errors' => $errors, 'project' => $project, @@ -138,7 +138,7 @@ class Category extends Base $project = $this->getProjectManagement(); $category = $this->getCategory($project['id']); - $this->response->html($this->projectLayout('category_remove', array( + $this->response->html($this->projectLayout('category/remove', array( 'project' => $project, 'category' => $category, 'title' => t('Remove a category') diff --git a/app/Template/category_edit.php b/app/Template/category/edit.php index 278d7e12..05fe288a 100644 --- a/app/Template/category_edit.php +++ b/app/Template/category/edit.php @@ -2,8 +2,10 @@ <h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2> </div> -<form method="post" action="?controller=category&action=update&project_id=<?= $project['id'] ?>" autocomplete="off"> +<form method="post" action="<?= Helper\u('category', 'update', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= Helper\form_csrf() ?> + <?= Helper\form_hidden('id', $values) ?> <?= Helper\form_hidden('project_id', $values) ?> diff --git a/app/Template/category_index.php b/app/Template/category/index.php index 4635406e..8a3eb4f1 100644 --- a/app/Template/category_index.php +++ b/app/Template/category/index.php @@ -14,10 +14,10 @@ <td> <ul> <li> - <a href="?controller=category&action=edit&project_id=<?= $project['id'] ?>&category_id=<?= $category_id ?>"><?= t('Edit') ?></a> + <?= Helper\a(t('Edit'), 'category', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> </li> <li> - <a href="?controller=category&action=confirm&project_id=<?= $project['id'] ?>&category_id=<?= $category_id ?>"><?= t('Remove') ?></a> + <?= Helper\a(t('Remove'), 'category', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> </li> </ul> </td> @@ -27,7 +27,7 @@ <?php endif ?> <h3><?= t('Add a new category') ?></h3> -<form method="post" action="?controller=category&action=save&project_id=<?= $project['id'] ?>" autocomplete="off"> +<form method="post" action="<?= Helper\u('category', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= Helper\form_csrf() ?> <?= Helper\form_hidden('project_id', $values) ?> diff --git a/app/Template/category_remove.php b/app/Template/category/remove.php index cfc23e07..39e5c1db 100644 --- a/app/Template/category_remove.php +++ b/app/Template/category/remove.php @@ -9,8 +9,9 @@ </p> <div class="form-actions"> - <a href="?controller=category&action=remove&project_id=<?= $project['id'] ?>&category_id=<?= $category['id'].Helper\param_csrf() ?>" class="btn btn-red"><?= t('Yes') ?></a> - <?= t('or') ?> <a href="?controller=category&project_id=<?= $project['id'] ?>"><?= t('cancel') ?></a> + <?= Helper\a(t('Yes'), 'category', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?> + <?= t('or') ?> + <?= Helper\a(t('cancel'), 'category', 'index', array('project_id' => $project['id'])) ?> </div> </div> </section>
\ No newline at end of file |