Improve category section

This commit is contained in:
Frederic Guillot
2017-02-18 14:01:54 -05:00
parent 49c8e5c1be
commit c7b7c060a6
29 changed files with 132 additions and 109 deletions

View File

@@ -7,6 +7,8 @@ New features:
Improvements: Improvements:
* Show category description in tooltip
* Show category creation form in modal dialog
* Prevent people to remove swimlanes that contains tasks * Prevent people to remove swimlanes that contains tasks
* Show task count in swimlane table * Show task count in swimlane table
* Use contextual menu instead of action column in users management * Use contextual menu instead of action column in users management

View File

@@ -34,20 +34,33 @@ class CategoryController extends BaseController
* List of categories for a given project * List of categories for a given project
* *
* @access public * @access public
* @param array $values
* @param array $errors
* @throws PageNotFoundException * @throws PageNotFoundException
*/ */
public function index(array $values = array(), array $errors = array()) public function index()
{ {
$project = $this->getProject(); $project = $this->getProject();
$this->response->html($this->helper->layout->project('category/index', array( $this->response->html($this->helper->layout->project('category/index', array(
'categories' => $this->categoryModel->getList($project['id'], false), 'categories' => $this->categoryModel->getAll($project['id']),
'project' => $project,
'title' => t('Categories'),
)));
}
/**
* Show form to create new category
*
* @param array $values
* @param array $errors
*/
public function create(array $values = array(), array $errors = array())
{
$project = $this->getProject();
$this->response->html($this->template->render('category/create', array(
'values' => $values + array('project_id' => $project['id']), 'values' => $values + array('project_id' => $project['id']),
'errors' => $errors, 'errors' => $errors,
'project' => $project, 'project' => $project,
'title' => t('Categories')
))); )));
} }
@@ -66,13 +79,14 @@ class CategoryController extends BaseController
if ($valid) { if ($valid) {
if ($this->categoryModel->create($values) !== false) { if ($this->categoryModel->create($values) !== false) {
$this->flash->success(t('Your category have been created successfully.')); $this->flash->success(t('Your category have been created successfully.'));
return $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id']))); $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id'])), true);
return;
} else { } else {
$this->flash->failure(t('Unable to create your category.')); $errors = array('name' => array(t('Another category with the same name exists in this project')));
} }
} }
return $this->index($values, $errors); $this->create($values, $errors);
} }
/** /**
@@ -88,11 +102,10 @@ class CategoryController extends BaseController
$project = $this->getProject(); $project = $this->getProject();
$category = $this->getCategory(); $category = $this->getCategory();
$this->response->html($this->helper->layout->project('category/edit', array( $this->response->html($this->template->render('category/edit', array(
'values' => empty($values) ? $category : $values, 'values' => empty($values) ? $category : $values,
'errors' => $errors, 'errors' => $errors,
'project' => $project, 'project' => $project,
'title' => t('Categories')
))); )));
} }
@@ -110,10 +123,10 @@ class CategoryController extends BaseController
if ($valid) { if ($valid) {
if ($this->categoryModel->update($values)) { if ($this->categoryModel->update($values)) {
$this->flash->success(t('Your category have been updated successfully.')); $this->flash->success(t('This category has been updated successfully.'));
return $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id']))); return $this->response->redirect($this->helper->url->to('CategoryController', 'index', array('project_id' => $project['id'])));
} else { } else {
$this->flash->failure(t('Unable to update your category.')); $this->flash->failure(t('Unable to update this category.'));
} }
} }
@@ -133,7 +146,6 @@ class CategoryController extends BaseController
$this->response->html($this->helper->layout->project('category/remove', array( $this->response->html($this->helper->layout->project('category/remove', array(
'project' => $project, 'project' => $project,
'category' => $category, 'category' => $category,
'title' => t('Remove a category')
))); )));
} }

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorije', 'Categories' => 'Kategorije',
'Your category have been created successfully.' => 'Uspješno kreirana kategorija.', 'Your category have been created successfully.' => 'Uspješno kreirana kategorija.',
'Unable to create your category.' => 'Nije moguće kreirati kategoriju.', 'Unable to create your category.' => 'Nije moguće kreirati kategoriju.',
'Your category have been updated successfully.' => 'Kategorija je uspješno ažurirana', 'This category has been updated successfully.' => 'Kategorija je uspješno ažurirana',
'Unable to update your category.' => 'Nemoguće izmijeniti kategoriju', 'Unable to update this category.' => 'Nemoguće izmijeniti kategoriju',
'Remove a category' => 'Ukloni kategoriju', 'Remove a category' => 'Ukloni kategoriju',
'Category removed successfully.' => 'Kategorija uspešno uklonjena.', 'Category removed successfully.' => 'Kategorija uspešno uklonjena.',
'Unable to remove this category.' => 'Nije moguće ukloniti kategoriju.', 'Unable to remove this category.' => 'Nije moguće ukloniti kategoriju.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorie', 'Categories' => 'Kategorie',
'Your category have been created successfully.' => 'Kategorie byla úspěšně vytvořena.', 'Your category have been created successfully.' => 'Kategorie byla úspěšně vytvořena.',
'Unable to create your category.' => 'Kategorii nelze vytvořit.', 'Unable to create your category.' => 'Kategorii nelze vytvořit.',
'Your category have been updated successfully.' => 'Kategorie byla úspěšně aktualizována.', 'This category has been updated successfully.' => 'Kategorie byla úspěšně aktualizována.',
'Unable to update your category.' => 'Kategorii nelze aktualizovat.', 'Unable to update this category.' => 'Kategorii nelze aktualizovat.',
'Remove a category' => 'Odstranit kategorii', 'Remove a category' => 'Odstranit kategorii',
'Category removed successfully.' => 'Kategorie byla odstraněna.', 'Category removed successfully.' => 'Kategorie byla odstraněna.',
'Unable to remove this category.' => 'Kategorie nemhla být odstraněna.', 'Unable to remove this category.' => 'Kategorie nemhla být odstraněna.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorier', 'Categories' => 'Kategorier',
'Your category have been created successfully.' => 'Kategorien er oprettet.', 'Your category have been created successfully.' => 'Kategorien er oprettet.',
'Unable to create your category.' => 'Kategorien kunne ikke oprettes.', 'Unable to create your category.' => 'Kategorien kunne ikke oprettes.',
'Your category have been updated successfully.' => 'Kategorien er opdateret.', 'This category has been updated successfully.' => 'Kategorien er opdateret.',
'Unable to update your category.' => 'Kategorien kunne ikke opdateres.', 'Unable to update this category.' => 'Kategorien kunne ikke opdateres.',
'Remove a category' => 'Fjern en kategori', 'Remove a category' => 'Fjern en kategori',
'Category removed successfully.' => 'Kategorien er fjernet.', 'Category removed successfully.' => 'Kategorien er fjernet.',
'Unable to remove this category.' => 'Kategorien kunne ikke fjernes.', 'Unable to remove this category.' => 'Kategorien kunne ikke fjernes.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorien', 'Categories' => 'Kategorien',
'Your category have been created successfully.' => 'Kategorie erfolgreich erstellt.', 'Your category have been created successfully.' => 'Kategorie erfolgreich erstellt.',
'Unable to create your category.' => 'Erstellung der Kategorie nicht möglich.', 'Unable to create your category.' => 'Erstellung der Kategorie nicht möglich.',
'Your category have been updated successfully.' => 'Kategorie erfolgreich aktualisiert.', 'This category has been updated successfully.' => 'Kategorie erfolgreich aktualisiert.',
'Unable to update your category.' => 'Änderung der Kategorie nicht möglich.', 'Unable to update this category.' => 'Änderung der Kategorie nicht möglich.',
'Remove a category' => 'Kategorie löschen', 'Remove a category' => 'Kategorie löschen',
'Category removed successfully.' => 'Kategorie erfolgreich gelöscht.', 'Category removed successfully.' => 'Kategorie erfolgreich gelöscht.',
'Unable to remove this category.' => 'Löschen der Kategorie nicht möglich.', 'Unable to remove this category.' => 'Löschen der Kategorie nicht möglich.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Κατηγορίες', 'Categories' => 'Κατηγορίες',
'Your category have been created successfully.' => 'Η κατηγορία δημιουργήθηκε.', 'Your category have been created successfully.' => 'Η κατηγορία δημιουργήθηκε.',
'Unable to create your category.' => 'Δεν είναι δυνατή η δημιουργία της κατηγορίας.', 'Unable to create your category.' => 'Δεν είναι δυνατή η δημιουργία της κατηγορίας.',
'Your category have been updated successfully.' => 'Η ενημέρωση της κατηγορίας καταχωρήθηκε με επιτυχία.', 'This category has been updated successfully.' => 'Η ενημέρωση της κατηγορίας καταχωρήθηκε με επιτυχία.',
'Unable to update your category.' => 'Δεν είναι δυνατή η ενημέρωση της κατηγορίας.', 'Unable to update this category.' => 'Δεν είναι δυνατή η ενημέρωση της κατηγορίας.',
'Remove a category' => 'Διαγραφή κατηγορίας', 'Remove a category' => 'Διαγραφή κατηγορίας',
'Category removed successfully.' => 'Η κατηγορία διεγράφει επιτυχώς.', 'Category removed successfully.' => 'Η κατηγορία διεγράφει επιτυχώς.',
'Unable to remove this category.' => 'Δεν είναι δυνατή η διαγραφή της κατηγορίας.', 'Unable to remove this category.' => 'Δεν είναι δυνατή η διαγραφή της κατηγορίας.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Categorías', 'Categories' => 'Categorías',
'Your category have been created successfully.' => 'Se ha creado su categoría correctamente.', 'Your category have been created successfully.' => 'Se ha creado su categoría correctamente.',
'Unable to create your category.' => 'No se puede crear su categoría.', 'Unable to create your category.' => 'No se puede crear su categoría.',
'Your category have been updated successfully.' => 'Se ha actualizado su categoría correctamente.', 'This category has been updated successfully.' => 'Se ha actualizado su categoría correctamente.',
'Unable to update your category.' => 'No se puede actualizar su categoría.', 'Unable to update this category.' => 'No se puede actualizar su categoría.',
'Remove a category' => 'Eliminar una categoría', 'Remove a category' => 'Eliminar una categoría',
'Category removed successfully.' => 'Categoría eliminada correctamente.', 'Category removed successfully.' => 'Categoría eliminada correctamente.',
'Unable to remove this category.' => 'No se puede eliminar esta categoría.', 'Unable to remove this category.' => 'No se puede eliminar esta categoría.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategoriat', 'Categories' => 'Kategoriat',
'Your category have been created successfully.' => 'Kategoria luotiin onnistuneesti.', 'Your category have been created successfully.' => 'Kategoria luotiin onnistuneesti.',
'Unable to create your category.' => 'Kategorian luonti epäonnistui.', 'Unable to create your category.' => 'Kategorian luonti epäonnistui.',
'Your category have been updated successfully.' => 'Kategoriaa muokattiin onnistuneesti.', 'This category has been updated successfully.' => 'Kategoriaa muokattiin onnistuneesti.',
'Unable to update your category.' => 'Kategorian muokkaaminen epäonnistui.', 'Unable to update this category.' => 'Kategorian muokkaaminen epäonnistui.',
'Remove a category' => 'Poista kategoria', 'Remove a category' => 'Poista kategoria',
'Category removed successfully.' => 'Kategoria poistettu onnistuneesti.', 'Category removed successfully.' => 'Kategoria poistettu onnistuneesti.',
'Unable to remove this category.' => 'Kategorian poisto epäonnistui.', 'Unable to remove this category.' => 'Kategorian poisto epäonnistui.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Catégories', 'Categories' => 'Catégories',
'Your category have been created successfully.' => 'Votre catégorie a été créée avec succès.', 'Your category have been created successfully.' => 'Votre catégorie a été créée avec succès.',
'Unable to create your category.' => 'Impossible de créer votre catégorie.', 'Unable to create your category.' => 'Impossible de créer votre catégorie.',
'Your category have been updated successfully.' => 'Votre catégorie a été mise à jour avec succès.', 'This category has been updated successfully.' => 'Cette catégorie a été mise à jour avec succès.',
'Unable to update your category.' => 'Impossible de mettre à jour votre catégorie.', 'Unable to update this category.' => 'Impossible de mettre à jour cette catégorie.',
'Remove a category' => 'Supprimer une catégorie', 'Remove a category' => 'Supprimer une catégorie',
'Category removed successfully.' => 'Catégorie supprimée avec succès.', 'Category removed successfully.' => 'Catégorie supprimée avec succès.',
'Unable to remove this category.' => 'Impossible de supprimer cette catégorie.', 'Unable to remove this category.' => 'Impossible de supprimer cette catégorie.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategóriák', 'Categories' => 'Kategóriák',
'Your category have been created successfully.' => 'Kategória sikeresen létrehozva.', 'Your category have been created successfully.' => 'Kategória sikeresen létrehozva.',
'Unable to create your category.' => 'A kategória létrehozása nem lehetséges.', 'Unable to create your category.' => 'A kategória létrehozása nem lehetséges.',
'Your category have been updated successfully.' => 'Kategória sikeresen frissítve.', 'This category has been updated successfully.' => 'Kategória sikeresen frissítve.',
'Unable to update your category.' => 'Kategória frissítése nem lehetséges.', 'Unable to update this category.' => 'Kategória frissítése nem lehetséges.',
'Remove a category' => 'Kategória törlése', 'Remove a category' => 'Kategória törlése',
'Category removed successfully.' => 'Kategória törlése megtörtént.', 'Category removed successfully.' => 'Kategória törlése megtörtént.',
'Unable to remove this category.' => 'A kategória törlése nem lehetséges.', 'Unable to remove this category.' => 'A kategória törlése nem lehetséges.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategori', 'Categories' => 'Kategori',
'Your category have been created successfully.' => 'Kategori Anda berhasil dibuat.', 'Your category have been created successfully.' => 'Kategori Anda berhasil dibuat.',
'Unable to create your category.' => 'Tidak dapat membuat kategori Anda.', 'Unable to create your category.' => 'Tidak dapat membuat kategori Anda.',
'Your category have been updated successfully.' => 'Kategori Anda berhasil diperbarui.', 'This category has been updated successfully.' => 'Kategori Anda berhasil diperbarui.',
'Unable to update your category.' => 'Tidak dapat memperbarui kategori Anda.', 'Unable to update this category.' => 'Tidak dapat memperbarui kategori Anda.',
'Remove a category' => 'Hapus kategori', 'Remove a category' => 'Hapus kategori',
'Category removed successfully.' => 'Kategori berhasil dihapus.', 'Category removed successfully.' => 'Kategori berhasil dihapus.',
'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.', 'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Categorie', 'Categories' => 'Categorie',
'Your category have been created successfully.' => 'La tua categoria è stata creata con successo.', 'Your category have been created successfully.' => 'La tua categoria è stata creata con successo.',
'Unable to create your category.' => 'Impossibile creare la tua categoria.', 'Unable to create your category.' => 'Impossibile creare la tua categoria.',
'Your category have been updated successfully.' => 'La tua categoria è stata aggiornata con successo.', 'This category has been updated successfully.' => 'La tua categoria è stata aggiornata con successo.',
'Unable to update your category.' => 'Impossibile aggiornare la tua categoria.', 'Unable to update this category.' => 'Impossibile aggiornare la tua categoria.',
'Remove a category' => 'Cancella una categoria', 'Remove a category' => 'Cancella una categoria',
'Category removed successfully.' => 'Categoria cancellata con successo.', 'Category removed successfully.' => 'Categoria cancellata con successo.',
'Unable to remove this category.' => 'Impossibile cancellare questa categoria.', 'Unable to remove this category.' => 'Impossibile cancellare questa categoria.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'カテゴリ', 'Categories' => 'カテゴリ',
'Your category have been created successfully.' => 'カテゴリを作成しました。', 'Your category have been created successfully.' => 'カテゴリを作成しました。',
'Unable to create your category.' => 'カテゴリの作成に失敗しました。', 'Unable to create your category.' => 'カテゴリの作成に失敗しました。',
'Your category have been updated successfully.' => 'カテゴリを更新しました。', 'This category has been updated successfully.' => 'カテゴリを更新しました。',
'Unable to update your category.' => 'カテゴリの更新に失敗しました。', 'Unable to update this category.' => 'カテゴリの更新に失敗しました。',
'Remove a category' => 'カテゴリの削除', 'Remove a category' => 'カテゴリの削除',
'Category removed successfully.' => 'カテゴリを削除しました。', 'Category removed successfully.' => 'カテゴリを削除しました。',
'Unable to remove this category.' => 'カテゴリを削除できませんでした。', 'Unable to remove this category.' => 'カテゴリを削除できませんでした。',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => '카테고리', 'Categories' => '카테고리',
'Your category have been created successfully.' => '카테고리를 작성했습니다.', 'Your category have been created successfully.' => '카테고리를 작성했습니다.',
'Unable to create your category.' => '카테고리의 작성에 실패했습니다.', 'Unable to create your category.' => '카테고리의 작성에 실패했습니다.',
'Your category have been updated successfully.' => '카테고리를 갱신했습니다.', 'This category has been updated successfully.' => '카테고리를 갱신했습니다.',
'Unable to update your category.' => '카테고리의 갱신에 실패했습니다.', 'Unable to update this category.' => '카테고리의 갱신에 실패했습니다.',
'Remove a category' => '카테고리의 삭제', 'Remove a category' => '카테고리의 삭제',
'Category removed successfully.' => '카테고리를 삭제했습니다.', 'Category removed successfully.' => '카테고리를 삭제했습니다.',
'Unable to remove this category.' => '카테고리를 삭제할 수 없었습니다.', 'Unable to remove this category.' => '카테고리를 삭제할 수 없었습니다.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategori', 'Categories' => 'Kategori',
'Your category have been created successfully.' => 'Kategori anda berhasil dibuat.', 'Your category have been created successfully.' => 'Kategori anda berhasil dibuat.',
'Unable to create your category.' => 'Tidak dapat membuat kategori anda.', 'Unable to create your category.' => 'Tidak dapat membuat kategori anda.',
'Your category have been updated successfully.' => 'Kategori anda berhasil diperbaharui.', 'This category has been updated successfully.' => 'Kategori anda berhasil diperbaharui.',
'Unable to update your category.' => 'Tidak dapat memperbaharui kategori anda.', 'Unable to update this category.' => 'Tidak dapat memperbaharui kategori anda.',
'Remove a category' => 'Hapus kategori', 'Remove a category' => 'Hapus kategori',
'Category removed successfully.' => 'Kategori berhasil dihapus.', 'Category removed successfully.' => 'Kategori berhasil dihapus.',
'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.', 'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorier', 'Categories' => 'Kategorier',
'Your category have been created successfully.' => 'Kategorien er opprettet.', 'Your category have been created successfully.' => 'Kategorien er opprettet.',
'Unable to create your category.' => 'Kategorien kunne ikke opprettes.', 'Unable to create your category.' => 'Kategorien kunne ikke opprettes.',
'Your category have been updated successfully.' => 'Kategorien er oppdatert.', 'This category has been updated successfully.' => 'Kategorien er oppdatert.',
'Unable to update your category.' => 'Kategorien kunne ikke oppdateres.', 'Unable to update this category.' => 'Kategorien kunne ikke oppdateres.',
'Remove a category' => 'Fjern en kategori', 'Remove a category' => 'Fjern en kategori',
'Category removed successfully.' => 'Kategorien er fjernet.', 'Category removed successfully.' => 'Kategorien er fjernet.',
'Unable to remove this category.' => 'Kategorien kunne ikke fjernes.', 'Unable to remove this category.' => 'Kategorien kunne ikke fjernes.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Categorieën', 'Categories' => 'Categorieën',
'Your category have been created successfully.' => 'Categorie succesvol aangemaakt.', 'Your category have been created successfully.' => 'Categorie succesvol aangemaakt.',
'Unable to create your category.' => 'Categorie aanmaken niet gelukt.', 'Unable to create your category.' => 'Categorie aanmaken niet gelukt.',
'Your category have been updated successfully.' => 'Categorie succesvol aangepast.', 'This category has been updated successfully.' => 'Categorie succesvol aangepast.',
'Unable to update your category.' => 'Aanpassen van categorie niet gelukt.', 'Unable to update this category.' => 'Aanpassen van categorie niet gelukt.',
'Remove a category' => 'Categorie verwijderen', 'Remove a category' => 'Categorie verwijderen',
'Category removed successfully.' => 'Categorie succesvol verwijderd.', 'Category removed successfully.' => 'Categorie succesvol verwijderd.',
'Unable to remove this category.' => 'Categorie verwijderen niet gelukt.', 'Unable to remove this category.' => 'Categorie verwijderen niet gelukt.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorie', 'Categories' => 'Kategorie',
'Your category have been created successfully.' => 'Pomyślnie utworzono kategorię.', 'Your category have been created successfully.' => 'Pomyślnie utworzono kategorię.',
'Unable to create your category.' => 'Nie można tworzyć kategorii.', 'Unable to create your category.' => 'Nie można tworzyć kategorii.',
'Your category have been updated successfully.' => 'Pomyślnie zaktualizowano kategorię', 'This category has been updated successfully.' => 'Pomyślnie zaktualizowano kategorię',
'Unable to update your category.' => 'Nie można zaktualizować kategorii', 'Unable to update this category.' => 'Nie można zaktualizować kategorii',
'Remove a category' => 'Usuń kategorię', 'Remove a category' => 'Usuń kategorię',
'Category removed successfully.' => 'Pomyślnie usunięto kategorię.', 'Category removed successfully.' => 'Pomyślnie usunięto kategorię.',
'Unable to remove this category.' => 'Nie można usunąć tej kategorii.', 'Unable to remove this category.' => 'Nie można usunąć tej kategorii.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Categorias', 'Categories' => 'Categorias',
'Your category have been created successfully.' => 'Sua categoria foi criada com sucesso.', 'Your category have been created successfully.' => 'Sua categoria foi criada com sucesso.',
'Unable to create your category.' => 'Não foi possível criar a sua categoria.', 'Unable to create your category.' => 'Não foi possível criar a sua categoria.',
'Your category have been updated successfully.' => 'A sua categoria foi atualizada com sucesso.', 'This category has been updated successfully.' => 'A sua categoria foi atualizada com sucesso.',
'Unable to update your category.' => 'Não foi possível atualizar a sua categoria.', 'Unable to update this category.' => 'Não foi possível atualizar a sua categoria.',
'Remove a category' => 'Remover uma categoria', 'Remove a category' => 'Remover uma categoria',
'Category removed successfully.' => 'Categoria removida com sucesso.', 'Category removed successfully.' => 'Categoria removida com sucesso.',
'Unable to remove this category.' => 'Não foi possível remover esta categoria.', 'Unable to remove this category.' => 'Não foi possível remover esta categoria.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Categorias', 'Categories' => 'Categorias',
'Your category have been created successfully.' => 'A sua categoria foi criada com sucesso.', 'Your category have been created successfully.' => 'A sua categoria foi criada com sucesso.',
'Unable to create your category.' => 'Não foi possível criar a sua categoria.', 'Unable to create your category.' => 'Não foi possível criar a sua categoria.',
'Your category have been updated successfully.' => 'A sua categoria foi actualizada com sucesso.', 'This category has been updated successfully.' => 'A sua categoria foi actualizada com sucesso.',
'Unable to update your category.' => 'Não foi possível actualizar a sua categoria.', 'Unable to update this category.' => 'Não foi possível actualizar a sua categoria.',
'Remove a category' => 'Remover uma categoria', 'Remove a category' => 'Remover uma categoria',
'Category removed successfully.' => 'Categoria removida com sucesso.', 'Category removed successfully.' => 'Categoria removida com sucesso.',
'Unable to remove this category.' => 'Não foi possível remover esta categoria.', 'Unable to remove this category.' => 'Não foi possível remover esta categoria.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Категории', 'Categories' => 'Категории',
'Your category have been created successfully.' => 'Категория создана.', 'Your category have been created successfully.' => 'Категория создана.',
'Unable to create your category.' => 'Не удалось создать категорию.', 'Unable to create your category.' => 'Не удалось создать категорию.',
'Your category have been updated successfully.' => 'Категория обновлена.', 'This category has been updated successfully.' => 'Категория обновлена.',
'Unable to update your category.' => 'Не удалось обновить категорию.', 'Unable to update this category.' => 'Не удалось обновить категорию.',
'Remove a category' => 'Удалить категорию', 'Remove a category' => 'Удалить категорию',
'Category removed successfully.' => 'Категория удалена.', 'Category removed successfully.' => 'Категория удалена.',
'Unable to remove this category.' => 'Не удалось удалить категорию.', 'Unable to remove this category.' => 'Не удалось удалить категорию.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategorije', 'Categories' => 'Kategorije',
'Your category have been created successfully.' => 'Uspešno kreirana kategorija.', 'Your category have been created successfully.' => 'Uspešno kreirana kategorija.',
'Unable to create your category.' => 'Nije moguće kreirati kategoriju.', 'Unable to create your category.' => 'Nije moguće kreirati kategoriju.',
'Your category have been updated successfully.' => 'Kategorija je uspešno izmenjena', 'This category has been updated successfully.' => 'Kategorija je uspešno izmenjena',
'Unable to update your category.' => 'Nemoguće izmeniti kategoriju', 'Unable to update this category.' => 'Nemoguće izmeniti kategoriju',
'Remove a category' => 'Obriši kategoriju', 'Remove a category' => 'Obriši kategoriju',
'Category removed successfully.' => 'Kategorija uspešno uklonjena.', 'Category removed successfully.' => 'Kategorija uspešno uklonjena.',
'Unable to remove this category.' => 'Nije moguće ukloniti kategoriju.', 'Unable to remove this category.' => 'Nije moguće ukloniti kategoriju.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Ange kategorier', 'Categories' => 'Ange kategorier',
'Your category have been created successfully.' => 'Din kategori har skapats', 'Your category have been created successfully.' => 'Din kategori har skapats',
'Unable to create your category.' => 'Kunde inte skapa din kategori', 'Unable to create your category.' => 'Kunde inte skapa din kategori',
'Your category have been updated successfully.' => 'Din kategori har uppdaterats', 'This category has been updated successfully.' => 'Din kategori har uppdaterats',
'Unable to update your category.' => 'Kunde inte uppdatera din kategori', 'Unable to update this category.' => 'Kunde inte uppdatera din kategori',
'Remove a category' => 'Ta bort en kategori', 'Remove a category' => 'Ta bort en kategori',
'Category removed successfully.' => 'Kategorin har tagits bort', 'Category removed successfully.' => 'Kategorin har tagits bort',
'Unable to remove this category.' => 'Kunde inte ta bort denna kategori', 'Unable to remove this category.' => 'Kunde inte ta bort denna kategori',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'หมวดหมู่', 'Categories' => 'หมวดหมู่',
'Your category have been created successfully.' => 'สร้างหมวดหมู่เรียบร้อยแล้ว', 'Your category have been created successfully.' => 'สร้างหมวดหมู่เรียบร้อยแล้ว',
'Unable to create your category.' => 'ไม่สามารถสร้างหมวดหมู่ได้', 'Unable to create your category.' => 'ไม่สามารถสร้างหมวดหมู่ได้',
'Your category have been updated successfully.' => 'ปรับปรุงหมวดเรียบร้อยแล้ว', 'This category has been updated successfully.' => 'ปรับปรุงหมวดเรียบร้อยแล้ว',
'Unable to update your category.' => 'ไม่สามารถปรับปรุงหมวดหมู่ได้', 'Unable to update this category.' => 'ไม่สามารถปรับปรุงหมวดหมู่ได้',
'Remove a category' => 'ลบหมวดหมู่', 'Remove a category' => 'ลบหมวดหมู่',
'Category removed successfully.' => 'ลบหมวดเรียบร้อยแล้ว', 'Category removed successfully.' => 'ลบหมวดเรียบร้อยแล้ว',
'Unable to remove this category.' => 'ไม่สามารถลบหมวดหมู่ได้', 'Unable to remove this category.' => 'ไม่สามารถลบหมวดหมู่ได้',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => 'Kategoriler', 'Categories' => 'Kategoriler',
'Your category have been created successfully.' => 'Kategori başarıyla oluşturuldu.', 'Your category have been created successfully.' => 'Kategori başarıyla oluşturuldu.',
'Unable to create your category.' => 'Kategori oluşturulamadı.', 'Unable to create your category.' => 'Kategori oluşturulamadı.',
'Your category have been updated successfully.' => 'Kategori başarıyla güncellendi.', 'This category has been updated successfully.' => 'Kategori başarıyla güncellendi.',
'Unable to update your category.' => 'Kategori güncellenemedi.', 'Unable to update this category.' => 'Kategori güncellenemedi.',
'Remove a category' => 'Bir kategoriyi sil', 'Remove a category' => 'Bir kategoriyi sil',
'Category removed successfully.' => 'Kategori başarıyla silindi.', 'Category removed successfully.' => 'Kategori başarıyla silindi.',
'Unable to remove this category.' => 'Bu kategori silinemedi.', 'Unable to remove this category.' => 'Bu kategori silinemedi.',

View File

@@ -235,8 +235,8 @@ return array(
'Categories' => '分类', 'Categories' => '分类',
'Your category have been created successfully.' => '成功为您创建分类。', 'Your category have been created successfully.' => '成功为您创建分类。',
'Unable to create your category.' => '无法为您创建分类。', 'Unable to create your category.' => '无法为您创建分类。',
'Your category have been updated successfully.' => '成功为您更新分类。', 'This category has been updated successfully.' => '成功为您更新分类。',
'Unable to update your category.' => '无法为您更新分类。', 'Unable to update this category.' => '无法为您更新分类。',
'Remove a category' => '移除一个分类', 'Remove a category' => '移除一个分类',
'Category removed successfully.' => '分类成功移除。', 'Category removed successfully.' => '分类成功移除。',
'Unable to remove this category.' => '无法移除该分类。', 'Unable to remove this category.' => '无法移除该分类。',

View File

@@ -0,0 +1,12 @@
<div class="page-header">
<h2><?= t('Add a new category') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('CategoryController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('project_id', $values) ?>
<?= $this->form->label(t('Category Name'), 'name') ?>
<?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
<?= $this->modal->submitButtons() ?>
</form>

View File

@@ -1,45 +1,42 @@
<?php if (! empty($categories)): ?>
<div class="page-header"> <div class="page-header">
<h2><?= t('Categories') ?></h2> <h2><?= t('Categories') ?></h2>
</div>
<table class="table-striped">
<tr>
<th><?= t('Category Name') ?></th>
<th class="column-8"><?= t('Actions') ?></th>
</tr>
<?php foreach ($categories as $category_id => $category_name): ?>
<tr>
<td><?= $this->text->e($category_name) ?></td>
<td>
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul> <ul>
<li> <li>
<?= $this->modal->medium('edit', t('Edit'), 'CategoryController', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> <?= $this->modal->medium('plus', t('Add a new category'), 'CategoryController', 'create', array('project_id' => $project['id'])) ?>
</li>
<li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'CategoryController', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?>
</li> </li>
</ul> </ul>
</div> </div>
<?php if (empty($categories)): ?>
<p class="alert"><?= t('There is no category in this project.') ?></p>
<?php else: ?>
<table class="table-striped">
<tr>
<th><?= t('Category Name') ?></th>
</tr>
<?php foreach ($categories as $category): ?>
<tr>
<td>
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
<ul>
<li>
<?= $this->modal->medium('edit', t('Edit'), 'CategoryController', 'edit', array('project_id' => $project['id'], 'category_id' => $category['id'])) ?>
</li>
<li>
<?= $this->modal->confirm('trash-o', t('Remove'), 'CategoryController', 'confirm', array('project_id' => $project['id'], 'category_id' => $category['id'])) ?>
</li>
</ul>
</div>
<?= $this->text->e($category['name']) ?>
<?php if (! empty($category['description'])): ?>
<span class="tooltip" title="<?= $this->text->markdownAttribute($category['description']) ?>">
<i class="fa fa-info-circle"></i>
</span>
<?php endif ?>
</td> </td>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
</table> </table>
<?php endif ?> <?php endif ?>
<div class="page-header">
<h2><?= t('Add a new category') ?></h2>
</div>
<form method="post" action="<?= $this->url->href('CategoryController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('project_id', $values) ?>
<?= $this->form->label(t('Category Name'), 'name') ?>
<?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>