diff options
author | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2019-12-10 11:34:53 +0100 |
---|---|---|
committer | Dzial Techniczny WMW Projekt s.c <techniczna@wmwprojekt.pl> | 2019-12-10 11:34:53 +0100 |
commit | b8fa0246803dab40cf57d40b45984c53046f2d55 (patch) | |
tree | dc92b167c7542137c385614a1d558e57669a4339 /plugins/Group_assign/Template | |
parent | 2a43146236fd8fb16f84398d85720ad84aa0a0b1 (diff) |
Plugins directory and local modifications
Diffstat (limited to 'plugins/Group_assign/Template')
-rw-r--r-- | plugins/Group_assign/Template/action_creation/params.php | 73 | ||||
-rw-r--r-- | plugins/Group_assign/Template/board/filter.php | 12 | ||||
-rw-r--r-- | plugins/Group_assign/Template/board/group.php | 7 | ||||
-rw-r--r-- | plugins/Group_assign/Template/board/multi.php | 5 | ||||
-rw-r--r-- | plugins/Group_assign/Template/config/toggle.php | 4 | ||||
-rw-r--r-- | plugins/Group_assign/Template/header/user_dropdown.php | 46 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task/changes.php | 92 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task/details.php | 10 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task/multi.php | 6 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task_creation/show.php | 50 | ||||
-rw-r--r-- | plugins/Group_assign/Template/task_modification/show.php | 43 |
11 files changed, 348 insertions, 0 deletions
diff --git a/plugins/Group_assign/Template/action_creation/params.php b/plugins/Group_assign/Template/action_creation/params.php new file mode 100644 index 00000000..0506007b --- /dev/null +++ b/plugins/Group_assign/Template/action_creation/params.php @@ -0,0 +1,73 @@ +<div class="page-header"> + <h2><?= t('Define action parameters') ?></h2> +</div> + +<form method="post" action="<?= $this->url->href('ActionCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <?= $this->form->hidden('event_name', $values) ?> + <?= $this->form->hidden('action_name', $values) ?> + + <?= $this->form->label(t('Action'), 'action_name') ?> + <?= $this->form->select('action_name', $available_actions, $values, array(), array('disabled')) ?> + + <?= $this->form->label(t('Event'), 'event_name') ?> + <?= $this->form->select('event_name', $events, $values, array(), array('disabled')) ?> + + <?php foreach ($action_params as $param_name => $param_desc): ?> + <?php if ($this->text->contains($param_name, 'column_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $columns_list, $values) ?> + <?php elseif ($this->text->contains($param_name, 'user_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $users_list, $values) ?> + <?php elseif ($this->text->contains($param_name, 'group_id')): ?> + <?php $groups = $this->model->projectGroupRoleModel->getGroups($values['project_id']); ?> + <?php $groupnames = array_column($groups, 'name'); ?> + <?php $groupids = array_column($groups, 'id'); ?> + <?php array_unshift($groupnames, t('Unassigned')); ?> + <?php array_unshift($groupids, 0); ?> + <?php $groupvalues = array_combine($groupids, $groupnames); ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $groupvalues, $values) ?> + <?php elseif ($this->text->contains($param_name, 'check_box')): ?> + <?= $this->form->label(t('Options'), $param_name) ?> + <?= $this->form->checkbox('params['.$param_name.']', $param_desc, 1) ?> + <?php elseif ($this->text->contains($param_name, 'project_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $projects_list, $values) ?> + <?php elseif ($this->text->contains($param_name, 'color_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $colors_list, $values) ?> + <?php elseif ($this->text->contains($param_name, 'category_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $categories_list, $values) ?> + <?php elseif ($this->text->contains($param_name, 'link_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $links_list, $values) ?> + <?php elseif ($param_name === 'priority'): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $priorities_list, $values) ?> + <?php elseif ($this->text->contains($param_name, 'duration')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->number('params['.$param_name.']', $values) ?> + <?php elseif ($this->text->contains($param_name, 'swimlane_id')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $swimlane_list, $values) ?> + <?php elseif (is_array($param_desc)): ?> + <?= $this->form->label(ucfirst($param_name), $param_name) ?> + <?= $this->form->select('params['.$param_name.']', $param_desc, $values) ?> + <?php elseif ($this->text->contains($param_name, 'multitasktitles')): ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->textarea('params['.$param_name.']', $values) ?> + <div class="form-help"> + <?= t('Enter one line per task, or leave blank to copy Task Title and create only one subtask.') ?> + </div> + <?php else: ?> + <?= $this->form->label($param_desc, $param_name) ?> + <?= $this->form->text('params['.$param_name.']', $values) ?> + <?php endif ?> + <?php endforeach ?> + + <?= $this->modal->submitButtons() ?> +</form> diff --git a/plugins/Group_assign/Template/board/filter.php b/plugins/Group_assign/Template/board/filter.php new file mode 100644 index 00000000..322c483f --- /dev/null +++ b/plugins/Group_assign/Template/board/filter.php @@ -0,0 +1,12 @@ +<?php if (isset($grouplist) && !empty($grouplist)) : ?> +</div> +<div class="input-addon-item"> + <div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon" title="<?= t('Group filters') ?>"><i class="fa fa-users fa-fw"></i><i class="fa fa-caret-down"></i></a> + <ul> + <?php foreach ($grouplist as $group) : ?> + <li><a href="#" class="filter-helper" data-unique-filter='allassignees:"<?= $this->text->e($group) ?>"'><?= $this->text->e($group) ?></a></li> + <?php endforeach ?> + </ul> + </div> +<?php endif ?>
\ No newline at end of file diff --git a/plugins/Group_assign/Template/board/group.php b/plugins/Group_assign/Template/board/group.php new file mode 100644 index 00000000..6ac95c1f --- /dev/null +++ b/plugins/Group_assign/Template/board/group.php @@ -0,0 +1,7 @@ +<span> +<?php if ($task['assigned_groupname']): ?> + <strong class="assigned-group-label"><?= t('Assigned Group:') ?></strong> + <span class="assigned-group" style="background-color: #<?= $this->task->groupColorExtension->getGroupColor($task['assigned_groupname']) ?>; color:<?= $this->task->groupColorExtension->getFontColor($this->task->groupColorExtension->getGroupColor($task['assigned_groupname'])) ?>;"><?= $this->text->e($task['assigned_groupname'] ?: $task['owner_gp']) ?></span> + <br> +<?php endif ?> +</span> diff --git a/plugins/Group_assign/Template/board/multi.php b/plugins/Group_assign/Template/board/multi.php new file mode 100644 index 00000000..46084b5f --- /dev/null +++ b/plugins/Group_assign/Template/board/multi.php @@ -0,0 +1,5 @@ +<?php if ($task['owner_ms'] > 0 && count($this->task->multiselectMemberModel->getMembers($task['owner_ms'])) > 0) : ?> +<strong class="assigned-other-label"><small><?= t('Other Assignees:') ?></small></strong> + <?= $this->helper->smallAvatarHelperExtend->miniMultiple($task['owner_ms'], 'avatar-inline') ?> +<br> +<?php endif ?> diff --git a/plugins/Group_assign/Template/config/toggle.php b/plugins/Group_assign/Template/config/toggle.php new file mode 100644 index 00000000..801a6a26 --- /dev/null +++ b/plugins/Group_assign/Template/config/toggle.php @@ -0,0 +1,4 @@ +<div class="panel"> + <?= $this->form->radio('enable_am_group_management', 'Enable Group Managment for Application Managers' , 1, isset($values['enable_am_group_management'])&& $values['enable_am_group_management']==1) ?> + <?= $this->form->radio('enable_am_group_management', 'Disable Group Managment for Application Managers' , 2, isset($values['enable_am_group_management'])&& $values['enable_am_group_management']==2) ?> +</div> diff --git a/plugins/Group_assign/Template/header/user_dropdown.php b/plugins/Group_assign/Template/header/user_dropdown.php new file mode 100644 index 00000000..e3a38787 --- /dev/null +++ b/plugins/Group_assign/Template/header/user_dropdown.php @@ -0,0 +1,46 @@ +<div class="dropdown"> + <a href="#" class="dropdown-menu dropdown-menu-link-icon"><?= $this->avatar->currentUserSmall('avatar-inline') ?><i class="fa fa-caret-down"></i></a> + <ul> + <li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li> + <li> + <?= $this->url->icon('tachometer', t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?> + </li> + <li> + <?= $this->url->icon('home', t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?> + </li> + <li> + <?= $this->url->icon('folder', t('Projects management'), 'ProjectListController', 'show') ?> + </li> + <?php if ($this->user->hasAccess('GroupListController', 'index') && $_SESSION['user']['role'] == 'app-manager'): ?> + <li> + <?= $this->url->icon('group', t('Groups management'), 'GroupListController', 'index') ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('UserListController', 'show')): ?> + <li> + <?= $this->url->icon('user', t('Users management'), 'UserListController', 'show') ?> + </li> + <li> + <?= $this->url->icon('group', t('Groups management'), 'GroupListController', 'index') ?> + </li> + <li> + <?= $this->url->icon('cubes', t('Plugins'), 'PluginController', 'show') ?> + </li> + <li> + <?= $this->url->icon('cog', t('Settings'), 'ConfigController', 'index') ?> + </li> + <?php endif ?> + + <?= $this->hook->render('template:header:dropdown') ?> + + <li> + <i class="fa fa-fw fa-life-ring" aria-hidden="true"></i> + <?= $this->url->doc(t('Documentation'), 'index') ?> + </li> + <?php if (! DISABLE_LOGOUT): ?> + <li> + <?= $this->url->icon('sign-out', t('Logout'), 'AuthController', 'logout') ?> + </li> + <?php endif ?> + </ul> +</div> diff --git a/plugins/Group_assign/Template/task/changes.php b/plugins/Group_assign/Template/task/changes.php new file mode 100644 index 00000000..7a0d2720 --- /dev/null +++ b/plugins/Group_assign/Template/task/changes.php @@ -0,0 +1,92 @@ +<?php if (! empty($changes)): ?> + <ul> + <?php + + foreach ($changes as $field => $value) { + switch ($field) { + case 'title': + echo '<li>'.t('New title: %s', $task['title']).'</li>'; + break; + case 'owner_id': + if (empty($task['owner_id'])) { + echo '<li>'.t('The task is not assigned anymore').'</li>'; + } else { + echo '<li>'.t('New assignee: %s', $task['assignee_name'] ?: $task['assignee_username']).'</li>'; + } + break; + case 'category_id': + if (empty($task['category_id'])) { + echo '<li>'.t('There is no category now').'</li>'; + } else { + echo '<li>'.t('New category: %s', $task['category_name']).'</li>'; + } + break; + case 'color_id': + echo '<li>'.t('New color: %s', $this->text->in($task['color_id'], $this->task->getColors())).'</li>'; + break; + case 'score': + echo '<li>'.t('New complexity: %d', $task['score']).'</li>'; + break; + case 'date_due': + if (empty($task['date_due'])) { + echo '<li>'.t('The due date have been removed').'</li>'; + } else { + echo '<li>'.t('New due date: ').$this->dt->datetime($task['date_due']).'</li>'; + } + break; + case 'description': + if (empty($task['description'])) { + echo '<li>'.t('There is no description anymore').'</li>'; + } + break; + case 'recurrence_status': + case 'recurrence_trigger': + case 'recurrence_factor': + case 'recurrence_timeframe': + case 'recurrence_basedate': + case 'recurrence_parent': + case 'recurrence_child': + echo '<li>'.t('Recurrence settings have been modified').'</li>'; + break; + case 'time_spent': + echo '<li>'.t('Time spent changed: %sh', $task['time_spent']).'</li>'; + break; + case 'time_estimated': + echo '<li>'.t('Time estimated changed: %sh', $task['time_estimated']).'</li>'; + break; + case 'date_started': + if ($value != 0) { + echo '<li>'.t('Start date changed: ').$this->dt->datetime($task['date_started']).'</li>'; + } + break; + case 'owner_gp': + if (empty($task['owner_gp'])) { + echo '<li>'.t('The task is not assigned to a group anymore').'</li>'; + } else { + echo '<li>'.t('New group assigned: %s', $task['assigned_groupname']).'</li>'; + } + break; + case 'owner_ms': + if (empty($task['owner_ms'])) { + echo '<li>'.t('The task is not assigned to multiple users anymore').'</li>'; + } else { + echo '<li>'.t('The task has been assigned other users').'</li>'; + } + break; + default: + echo '<li>'.t('The field "%s" have been updated', $field).'</li>'; + } + } + + ?> + </ul> + + <?php if (! empty($changes['description'])): ?> + <p><strong><?= t('The description has been modified:') ?></strong></p> + <?php if (isset($public)): ?> + <div class="markdown"><?= $this->text->markdown($task['description'], true) ?></div> + <?php else: ?> + <div class="markdown"><?= $this->text->markdown($task['description']) ?></div> + <?php endif ?> + <?php endif ?> +<?php endif ?> diff --git a/plugins/Group_assign/Template/task/details.php b/plugins/Group_assign/Template/task/details.php new file mode 100644 index 00000000..907739bc --- /dev/null +++ b/plugins/Group_assign/Template/task/details.php @@ -0,0 +1,10 @@ + <li> + <strong><?= t('Assigned Group:') ?></strong> + <span> + <?php if ($task['assigned_groupname']): ?> + <span class="assigned-group" style="background-color: #<?= $this->task->groupColorExtension->getGroupColor($task['assigned_groupname']) ?>; color:<?= $this->task->groupColorExtension->getFontColor($this->task->groupColorExtension->getGroupColor($task['assigned_groupname'])) ?>;"><?= $this->text->e($task['assigned_groupname'] ?: $task['owner_gp']) ?></span> + <?php else: ?> + <?= t('not assigned') ?> + <?php endif ?> + </span> + </li> diff --git a/plugins/Group_assign/Template/task/multi.php b/plugins/Group_assign/Template/task/multi.php new file mode 100644 index 00000000..5c1fcfb0 --- /dev/null +++ b/plugins/Group_assign/Template/task/multi.php @@ -0,0 +1,6 @@ + <?php if ($task['owner_ms'] > 0 && count($this->task->multiselectMemberModel->getMembers($task['owner_ms'])) > 0) : ?> + <li> + <strong><?= t('Other Assignees:') ?></strong> + </li> + <?= $this->helper->smallAvatarHelperExtend->smallMultiple($task['owner_ms'], 'avatar-inline') ?> + <?php endif ?> diff --git a/plugins/Group_assign/Template/task_creation/show.php b/plugins/Group_assign/Template/task_creation/show.php new file mode 100644 index 00000000..81f610a8 --- /dev/null +++ b/plugins/Group_assign/Template/task_creation/show.php @@ -0,0 +1,50 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= t('New task') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('GroupAssignTaskCreationController', 'save', array('plugin' => 'Group_assign', 'project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <div class="task-form-container"> + <div class="task-form-main-column"> + <?= $this->task->renderTitleField($values, $errors) ?> + <?= $this->task->renderDescriptionField($values, $errors) ?> + <?= $this->task->renderDescriptionTemplateDropdown($project['id']) ?> + <?= $this->task->renderTagField($project) ?> + + <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="task-form-secondary-column"> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->helper->newTaskHelper->renderGroupField($values, $errors) ?> + <?= $this->helper->newTaskHelper->renderMultiAssigneeField($users_list, $values) ?> + <?= $this->task->renderCategoryField($categories_list, $values, $errors) ?> + <?= $this->task->renderSwimlaneField($swimlanes_list, $values, $errors) ?> + <?= $this->task->renderColumnField($columns_list, $values, $errors) ?> + <?= $this->task->renderPriorityField($project, $values) ?> + + <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="task-form-secondary-column"> + <?= $this->task->renderDueDateField($values, $errors) ?> + <?= $this->task->renderStartDateField($values, $errors) ?> + <?= $this->task->renderTimeEstimatedField($values, $errors) ?> + <?= $this->task->renderTimeSpentField($values, $errors) ?> + <?= $this->task->renderScoreField($values, $errors) ?> + <?= $this->task->renderReferenceField($values, $errors) ?> + + <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="task-form-bottom"> + <?php if (! isset($duplicate)): ?> + <?= $this->form->checkbox('another_task', t('Create another task'), 1, isset($values['another_task']) && $values['another_task'] == 1) ?> + <?= $this->form->checkbox('duplicate_multiple_projects', t('Duplicate to multiple projects'), 1) ?> + <?php endif ?> + + <?= $this->modal->submitButtons() ?> + </div> + </div> +</form> diff --git a/plugins/Group_assign/Template/task_modification/show.php b/plugins/Group_assign/Template/task_modification/show.php new file mode 100644 index 00000000..31599ef6 --- /dev/null +++ b/plugins/Group_assign/Template/task_modification/show.php @@ -0,0 +1,43 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= $this->text->e($task['title']) ?></h2> +</div> +<form method="post" action="<?= $this->url->href('GroupAssignTaskModificationController', 'update', array('plugin' => 'Group_assign', 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <div class="task-form-container"> + <div class="task-form-main-column"> + <?= $this->task->renderTitleField($values, $errors) ?> + <?= $this->task->renderDescriptionField($values, $errors) ?> + <?= $this->task->renderDescriptionTemplateDropdown($project['id']) ?> + <?= $this->task->renderTagField($project, $tags) ?> + + <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="task-form-secondary-column"> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->helper->newTaskHelper->renderGroupField($values, $errors) ?> + <?= $this->helper->newTaskHelper->renderMultiAssigneeField($users_list, $values) ?> + <?= $this->task->renderCategoryField($categories_list, $values, $errors) ?> + <?= $this->task->renderPriorityField($project, $values) ?> + + <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="task-form-secondary-column"> + <?= $this->task->renderDueDateField($values, $errors) ?> + <?= $this->task->renderStartDateField($values, $errors) ?> + <?= $this->task->renderTimeEstimatedField($values, $errors) ?> + <?= $this->task->renderTimeSpentField($values, $errors) ?> + <?= $this->task->renderScoreField($values, $errors) ?> + <?= $this->task->renderReferenceField($values, $errors) ?> + + <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> + </div> + + <div class="task-form-bottom"> + <?= $this->modal->submitButtons() ?> + </div> + </div> +</form> |