Improve category section
This commit is contained in:
parent
49c8e5c1be
commit
c7b7c060a6
|
|
@ -7,6 +7,8 @@ New features:
|
|||
|
||||
Improvements:
|
||||
|
||||
* Show category description in tooltip
|
||||
* Show category creation form in modal dialog
|
||||
* Prevent people to remove swimlanes that contains tasks
|
||||
* Show task count in swimlane table
|
||||
* Use contextual menu instead of action column in users management
|
||||
|
|
|
|||
|
|
@ -34,20 +34,33 @@ class CategoryController extends BaseController
|
|||
* List of categories for a given project
|
||||
*
|
||||
* @access public
|
||||
* @param array $values
|
||||
* @param array $errors
|
||||
* @throws PageNotFoundException
|
||||
*/
|
||||
public function index(array $values = array(), array $errors = array())
|
||||
public function index()
|
||||
{
|
||||
$project = $this->getProject();
|
||||
|
||||
$this->response->html($this->helper->layout->project('category/index', array(
|
||||
'categories' => $this->categoryModel->getList($project['id'], false),
|
||||
'values' => $values + array('project_id' => $project['id']),
|
||||
'errors' => $errors,
|
||||
'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']),
|
||||
'errors' => $errors,
|
||||
'project' => $project,
|
||||
'title' => t('Categories')
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
@ -66,13 +79,14 @@ class CategoryController extends BaseController
|
|||
if ($valid) {
|
||||
if ($this->categoryModel->create($values) !== false) {
|
||||
$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 {
|
||||
$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();
|
||||
$category = $this->getCategory();
|
||||
|
||||
$this->response->html($this->helper->layout->project('category/edit', array(
|
||||
'values' => empty($values) ? $category : $values,
|
||||
'errors' => $errors,
|
||||
$this->response->html($this->template->render('category/edit', array(
|
||||
'values' => empty($values) ? $category : $values,
|
||||
'errors' => $errors,
|
||||
'project' => $project,
|
||||
'title' => t('Categories')
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
@ -110,10 +123,10 @@ class CategoryController extends BaseController
|
|||
|
||||
if ($valid) {
|
||||
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'])));
|
||||
} else {
|
||||
$this->flash->failure(t('Unable to update your category.'));
|
||||
$this->flash->failure(t('Unable to update this category.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -131,9 +144,8 @@ class CategoryController extends BaseController
|
|||
$category = $this->getCategory();
|
||||
|
||||
$this->response->html($this->helper->layout->project('category/remove', array(
|
||||
'project' => $project,
|
||||
'project' => $project,
|
||||
'category' => $category,
|
||||
'title' => t('Remove a category')
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorije',
|
||||
'Your category have been created successfully.' => 'Uspješno kreirana kategorija.',
|
||||
'Unable to create your category.' => 'Nije moguće kreirati kategoriju.',
|
||||
'Your category have been updated successfully.' => 'Kategorija je uspješno ažurirana',
|
||||
'Unable to update your category.' => 'Nemoguće izmijeniti kategoriju',
|
||||
'This category has been updated successfully.' => 'Kategorija je uspješno ažurirana',
|
||||
'Unable to update this category.' => 'Nemoguće izmijeniti kategoriju',
|
||||
'Remove a category' => 'Ukloni kategoriju',
|
||||
'Category removed successfully.' => 'Kategorija uspešno uklonjena.',
|
||||
'Unable to remove this category.' => 'Nije moguće ukloniti kategoriju.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorie',
|
||||
'Your category have been created successfully.' => 'Kategorie byla úspěšně vytvořena.',
|
||||
'Unable to create your category.' => 'Kategorii nelze vytvořit.',
|
||||
'Your category have been updated successfully.' => 'Kategorie byla úspěšně aktualizována.',
|
||||
'Unable to update your category.' => 'Kategorii nelze aktualizovat.',
|
||||
'This category has been updated successfully.' => 'Kategorie byla úspěšně aktualizována.',
|
||||
'Unable to update this category.' => 'Kategorii nelze aktualizovat.',
|
||||
'Remove a category' => 'Odstranit kategorii',
|
||||
'Category removed successfully.' => 'Kategorie byla odstraněna.',
|
||||
'Unable to remove this category.' => 'Kategorie nemhla být odstraněna.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorier',
|
||||
'Your category have been created successfully.' => 'Kategorien er oprettet.',
|
||||
'Unable to create your category.' => 'Kategorien kunne ikke oprettes.',
|
||||
'Your category have been updated successfully.' => 'Kategorien er opdateret.',
|
||||
'Unable to update your category.' => 'Kategorien kunne ikke opdateres.',
|
||||
'This category has been updated successfully.' => 'Kategorien er opdateret.',
|
||||
'Unable to update this category.' => 'Kategorien kunne ikke opdateres.',
|
||||
'Remove a category' => 'Fjern en kategori',
|
||||
'Category removed successfully.' => 'Kategorien er fjernet.',
|
||||
'Unable to remove this category.' => 'Kategorien kunne ikke fjernes.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorien',
|
||||
'Your category have been created successfully.' => 'Kategorie erfolgreich erstellt.',
|
||||
'Unable to create your category.' => 'Erstellung der Kategorie nicht möglich.',
|
||||
'Your category have been updated successfully.' => 'Kategorie erfolgreich aktualisiert.',
|
||||
'Unable to update your category.' => 'Änderung der Kategorie nicht möglich.',
|
||||
'This category has been updated successfully.' => 'Kategorie erfolgreich aktualisiert.',
|
||||
'Unable to update this category.' => 'Änderung der Kategorie nicht möglich.',
|
||||
'Remove a category' => 'Kategorie löschen',
|
||||
'Category removed successfully.' => 'Kategorie erfolgreich gelöscht.',
|
||||
'Unable to remove this category.' => 'Löschen der Kategorie nicht möglich.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Κατηγορίες',
|
||||
'Your category have been created successfully.' => 'Η κατηγορία δημιουργήθηκε.',
|
||||
'Unable to create your category.' => 'Δεν είναι δυνατή η δημιουργία της κατηγορίας.',
|
||||
'Your category have been updated successfully.' => 'Η ενημέρωση της κατηγορίας καταχωρήθηκε με επιτυχία.',
|
||||
'Unable to update your category.' => 'Δεν είναι δυνατή η ενημέρωση της κατηγορίας.',
|
||||
'This category has been updated successfully.' => 'Η ενημέρωση της κατηγορίας καταχωρήθηκε με επιτυχία.',
|
||||
'Unable to update this category.' => 'Δεν είναι δυνατή η ενημέρωση της κατηγορίας.',
|
||||
'Remove a category' => 'Διαγραφή κατηγορίας',
|
||||
'Category removed successfully.' => 'Η κατηγορία διεγράφει επιτυχώς.',
|
||||
'Unable to remove this category.' => 'Δεν είναι δυνατή η διαγραφή της κατηγορίας.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Categorías',
|
||||
'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.',
|
||||
'Your category have been updated successfully.' => 'Se ha actualizado su categoría correctamente.',
|
||||
'Unable to update your category.' => 'No se puede actualizar su categoría.',
|
||||
'This category has been updated successfully.' => 'Se ha actualizado su categoría correctamente.',
|
||||
'Unable to update this category.' => 'No se puede actualizar su categoría.',
|
||||
'Remove a category' => 'Eliminar una categoría',
|
||||
'Category removed successfully.' => 'Categoría eliminada correctamente.',
|
||||
'Unable to remove this category.' => 'No se puede eliminar esta categoría.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategoriat',
|
||||
'Your category have been created successfully.' => 'Kategoria luotiin onnistuneesti.',
|
||||
'Unable to create your category.' => 'Kategorian luonti epäonnistui.',
|
||||
'Your category have been updated successfully.' => 'Kategoriaa muokattiin onnistuneesti.',
|
||||
'Unable to update your category.' => 'Kategorian muokkaaminen epäonnistui.',
|
||||
'This category has been updated successfully.' => 'Kategoriaa muokattiin onnistuneesti.',
|
||||
'Unable to update this category.' => 'Kategorian muokkaaminen epäonnistui.',
|
||||
'Remove a category' => 'Poista kategoria',
|
||||
'Category removed successfully.' => 'Kategoria poistettu onnistuneesti.',
|
||||
'Unable to remove this category.' => 'Kategorian poisto epäonnistui.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Catégories',
|
||||
'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.',
|
||||
'Your category have been updated successfully.' => 'Votre catégorie a été mise à jour avec succès.',
|
||||
'Unable to update your category.' => 'Impossible de mettre à jour votre catégorie.',
|
||||
'This category has been updated successfully.' => 'Cette catégorie a été mise à jour avec succès.',
|
||||
'Unable to update this category.' => 'Impossible de mettre à jour cette catégorie.',
|
||||
'Remove a category' => 'Supprimer une catégorie',
|
||||
'Category removed successfully.' => 'Catégorie supprimée avec succès.',
|
||||
'Unable to remove this category.' => 'Impossible de supprimer cette catégorie.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategóriák',
|
||||
'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.',
|
||||
'Your category have been updated successfully.' => 'Kategória sikeresen frissítve.',
|
||||
'Unable to update your category.' => 'Kategória frissítése nem lehetséges.',
|
||||
'This category has been updated successfully.' => 'Kategória sikeresen frissítve.',
|
||||
'Unable to update this category.' => 'Kategória frissítése nem lehetséges.',
|
||||
'Remove a category' => 'Kategória törlése',
|
||||
'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.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategori',
|
||||
'Your category have been created successfully.' => 'Kategori Anda berhasil dibuat.',
|
||||
'Unable to create your category.' => 'Tidak dapat membuat kategori Anda.',
|
||||
'Your category have been updated successfully.' => 'Kategori Anda berhasil diperbarui.',
|
||||
'Unable to update your category.' => 'Tidak dapat memperbarui kategori Anda.',
|
||||
'This category has been updated successfully.' => 'Kategori Anda berhasil diperbarui.',
|
||||
'Unable to update this category.' => 'Tidak dapat memperbarui kategori Anda.',
|
||||
'Remove a category' => 'Hapus kategori',
|
||||
'Category removed successfully.' => 'Kategori berhasil dihapus.',
|
||||
'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Categorie',
|
||||
'Your category have been created successfully.' => 'La tua categoria è stata creata con successo.',
|
||||
'Unable to create your category.' => 'Impossibile creare la tua categoria.',
|
||||
'Your category have been updated successfully.' => 'La tua categoria è stata aggiornata con successo.',
|
||||
'Unable to update your category.' => 'Impossibile aggiornare la tua categoria.',
|
||||
'This category has been updated successfully.' => 'La tua categoria è stata aggiornata con successo.',
|
||||
'Unable to update this category.' => 'Impossibile aggiornare la tua categoria.',
|
||||
'Remove a category' => 'Cancella una categoria',
|
||||
'Category removed successfully.' => 'Categoria cancellata con successo.',
|
||||
'Unable to remove this category.' => 'Impossibile cancellare questa categoria.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'カテゴリ',
|
||||
'Your category have been created successfully.' => 'カテゴリを作成しました。',
|
||||
'Unable to create your category.' => 'カテゴリの作成に失敗しました。',
|
||||
'Your category have been updated successfully.' => 'カテゴリを更新しました。',
|
||||
'Unable to update your category.' => 'カテゴリの更新に失敗しました。',
|
||||
'This category has been updated successfully.' => 'カテゴリを更新しました。',
|
||||
'Unable to update this category.' => 'カテゴリの更新に失敗しました。',
|
||||
'Remove a category' => 'カテゴリの削除',
|
||||
'Category removed successfully.' => 'カテゴリを削除しました。',
|
||||
'Unable to remove this category.' => 'カテゴリを削除できませんでした。',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => '카테고리',
|
||||
'Your category have been created successfully.' => '카테고리를 작성했습니다.',
|
||||
'Unable to create your category.' => '카테고리의 작성에 실패했습니다.',
|
||||
'Your category have been updated successfully.' => '카테고리를 갱신했습니다.',
|
||||
'Unable to update your category.' => '카테고리의 갱신에 실패했습니다.',
|
||||
'This category has been updated successfully.' => '카테고리를 갱신했습니다.',
|
||||
'Unable to update this category.' => '카테고리의 갱신에 실패했습니다.',
|
||||
'Remove a category' => '카테고리의 삭제',
|
||||
'Category removed successfully.' => '카테고리를 삭제했습니다.',
|
||||
'Unable to remove this category.' => '카테고리를 삭제할 수 없었습니다.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategori',
|
||||
'Your category have been created successfully.' => 'Kategori anda berhasil dibuat.',
|
||||
'Unable to create your category.' => 'Tidak dapat membuat kategori anda.',
|
||||
'Your category have been updated successfully.' => 'Kategori anda berhasil diperbaharui.',
|
||||
'Unable to update your category.' => 'Tidak dapat memperbaharui kategori anda.',
|
||||
'This category has been updated successfully.' => 'Kategori anda berhasil diperbaharui.',
|
||||
'Unable to update this category.' => 'Tidak dapat memperbaharui kategori anda.',
|
||||
'Remove a category' => 'Hapus kategori',
|
||||
'Category removed successfully.' => 'Kategori berhasil dihapus.',
|
||||
'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorier',
|
||||
'Your category have been created successfully.' => 'Kategorien er opprettet.',
|
||||
'Unable to create your category.' => 'Kategorien kunne ikke opprettes.',
|
||||
'Your category have been updated successfully.' => 'Kategorien er oppdatert.',
|
||||
'Unable to update your category.' => 'Kategorien kunne ikke oppdateres.',
|
||||
'This category has been updated successfully.' => 'Kategorien er oppdatert.',
|
||||
'Unable to update this category.' => 'Kategorien kunne ikke oppdateres.',
|
||||
'Remove a category' => 'Fjern en kategori',
|
||||
'Category removed successfully.' => 'Kategorien er fjernet.',
|
||||
'Unable to remove this category.' => 'Kategorien kunne ikke fjernes.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Categorieën',
|
||||
'Your category have been created successfully.' => 'Categorie succesvol aangemaakt.',
|
||||
'Unable to create your category.' => 'Categorie aanmaken niet gelukt.',
|
||||
'Your category have been updated successfully.' => 'Categorie succesvol aangepast.',
|
||||
'Unable to update your category.' => 'Aanpassen van categorie niet gelukt.',
|
||||
'This category has been updated successfully.' => 'Categorie succesvol aangepast.',
|
||||
'Unable to update this category.' => 'Aanpassen van categorie niet gelukt.',
|
||||
'Remove a category' => 'Categorie verwijderen',
|
||||
'Category removed successfully.' => 'Categorie succesvol verwijderd.',
|
||||
'Unable to remove this category.' => 'Categorie verwijderen niet gelukt.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorie',
|
||||
'Your category have been created successfully.' => 'Pomyślnie utworzono kategorię.',
|
||||
'Unable to create your category.' => 'Nie można tworzyć kategorii.',
|
||||
'Your category have been updated successfully.' => 'Pomyślnie zaktualizowano kategorię',
|
||||
'Unable to update your category.' => 'Nie można zaktualizować kategorii',
|
||||
'This category has been updated successfully.' => 'Pomyślnie zaktualizowano kategorię',
|
||||
'Unable to update this category.' => 'Nie można zaktualizować kategorii',
|
||||
'Remove a category' => 'Usuń kategorię',
|
||||
'Category removed successfully.' => 'Pomyślnie usunięto kategorię.',
|
||||
'Unable to remove this category.' => 'Nie można usunąć tej kategorii.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Categorias',
|
||||
'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.',
|
||||
'Your category have been updated successfully.' => 'A sua categoria foi atualizada com sucesso.',
|
||||
'Unable to update your category.' => 'Não foi possível atualizar a sua categoria.',
|
||||
'This category has been updated successfully.' => 'A sua categoria foi atualizada com sucesso.',
|
||||
'Unable to update this category.' => 'Não foi possível atualizar a sua categoria.',
|
||||
'Remove a category' => 'Remover uma categoria',
|
||||
'Category removed successfully.' => 'Categoria removida com sucesso.',
|
||||
'Unable to remove this category.' => 'Não foi possível remover esta categoria.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Categorias',
|
||||
'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.',
|
||||
'Your category have been updated successfully.' => 'A sua categoria foi actualizada com sucesso.',
|
||||
'Unable to update your category.' => 'Não foi possível actualizar a sua categoria.',
|
||||
'This category has been updated successfully.' => 'A sua categoria foi actualizada com sucesso.',
|
||||
'Unable to update this category.' => 'Não foi possível actualizar a sua categoria.',
|
||||
'Remove a category' => 'Remover uma categoria',
|
||||
'Category removed successfully.' => 'Categoria removida com sucesso.',
|
||||
'Unable to remove this category.' => 'Não foi possível remover esta categoria.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Категории',
|
||||
'Your category have been created successfully.' => 'Категория создана.',
|
||||
'Unable to create your category.' => 'Не удалось создать категорию.',
|
||||
'Your category have been updated successfully.' => 'Категория обновлена.',
|
||||
'Unable to update your category.' => 'Не удалось обновить категорию.',
|
||||
'This category has been updated successfully.' => 'Категория обновлена.',
|
||||
'Unable to update this category.' => 'Не удалось обновить категорию.',
|
||||
'Remove a category' => 'Удалить категорию',
|
||||
'Category removed successfully.' => 'Категория удалена.',
|
||||
'Unable to remove this category.' => 'Не удалось удалить категорию.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategorije',
|
||||
'Your category have been created successfully.' => 'Uspešno kreirana kategorija.',
|
||||
'Unable to create your category.' => 'Nije moguće kreirati kategoriju.',
|
||||
'Your category have been updated successfully.' => 'Kategorija je uspešno izmenjena',
|
||||
'Unable to update your category.' => 'Nemoguće izmeniti kategoriju',
|
||||
'This category has been updated successfully.' => 'Kategorija je uspešno izmenjena',
|
||||
'Unable to update this category.' => 'Nemoguće izmeniti kategoriju',
|
||||
'Remove a category' => 'Obriši kategoriju',
|
||||
'Category removed successfully.' => 'Kategorija uspešno uklonjena.',
|
||||
'Unable to remove this category.' => 'Nije moguće ukloniti kategoriju.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Ange kategorier',
|
||||
'Your category have been created successfully.' => 'Din kategori har skapats',
|
||||
'Unable to create your category.' => 'Kunde inte skapa din kategori',
|
||||
'Your category have been updated successfully.' => 'Din kategori har uppdaterats',
|
||||
'Unable to update your category.' => 'Kunde inte uppdatera din kategori',
|
||||
'This category has been updated successfully.' => 'Din kategori har uppdaterats',
|
||||
'Unable to update this category.' => 'Kunde inte uppdatera din kategori',
|
||||
'Remove a category' => 'Ta bort en kategori',
|
||||
'Category removed successfully.' => 'Kategorin har tagits bort',
|
||||
'Unable to remove this category.' => 'Kunde inte ta bort denna kategori',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'หมวดหมู่',
|
||||
'Your category have been created successfully.' => 'สร้างหมวดหมู่เรียบร้อยแล้ว',
|
||||
'Unable to create your category.' => 'ไม่สามารถสร้างหมวดหมู่ได้',
|
||||
'Your category have been updated successfully.' => 'ปรับปรุงหมวดเรียบร้อยแล้ว',
|
||||
'Unable to update your category.' => 'ไม่สามารถปรับปรุงหมวดหมู่ได้',
|
||||
'This category has been updated successfully.' => 'ปรับปรุงหมวดเรียบร้อยแล้ว',
|
||||
'Unable to update this category.' => 'ไม่สามารถปรับปรุงหมวดหมู่ได้',
|
||||
'Remove a category' => 'ลบหมวดหมู่',
|
||||
'Category removed successfully.' => 'ลบหมวดเรียบร้อยแล้ว',
|
||||
'Unable to remove this category.' => 'ไม่สามารถลบหมวดหมู่ได้',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => 'Kategoriler',
|
||||
'Your category have been created successfully.' => 'Kategori başarıyla oluşturuldu.',
|
||||
'Unable to create your category.' => 'Kategori oluşturulamadı.',
|
||||
'Your category have been updated successfully.' => 'Kategori başarıyla güncellendi.',
|
||||
'Unable to update your category.' => 'Kategori güncellenemedi.',
|
||||
'This category has been updated successfully.' => 'Kategori başarıyla güncellendi.',
|
||||
'Unable to update this category.' => 'Kategori güncellenemedi.',
|
||||
'Remove a category' => 'Bir kategoriyi sil',
|
||||
'Category removed successfully.' => 'Kategori başarıyla silindi.',
|
||||
'Unable to remove this category.' => 'Bu kategori silinemedi.',
|
||||
|
|
|
|||
|
|
@ -235,8 +235,8 @@ return array(
|
|||
'Categories' => '分类',
|
||||
'Your category have been created successfully.' => '成功为您创建分类。',
|
||||
'Unable to create your category.' => '无法为您创建分类。',
|
||||
'Your category have been updated successfully.' => '成功为您更新分类。',
|
||||
'Unable to update your category.' => '无法为您更新分类。',
|
||||
'This category has been updated successfully.' => '成功为您更新分类。',
|
||||
'Unable to update this category.' => '无法为您更新分类。',
|
||||
'Remove a category' => '移除一个分类',
|
||||
'Category removed successfully.' => '分类成功移除。',
|
||||
'Unable to remove this category.' => '无法移除该分类。',
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -1,45 +1,42 @@
|
|||
<?php if (! empty($categories)): ?>
|
||||
<div class="page-header">
|
||||
<h2><?= t('Categories') ?></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<?= $this->modal->medium('plus', t('Add a new category'), 'CategoryController', 'create', array('project_id' => $project['id'])) ?>
|
||||
</li>
|
||||
</ul>
|
||||
</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>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?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>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
</table>
|
||||
<?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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue