diff --git a/app/Controller/Action.php b/app/Controller/Action.php index 797bbfa2f..b2f80009b 100644 --- a/app/Controller/Action.php +++ b/app/Controller/Action.php @@ -17,15 +17,9 @@ class Action extends Base */ public function index() { - $project_id = $this->request->getIntegerParam('project_id'); - $project = $this->project->getById($project_id); + $project = $this->getProject(); - if (! $project) { - $this->session->flashError(t('Project not found.')); - $this->response->redirect('?controller=project'); - } - - $this->response->html($this->template->layout('action_index', array( + $this->response->html($this->projectLayout('action_index', array( 'values' => array('project_id' => $project['id']), 'project' => $project, 'actions' => $this->action->getAllByProject($project['id']), @@ -49,18 +43,11 @@ class Action extends Base */ public function params() { - $project_id = $this->request->getIntegerParam('project_id'); - $project = $this->project->getById($project_id); - - if (! $project) { - $this->session->flashError(t('Project not found.')); - $this->response->redirect('?controller=project'); - } - + $project = $this->getProject(); $values = $this->request->getValues(); $action = $this->action->load($values['action_name'], $values['project_id']); - $this->response->html($this->template->layout('action_params', array( + $this->response->html($this->projectLayout('action_params', array( 'values' => $values, 'action_params' => $action->getActionRequiredParameters(), 'columns_list' => $this->board->getColumnsList($project['id']), @@ -81,14 +68,7 @@ class Action extends Base */ public function create() { - $project_id = $this->request->getIntegerParam('project_id'); - $project = $this->project->getById($project_id); - - if (! $project) { - $this->session->flashError(t('Project not found.')); - $this->response->redirect('?controller=project'); - } - + $project = $this->getProject(); $values = $this->request->getValues(); list($valid,) = $this->action->validateCreation($values); @@ -113,10 +93,13 @@ class Action extends Base */ public function confirm() { - $this->response->html($this->template->layout('action_remove', array( + $project = $this->getProject(); + + $this->response->html($this->projectLayout('action_remove', array( 'action' => $this->action->getById($this->request->getIntegerParam('action_id')), 'available_events' => $this->action->getAvailableEvents(), 'available_actions' => $this->action->getAvailableActions(), + 'project' => $project, 'menu' => 'projects', 'title' => t('Remove an action') ))); diff --git a/app/Controller/Base.php b/app/Controller/Base.php index 415859658..f9059d1e8 100644 --- a/app/Controller/Base.php +++ b/app/Controller/Base.php @@ -211,6 +211,22 @@ abstract class Base return $this->template->layout('task_layout', $params); } + /** + * Common layout for project views + * + * @access protected + * @param string $template Template name + * @param array $params Template parameters + * @return string + */ + protected function projectLayout($template, array $params) + { + $content = $this->template->load($template, $params); + $params['project_content_for_layout'] = $content; + + return $this->template->layout('project_layout', $params); + } + /** * Common method to get a task for task views * diff --git a/app/Controller/Board.php b/app/Controller/Board.php index 7fe9c4ae3..f43527ead 100644 --- a/app/Controller/Board.php +++ b/app/Controller/Board.php @@ -212,12 +212,8 @@ class Board extends Base */ public function edit() { - $project_id = $this->request->getIntegerParam('project_id'); - $project = $this->project->getById($project_id); - - if (! $project) $this->notfound(); - - $columns = $this->board->getColumns($project_id); + $project = $this->getProject(); + $columns = $this->board->getColumns($project['id']); $values = array(); foreach ($columns as $column) { @@ -225,9 +221,9 @@ class Board extends Base $values['task_limit['.$column['id'].']'] = $column['task_limit'] ?: null; } - $this->response->html($this->template->layout('board_edit', array( + $this->response->html($this->projectLayout('board_edit', array( 'errors' => array(), - 'values' => $values + array('project_id' => $project_id), + 'values' => $values + array('project_id' => $project['id']), 'columns' => $columns, 'project' => $project, 'menu' => 'projects', @@ -242,12 +238,8 @@ class Board extends Base */ public function update() { - $project_id = $this->request->getIntegerParam('project_id'); - $project = $this->project->getById($project_id); - - if (! $project) $this->notfound(); - - $columns = $this->board->getColumns($project_id); + $project = $this->getProject(); + $columns = $this->board->getColumns($project['id']); $data = $this->request->getValues(); $values = $columns_list = array(); @@ -270,9 +262,9 @@ class Board extends Base } } - $this->response->html($this->template->layout('board_edit', array( + $this->response->html($this->projectLayout('board_edit', array( 'errors' => $errors, - 'values' => $values + array('project_id' => $project_id), + 'values' => $values + array('project_id' => $project['id']), 'columns' => $columns, 'project' => $project, 'menu' => 'projects', @@ -287,11 +279,7 @@ class Board extends Base */ public function add() { - $project_id = $this->request->getIntegerParam('project_id'); - $project = $this->project->getById($project_id); - - if (! $project) $this->notfound(); - + $project = $this->getProject(); $columns = $this->board->getColumnsList($project_id); $data = $this->request->getValues(); $values = array(); @@ -313,7 +301,7 @@ class Board extends Base } } - $this->response->html($this->template->layout('board_edit', array( + $this->response->html($this->projectLayout('board_edit', array( 'errors' => $errors, 'values' => $values + $data, 'columns' => $columns, @@ -330,8 +318,11 @@ class Board extends Base */ public function confirm() { - $this->response->html($this->template->layout('board_remove', array( + $project = $this->getProject(); + + $this->response->html($this->projectLayout('board_remove', array( 'column' => $this->board->getColumn($this->request->getIntegerParam('column_id')), + 'project' => $project, 'menu' => 'projects', 'title' => t('Remove a column from a board') ))); diff --git a/app/Controller/Category.php b/app/Controller/Category.php index 5fd59c0a6..3c9d0523f 100644 --- a/app/Controller/Category.php +++ b/app/Controller/Category.php @@ -38,7 +38,7 @@ class Category extends Base { $project = $this->getProject(); - $this->response->html($this->template->layout('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(), @@ -71,7 +71,7 @@ class Category extends Base } } - $this->response->html($this->template->layout('category_index', array( + $this->response->html($this->projectLayout('category_index', array( 'categories' => $this->category->getList($project['id'], false), 'values' => $values, 'errors' => $errors, @@ -91,7 +91,7 @@ class Category extends Base $project = $this->getProject(); $category = $this->getCategory($project['id']); - $this->response->html($this->template->layout('category_edit', array( + $this->response->html($this->projectLayout('category_edit', array( 'values' => $category, 'errors' => array(), 'project' => $project, @@ -123,7 +123,7 @@ class Category extends Base } } - $this->response->html($this->template->layout('category_edit', array( + $this->response->html($this->projectLayout('category_edit', array( 'values' => $values, 'errors' => $errors, 'project' => $project, @@ -142,7 +142,7 @@ class Category extends Base $project = $this->getProject(); $category = $this->getCategory($project['id']); - $this->response->html($this->template->layout('category_remove', array( + $this->response->html($this->projectLayout('category_remove', array( 'project' => $project, 'category' => $category, 'menu' => 'projects', diff --git a/app/Controller/Project.php b/app/Controller/Project.php index 0d430b44e..deca7e1ab 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -13,26 +13,52 @@ use Core\Translator; */ class Project extends Base { + /** + * List of projects + * + * @access public + */ + public function index() + { + $projects = $this->project->getAll($this->acl->isRegularUser()); + $nb_projects = count($projects); + $active_projects = array(); + $inactive_projects = array(); - /** - * Clone Project - * - * @author Antonio Rabelo - * @access public - */ - public function duplicate() - { - $this->checkCSRFParam(); - $project_id = $this->request->getIntegerParam('project_id'); + foreach ($projects as $project) { + if ($project['is_active'] == 1) { + $active_projects[] = $project; + } + else { + $inactive_projects[] = $project; + } + } - if ($project_id && $this->project->duplicate($project_id)) { - $this->session->flash(t('Project cloned successfully.')); - } else { - $this->session->flashError(t('Unable to clone this project.')); - } + $this->response->html($this->template->layout('project_index', array( + 'active_projects' => $active_projects, + 'inactive_projects' => $inactive_projects, + 'nb_projects' => $nb_projects, + 'menu' => 'projects', + 'title' => t('Projects').' ('.$nb_projects.')' + ))); + } - $this->response->redirect('?controller=project'); - } + /** + * Show the project information page + * + * @access public + */ + public function show() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_show', array( + 'project' => $project, + 'stats' => $this->project->getStats($project['id']), + 'menu' => 'projects', + 'title' => $project['name'], + ))); + } /** * Task export @@ -52,7 +78,7 @@ class Project extends Base $this->response->csv($data); } - $this->response->html($this->template->layout('project_export', array( + $this->response->html($this->projectLayout('project_export', array( 'values' => array( 'controller' => 'project', 'action' => 'export', @@ -67,6 +93,319 @@ class Project extends Base ))); } + /** + * Public access management + * + * @access public + */ + public function share() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_share', array( + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Public access'), + ))); + } + + /** + * Enable public access for a project + * + * @access public + */ + public function enablePublic() + { + $this->checkCSRFParam(); + $project_id = $this->request->getIntegerParam('project_id'); + + if ($project_id && $this->project->enablePublicAccess($project_id)) { + $this->session->flash(t('Project updated successfully.')); + } else { + $this->session->flashError(t('Unable to update this project.')); + } + + $this->response->redirect('?controller=project&action=share&project_id='.$project_id); + } + + /** + * Disable public access for a project + * + * @access public + */ + public function disablePublic() + { + $this->checkCSRFParam(); + $project_id = $this->request->getIntegerParam('project_id'); + + if ($project_id && $this->project->disablePublicAccess($project_id)) { + $this->session->flash(t('Project updated successfully.')); + } else { + $this->session->flashError(t('Unable to update this project.')); + } + + $this->response->redirect('?controller=project&action=share&project_id='.$project_id); + } + + /** + * Display a form to edit a project + * + * @access public + */ + public function edit() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_edit', array( + 'errors' => array(), + 'values' => $project, + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Edit project') + ))); + } + + /** + * Validate and update a project + * + * @access public + */ + public function update() + { + $project = $this->getProject(); + $values = $this->request->getValues() + array('is_active' => 0); + list($valid, $errors) = $this->project->validateModification($values); + + if ($valid) { + + if ($this->project->update($values)) { + $this->session->flash(t('Project updated successfully.')); + $this->response->redirect('?controller=project&action=edit&project_id='.$project['id']); + } + else { + $this->session->flashError(t('Unable to update this project.')); + } + } + + $this->response->html($this->projectLayout('project_edit', array( + 'errors' => $errors, + 'values' => $values, + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Edit Project') + ))); + } + + /** + * Users list for the selected project + * + * @access public + */ + public function users() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_users', array( + 'project' => $project, + 'users' => $this->project->getAllUsers($project['id']), + 'menu' => 'projects', + 'title' => t('Edit project access list') + ))); + } + + /** + * Allow a specific user for the selected project + * + * @access public + */ + public function allow() + { + $values = $this->request->getValues(); + list($valid,) = $this->project->validateUserAccess($values); + + if ($valid) { + + if ($this->project->allowUser($values['project_id'], $values['user_id'])) { + $this->session->flash(t('Project updated successfully.')); + } + else { + $this->session->flashError(t('Unable to update this project.')); + } + } + + $this->response->redirect('?controller=project&action=users&project_id='.$values['project_id']); + } + + /** + * Revoke user access + * + * @access public + */ + public function revoke() + { + $this->checkCSRFParam(); + + $values = array( + 'project_id' => $this->request->getIntegerParam('project_id'), + 'user_id' => $this->request->getIntegerParam('user_id'), + ); + + list($valid,) = $this->project->validateUserAccess($values); + + if ($valid) { + + if ($this->project->revokeUser($values['project_id'], $values['user_id'])) { + $this->session->flash(t('Project updated successfully.')); + } + else { + $this->session->flashError(t('Unable to update this project.')); + } + } + + $this->response->redirect('?controller=project&action=users&project_id='.$values['project_id']); + } + + /** + * Confirmation dialog before to remove a project + * + * @access public + */ + public function confirmRemove() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_remove', array( + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Remove project') + ))); + } + + /** + * Remove a project + * + * @access public + */ + public function remove() + { + $this->checkCSRFParam(); + $project_id = $this->request->getIntegerParam('project_id'); + + if ($project_id && $this->project->remove($project_id)) { + $this->session->flash(t('Project removed successfully.')); + } else { + $this->session->flashError(t('Unable to remove this project.')); + } + + $this->response->redirect('?controller=project'); + } + + /** + * Confirmation dialog before to clone a project + * + * @access public + */ + public function confirmDuplicate() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_duplicate', array( + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Clone this project') + ))); + } + + /** + * Duplicate a project + * + * @author Antonio Rabelo + * @access public + */ + public function duplicate() + { + $this->checkCSRFParam(); + $project_id = $this->request->getIntegerParam('project_id'); + + if ($project_id && $this->project->duplicate($project_id)) { + $this->session->flash(t('Project cloned successfully.')); + } else { + $this->session->flashError(t('Unable to clone this project.')); + } + + $this->response->redirect('?controller=project'); + } + + /** + * Confirmation dialog before to disable a project + * + * @access public + */ + public function confirmDisable() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_disable', array( + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Project activation') + ))); + } + + /** + * Disable a project + * + * @access public + */ + public function disable() + { + $this->checkCSRFParam(); + $project_id = $this->request->getIntegerParam('project_id'); + + if ($project_id && $this->project->disable($project_id)) { + $this->session->flash(t('Project disabled successfully.')); + } else { + $this->session->flashError(t('Unable to disable this project.')); + } + + $this->response->redirect('?controller=project&action=show&project_id='.$project_id); + } + + /** + * Confirmation dialog before to enable a project + * + * @access public + */ + public function confirmEnable() + { + $project = $this->getProject(); + + $this->response->html($this->projectLayout('project_enable', array( + 'project' => $project, + 'menu' => 'projects', + 'title' => t('Project activation') + ))); + } + + /** + * Enable a project + * + * @access public + */ + public function enable() + { + $this->checkCSRFParam(); + $project_id = $this->request->getIntegerParam('project_id'); + + if ($project_id && $this->project->enable($project_id)) { + $this->session->flash(t('Project activated successfully.')); + } else { + $this->session->flashError(t('Unable to activate this project.')); + } + + $this->response->redirect('?controller=project&action=show&project_id='.$project_id); + } + /** * Task search for a given project * @@ -138,24 +477,6 @@ class Project extends Base ))); } - /** - * List of projects - * - * @access public - */ - public function index() - { - $projects = $this->project->getAll(true, $this->acl->isRegularUser()); - $nb_projects = count($projects); - - $this->response->html($this->template->layout('project_index', array( - 'projects' => $projects, - 'nb_projects' => $nb_projects, - 'menu' => 'projects', - 'title' => t('Projects').' ('.$nb_projects.')' - ))); - } - /** * Display a form to create a new project * @@ -199,192 +520,4 @@ class Project extends Base 'title' => t('New Project') ))); } - - /** - * Display a form to edit a project - * - * @access public - */ - public function edit() - { - $project = $this->getProject(); - - $this->response->html($this->template->layout('project_edit', array( - 'errors' => array(), - 'values' => $project, - 'menu' => 'projects', - 'title' => t('Edit project') - ))); - } - - /** - * Validate and update a project - * - * @access public - */ - public function update() - { - $values = $this->request->getValues() + array('is_active' => 0); - list($valid, $errors) = $this->project->validateModification($values); - - if ($valid) { - - if ($this->project->update($values)) { - $this->session->flash(t('Project updated successfully.')); - $this->response->redirect('?controller=project'); - } - else { - $this->session->flashError(t('Unable to update this project.')); - } - } - - $this->response->html($this->template->layout('project_edit', array( - 'errors' => $errors, - 'values' => $values, - 'menu' => 'projects', - 'title' => t('Edit Project') - ))); - } - - /** - * Confirmation dialog before to remove a project - * - * @access public - */ - public function confirm() - { - $project = $this->getProject(); - - $this->response->html($this->template->layout('project_remove', array( - 'project' => $project, - 'menu' => 'projects', - 'title' => t('Remove project') - ))); - } - - /** - * Remove a project - * - * @access public - */ - public function remove() - { - $this->checkCSRFParam(); - $project_id = $this->request->getIntegerParam('project_id'); - - if ($project_id && $this->project->remove($project_id)) { - $this->session->flash(t('Project removed successfully.')); - } else { - $this->session->flashError(t('Unable to remove this project.')); - } - - $this->response->redirect('?controller=project'); - } - - /** - * Enable a project - * - * @access public - */ - public function enable() - { - $this->checkCSRFParam(); - $project_id = $this->request->getIntegerParam('project_id'); - - if ($project_id && $this->project->enable($project_id)) { - $this->session->flash(t('Project activated successfully.')); - } else { - $this->session->flashError(t('Unable to activate this project.')); - } - - $this->response->redirect('?controller=project'); - } - - /** - * Disable a project - * - * @access public - */ - public function disable() - { - $this->checkCSRFParam(); - $project_id = $this->request->getIntegerParam('project_id'); - - if ($project_id && $this->project->disable($project_id)) { - $this->session->flash(t('Project disabled successfully.')); - } else { - $this->session->flashError(t('Unable to disable this project.')); - } - - $this->response->redirect('?controller=project'); - } - - /** - * Users list for the selected project - * - * @access public - */ - public function users() - { - $project = $this->getProject(); - - $this->response->html($this->template->layout('project_users', array( - 'project' => $project, - 'users' => $this->project->getAllUsers($project['id']), - 'menu' => 'projects', - 'title' => t('Edit project access list') - ))); - } - - /** - * Allow a specific user for the selected project - * - * @access public - */ - public function allow() - { - $values = $this->request->getValues(); - list($valid,) = $this->project->validateUserAccess($values); - - if ($valid) { - - if ($this->project->allowUser($values['project_id'], $values['user_id'])) { - $this->session->flash(t('Project updated successfully.')); - } - else { - $this->session->flashError(t('Unable to update this project.')); - } - } - - $this->response->redirect('?controller=project&action=users&project_id='.$values['project_id']); - } - - /** - * Revoke user access - * - * @access public - */ - public function revoke() - { - $this->checkCSRFParam(); - - $values = array( - 'project_id' => $this->request->getIntegerParam('project_id'), - 'user_id' => $this->request->getIntegerParam('user_id'), - ); - - list($valid,) = $this->project->validateUserAccess($values); - - if ($valid) { - - if ($this->project->revokeUser($values['project_id'], $values['user_id'])) { - $this->session->flash(t('Project updated successfully.')); - } - else { - $this->session->flashError(t('Unable to update this project.')); - } - } - - $this->response->redirect('?controller=project&action=users&project_id='.$values['project_id']); - } } diff --git a/app/Locales/de_DE/translations.php b/app/Locales/de_DE/translations.php index 6997a0b38..2a5a4c0c0 100644 --- a/app/Locales/de_DE/translations.php +++ b/app/Locales/de_DE/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Liste der Projekte', 'Completed tasks for "%s"' => 'Abgeschlossene Aufgaben für "%s"', '%d closed tasks' => '%d abgeschlossene Aufgaben', - 'no task for this project' => 'Keine Aufgaben in diesem Projekt', + 'No task for this project' => 'Keine Aufgaben in diesem Projekt', 'Public link' => 'Öffentlicher Link', 'There is no column in your project!' => 'Es gibt keine Spalte in deinem Projekt!', 'Change assignee' => 'Zuständigkeit ändern', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Zugriffsberechtigungen des Projektes bearbeiten', 'Edit users access' => 'Benutzerzugriff ändern', 'Allow this user' => 'Diesen Benutzer autorisieren', - 'Project access list for "%s"' => 'Zugriffsliste für Projekt "%s"', 'Only those users have access to this project:' => 'Nur diese Benutzer haben Zugang zum Projekt:', 'Don\'t forget that administrators have access to everything.' => 'Nicht vergessen: Administratoren haben überall Zugang.', 'revoke' => 'entfernen', @@ -422,4 +421,17 @@ return array( // '[Kanboard] Notification' => '', // 'I want to receive notifications only for those projects:' => '', // 'view the task on Kanboard' => '', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/es_ES/translations.php b/app/Locales/es_ES/translations.php index 801094c3d..0edf38379 100644 --- a/app/Locales/es_ES/translations.php +++ b/app/Locales/es_ES/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Lista de los proyectos', 'Completed tasks for "%s"' => 'Tarea completada por « %s »', '%d closed tasks' => '%d tareas completadas', - 'no task for this project' => 'ninguna tarea para este proyecto', + 'No task for this project' => 'Ninguna tarea para este proyecto', 'Public link' => 'Enlace público', 'There is no column in your project!' => '¡No hay ninguna columna para este proyecto!', 'Change assignee' => 'Cambiar la persona asignada', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Editar los permisos del proyecto', 'Edit users access' => 'Editar los permisos de usuario', 'Allow this user' => 'Autorizar este usuario', - 'Project access list for "%s"' => 'Permisos del proyecto « %s »', 'Only those users have access to this project:' => 'Solo estos usuarios tienen acceso a este proyecto:', 'Don\'t forget that administrators have access to everything.' => 'No olvide que los administradores tienen acceso a todo.', 'revoke' => 'revocar', @@ -422,4 +421,17 @@ return array( '[Kanboard] Notification' => '[Kanboard] Notificación', 'I want to receive notifications only for those projects:' => 'Quiero recibir notificaciones solo de estos proyectos:', 'view the task on Kanboard' => 'ver la tarea en Kanboard', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/fi_FI/translations.php b/app/Locales/fi_FI/translations.php index f18314ed3..df0d41766 100644 --- a/app/Locales/fi_FI/translations.php +++ b/app/Locales/fi_FI/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Projektit', 'Completed tasks for "%s"' => 'Suoritetut tehtävät projektille %s', '%d closed tasks' => '%d suljettua tehtävää', - 'no task for this project' => 'ei tehtävää tälle projektille', + 'No task for this project' => 'Ei tehtävää tälle projektille', 'Public link' => 'Julkinen linkki', 'There is no column in your project!' => 'Projektilta puuttuu sarakkeet!', 'Change assignee' => 'Vaihda suorittajaa', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Muuta projektin käyttäjiä', 'Edit users access' => 'Muuta käyttäjien pääsyä', 'Allow this user' => 'Salli tämä projekti', - 'Project access list for "%s"' => 'Projektin pääsylista "%s"', 'Only those users have access to this project:' => 'Vain näillä käyttäjillä on pääsy projektiin:', 'Don\'t forget that administrators have access to everything.' => 'Muista että ylläpitäjät pääsevät kaikkialle.', 'revoke' => 'poista', @@ -422,4 +421,17 @@ return array( // '[Kanboard] Notification' => '', // 'I want to receive notifications only for those projects:' => '', // 'view the task on Kanboard' => '', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/fr_FR/translations.php b/app/Locales/fr_FR/translations.php index 3f5bb6331..cfb0733f8 100644 --- a/app/Locales/fr_FR/translations.php +++ b/app/Locales/fr_FR/translations.php @@ -176,8 +176,8 @@ return array( 'List of projects' => 'Liste des projets', 'Completed tasks for "%s"' => 'Tâches terminées pour « %s »', '%d closed tasks' => '%d tâches terminées', - 'no task for this project' => 'aucune tâche pour ce projet', - 'Public link' => 'Accès public', + 'No task for this project' => 'Aucune tâche pour ce projet', + 'Public link' => 'Lien publique', 'There is no column in your project!' => 'Il n\'y a aucune colonne dans votre projet !', 'Change assignee' => 'Changer la personne assignée', 'Change assignee for the task "%s"' => 'Changer la personne assignée pour la tâche « %s »', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Modifier l\'accès au projet', 'Edit users access' => 'Modifier les utilisateurs autorisés', 'Allow this user' => 'Autoriser cet utilisateur', - 'Project access list for "%s"' => 'Liste des accès au projet « %s »', 'Only those users have access to this project:' => 'Seulement ces utilisateurs ont accès à ce projet :', 'Don\'t forget that administrators have access to everything.' => 'N\'oubliez pas que les administrateurs ont accès à tout.', 'revoke' => 'révoquer', @@ -422,4 +421,17 @@ return array( '[Kanboard] Notification' => '[Kanboard] Notification', 'I want to receive notifications only for those projects:' => 'Je souhaite reçevoir les notifications uniquement pour les projets sélectionnés :', 'view the task on Kanboard' => 'voir la tâche sur Kanboard', + 'Public access' => 'Accès publique', + 'Categories management' => 'Gestion des catégories', + 'Users management' => 'Gestion des utilisateurs', + 'Active tasks' => 'Tâches actives', + 'Disable public access' => 'Désactiver l\'accès publique', + 'Enable public access' => 'Activer l\'accès publique', + 'Active projects' => 'Projets activés', + 'Inactive projects' => 'Projets désactivés', + 'Public access disabled' => 'Accès publique désactivé', + 'Do you really want to disable this project: "%s"?' => 'Voulez-vous vraiment désactiver ce projet : « %s » ?', + 'Do you really want to duplicate this project: "%s"?' => 'Voulez-vous vraiment dupliquer ce projet : « %s » ?', + 'Do you really want to enable this project: "%s"?' => 'Voulez-vous vraiment activer ce projet : « %s » ?', + 'Project activation' => 'Activation du projet', ); diff --git a/app/Locales/it_IT/translations.php b/app/Locales/it_IT/translations.php index 08d82d795..9dad1d6d3 100644 --- a/app/Locales/it_IT/translations.php +++ b/app/Locales/it_IT/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Lista di progetti', 'Completed tasks for "%s"' => 'Compiti fatti da « %s »', '%d closed tasks' => '%d compiti chiusi', - 'no task for this project' => 'nessun compito per questo progetto', + 'No task for this project' => 'Nessun compito per questo progetto', 'Public link' => 'Link pubblico', 'There is no column in your project!' => 'Non c\'è nessuna colonna per questo progetto!', 'Change assignee' => 'Cambiare la persona assegnata', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Modificare i permessi del progetto', 'Edit users access' => 'Modificare i permessi degli utenti', 'Allow this user' => 'Permettere a questo utente', - 'Project access list for "%s"' => 'Permessi del progetto « %s »', 'Only those users have access to this project:' => 'Solo questi utenti hanno accesso a questo progetto:', 'Don\'t forget that administrators have access to everything.' => 'Non dimenticare che gli amministratori hanno accesso a tutto.', 'revoke' => 'revocare', @@ -422,4 +421,17 @@ return array( '[Kanboard] Notification' => '[Kanboard] Notification', 'I want to receive notifications only for those projects:' => 'Vorrei ricevere le notifiche solo da questi progetti:', 'view the task on Kanboard' => 'vedere il compito su Kanboard', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/pl_PL/translations.php b/app/Locales/pl_PL/translations.php index 22c1de192..e042ef211 100644 --- a/app/Locales/pl_PL/translations.php +++ b/app/Locales/pl_PL/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Lista projektów', 'Completed tasks for "%s"' => 'Zadania zakończone dla "%s"', '%d closed tasks' => '%d zamkniętych zadań', - 'no task for this project' => 'brak zadań dla tego projektu', + 'No task for this project' => 'Brak zadań dla tego projektu', 'Public link' => 'Link publiczny', 'There is no column in your project!' => 'Brak kolumny w Twoim projekcie', 'Change assignee' => 'Zmień odpowiedzialną osobę', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Edycja list dostępu dla projektu', 'Edit users access' => 'Edytuj dostęp', 'Allow this user' => 'Dodaj użytkownika', - 'Project access list for "%s"' => 'Lista uprawnionych dla projektu "%s"', 'Only those users have access to this project:' => 'Użytkownicy mający dostęp:', 'Don\'t forget that administrators have access to everything.' => 'Pamiętaj: Administratorzy mają zawsze dostęp do wszystkiego!', 'revoke' => 'odbierz dostęp', @@ -422,4 +421,17 @@ return array( // '[Kanboard] Notification' => '', // 'I want to receive notifications only for those projects:' => '', // 'view the task on Kanboard' => '', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/pt_BR/translations.php b/app/Locales/pt_BR/translations.php index 70378433e..a0bad1c17 100644 --- a/app/Locales/pt_BR/translations.php +++ b/app/Locales/pt_BR/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Lista de projetos', 'Completed tasks for "%s"' => 'Tarefas completadas por "%s"', '%d closed tasks' => '%d tarefas encerradas', - 'no task for this project' => 'nenhuma tarefa para este projeto', + 'No task for this project' => 'Nenhuma tarefa para este projeto', 'Public link' => 'Link público', 'There is no column in your project!' => 'Não há colunas no seu projeto!', 'Change assignee' => 'Mudar a designação', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Editar lista de acesso ao projeto', 'Edit users access' => 'Editar acesso de usuários', 'Allow this user' => 'Permitir esse usuário', - 'Project access list for "%s"' => 'Lista de acesso ao projeto para "%s"', 'Only those users have access to this project:' => 'Somente estes usuários têm acesso a este projeto:', 'Don\'t forget that administrators have access to everything.' => 'Não esqueça que administradores têm acesso a tudo.', 'revoke' => 'revogar', @@ -422,4 +421,17 @@ return array( // '[Kanboard] Notification' => '', // 'I want to receive notifications only for those projects:' => '', // 'view the task on Kanboard' => '', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/sv_SE/translations.php b/app/Locales/sv_SE/translations.php index 4a4044b04..5de962795 100644 --- a/app/Locales/sv_SE/translations.php +++ b/app/Locales/sv_SE/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => 'Lista med projekt', 'Completed tasks for "%s"' => 'Slutföra uppgifter för "%s"', '%d closed tasks' => '%d stängda uppgifter', - 'no task for this project' => 'inga uppgifter i detta projekt', + 'No task for this project' => 'Inga uppgifter i detta projekt', 'Public link' => 'Publik länk', 'There is no column in your project!' => 'Det saknas kolumner i ditt projekt!', 'Change assignee' => 'Ändra uppdragsinnehavare', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => 'Ändra projektåtkomst lista', 'Edit users access' => 'Användaråtkomst', 'Allow this user' => 'Tillåt användare', - 'Project access list for "%s"' => 'Behörighetslista för "%s"', 'Only those users have access to this project:' => 'Bara de användarna har tillgång till detta projekt.', 'Don\'t forget that administrators have access to everything.' => 'Glöm inte att administratörerna har rätt att göra allt.', 'revoke' => 'Dra tillbaka behörighet', @@ -422,4 +421,17 @@ return array( '[Kanboard] Notification' => '[Kanboard] Notis', 'I want to receive notifications only for those projects:' => 'Jag vill endast få notiser för dessa projekt:', 'view the task on Kanboard' => 'Visa uppgiften på Kanboard', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Locales/zh_CN/translations.php b/app/Locales/zh_CN/translations.php index 0d3500ed6..31addc37a 100644 --- a/app/Locales/zh_CN/translations.php +++ b/app/Locales/zh_CN/translations.php @@ -176,7 +176,7 @@ return array( 'List of projects' => '项目列表', 'Completed tasks for "%s"' => '任务因"%s"原因完成', '%d closed tasks' => '%d个已关闭任务', - 'no task for this project' => '该项目尚无任务', + 'No task for this project' => '该项目尚无任务', 'Public link' => '公开链接', 'There is no column in your project!' => '该项目尚无栏目项!', 'Change assignee' => '被指派人变更', @@ -191,7 +191,6 @@ return array( 'Edit project access list' => '编辑项目存取列表', 'Edit users access' => '编辑用户存取权限', 'Allow this user' => '允许该用户', - 'Project access list for "%s"' => '"%s"的项目存取列表', 'Only those users have access to this project:' => '只有这些用户有该项目的存取权限:', 'Don\'t forget that administrators have access to everything.' => '别忘了管理员有一切的权限。', 'revoke' => '撤销', @@ -422,4 +421,17 @@ return array( // '[Kanboard] Notification' => '', // 'I want to receive notifications only for those projects:' => '', // 'view the task on Kanboard' => '', + // 'Public access' => '', + // 'Categories management' => '', + // 'Users management' => '', + // 'Active tasks' => '', + // 'Disable public access' => '', + // 'Enable public access' => '', + // 'Active projects' => '', + // 'Inactive projects' => '', + // 'Public access disabled' => '', + // 'Do you really want to disable this project: "%s"?' => '', + // 'Do you really want to duplicate this project: "%s"?' => '', + // 'Do you really want to enable this project: "%s"?' => '', + // 'Project activation' => '', ); diff --git a/app/Model/Acl.php b/app/Model/Acl.php index c4b310798..b26446869 100644 --- a/app/Model/Acl.php +++ b/app/Model/Acl.php @@ -31,7 +31,7 @@ class Acl extends Base private $user_actions = array( 'app' => array('index'), 'board' => array('index', 'show', 'assign', 'assigntask', 'save', 'check'), - 'project' => array('tasks', 'index', 'forbidden', 'search'), + 'project' => array('tasks', 'index', 'forbidden', 'search', 'export', 'show'), 'user' => array('index', 'edit', 'update', 'forbidden', 'logout', 'index', 'unlinkgoogle', 'unlinkgithub'), 'config' => array('index', 'removeremembermetoken', 'notifications'), 'comment' => array('create', 'save', 'confirm', 'remove', 'update', 'edit', 'forbidden'), diff --git a/app/Model/Project.php b/app/Model/Project.php index dc72addc2..3298b4960 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -227,7 +227,7 @@ class Project extends Base */ public function getByToken($token) { - return $this->db->table(self::TABLE)->eq('token', $token)->findOne(); + return $this->db->table(self::TABLE)->eq('token', $token)->eq('is_public', 1)->findOne(); } /** @@ -245,46 +245,23 @@ class Project extends Base * Get all projects, optionaly fetch stats for each project and can check users permissions * * @access public - * @param bool $fetch_stats If true, return metrics about each projects - * @param bool $check_permissions If true, remove projects not allowed for the current user + * @param bool $filter_permissions If true, remove projects not allowed for the current user * @return array */ - public function getAll($fetch_stats = false, $check_permissions = false) + public function getAll($filter_permissions = false) { - if (! $fetch_stats) { - return $this->db->table(self::TABLE)->asc('name')->findAll(); - } + $projects = $this->db->table(self::TABLE)->asc('name')->findAll(); - $this->db->startTransaction(); + if ($filter_permissions) { - $projects = $this->db - ->table(self::TABLE) - ->asc('name') - ->findAll(); + foreach ($projects as $key => $project) { - foreach ($projects as $pkey => &$project) { - - if ($check_permissions && ! $this->isUserAllowed($project['id'], $this->acl->getUserId())) { - unset($projects[$pkey]); - } - else { - - $columns = $this->board->getcolumns($project['id']); - $project['nb_active_tasks'] = 0; - - foreach ($columns as &$column) { - $column['nb_active_tasks'] = $this->task->countByColumnId($project['id'], $column['id']); - $project['nb_active_tasks'] += $column['nb_active_tasks']; + if (! $this->isUserAllowed($project['id'], $this->acl->getUserId())) { + unset($projects[$key]); } - - $project['columns'] = $columns; - $project['nb_tasks'] = $this->task->countByProjectId($project['id']); - $project['nb_inactive_tasks'] = $project['nb_tasks'] - $project['nb_active_tasks']; } } - $this->db->closeTransaction(); - return $projects; } @@ -382,6 +359,31 @@ class Project extends Base return $this->filterListByAccess($this->getListByStatus(self::ACTIVE), $user_id); } + /** + * Gather some task metrics for a given project + * + * @access public + * @param integer $project_id Project id + * @return array + */ + public function getStats($project_id) + { + $stats = array(); + $columns = $this->board->getcolumns($project_id); + $stats['nb_active_tasks'] = 0; + + foreach ($columns as &$column) { + $column['nb_active_tasks'] = $this->task->countByColumnId($project_id, $column['id']); + $stats['nb_active_tasks'] += $column['nb_active_tasks']; + } + + $stats['columns'] = $columns; + $stats['nb_tasks'] = $this->task->countByProjectId($project_id); + $stats['nb_inactive_tasks'] = $stats['nb_tasks'] - $stats['nb_active_tasks']; + + return $stats; + } + /** * Create a project from another one. * @@ -397,7 +399,7 @@ class Project extends Base 'name' => $project_name.' ('.t('Clone').')', 'is_active' => true, 'last_modified' => 0, - 'token' => Security::generateToken(), + 'token' => '', ); if (! $this->db->table(self::TABLE)->save($project)) { @@ -486,7 +488,7 @@ class Project extends Base { $this->db->startTransaction(); - $values['token'] = Security::generateToken(); + $values['token'] = ''; if (! $this->db->table(self::TABLE)->save($values)) { $this->db->cancelTransaction(); @@ -591,6 +593,36 @@ class Project extends Base ->save(array('is_active' => 0)); } + /** + * Enable public access for a project + * + * @access public + * @param integer $project_id Project id + * @return bool + */ + public function enablePublicAccess($project_id) + { + return $this->db + ->table(self::TABLE) + ->eq('id', $project_id) + ->save(array('is_public' => 1, 'token' => Security::generateToken())); + } + + /** + * Disable public access for a project + * + * @access public + * @param integer $project_id Project id + * @return bool + */ + public function disablePublicAccess($project_id) + { + return $this->db + ->table(self::TABLE) + ->eq('id', $project_id) + ->save(array('is_public' => 0, 'token' => '')); + } + /** * Validate project creation * diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 8f3ae5a13..ca4bbbae2 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -4,7 +4,12 @@ namespace Schema; use Core\Security; -const VERSION = 23; +const VERSION = 24; + +function version_24($pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN is_public TINYINT(1) DEFAULT '0'"); +} function version_23($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index ce77a4ed2..ac27f786f 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -4,7 +4,12 @@ namespace Schema; use Core\Security; -const VERSION = 4; +const VERSION = 5; + +function version_5($pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN is_public BOOLEAN DEFAULT '0'"); +} function version_4($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index c3a3f10e7..fed9aaf85 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -4,7 +4,12 @@ namespace Schema; use Core\Security; -const VERSION = 23; +const VERSION = 24; + +function version_24($pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN is_public INTEGER DEFAULT "0"'); +} function version_23($pdo) { @@ -238,19 +243,6 @@ function version_4($pdo) function version_3($pdo) { $pdo->exec('ALTER TABLE projects ADD COLUMN token TEXT'); - - // For each existing project, assign a different token - $rq = $pdo->prepare("SELECT id FROM projects WHERE token IS NULL"); - $rq->execute(); - $results = $rq->fetchAll(\PDO::FETCH_ASSOC); - - if ($results !== false) { - - foreach ($results as &$result) { - $rq = $pdo->prepare('UPDATE projects SET token=? WHERE id=?'); - $rq->execute(array(Security::generateToken(), $result['id'])); - } - } } function version_2($pdo) diff --git a/app/Templates/action_index.php b/app/Templates/action_index.php index 36c333a95..c21395fda 100644 --- a/app/Templates/action_index.php +++ b/app/Templates/action_index.php @@ -1,77 +1,70 @@ -
-
\ No newline at end of file +
+ +
+ \ No newline at end of file diff --git a/app/Templates/action_params.php b/app/Templates/action_params.php index da685860d..92d162887 100644 --- a/app/Templates/action_params.php +++ b/app/Templates/action_params.php @@ -1,43 +1,37 @@ -
- \ No newline at end of file diff --git a/app/Templates/board_edit.php b/app/Templates/board_edit.php index 05d9a6f6b..8832e71d6 100644 --- a/app/Templates/board_edit.php +++ b/app/Templates/board_edit.php @@ -1,66 +1,58 @@ -
- \ No newline at end of file diff --git a/app/Templates/category_edit.php b/app/Templates/category_edit.php index 327acce64..278d7e125 100644 --- a/app/Templates/category_edit.php +++ b/app/Templates/category_edit.php @@ -1,24 +1,16 @@ -
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/Templates/category_index.php b/app/Templates/category_index.php index 18e81b784..4635406e6 100644 --- a/app/Templates/category_index.php +++ b/app/Templates/category_index.php @@ -1,49 +1,41 @@ -
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/Templates/project_disable.php b/app/Templates/project_disable.php new file mode 100644 index 000000000..39f555703 --- /dev/null +++ b/app/Templates/project_disable.php @@ -0,0 +1,14 @@ + + +
+

+ +

+ +
+ + +
+
\ No newline at end of file diff --git a/app/Templates/project_duplicate.php b/app/Templates/project_duplicate.php new file mode 100644 index 000000000..32cbd5d85 --- /dev/null +++ b/app/Templates/project_duplicate.php @@ -0,0 +1,14 @@ + + +
+

+ +

+ +
+ + +
+
\ No newline at end of file diff --git a/app/Templates/project_edit.php b/app/Templates/project_edit.php index a882fbc68..4c9420f01 100644 --- a/app/Templates/project_edit.php +++ b/app/Templates/project_edit.php @@ -1,25 +1,17 @@ -
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/Templates/project_enable.php b/app/Templates/project_enable.php new file mode 100644 index 000000000..d2fce9f3d --- /dev/null +++ b/app/Templates/project_enable.php @@ -0,0 +1,14 @@ + + +
+

+ +

+ +
+ + +
+
\ No newline at end of file diff --git a/app/Templates/project_export.php b/app/Templates/project_export.php index 946a68a87..46b4f3692 100644 --- a/app/Templates/project_export.php +++ b/app/Templates/project_export.php @@ -1,33 +1,24 @@ -
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/Templates/project_index.php b/app/Templates/project_index.php index dc71033fb..8b103c52d 100644 --- a/app/Templates/project_index.php +++ b/app/Templates/project_index.php @@ -8,99 +8,32 @@
- +

- - - - - - - - - - - - - - - - - - - - - -
- - - - -
    - 0): ?> + +

    +
      + +
    • + +
    • + +
    + - 0): ?> -
  • - + +

    +
      + +
    • + +
    • + +
    + - 0): ?> -
  • - - -
  • - - -
  • - -
-
-
    - -
  • - () -
  • - -
-
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - - - - - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
\ No newline at end of file diff --git a/app/Templates/project_layout.php b/app/Templates/project_layout.php new file mode 100644 index 000000000..c8cc92365 --- /dev/null +++ b/app/Templates/project_layout.php @@ -0,0 +1,17 @@ +
+ +
+ + $project)) ?> + +
+ +
+
+
\ No newline at end of file diff --git a/app/Templates/project_remove.php b/app/Templates/project_remove.php index e25efa2f5..00771b5f4 100644 --- a/app/Templates/project_remove.php +++ b/app/Templates/project_remove.php @@ -1,16 +1,14 @@ -
- + -
-

- -

+
+

+ +

-
- - -
+
+ +
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/Templates/project_share.php b/app/Templates/project_share.php new file mode 100644 index 000000000..62e05b737 --- /dev/null +++ b/app/Templates/project_share.php @@ -0,0 +1,18 @@ + + + + +
+
+ +
+ + + + + + + + diff --git a/app/Templates/project_show.php b/app/Templates/project_show.php new file mode 100644 index 000000000..12b0ae641 --- /dev/null +++ b/app/Templates/project_show.php @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + +
diff --git a/app/Templates/project_sidebar.php b/app/Templates/project_sidebar.php new file mode 100644 index 000000000..d711e347b --- /dev/null +++ b/app/Templates/project_sidebar.php @@ -0,0 +1,47 @@ +
+

+
+
    +
  • + +
  • +
  • + +
  • + + +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + + + + + +
  • +
  • + +
  • + +
+
+
\ No newline at end of file diff --git a/app/Templates/project_users.php b/app/Templates/project_users.php index 8afac7096..dca3524fb 100644 --- a/app/Templates/project_users.php +++ b/app/Templates/project_users.php @@ -1,46 +1,36 @@ -
- -
+ - -
+ +
+ +
+

+
    + $username): ?> +
  • + + () +
  • + +
+

+
+ - + + - $project['id'])) ?> + - -
+ $project['id'])) ?> -
- - -
-
- + +
-

- -
- -
-

-
    - $username): ?> -
  • - - () -
  • - -
-

-
- - -
-
\ No newline at end of file +
+ +
+ + \ No newline at end of file diff --git a/assets/css/app.css b/assets/css/app.css index ad5a9cf05..e5f2fc57a 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -420,13 +420,16 @@ a.btn-red:hover, background: #c53727; } +a.btn-blue, .btn-blue { border-color: #3079ed; background: #4d90fe; color: #fff; } +a.btn-blue:hover, .btn-blue:hover, +a.btn-blue:focus, .btn-blue:focus { border-color: #2f5bb7; background: #357ae8; @@ -673,14 +676,17 @@ a.task-board-nobody { } /* task view */ +.project-show, .task-show { position: relative; } +.project-show-main, .task-show-main { margin-left: 330px; } +.project-show-sidebar, .task-show-sidebar { position: absolute; left: 0px; @@ -693,6 +699,7 @@ a.task-board-nobody { border-radius: 5px; } +.project-show-sidebar li, .task-show-sidebar li { list-style-type: square; margin-left: 30px; @@ -968,6 +975,35 @@ tr td.task-orange, margin-bottom: 15px; } +/* project view */ +.project-listing { + border-left: 3px solid #000; + margin-left: 35px; + padding-bottom: 10px; + width: 700px; +} + +.project-listing li { + font-size: 1.3em; + line-height: 1.7em; + list-style-type: none; + margin-left: 20px; + border-bottom: 1px dashed #ccc; +} + +.project-listing li:hover { + border-color: #333; +} + +.project-listing a { + text-decoration: none; +} + +.project-listing a:hover, +.project-listing a:focus { + color: #000; +} + /* confirmation box */ .confirm { max-width: 700px;