diff options
Diffstat (limited to 'app/Template')
198 files changed, 1331 insertions, 1661 deletions
diff --git a/app/Template/action/index.php b/app/Template/action/index.php index 7768a0b6..90db0450 100644 --- a/app/Template/action/index.php +++ b/app/Template/action/index.php @@ -2,12 +2,10 @@ <h2><?= t('Automatic actions for the project "%s"', $project['name']) ?></h2> <ul> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a new action'), 'ActionCreationController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new action'), 'ActionCreationController', 'create', array('project_id' => $project['id'])) ?> </li> <li> - <i class="fa fa-copy fa-fw"></i> - <?= $this->url->link(t('Import from another project'), 'ProjectActionDuplicationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('copy', t('Import from another project'), 'ProjectActionDuplicationController', 'show', array('project_id' => $project['id'])) ?> </li> </ul> </div> @@ -17,8 +15,8 @@ <?php else: ?> <table class="table-scrolling"> <tr> - <th><?= t('Automatic actions') ?></th> - <th><?= t('Action parameters') ?></th> + <th class="column-60"><?= t('Automatic actions') ?></th> + <th class="column-25"><?= t('Action parameters') ?></th> <th><?= t('Action') ?></th> </tr> @@ -65,7 +63,7 @@ </ul> </td> <td> - <?= $this->url->link(t('Remove'), 'ActionController', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ActionController', 'confirm', array('project_id' => $project['id'], 'action_id' => $action['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/action/remove.php b/app/Template/action/remove.php index 384bec7a..e3cdb206 100644 --- a/app/Template/action/remove.php +++ b/app/Template/action/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this action: "%s"?', $this->text->in($action['event_name'], $available_events).'/'.$this->text->in($action['action_name'], $available_actions)) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ActionController', 'remove', array('project_id' => $project['id'], 'action_id' => $action['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ActionController', + 'remove', + array('project_id' => $project['id'], 'action_id' => $action['id']) + ) ?> </div> diff --git a/app/Template/action_creation/create.php b/app/Template/action_creation/create.php index c0d2880e..862ee474 100644 --- a/app/Template/action_creation/create.php +++ b/app/Template/action_creation/create.php @@ -1,16 +1,14 @@ <div class="page-header"> <h2><?= t('Add an action') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ActionCreationController', 'event', array('project_id' => $project['id'])) ?>"> +<form method="post" action="<?= $this->url->href('ActionCreationController', 'event', array('project_id' => $project['id'])) ?>"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Action'), 'action_name') ?> <?= $this->form->select('action_name', $available_actions, $values) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Next step') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ActionController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons(array( + 'submitLabel' => t('Next step') + )) ?> </form> diff --git a/app/Template/action_creation/event.php b/app/Template/action_creation/event.php index cdf00310..e4166548 100644 --- a/app/Template/action_creation/event.php +++ b/app/Template/action_creation/event.php @@ -2,8 +2,7 @@ <h2><?= t('Choose an event') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ActionCreationController', 'params', array('project_id' => $project['id'])) ?>"> - +<form method="post" action="<?= $this->url->href('ActionCreationController', 'params', array('project_id' => $project['id'])) ?>"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> @@ -19,9 +18,7 @@ <?= t('When the selected event occurs execute the corresponding action.') ?> </div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Next step') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons(array( + 'submitLabel' => t('Next step') + )) ?> </form> diff --git a/app/Template/action_creation/params.php b/app/Template/action_creation/params.php index c9608f21..0cc98f50 100644 --- a/app/Template/action_creation/params.php +++ b/app/Template/action_creation/params.php @@ -2,8 +2,7 @@ <h2><?= t('Define action parameters') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ActionCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('ActionCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> @@ -50,9 +49,5 @@ <?php endif ?> <?php endforeach ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ActionController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/activity/project.php b/app/Template/activity/project.php index e8e62777..ce1f8bba 100644 --- a/app/Template/activity/project.php +++ b/app/Template/activity/project.php @@ -1,14 +1,12 @@ -<section id="main"> - <?= $this->projectHeader->render($project, 'ActivityController', $this->app->getRouterAction()) ?> +<div class="page-header"> + <h2><?= t('%s\'s activity', $project['name']) ?></h2> <?php if ($project['is_public']): ?> - <div class="menu-inline pull-right"> <ul> - <li><i class="fa fa-rss-square fa-fw"></i><?= $this->url->link(t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-calendar fa-fw"></i><?= $this->url->link(t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li> + <li><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li> + <li><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li> </ul> - </div> <?php endif ?> +</div> - <?= $this->render('event/events', array('events' => $events)) ?> -</section> +<?= $this->render('event/events', array('events' => $events)) ?> diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php index 929331a9..1af69c8b 100644 --- a/app/Template/analytic/avg_time_columns.php +++ b/app/Template/analytic/avg_time_columns.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Average time spent into each column') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Average time spent into each column') ?></h2> + </div> +<?php endif ?> <?php if (empty($metrics)): ?> <p class="alert"><?= t('Not enough data to show the graph.') ?></p> @@ -11,16 +13,16 @@ )) ?> <table class="table-striped"> - <tr> - <th><?= t('Column') ?></th> - <th><?= t('Average time spent') ?></th> - </tr> - <?php foreach ($metrics as $column): ?> - <tr> - <td><?= $this->text->e($column['title']) ?></td> - <td><?= $this->dt->duration($column['average']) ?></td> - </tr> - <?php endforeach ?> + <tr> + <th><?= t('Column') ?></th> + <th><?= t('Average time spent') ?></th> + </tr> + <?php foreach ($metrics as $column): ?> + <tr> + <td><?= $this->text->e($column['title']) ?></td> + <td><?= $this->dt->duration($column['average']) ?></td> + </tr> + <?php endforeach ?> </table> <p class="alert alert-info"> diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php index 674c76dd..d62c9ba0 100644 --- a/app/Template/analytic/burndown.php +++ b/app/Template/analytic/burndown.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Burndown chart') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Burndown chart') ?></h2> + </div> +<?php endif ?> <?php if (! $display_graph): ?> <p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p> @@ -15,20 +17,10 @@ <hr/> <form method="post" class="form-inline" action="<?= $this->url->href('AnalyticController', 'burndown', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - - <div class="form-inline-group"> - <?= $this->form->date(t('Start date'), 'from', $values) ?> - </div> - - <div class="form-inline-group"> - <?= $this->form->date(t('End date'), 'to', $values) ?> - </div> - - <div class="form-inline-group"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> - </div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Execute'))) ?> </form> <p class="alert alert-info"><?= t('This chart show the task complexity over the time (Work Remaining).') ?></p> diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php index 5eb42e82..dcd7b58f 100644 --- a/app/Template/analytic/cfd.php +++ b/app/Template/analytic/cfd.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Cumulative flow diagram') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Cumulative flow diagram') ?></h2> + </div> +<?php endif ?> <?php if (! $display_graph): ?> <p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p> @@ -14,18 +16,8 @@ <hr/> <form method="post" class="form-inline" action="<?= $this->url->href('AnalyticController', 'cfd', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - - <div class="form-inline-group"> - <?= $this->form->date(t('Start date'), 'from', $values) ?> - </div> - - <div class="form-inline-group"> - <?= $this->form->date(t('End date'), 'to', $values) ?> - </div> - - <div class="form-inline-group"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> - </div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Execute'))) ?> </form> diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php index e3c6099f..7159094c 100644 --- a/app/Template/analytic/layout.php +++ b/app/Template/analytic/layout.php @@ -1,10 +1,14 @@ -<section id="main"> +<?php if ($is_ajax): ?> + <div class="page-header"> + <h2><?= $title ?></h2> + </div> +<?php else: ?> <?= $this->projectHeader->render($project, 'TaskListController', 'show') ?> - <section class="sidebar-container"> - <?= $this->render($sidebar_template, array('project' => $project)) ?> +<?php endif ?> +<section class="sidebar-container"> + <?= $this->render($sidebar_template, array('project' => $project)) ?> - <div class="sidebar-content"> - <?= $content_for_sublayout ?> - </div> - </section> + <div class="sidebar-content"> + <?= $content_for_sublayout ?> + </div> </section> diff --git a/app/Template/analytic/lead_cycle_time.php b/app/Template/analytic/lead_cycle_time.php index d5908096..780b47b6 100644 --- a/app/Template/analytic/lead_cycle_time.php +++ b/app/Template/analytic/lead_cycle_time.php @@ -1,8 +1,10 @@ -<div class="page-header"> - <h2><?= t('Average Lead and Cycle time') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Average Lead and Cycle time') ?></h2> + </div> +<?php endif ?> -<div class="listing"> +<div class="panel"> <ul> <li><?= t('Average lead time: ').'<strong>'.$this->dt->duration($average['avg_lead_time']) ?></strong></li> <li><?= t('Average cycle time: ').'<strong>'.$this->dt->duration($average['avg_cycle_time']) ?></strong></li> @@ -19,20 +21,10 @@ )) ?> <form method="post" class="form-inline" action="<?= $this->url->href('AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - - <div class="form-inline-group"> - <?= $this->form->date(t('Start date'), 'from', $values) ?> - </div> - - <div class="form-inline-group"> - <?= $this->form->date(t('End date'), 'to', $values) ?> - </div> - - <div class="form-inline-group"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> - </div> + <?= $this->form->date(t('Start date'), 'from', $values) ?> + <?= $this->form->date(t('End date'), 'to', $values) ?> + <?= $this->modal->submitButtons(array('submitLabel' => t('Execute'))) ?> </form> <p class="alert alert-info"> diff --git a/app/Template/analytic/sidebar.php b/app/Template/analytic/sidebar.php index f768a11d..d5ce88cb 100644 --- a/app/Template/analytic/sidebar.php +++ b/app/Template/analytic/sidebar.php @@ -1,28 +1,27 @@ <div class="sidebar"> <ul> <li <?= $this->app->checkMenuSelection('AnalyticController', 'taskDistribution') ?>> - <?= $this->url->link(t('Task distribution'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Task distribution'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'userDistribution') ?>> - <?= $this->url->link(t('User repartition'), 'AnalyticController', 'userDistribution', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('User repartition'), 'AnalyticController', 'userDistribution', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'cfd') ?>> - <?= $this->url->link(t('Cumulative flow diagram'), 'AnalyticController', 'cfd', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Cumulative flow diagram'), 'AnalyticController', 'cfd', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'burndown') ?>> - <?= $this->url->link(t('Burndown chart'), 'AnalyticController', 'burndown', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Burndown chart'), 'AnalyticController', 'burndown', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'averageTimeByColumn') ?>> - <?= $this->url->link(t('Average time into each column'), 'AnalyticController', 'averageTimeByColumn', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Average time into each column'), 'AnalyticController', 'averageTimeByColumn', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'leadAndCycleTime') ?>> - <?= $this->url->link(t('Lead and cycle time'), 'AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Lead and cycle time'), 'AnalyticController', 'leadAndCycleTime', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('AnalyticController', 'timeComparison') ?>> - <?= $this->url->link(t('Estimated vs actual time'), 'AnalyticController', 'timeComparison', array('project_id' => $project['id'])) ?> + <?= $this->modal->replaceLink(t('Estimated vs actual time'), 'AnalyticController', 'timeComparison', array('project_id' => $project['id'])) ?> </li> <?= $this->hook->render('template:analytic:sidebar', array('project' => $project)) ?> - </ul> </div> diff --git a/app/Template/analytic/task_distribution.php b/app/Template/analytic/task_distribution.php index 1231856e..671d462f 100644 --- a/app/Template/analytic/task_distribution.php +++ b/app/Template/analytic/task_distribution.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('Task distribution') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Task distribution') ?></h2> + </div> +<?php endif ?> <?php if (empty($metrics)): ?> <p class="alert"><?= t('Not enough data to show the graph.') ?></p> diff --git a/app/Template/analytic/time_comparison.php b/app/Template/analytic/time_comparison.php index 31d0f53b..754c68f2 100644 --- a/app/Template/analytic/time_comparison.php +++ b/app/Template/analytic/time_comparison.php @@ -1,8 +1,10 @@ -<div class="page-header"> - <h2><?= t('Estimated vs actual time') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('Estimated vs actual time') ?></h2> + </div> +<?php endif ?> -<div class="listing"> +<div class="panel"> <ul> <li><?= t('Estimated hours: ').'<strong>'.$this->text->e($metrics['open']['time_estimated'] + $metrics['closed']['time_estimated']) ?></strong></li> <li><?= t('Actual hours: ').'<strong>'.$this->text->e($metrics['open']['time_spent'] + $metrics['closed']['time_spent']) ?></strong></li> @@ -27,9 +29,9 @@ <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'tasks.id') ?></th> <th><?= $paginator->order(t('Title'), 'tasks.title') ?></th> - <th class="column-5"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> - <th class="column-10"><?= $paginator->order(t('Estimated Time'), 'tasks.time_estimated') ?></th> - <th class="column-10"><?= $paginator->order(t('Actual Time'), 'tasks.time_spent') ?></th> + <th class="column-10"><?= $paginator->order(t('Status'), 'tasks.is_active') ?></th> + <th class="column-12"><?= $paginator->order(t('Estimated Time'), 'tasks.time_estimated') ?></th> + <th class="column-12"><?= $paginator->order(t('Actual Time'), 'tasks.time_spent') ?></th> </tr> <?php foreach ($paginator->getCollection() as $task): ?> <tr> diff --git a/app/Template/analytic/user_distribution.php b/app/Template/analytic/user_distribution.php index 76ac945c..cae6fa57 100644 --- a/app/Template/analytic/user_distribution.php +++ b/app/Template/analytic/user_distribution.php @@ -1,6 +1,8 @@ -<div class="page-header"> - <h2><?= t('User repartition') ?></h2> -</div> +<?php if (! $is_ajax): ?> + <div class="page-header"> + <h2><?= t('User repartition') ?></h2> + </div> +<?php endif ?> <?php if (empty($metrics)): ?> <p class="alert"><?= t('Not enough data to show the graph.') ?></p> diff --git a/app/Template/board/table_column.php b/app/Template/board/table_column.php index e2976f27..df16715f 100644 --- a/app/Template/board/table_column.php +++ b/app/Template/board/table_column.php @@ -14,7 +14,7 @@ <div class="board-column-expanded"> <?php if (! $not_editable && $this->projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?> <div class="board-add-icon"> - <?= $this->url->link('+', 'TaskCreationController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover', t('Add a new task')) ?> + <?= $this->modal->largeIcon('plus', t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?> </div> <?php endif ?> @@ -37,15 +37,13 @@ </li> <?php if ($this->projectRole->canCreateTaskInColumn($column['project_id'], $column['id'])): ?> <li> - <i class="fa fa-align-justify fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?> + <?= $this->modal->medium('align-justify', t('Create tasks in bulk'), 'TaskBulkController', 'show', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?> </li> <?php endif ?> <?php if ($column['nb_tasks'] > 0 && $this->projectRole->canChangeTaskStatusInColumn($column['project_id'], $column['id'])): ?> <li> - <i class="fa fa-close fa-fw"></i> - <?= $this->url->link(t('Close all tasks of this column'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?> + <?= $this->modal->confirm('close', t('Close all tasks of this column'), 'BoardPopoverController', 'confirmCloseColumnTasks', array('project_id' => $column['project_id'], 'column_id' => $column['id'], 'swimlane_id' => $swimlane['id'])) ?> </li> <?php endif ?> @@ -76,6 +74,7 @@ (<span id="task-number-column-<?= $column['id'] ?>"><?= $column['nb_tasks'] ?></span>) </span> <?php endif ?> + <?= $this->hook->render('template:board:column:header', array('swimlane' => $swimlane, 'column' => $column)) ?> </div> </th> diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index 83a582c6..15f1f713 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -10,7 +10,7 @@ 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, - 'popover' . (! empty($task['category_description']) ? ' tooltip' : ''), + 'js-modal-medium' . (! empty($task['category_description']) ? ' tooltip' : ''), ! empty($task['category_description']) ? $this->text->markdownAttribute($task['category_description']) : t('Change category') ) ?> <?php endif ?> diff --git a/app/Template/board/tooltip_files.php b/app/Template/board/tooltip_files.php index 4e704dac..5cb72741 100644 --- a/app/Template/board/tooltip_files.php +++ b/app/Template/board/tooltip_files.php @@ -9,9 +9,9 @@ </tr> <tr> <td> - <i class="fa fa-download fa-fw"></i><?= $this->url->link(t('download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + <?= $this->url->icon('download', t('download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?php if ($file['is_image'] == 1): ?> - <i class="fa fa-eye"></i> <?= $this->url->link(t('open file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->modal->large('eye', t('open file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> <?php endif ?> </td> </tr> diff --git a/app/Template/board_popover/close_all_tasks_column.php b/app/Template/board_popover/close_all_tasks_column.php index 57f703e3..ab7c2d47 100644 --- a/app/Template/board_popover/close_all_tasks_column.php +++ b/app/Template/board_popover/close_all_tasks_column.php @@ -1,18 +1,15 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Do you really want to close all tasks of this column?') ?></h2> - </div> - <form method="post" action="<?= $this->url->href('BoardPopoverController', 'closeColumnTasks', array('project_id' => $project['id'])) ?>"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('column_id', $values) ?> - <?= $this->form->hidden('swimlane_id', $values) ?> +<div class="page-header"> + <h2><?= t('Do you really want to close all tasks of this column?') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('BoardPopoverController', 'closeColumnTasks', array('project_id' => $project['id'])) ?>"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('column_id', $values) ?> + <?= $this->form->hidden('swimlane_id', $values) ?> - <p class="alert"><?= t('%d task(s) in the column "%s" and the swimlane "%s" will be closed.', $nb_tasks, $column, $swimlane) ?></p> + <p class="alert"><?= t('%d task(s) in the column "%s" and the swimlane "%s" will be closed.', $nb_tasks, $column, $swimlane) ?></p> - <div class="form-actions"> - <button type="submit" class="btn btn-red"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> - </form> -</section> + <?= $this->modal->submitButtons(array( + 'submitLabel' => t('Yes'), + 'color' => 'red', + )) ?> +</form> diff --git a/app/Template/category/edit.php b/app/Template/category/edit.php index d8ca313d..108826f3 100644 --- a/app/Template/category/edit.php +++ b/app/Template/category/edit.php @@ -2,8 +2,7 @@ <h2><?= t('Category modification for the project "%s"', $project['name']) ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('CategoryController', 'update', array('project_id' => $project['id'], 'category_id' => $values['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('CategoryController', 'update', array('project_id' => $project['id'], 'category_id' => $values['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -15,9 +14,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'CategoryController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/category/index.php b/app/Template/category/index.php index 336b79a2..e93138fd 100644 --- a/app/Template/category/index.php +++ b/app/Template/category/index.php @@ -15,12 +15,10 @@ <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> - <i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'CategoryController', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'CategoryController', 'edit', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> </li> <li> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'CategoryController', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'CategoryController', 'confirm', array('project_id' => $project['id'], 'category_id' => $category_id)) ?> </li> </ul> </div> diff --git a/app/Template/category/remove.php b/app/Template/category/remove.php index e7b9c9b4..79e8a560 100644 --- a/app/Template/category/remove.php +++ b/app/Template/category/remove.php @@ -1,17 +1,15 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove a category') ?></h2> - </div> +<div class="page-header"> + <h2><?= t('Remove a category') ?></h2> +</div> - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this category: "%s"?', $category['name']) ?> - </p> +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to remove this category: "%s"?', $category['name']) ?> + </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'CategoryController', 'remove', array('project_id' => $project['id'], 'category_id' => $category['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'CategoryController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> - </div> -</section> + <?= $this->modal->confirmButtons( + 'CategoryController', + 'remove', + array('project_id' => $project['id'], 'category_id' => $category['id']) + ) ?> +</div> diff --git a/app/Template/column/create.php b/app/Template/column/create.php index f4cded52..aad9606b 100644 --- a/app/Template/column/create.php +++ b/app/Template/column/create.php @@ -1,8 +1,7 @@ <div class="page-header"> <h2><?= t('Add a new column') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ColumnController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('ColumnController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> @@ -18,9 +17,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 4)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="5"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'column', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/column/edit.php b/app/Template/column/edit.php index a72a5c84..e590b5cc 100644 --- a/app/Template/column/edit.php +++ b/app/Template/column/edit.php @@ -2,8 +2,7 @@ <h2><?= t('Edit column "%s"', $column['title']) ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ColumnController', 'update', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('ColumnController', 'update', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -20,9 +19,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/column/index.php b/app/Template/column/index.php index 8c96a350..eaaae332 100644 --- a/app/Template/column/index.php +++ b/app/Template/column/index.php @@ -2,8 +2,7 @@ <h2><?= t('Edit the board for "%s"', $project['name']) ?></h2> <ul> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a new column'), 'ColumnController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new column'), 'ColumnController', 'create', array('project_id' => $project['id'])) ?> </li> </ul> </div> @@ -17,7 +16,8 @@ <thead> <tr> <th class="column-70"><?= t('Column title') ?></th> - <th class="column-25"><?= t('Task limit') ?></th> + <th class="column-10"><?= t('Task limit') ?></th> + <th class="column-20"><?= t('Visible on dashboard') ?></th> <th class="column-5"><?= t('Actions') ?></th> </tr> </thead> @@ -37,16 +37,17 @@ <?= $this->text->e($column['task_limit']) ?> </td> <td> + <?= $column['hide_in_dashboard'] == 1 ? t('Yes') : t('No') ?> + </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> - <i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'ColumnController', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'ColumnController', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> <li> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ColumnController', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ColumnController', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id'])) ?> </li> </ul> </div> diff --git a/app/Template/column/remove.php b/app/Template/column/remove.php index dc0a4712..4134b175 100644 --- a/app/Template/column/remove.php +++ b/app/Template/column/remove.php @@ -8,8 +8,9 @@ <?= t('This action will REMOVE ALL TASKS associated to this column!') ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ColumnController', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ColumnController', + 'remove', + array('project_id' => $project['id'], 'column_id' => $column['id']) + ) ?> </div> diff --git a/app/Template/column_move_restriction/create.php b/app/Template/column_move_restriction/create.php index 1eb6d539..852df971 100644 --- a/app/Template/column_move_restriction/create.php +++ b/app/Template/column_move_restriction/create.php @@ -1,24 +1,18 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('New drag and drop restriction for the role "%s"', $role['role']) ?></h2> - </div> - <form class="popover-form" method="post" action="<?= $this->url->href('ColumnMoveRestrictionController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->hidden('role_id', $values) ?> +<div class="page-header"> + <h2><?= t('New drag and drop restriction for the role "%s"', $role['role']) ?></h2> +</div> +<form method="post" action="<?= $this->url->href('ColumnMoveRestrictionController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('project_id', $values) ?> + <?= $this->form->hidden('role_id', $values) ?> - <?= $this->form->label(t('Source column'), 'src_column_id') ?> - <?= $this->form->select('src_column_id', $columns, $values, $errors) ?> + <?= $this->form->label(t('Source column'), 'src_column_id') ?> + <?= $this->form->select('src_column_id', $columns, $values, $errors) ?> - <?= $this->form->label(t('Destination column'), 'dst_column_id') ?> - <?= $this->form->select('dst_column_id', $columns, $values, $errors) ?> + <?= $this->form->label(t('Destination column'), 'dst_column_id') ?> + <?= $this->form->select('dst_column_id', $columns, $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> - <p class="alert alert-info"><?= t('People belonging to this role will be able to move tasks only between the source and the destination column.') ?></p> - </form> -</section> + <p class="alert alert-info"><?= t('People belonging to this role will be able to move tasks only between the source and the destination column.') ?></p> +</form> diff --git a/app/Template/column_move_restriction/remove.php b/app/Template/column_move_restriction/remove.php index 1985e167..4902cd23 100644 --- a/app/Template/column_move_restriction/remove.php +++ b/app/Template/column_move_restriction/remove.php @@ -7,8 +7,9 @@ <?= t('Do you really want to remove this column restriction: "%s" to "%s"?', $restriction['src_column_title'], $restriction['dst_column_title']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ColumnMoveRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ColumnMoveRestrictionController', + 'remove', + array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']) + ) ?> </div> diff --git a/app/Template/column_restriction/create.php b/app/Template/column_restriction/create.php index 982733b4..be158f19 100644 --- a/app/Template/column_restriction/create.php +++ b/app/Template/column_restriction/create.php @@ -1,22 +1,16 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('New column restriction for the role "%s"', $role['role']) ?></h2> - </div> - <form class="popover-form" method="post" action="<?= $this->url->href('ColumnRestrictionController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->hidden('role_id', $values) ?> +<div class="page-header"> + <h2><?= t('New column restriction for the role "%s"', $role['role']) ?></h2> +</div> +<form method="post" action="<?= $this->url->href('ColumnRestrictionController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('project_id', $values) ?> + <?= $this->form->hidden('role_id', $values) ?> - <?= $this->form->label(t('Rule'), 'rule') ?> - <?= $this->form->select('rule', $rules, $values, $errors) ?> + <?= $this->form->label(t('Rule'), 'rule') ?> + <?= $this->form->select('rule', $rules, $values, $errors) ?> - <?= $this->form->label(t('Column'), 'column_id') ?> - <?= $this->form->select('column_id', $columns, $values, $errors) ?> + <?= $this->form->label(t('Column'), 'column_id') ?> + <?= $this->form->select('column_id', $columns, $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> - </div> - </form> -</section> + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/column_restriction/remove.php b/app/Template/column_restriction/remove.php index 97650e2d..edbd9d6e 100644 --- a/app/Template/column_restriction/remove.php +++ b/app/Template/column_restriction/remove.php @@ -7,8 +7,9 @@ <?= t('Do you really want to remove this column restriction?') ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ColumnRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ColumnRestrictionController', + 'remove', + array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']) + ) ?> </div> diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index 02cb48eb..8a421759 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -1,16 +1,12 @@ <div class="page-header"> <h2><?= t('Add a comment') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', $values) ?> <?= $this->form->hidden('user_id', $values) ?> <?= $this->form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php index f295c8a7..04f6ffd4 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -2,7 +2,7 @@ <h2><?= t('Edit a comment') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('CommentController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('CommentController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('task_id', $values) ?> @@ -10,9 +10,5 @@ <?= $this->form->textEditor('comment', $values, $errors, array('autofocus' => true, 'required' => true)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 55587b67..03f16e00 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -13,9 +13,9 @@ 'hide_actions' => true )) ?> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'CommentController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'CommentController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']) + ) ?> </div> diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index 16a807bc..f8d9607e 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -7,7 +7,9 @@ <strong class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></strong> <?php endif ?> - <small class="comment-date"><?= $this->dt->datetime($comment['date_creation']) ?></small> + <small class="comment-date"><?= t('Created at:') ?> <?= $this->dt->datetime($comment['date_creation']) ?></small> + <small class="comment-date"><?= t('Updated at:')?> <?= $this->dt->datetime($comment['date_modification']) ?></small> + </div> <div class="comment-content"> @@ -25,12 +27,10 @@ </li> <?php if ($editable && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?> <li> - <i class="fa fa-remove fa-fw"></i> - <?= $this->url->link(t('remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?> </li> <li> - <i class="fa fa-edit fa-fw"></i> - <?= $this->url->link(t('edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/comments/show.php b/app/Template/comments/show.php index dfc13821..3edf7076 100644 --- a/app/Template/comments/show.php +++ b/app/Template/comments/show.php @@ -6,8 +6,7 @@ <?php if (!isset($is_public) || !$is_public): ?> <div class="comment-sorting"> <small> - <i class="fa fa-sort"></i> - <?= $this->url->link(t('change sorting'), 'CommentController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('sort', t('change sorting'), 'CommentController', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </small> </div> <?php endif ?> diff --git a/app/Template/config/about.php b/app/Template/config/about.php index 8d5a575d..3f078c3d 100644 --- a/app/Template/config/about.php +++ b/app/Template/config/about.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('About') ?></h2> </div> -<div class="listing"> +<div class="panel"> <ul> <li> <?= t('Official website:') ?> @@ -21,7 +21,7 @@ <div class="page-header"> <h2><?= t('Configuration') ?></h2> </div> -<div class="listing"> +<div class="panel"> <ul> <li> <?= t('Application version:') ?> @@ -58,7 +58,7 @@ <div class="page-header"> <h2><?= t('Database') ?></h2> </div> - <div class="listing"> + <div class="panel"> <ul> <li> <?= t('Database size:') ?> @@ -81,6 +81,6 @@ <div class="page-header"> <h2><?= t('License') ?></h2> </div> -<div class="listing"> +<div class="panel"> <?= nl2br(file_get_contents(ROOT_DIR.DIRECTORY_SEPARATOR.'LICENSE')) ?> </div> diff --git a/app/Template/config/api.php b/app/Template/config/api.php index 95f77355..9a3b06ce 100644 --- a/app/Template/config/api.php +++ b/app/Template/config/api.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('API') ?></h2> </div> -<section class="listing"> +<div class="panel"> <ul> <li> <?= t('API token:') ?> @@ -9,10 +9,10 @@ </li> <li> <?= t('API endpoint:') ?> - <input type="text" class="auto-select" readonly="readonly" value="<?= $this->url->base().'jsonrpc.php' ?>"> - </li> - <li> - <?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'api'), true) ?> + <strong><?= $this->url->base().'jsonrpc.php' ?></strong> </li> </ul> -</section> +</div> + +<?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'api'), true, 'btn btn-red') ?> + diff --git a/app/Template/config/application.php b/app/Template/config/application.php index 0f842f6e..d3d8c858 100644 --- a/app/Template/config/application.php +++ b/app/Template/config/application.php @@ -2,33 +2,35 @@ <h2><?= t('Application settings') ?></h2> </div> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'application')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Application URL'), 'application_url') ?> - <?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?> - <p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p> - - <?= $this->form->label(t('Language'), 'application_language') ?> - <?= $this->form->select('application_language', $languages, $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Application URL'), 'application_url') ?> + <?= $this->form->text('application_url', $values, $errors, array('placeholder="http://example.kanboard.net/"')) ?> + <p class="form-help"><?= t('Example: http://example.kanboard.net/ (used to generate absolute URLs)') ?></p> - <?= $this->form->label(t('Timezone'), 'application_timezone') ?> - <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?> + <?= $this->form->label(t('Language'), 'application_language') ?> + <?= $this->form->select('application_language', $languages, $values, $errors) ?> - <?= $this->form->label(t('Date format'), 'application_date_format') ?> - <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?> - <p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p> + <?= $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> + </fieldset> - <?= $this->form->label(t('Date and time format'), 'application_datetime_format') ?> - <?= $this->form->select('application_datetime_format', $datetime_formats, $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Timezone'), 'application_timezone') ?> + <?= $this->form->select('application_timezone', $timezones, $values, $errors) ?> - <?= $this->form->label(t('Time format'), 'application_time_format') ?> - <?= $this->form->select('application_time_format', $time_formats, $values, $errors) ?> + <?= $this->form->label(t('Date format'), 'application_date_format') ?> + <?= $this->form->select('application_date_format', $date_formats, $values, $errors) ?> + <p class="form-help"><?= t('ISO format is always accepted, example: "%s" and "%s"', date('Y-m-d'), date('Y_m_d')) ?></p> - <?= $this->form->checkbox('password_reset', t('Enable "Forget Password"'), 1, $values['password_reset'] == 1) ?> + <?= $this->form->label(t('Time format'), 'application_time_format') ?> + <?= $this->form->select('application_time_format', $time_formats, $values, $errors) ?> + </fieldset> - <?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> - <?= $this->form->textarea('application_stylesheet', $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Custom Stylesheet'), 'application_stylesheet') ?> + <?= $this->form->textarea('application_stylesheet', $values, $errors) ?> + </fieldset> <?= $this->hook->render('template:config:application', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/config/board.php b/app/Template/config/board.php index 62a736e7..35058f0f 100644 --- a/app/Template/config/board.php +++ b/app/Template/config/board.php @@ -2,20 +2,21 @@ <h2><?= t('Board settings') ?></h2> </div> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'board')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?> - <?= $this->form->number('board_highlight_period', $values, $errors) ?> - <p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p> + <fieldset> + <?= $this->form->label(t('Task highlight period'), 'board_highlight_period') ?> + <?= $this->form->number('board_highlight_period', $values, $errors) ?> + <p class="form-help"><?= t('Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)') ?></p> - <?= $this->form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?> - <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?> - <p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p> + <?= $this->form->label(t('Refresh interval for public board'), 'board_public_refresh_interval') ?> + <?= $this->form->number('board_public_refresh_interval', $values, $errors) ?> + <p class="form-help"><?= t('Frequency in second (60 seconds by default)') ?></p> - <?= $this->form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?> - <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?> - <p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p> + <?= $this->form->label(t('Refresh interval for private board'), 'board_private_refresh_interval') ?> + <?= $this->form->number('board_private_refresh_interval', $values, $errors) ?> + <p class="form-help"><?= t('Frequency in second (0 to disable this feature, 10 seconds by default)') ?></p> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> diff --git a/app/Template/config/calendar.php b/app/Template/config/calendar.php index 90e034e9..0cc3d064 100644 --- a/app/Template/config/calendar.php +++ b/app/Template/config/calendar.php @@ -1,34 +1,36 @@ <div class="page-header"> <h2><?= t('Calendar settings') ?></h2> </div> -<section> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'calendar')) ?>" autocomplete="off"> <?= $this->form->csrf() ?> - <div class="listing"> - <h3><?= t('Project calendar view') ?></h3> + <fieldset> + <legend><?= t('Project calendar view') ?></legend> <?= $this->form->radios('calendar_project_tasks', array( 'date_creation' => t('Show tasks based on the creation date'), 'date_started' => t('Show tasks based on the start date'), - ), $values) ?> - </div> + ), + $values + ) ?> + </fieldset> - <div class="listing"> - <h3><?= t('User calendar view') ?></h3> + <fieldset> + <legend><?= t('User calendar view') ?></legend> <?= $this->form->radios('calendar_user_tasks', array( 'date_creation' => t('Show tasks based on the creation date'), 'date_started' => t('Show tasks based on the start date'), - ), $values) ?> - </div> + ), + $values + ) ?> + </fieldset> - <div class="listing"> - <h3><?= t('Subtasks time tracking') ?></h3> + <fieldset> + <legend><?= t('Subtasks time tracking') ?></legend> <?= $this->form->checkbox('calendar_user_subtasks_time_tracking', t('Show subtasks based on the time tracking'), 1, $values['calendar_user_subtasks_time_tracking'] == 1) ?> - </div> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> </div> </form> -</section> diff --git a/app/Template/config/email.php b/app/Template/config/email.php index 6ff76eca..bc2c2ae5 100644 --- a/app/Template/config/email.php +++ b/app/Template/config/email.php @@ -4,11 +4,14 @@ <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'email')) ?>" autocomplete="off"> <?= $this->form->csrf() ?> - <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?> - <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> + <fieldset> + <legend><?= t('Outgoing Emails') ?></legend> + <?= $this->form->label(t('Email sender address'), 'mail_sender_address') ?> + <?= $this->form->text('mail_sender_address', $values, $errors, array('placeholder="'.MAIL_FROM.'"')) ?> - <?= $this->form->label(t('Email transport'), 'mail_transport') ?> - <?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?> + <?= $this->form->label(t('Email transport'), 'mail_transport') ?> + <?= $this->form->select('mail_transport', $mail_transports, $values, $errors) ?> + </fieldset> <?= $this->hook->render('template:config:email', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/config/integrations.php b/app/Template/config/integrations.php index 3ba4e865..07a90ce2 100644 --- a/app/Template/config/integrations.php +++ b/app/Template/config/integrations.php @@ -7,11 +7,11 @@ <?= $this->hook->render('template:config:integrations', array('values' => $values)) ?> <h3><img src="<?= $this->url->dir() ?>assets/img/gravatar-icon.png"/> <?= t('Gravatar') ?></h3> - <div class="listing"> + <div class="panel"> <?= $this->form->checkbox('integration_gravatar', t('Enable Gravatar images'), 1, $values['integration_gravatar'] == 1) ?> + <div class="form-actions"> + <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> + </div> </div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> </form> diff --git a/app/Template/config/keyboard_shortcuts.php b/app/Template/config/keyboard_shortcuts.php index 1b1a9477..6ac71ee0 100644 --- a/app/Template/config/keyboard_shortcuts.php +++ b/app/Template/config/keyboard_shortcuts.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Keyboard shortcuts') ?></h2> </div> -<div class="listing"> +<div class="panel"> <h3><?= t('Board/Calendar/List view') ?></h3> <ul> <li><?= t('Switch to the project overview') ?> = <strong>v o</strong></li> diff --git a/app/Template/config/project.php b/app/Template/config/project.php index 6d8d131a..514a9baa 100644 --- a/app/Template/config/project.php +++ b/app/Template/config/project.php @@ -2,24 +2,27 @@ <h2><?= t('Project settings') ?></h2> </div> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'project')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Default task color'), 'default_color') ?> - <?= $this->form->select('default_color', $colors, $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Default task color'), 'default_color') ?> + <?= $this->form->select('default_color', $colors, $values, $errors) ?> - <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> - <?= $this->form->text('board_columns', $values, $errors) ?> - <p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p> + <?= $this->form->label(t('Default columns for new projects (Comma-separated)'), 'board_columns') ?> + <?= $this->form->text('board_columns', $values, $errors) ?> + <p class="form-help"><?= t('Default values are "%s"', $default_columns) ?></p> - <?= $this->form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?> - <?= $this->form->text('project_categories', $values, $errors) ?> - <p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p> + <?= $this->form->label(t('Default categories for new projects (Comma-separated)'), 'project_categories') ?> + <?= $this->form->text('project_categories', $values, $errors) ?> + <p class="form-help"><?= t('Example: "Bug, Feature Request, Improvement"') ?></p> + </fieldset> - <?= $this->form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> - <?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> - <?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> - <?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> + <fieldset> + <?= $this->form->checkbox('disable_private_project', t('Disable private projects'), 1, isset($values['disable_private_project']) && $values['disable_private_project'] == 1) ?> + <?= $this->form->checkbox('subtask_restriction', t('Allow only one subtask in progress at the same time for a user'), 1, $values['subtask_restriction'] == 1) ?> + <?= $this->form->checkbox('subtask_time_tracking', t('Trigger automatically subtask time tracking'), 1, $values['subtask_time_tracking'] == 1) ?> + <?= $this->form->checkbox('cfd_include_closed_tasks', t('Include closed tasks in the cumulative flow diagram'), 1, $values['cfd_include_closed_tasks'] == 1) ?> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> diff --git a/app/Template/config/sidebar.php b/app/Template/config/sidebar.php index 239edc19..95be963b 100644 --- a/app/Template/config/sidebar.php +++ b/app/Template/config/sidebar.php @@ -22,10 +22,10 @@ <?= $this->url->link(t('Tags management'), 'TagController', 'index') ?> </li> <li <?= $this->app->checkMenuSelection('LinkController') ?>> - <?= $this->url->link(t('Link settings'), 'LinkController', 'index') ?> + <?= $this->url->link(t('Link labels'), 'LinkController', 'show') ?> </li> - <li <?= $this->app->checkMenuSelection('CurrencyController', 'index') ?>> - <?= $this->url->link(t('Currency rates'), 'CurrencyController', 'index') ?> + <li <?= $this->app->checkMenuSelection('CurrencyController') ?>> + <?= $this->url->link(t('Currency rates'), 'CurrencyController', 'show') ?> </li> <li <?= $this->app->checkMenuSelection('ConfigController', 'integrations') ?>> <?= $this->url->link(t('Integrations'), 'ConfigController', 'integrations') ?> diff --git a/app/Template/config/webhook.php b/app/Template/config/webhook.php index e3245873..bc4bbfdf 100644 --- a/app/Template/config/webhook.php +++ b/app/Template/config/webhook.php @@ -1,9 +1,7 @@ <div class="page-header"> <h2><?= t('Webhook settings') ?></h2> </div> -<section> <form method="post" action="<?= $this->url->href('ConfigController', 'save', array('redirect' => 'webhook')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> <?= $this->form->label(t('Webhook URL'), 'webhook_url') ?> @@ -13,19 +11,13 @@ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> </div> </form> -</section> -<div class="page-header"> +<div class="page-header margin-top"> <h2><?= t('Webhook token') ?></h2> </div> -<section class="listing"> - <ul> - <li> - <?= t('Webhook token:') ?> - <strong><?= $this->text->e($values['webhook_token']) ?></strong> - </li> - <li> - <?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'webhook'), true) ?> - </li> - </ul> -</section> +<div class="panel"> + <?= t('Webhook token:') ?> + <strong><?= $this->text->e($values['webhook_token']) ?></strong> +</div> + +<?= $this->url->link(t('Reset token'), 'ConfigController', 'token', array('type' => 'webhook'), true, 'btn btn-red') ?> diff --git a/app/Template/currency/change.php b/app/Template/currency/change.php new file mode 100644 index 00000000..59a7ce37 --- /dev/null +++ b/app/Template/currency/change.php @@ -0,0 +1,9 @@ +<div class="page-header"> + <h2><?= t('Change reference currency') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('CurrencyController', 'update') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->label(t('Reference currency'), 'application_currency') ?> + <?= $this->form->select('application_currency', $currencies, $values, $errors) ?> + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/currency/create.php b/app/Template/currency/create.php new file mode 100644 index 00000000..578ece81 --- /dev/null +++ b/app/Template/currency/create.php @@ -0,0 +1,11 @@ +<div class="page-header"> + <h2><?= t('Add or change currency rate') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('CurrencyController', 'save') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->label(t('Currency'), 'currency') ?> + <?= $this->form->select('currency', $currencies, $values, $errors) ?> + <?= $this->form->label(t('Rate'), 'rate') ?> + <?= $this->form->text('rate', $values, $errors, array('autofocus'), 'form-numeric') ?> + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/currency/index.php b/app/Template/currency/index.php deleted file mode 100644 index db9b21af..00000000 --- a/app/Template/currency/index.php +++ /dev/null @@ -1,54 +0,0 @@ -<div class="page-header"> - <h2><?= t('Currency rates') ?></h2> -</div> - -<?php if (! empty($rates)): ?> - -<table class="table-striped"> - <tr> - <th class="column-35"><?= t('Currency') ?></th> - <th><?= t('Rate') ?></th> - </tr> - <?php foreach ($rates as $rate): ?> - <tr> - <td> - <strong><?= $this->text->e($rate['currency']) ?></strong> - </td> - <td> - <?= n($rate['rate']) ?> - </td> - </tr> - <?php endforeach ?> -</table> - -<hr/> -<h3><?= t('Change reference currency') ?></h3> -<?php endif ?> -<form method="post" action="<?= $this->url->href('CurrencyController', 'reference') ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->label(t('Reference currency'), 'application_currency') ?> - <?= $this->form->select('application_currency', $currencies, $config_values, $errors) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> - -<hr/> -<h3><?= t('Add a new currency rate') ?></h3> -<form method="post" action="<?= $this->url->href('CurrencyController', 'create') ?>" autocomplete="off"> - - <?= $this->form->csrf() ?> - - <?= $this->form->label(t('Currency'), 'currency') ?> - <?= $this->form->select('currency', $currencies, $values, $errors) ?> - - <?= $this->form->label(t('Rate'), 'rate') ?> - <?= $this->form->text('rate', $values, $errors, array(), 'form-numeric') ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> diff --git a/app/Template/currency/show.php b/app/Template/currency/show.php new file mode 100644 index 00000000..4b7f34bc --- /dev/null +++ b/app/Template/currency/show.php @@ -0,0 +1,34 @@ +<div class="page-header"> + <h2><?= t('Currency rates') ?></h2> + <ul> + <li> + <?= $this->modal->medium('plus', t('Add or change currency rate'), 'CurrencyController', 'create') ?> + </li> + <li> + <?= $this->modal->medium('edit', t('Change reference currency'), 'CurrencyController', 'change') ?> + </li> + </ul> +</div> + +<div class="panel"> + <strong><?= t('Reference currency: %s', $application_currency) ?></strong> +</div> + +<?php if (! empty($rates)): ?> + <table class="table-striped"> + <tr> + <th class="column-35"><?= t('Currency') ?></th> + <th><?= t('Rate') ?></th> + </tr> + <?php foreach ($rates as $rate): ?> + <tr> + <td> + <strong><?= $this->text->e($rate['currency']) ?></strong> + </td> + <td> + <?= n($rate['rate']) ?> + </td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?> diff --git a/app/Template/custom_filter/add.php b/app/Template/custom_filter/create.php index 3801cc30..24e896ee 100644 --- a/app/Template/custom_filter/add.php +++ b/app/Template/custom_filter/create.php @@ -2,23 +2,20 @@ <h2><?= t('Add a new filter') ?></h2> </div> <form method="post" action="<?= $this->url->href('CustomFilterController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors, array('required', 'maxlength="100"')) ?> + <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?> <?= $this->form->label(t('Filter'), 'filter') ?> <?= $this->form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?> - <?php if ($this->user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> <?= $this->form->checkbox('is_shared', t('Share with all project members'), 1) ?> <?php endif ?> <?= $this->form->checkbox('append', t('Append filter (instead of replacement)'), 1) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/custom_filter/edit.php b/app/Template/custom_filter/edit.php index 26da8da2..b64dee53 100644 --- a/app/Template/custom_filter/edit.php +++ b/app/Template/custom_filter/edit.php @@ -2,8 +2,7 @@ <h2><?= t('Edit custom filter') ?></h2> </div> -<form class="form-popover" method="post" action="<?= $this->url->href('CustomFilterController', 'update', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('CustomFilterController', 'update', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -16,7 +15,7 @@ <?= $this->form->label(t('Filter'), 'filter') ?> <?= $this->form->text('filter', $values, $errors, array('required', 'maxlength="100"')) ?> - <?php if ($this->user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> <?= $this->form->checkbox('is_shared', t('Share with all project members'), 1, $values['is_shared'] == 1) ?> <?php else: ?> <?= $this->form->hidden('is_shared', $values) ?> @@ -24,9 +23,5 @@ <?= $this->form->checkbox('append', t('Append filter (instead of replacement)'), 1, $values['append'] == 1) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'CustomFilterController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/custom_filter/index.php b/app/Template/custom_filter/index.php index dcab891b..9475c278 100644 --- a/app/Template/custom_filter/index.php +++ b/app/Template/custom_filter/index.php @@ -1,8 +1,12 @@ -<?php if (! empty($custom_filters)): ?> <div class="page-header"> <h2><?= t('Custom filters') ?></h2> + <ul> + <li> + <?= $this->modal->medium('filter', t('Add custom filters'), 'CustomFilterController', 'create', array('project_id' => $project['id'])) ?> + </li> + </ul> </div> -<div> +<?php if (! empty($custom_filters)): ?> <table class="table-striped table-scrolling"> <tr> <th class="column-15"><?= t('Name') ?></th> @@ -36,8 +40,8 @@ <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->url->link(t('Remove'), 'CustomFilterController', 'confirm', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id']), false, 'popover') ?></li> - <li><?= $this->url->link(t('Edit'), 'CustomFilterController', 'edit', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id']), false, 'popover') ?></li> + <li><?= $this->modal->medium('edit', t('Edit'), 'CustomFilterController', 'edit', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li> + <li><?= $this->modal->confirm('trash-o', t('Remove'), 'CustomFilterController', 'confirm', array('project_id' => $filter['project_id'], 'filter_id' => $filter['id'])) ?></li> </ul> </div> <?php endif ?> @@ -45,7 +49,7 @@ </tr> <?php endforeach ?> </table> -</div> +<?php else: ?> + <p class="alert"><?= t('There is no custom filter.') ?></p> <?php endif ?> -<?= $this->render('custom_filter/add', array('project' => $project, 'values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/custom_filter/remove.php b/app/Template/custom_filter/remove.php index 609f19b2..1c576fa2 100644 --- a/app/Template/custom_filter/remove.php +++ b/app/Template/custom_filter/remove.php @@ -1,17 +1,15 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove a custom filter') ?></h2> - </div> +<div class="page-header"> + <h2><?= t('Remove a custom filter') ?></h2> +</div> - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this custom filter: "%s"?', $filter['name']) ?> - </p> +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to remove this custom filter: "%s"?', $filter['name']) ?> + </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'CustomFilterController', 'remove', array('project_id' => $project['id'], 'filter_id' => $filter['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'CustomFilterController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> - </div> -</section> + <?= $this->modal->confirmButtons( + 'CustomFilterController', + 'remove', + array('project_id' => $project['id'], 'filter_id' => $filter['id']) + ) ?> +</div> diff --git a/app/Template/dashboard/layout.php b/app/Template/dashboard/layout.php index 795537a6..15ab8a1a 100644 --- a/app/Template/dashboard/layout.php +++ b/app/Template/dashboard/layout.php @@ -3,23 +3,19 @@ <ul> <?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('New project'), 'ProjectCreationController', 'create', array(), false, 'popover') ?> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> </li> <?php endif ?> <?php if ($this->app->config('disable_private_project', 0) == 0): ?> <li> - <i class="fa fa-lock fa-fw"></i> - <?= $this->url->link(t('New private project'), 'ProjectCreationController', 'createPrivate', array(), false, 'popover') ?> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> </li> <?php endif ?> <li> - <i class="fa fa-search fa-fw"></i> - <?= $this->url->link(t('Search'), 'SearchController', 'index') ?> + <?= $this->url->icon('search', t('Search'), 'SearchController', 'index') ?> </li> <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('Project management'), 'ProjectListController', 'show') ?> + <?= $this->url->icon('folder', t('Project management'), 'ProjectListController', 'show') ?> </li> </ul> </div> diff --git a/app/Template/dashboard/notifications.php b/app/Template/dashboard/notifications.php index 4fb59e24..81adb348 100644 --- a/app/Template/dashboard/notifications.php +++ b/app/Template/dashboard/notifications.php @@ -7,8 +7,7 @@ <?php else: ?> <ul> <li> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Mark all as read'), 'WebNotificationController', 'flush', array('user_id' => $user['id'])) ?> + <?= $this->url->icon('check-square-o', t('Mark all as read'), 'WebNotificationController', 'flush', array('user_id' => $user['id'])) ?> </li> </ul> </div> @@ -60,8 +59,7 @@ <?= $this->dt->datetime($notification['date_creation']) ?> </td> <td> - <i class="fa fa-check fa-fw"></i> - <?= $this->url->link(t('Mark as read'), 'WebNotificationController', 'remove', array('user_id' => $user['id'], 'notification_id' => $notification['id'])) ?> + <?= $this->url->icon('check', t('Mark as read'), 'WebNotificationController', 'remove', array('user_id' => $user['id'], 'notification_id' => $notification['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/dashboard/show.php b/app/Template/dashboard/show.php index aec6f591..b1d877cf 100644 --- a/app/Template/dashboard/show.php +++ b/app/Template/dashboard/show.php @@ -1,4 +1,4 @@ -<div class="filter-box"> +<div class="filter-box margin-bottom"> <form method="get" action="<?= $this->url->dir() ?>" class="search"> <?= $this->form->hidden('controller', array('controller' => 'SearchController')) ?> <?= $this->form->hidden('action', array('action' => 'index')) ?> diff --git a/app/Template/doc/show.php b/app/Template/doc/show.php index a8dbd762..879e45b6 100644 --- a/app/Template/doc/show.php +++ b/app/Template/doc/show.php @@ -2,8 +2,7 @@ <div class="page-header"> <ul> <li> - <i class="fa fa-life-ring fa-fw"></i> - <?= $this->url->link(t('Table of contents'), 'DocumentationController', 'show', array('file' => 'index')) ?> + <?= $this->url->icon('life-ring', t('Table of contents'), 'DocumentationController', 'show', array('file' => 'index')) ?> </li> </ul> </div> diff --git a/app/Template/export/header.php b/app/Template/export/header.php new file mode 100644 index 00000000..35591352 --- /dev/null +++ b/app/Template/export/header.php @@ -0,0 +1,17 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= $title ?></h2> + <ul> + <li <?= $this->app->checkMenuSelection('ExportController', 'tasks') ?>> + <?= $this->modal->replaceLink(t('Tasks'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('ExportController', 'subtasks') ?>> + <?= $this->modal->replaceLink(t('Subtasks'), 'ExportController', 'subtasks', array('project_id' => $project['id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('ExportController', 'transitions') ?>> + <?= $this->modal->replaceLink(t('Task transitions'), 'ExportController', 'transitions', array('project_id' => $project['id'])) ?> + </li> + <li <?= $this->app->checkMenuSelection('ExportController', 'summary') ?>> + <?= $this->modal->replaceLink(t('Daily project summary'), 'ExportController', 'summary', array('project_id' => $project['id'])) ?> + </li> + </ul> +</div> diff --git a/app/Template/export/sidebar.php b/app/Template/export/sidebar.php deleted file mode 100644 index 463c0cee..00000000 --- a/app/Template/export/sidebar.php +++ /dev/null @@ -1,17 +0,0 @@ -<div class="sidebar"> - <ul> - <li <?= $this->app->checkMenuSelection('ExportController', 'tasks') ?>> - <?= $this->url->link(t('Tasks'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('ExportController', 'subtasks') ?>> - <?= $this->url->link(t('Subtasks'), 'ExportController', 'subtasks', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('ExportController', 'transitions') ?>> - <?= $this->url->link(t('Task transitions'), 'ExportController', 'transitions', array('project_id' => $project['id'])) ?> - </li> - <li <?= $this->app->checkMenuSelection('ExportController', 'summary') ?>> - <?= $this->url->link(t('Daily project summary'), 'ExportController', 'summary', array('project_id' => $project['id'])) ?> - </li> - <?= $this->hook->render('template:export:sidebar') ?> - </ul> -</div> diff --git a/app/Template/export/subtasks.php b/app/Template/export/subtasks.php index 959f0e47..0e47772b 100644 --- a/app/Template/export/subtasks.php +++ b/app/Template/export/subtasks.php @@ -1,20 +1,16 @@ -<div class="page-header"> - <h2><?= t('Subtasks export') ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <p class="alert alert-info"><?= t('This report contains all subtasks information for the given date range.') ?></p> -<form method="get" action="?" autocomplete="off"> - - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'subtasks', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->date(t('Start date'), 'from', $values) ?> <?= $this->form->date(t('End date'), 'to', $values) ?> - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'subtasks', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> </form> diff --git a/app/Template/export/summary.php b/app/Template/export/summary.php index a7483fcb..7dc7482f 100644 --- a/app/Template/export/summary.php +++ b/app/Template/export/summary.php @@ -1,20 +1,16 @@ -<div class="page-header"> - <h2><?= t('Daily project summary export') ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <p class="alert alert-info"><?= t('This export contains the number of tasks per column grouped per day.') ?></p> -<form method="get" action="?" autocomplete="off"> - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'summary', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->date(t('Start date'), 'from', $values) ?> <?= $this->form->date(t('End date'), 'to', $values) ?> - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'summary', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> </form> diff --git a/app/Template/export/tasks.php b/app/Template/export/tasks.php index ce1c869e..232ff8eb 100644 --- a/app/Template/export/tasks.php +++ b/app/Template/export/tasks.php @@ -1,20 +1,16 @@ -<div class="page-header"> - <h2><?= t('Tasks exportation') ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <p class="alert alert-info"><?= t('This report contains all tasks information for the given date range.') ?></p> -<form method="get" action="?" autocomplete="off"> - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'tasks', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->date(t('Start date'), 'from', $values) ?> <?= $this->form->date(t('End date'), 'to', $values) ?> - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'tasks', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> </form> diff --git a/app/Template/export/transitions.php b/app/Template/export/transitions.php index 7cd355db..4f3749b8 100644 --- a/app/Template/export/transitions.php +++ b/app/Template/export/transitions.php @@ -1,21 +1,16 @@ -<div class="page-header"> - <h2><?= t('Task transitions export') ?></h2> -</div> +<?= $this->render('export/header', array('project' => $project, 'title' => $title)) ?> <p class="alert alert-info"><?= t('This report contains all column moves for each task with the date, the user and the time spent for each transition.') ?></p> -<form method="get" action="?" autocomplete="off"> - - <?= $this->form->hidden('controller', $values) ?> - <?= $this->form->hidden('action', $values) ?> +<form class="js-modal-ignore-form" method="post" action="<?= $this->url->href('ExportController', 'transitions', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->date(t('Start date'), 'from', $values) ?> <?= $this->form->date(t('End date'), 'to', $values) ?> - <div class="form-help"><?= t('Others formats accepted: %s and %s', date('Y-m-d'), date('Y_m_d')) ?></div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Execute') ?></button> + <button type="submit" class="btn btn-blue js-form-export"><?= t('Export') ?></button> + <?= t('or') ?> + <?= $this->url->link(t('cancel'), 'ExportController', 'transitions', array('project_id' => $project['id']), false, 'js-modal-close') ?> </div> </form> diff --git a/app/Template/external_task_creation/step1.php b/app/Template/external_task_creation/step1.php index 2af9b427..2a3b0144 100644 --- a/app/Template/external_task_creation/step1.php +++ b/app/Template/external_task_creation/step1.php @@ -1,4 +1,4 @@ -<form class="popover-form" method="post" action="<?= $this->url->href('ExternalTaskCreationController', 'step2', array('project_id' => $project['id'], 'provider_name' => $provider_name)) ?>"> +<form method="post" action="<?= $this->url->href('ExternalTaskCreationController', 'step2', array('project_id' => $project['id'], 'provider_name' => $provider_name)) ?>"> <?= $this->form->csrf() ?> <?= $this->form->hidden('swimlane_id', $values) ?> <?= $this->form->hidden('column_id', $values) ?> @@ -12,8 +12,5 @@ <div class="alert alert-error"><?= $this->text->e($error_message) ?></div> <?php endif ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Next') ?></button> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons(array('submitLabel' => t('Next'))) ?> </form> diff --git a/app/Template/external_task_creation/step2.php b/app/Template/external_task_creation/step2.php index 4bc0e509..baace3ae 100644 --- a/app/Template/external_task_creation/step2.php +++ b/app/Template/external_task_creation/step2.php @@ -1,4 +1,4 @@ -<form class="popover-form" method="post" action="<?= $this->url->href('ExternalTaskCreationController', 'step3', array('project_id' => $project['id'], 'provider_name' => $provider_name)) ?>"> +<form method="post" action="<?= $this->url->href('ExternalTaskCreationController', 'step3', array('project_id' => $project['id'], 'provider_name' => $provider_name)) ?>"> <?= $this->form->csrf() ?> <?= $this->form->hidden('external_provider', $values) ?> <?= $this->form->hidden('external_uri', $values) ?> @@ -18,8 +18,5 @@ <div class="alert alert-error"><?= $this->text->e($error_message) ?></div> <?php endif ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/external_task_modification/show.php b/app/Template/external_task_modification/show.php index 79dd9556..55180b96 100644 --- a/app/Template/external_task_modification/show.php +++ b/app/Template/external_task_modification/show.php @@ -1,4 +1,4 @@ -<form class="popover-form" method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $project['id'])) ?>"> +<form method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $project['id'])) ?>"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> @@ -18,9 +18,5 @@ )) ?> <?php endif ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/group/associate.php b/app/Template/group/associate.php index 24edd133..cd7f2b77 100644 --- a/app/Template/group/associate.php +++ b/app/Template/group/associate.php @@ -3,8 +3,11 @@ </div> <?php if (empty($users)): ?> <p class="alert"><?= t('There is no user available.') ?></p> + <div class="form-actions"> + <?= $this->url->link(t('Close this window'), 'GroupListController', 'index', array(), false, 'btn js-modal-close') ?> + </div> <?php else: ?> - <form class="popover-form" method="post" action="<?= $this->url->href('GroupListController', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('GroupListController', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('group_id', $values) ?> @@ -12,13 +15,9 @@ <?= $this->app->component('select-dropdown-autocomplete', array( 'name' => 'user_id', 'items' => $users, - 'defaultValue' => isset($values['user_id']) ? $values['user_id'] : null, + 'defaultValue' => isset($values['user_id']) ? $values['user_id'] : key($users), )) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php endif ?> diff --git a/app/Template/group/dissociate.php b/app/Template/group/dissociate.php index 50ef6d61..24836397 100644 --- a/app/Template/group/dissociate.php +++ b/app/Template/group/dissociate.php @@ -4,9 +4,9 @@ <div class="confirm"> <p class="alert alert-info"><?= t('Do you really want to remove the user "%s" from the group "%s"?', $user['name'] ?: $user['username'], $group['name']) ?></p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'GroupListController', 'removeUser', array('group_id' => $group['id'], 'user_id' => $user['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'GroupListController', 'users', array('group_id' => $group['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'GroupListController', + 'removeUser', + array('group_id' => $group['id'], 'user_id' => $user['id']) + ) ?> </div> diff --git a/app/Template/group/index.php b/app/Template/group/index.php index fe8a07e7..fe3f398e 100644 --- a/app/Template/group/index.php +++ b/app/Template/group/index.php @@ -1,14 +1,14 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'UserListController', 'show') ?></li> - <li><i class="fa fa-user-plus fa-fw"></i><?= $this->url->link(t('New group'), 'GroupCreationController', 'show', array(), false, 'popover') ?></li> + <li><?= $this->url->icon('user', t('All users'), 'UserListController', 'show') ?></li> + <li><?= $this->modal->medium('user-plus', t('New group'), 'GroupCreationController', 'show') ?></li> </ul> </div> <?php if ($paginator->isEmpty()): ?> <p class="alert"><?= t('There is no group.') ?></p> <?php else: ?> - <table class="table-small table-fixed table-scrolling"> + <table class="table-fixed table-scrolling"> <tr> <th class="column-5"><?= $paginator->order(t('Id'), 'id') ?></th> <th class="column-20"><?= $paginator->order(t('External Id'), 'external_id') ?></th> @@ -30,10 +30,10 @@ <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->url->link(t('Add group member'), 'GroupListController', 'associate', array('group_id' => $group['id']), false, 'popover') ?></li> - <li><?= $this->url->link(t('Members'), 'GroupListController', 'users', array('group_id' => $group['id'])) ?></li> - <li><?= $this->url->link(t('Edit'), 'GroupModificationController', 'show', array('group_id' => $group['id']), false, 'popover') ?></li> - <li><?= $this->url->link(t('Remove'), 'GroupListController', 'confirm', array('group_id' => $group['id']), false, 'popover') ?></li> + <li><?= $this->modal->medium('plus', t('Add group member'), 'GroupListController', 'associate', array('group_id' => $group['id'])) ?></li> + <li><?= $this->url->icon('users', t('Members'), 'GroupListController', 'users', array('group_id' => $group['id'])) ?></li> + <li><?= $this->modal->medium('edit', t('Edit'), 'GroupModificationController', 'show', array('group_id' => $group['id'])) ?></li> + <li><?= $this->modal->confirm('trash-o', t('Remove'), 'GroupListController', 'confirm', array('group_id' => $group['id'])) ?></li> </ul> </div> </td> diff --git a/app/Template/group/remove.php b/app/Template/group/remove.php index 408b3d83..77d602f9 100644 --- a/app/Template/group/remove.php +++ b/app/Template/group/remove.php @@ -4,9 +4,9 @@ <div class="confirm"> <p class="alert alert-info"><?= t('Do you really want to remove this group: "%s"?', $group['name']) ?></p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'GroupListController', 'remove', array('group_id' => $group['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'GroupListController', + 'remove', + array('group_id' => $group['id']) + ) ?> </div> diff --git a/app/Template/group/users.php b/app/Template/group/users.php index 73597b39..ef179674 100644 --- a/app/Template/group/users.php +++ b/app/Template/group/users.php @@ -1,8 +1,8 @@ <section id="main"> <div class="page-header"> <ul> - <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('Add group member'), 'GroupListController', 'associate', array('group_id' => $group['id']), false, 'popover') ?></li> + <li><?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?></li> + <li><?= $this->modal->medium('plus', t('Add group member'), 'GroupListController', 'associate', array('group_id' => $group['id'])) ?></li> </ul> </div> <?php if ($paginator->isEmpty()): ?> @@ -31,8 +31,7 @@ <a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a> </td> <td> - <i class="fa fa-times fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove this user'), 'GroupListController', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove this user'), 'GroupListController', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/group_creation/show.php b/app/Template/group_creation/show.php index b219bd70..9f4f5608 100644 --- a/app/Template/group_creation/show.php +++ b/app/Template/group_creation/show.php @@ -1,15 +1,11 @@ <div class="page-header"> <h2><?= t('New group') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('GroupCreationController', 'save') ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('GroupCreationController', 'save') ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/group_modification/show.php b/app/Template/group_modification/show.php index ddf07369..df4ed01e 100644 --- a/app/Template/group_modification/show.php +++ b/app/Template/group_modification/show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit group') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('GroupModificationController', 'save') ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('GroupModificationController', 'save') ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -10,9 +10,5 @@ <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/header/creation_dropdown.php b/app/Template/header/creation_dropdown.php index d3b9e7cb..9bdf5ad2 100644 --- a/app/Template/header/creation_dropdown.php +++ b/app/Template/header/creation_dropdown.php @@ -6,14 +6,13 @@ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-plus fa-fw"></i><i class="fa fa-caret-down"></i></a> <ul> <?php if ($has_project_creation_access): ?> - <li><i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('New project'), 'ProjectCreationController', 'create', array(), false, 'popover') ?> + <li> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> </li> <?php endif ?> <?php if ($is_private_project_enabled): ?> <li> - <i class="fa fa-lock fa-fw"></i> - <?= $this->url->link(t('New private project'), 'ProjectCreationController', 'createPrivate', array(), false, 'popover') ?> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> </li> <?php endif ?> <?= $this->hook->render('template:header:creation-dropdown') ?> diff --git a/app/Template/header/user_dropdown.php b/app/Template/header/user_dropdown.php index 49d08213..a74bdd52 100644 --- a/app/Template/header/user_dropdown.php +++ b/app/Template/header/user_dropdown.php @@ -3,46 +3,37 @@ <ul> <li class="no-hover"><strong><?= $this->text->e($this->user->getFullname()) ?></strong></li> <li> - <i class="fa fa-tachometer fa-fw"></i> - <?= $this->url->link(t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?> + <?= $this->url->icon('tachometer', t('My dashboard'), 'DashboardController', 'show', array('user_id' => $this->user->getId())) ?> </li> <li> - <i class="fa fa-home fa-fw"></i> - <?= $this->url->link(t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?> + <?= $this->url->icon('home', t('My profile'), 'UserViewController', 'show', array('user_id' => $this->user->getId())) ?> </li> <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('Projects management'), 'ProjectListController', 'show') ?> + <?= $this->url->icon('folder', t('Projects management'), 'ProjectListController', 'show') ?> </li> <?php if ($this->user->hasAccess('UserListController', 'show')): ?> <li> - <i class="fa fa-user fa-fw"></i> - <?= $this->url->link(t('Users management'), 'UserListController', 'show') ?> + <?= $this->url->icon('user', t('Users management'), 'UserListController', 'show') ?> </li> <li> - <i class="fa fa-group fa-fw"></i> - <?= $this->url->link(t('Groups management'), 'GroupListController', 'index') ?> + <?= $this->url->icon('group', t('Groups management'), 'GroupListController', 'index') ?> </li> <li> - <i class="fa fa-cubes" aria-hidden="true"></i> - <?= $this->url->link(t('Plugins'), 'PluginController', 'show') ?> + <?= $this->url->icon('cubes', t('Plugins'), 'PluginController', 'show') ?> </li> <li> - <i class="fa fa-cog fa-fw"></i> - <?= $this->url->link(t('Settings'), 'ConfigController', 'index') ?> + <?= $this->url->icon('cog', t('Settings'), 'ConfigController', 'index') ?> </li> <?php endif ?> <?= $this->hook->render('template:header:dropdown') ?> <li> - <i class="fa fa-life-ring fa-fw"></i> - <?= $this->url->link(t('Documentation'), 'DocumentationController', 'show') ?> + <?= $this->url->icon('life-ring', t('Documentation'), 'DocumentationController', 'show') ?> </li> <?php if (! DISABLE_LOGOUT): ?> <li> - <i class="fa fa-sign-out fa-fw"></i> - <?= $this->url->link(t('Logout'), 'AuthController', 'logout') ?> + <?= $this->url->icon('sign-out', t('Logout'), 'AuthController', 'logout') ?> </li> <?php endif ?> </ul> diff --git a/app/Template/layout.php b/app/Template/layout.php index 8c85ffc6..241b99df 100644 --- a/app/Template/layout.php +++ b/app/Template/layout.php @@ -53,6 +53,7 @@ > <?php if (isset($no_layout) && $no_layout): ?> + <?= $this->app->flashMessage() ?> <?= $content_for_layout ?> <?php else: ?> <?= $this->hook->render('template:layout:top') ?> diff --git a/app/Template/link/create.php b/app/Template/link/create.php index 23990604..37610a3b 100644 --- a/app/Template/link/create.php +++ b/app/Template/link/create.php @@ -1,18 +1,12 @@ <div class="page-header"> - <h2><?= t('Add a new link') ?></h2> + <h2><?= t('Add link label') ?></h2> </div> <form action="<?= $this->url->href('LinkController', 'save') ?>" method="post" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->label(t('Label'), 'label') ?> - <?= $this->form->text('label', $values, $errors, array('required')) ?> - + <?= $this->form->text('label', $values, $errors, array('required', 'autofocus')) ?> <?= $this->form->label(t('Opposite label'), 'opposite_label') ?> <?= $this->form->text('opposite_label', $values, $errors) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/link/edit.php b/app/Template/link/edit.php index cb4f29e2..4be56573 100644 --- a/app/Template/link/edit.php +++ b/app/Template/link/edit.php @@ -13,9 +13,5 @@ <?= $this->form->label(t('Opposite label'), 'opposite_id') ?> <?= $this->form->select('opposite_id', $labels, $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'LinkController', 'index') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/link/index.php b/app/Template/link/index.php deleted file mode 100644 index 70ead4a6..00000000 --- a/app/Template/link/index.php +++ /dev/null @@ -1,33 +0,0 @@ -<div class="page-header"> - <h2><?= t('Link labels') ?></h2> -</div> -<?php if (! empty($links)): ?> -<table class="table-striped table-scrolling"> - <tr> - <th class="column-70"><?= t('Link labels') ?></th> - <th><?= t('Actions') ?></th> - </tr> - <?php foreach ($links as $link): ?> - <tr> - <td> - <strong><?= t($link['label']) ?></strong> - - <?php if (! empty($link['opposite_label'])): ?> - | <?= t($link['opposite_label']) ?> - <?php endif ?> - </td> - <td> - <ul> - <?= $this->url->link(t('Edit'), 'LinkController', 'edit', array('link_id' => $link['id'])) ?> - <?= t('or') ?> - <?= $this->url->link(t('Remove'), 'LinkController', 'confirm', array('link_id' => $link['id'])) ?> - </ul> - </td> - </tr> - <?php endforeach ?> -</table> -<?php else: ?> - <?= t('There is no link.') ?> -<?php endif ?> - -<?= $this->render('link/create', array('values' => $values, 'errors' => $errors)) ?> diff --git a/app/Template/link/remove.php b/app/Template/link/remove.php index b7fbef5e..e5ea2466 100644 --- a/app/Template/link/remove.php +++ b/app/Template/link/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this link: "%s"?', $link['label']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'LinkController', 'remove', array('link_id' => $link['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'LinkController', 'index') ?> - </div> + <?= $this->modal->confirmButtons( + 'LinkController', + 'remove', + array('link_id' => $link['id']) + ) ?> </div> diff --git a/app/Template/link/show.php b/app/Template/link/show.php new file mode 100644 index 00000000..6aadd66b --- /dev/null +++ b/app/Template/link/show.php @@ -0,0 +1,36 @@ +<div class="page-header"> + <h2><?= t('Link labels') ?></h2> + <ul> + <li> + <?= $this->modal->medium('plus', t('Add link label'), 'LinkController', 'create') ?> + </li> + </ul> +</div> +<?php if (! empty($links)): ?> + <table class="table-striped table-scrolling"> + <tr> + <th class="column-70"><?= t('Link labels') ?></th> + <th><?= t('Actions') ?></th> + </tr> + <?php foreach ($links as $link): ?> + <tr> + <td> + <strong><?= t($link['label']) ?></strong> + + <?php if (! empty($link['opposite_label'])): ?> + | <?= t($link['opposite_label']) ?> + <?php endif ?> + </td> + <td> + <ul> + <?= $this->modal->medium('edit', t('Edit'), 'LinkController', 'edit', array('link_id' => $link['id'])) ?> + <?= t('or') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'LinkController', 'confirm', array('link_id' => $link['id'])) ?> + </ul> + </td> + </tr> + <?php endforeach ?> + </table> +<?php else: ?> + <?= t('There is no link.') ?> +<?php endif ?> diff --git a/app/Template/plugin/directory.php b/app/Template/plugin/directory.php index b6c6734c..b2fffcb9 100644 --- a/app/Template/plugin/directory.php +++ b/app/Template/plugin/directory.php @@ -28,11 +28,9 @@ <td> <?php if ($is_configured): ?> <?php if (! isset($installed_plugins[$plugin['title']])): ?> - <i class="fa fa-cloud-download fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Install'), 'PluginController', 'install', array('archive_url' => urlencode($plugin['download'])), true) ?> + <?= $this->url->icon('cloud-download', t('Install'), 'PluginController', 'install', array('archive_url' => urlencode($plugin['download'])), true) ?> <?php elseif ($installed_plugins[$plugin['title']] < $plugin['version']): ?> - <i class="fa fa-refresh fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Update'), 'PluginController', 'update', array('archive_url' => urlencode($plugin['download'])), true) ?> + <?= $this->url->icon('refresh', t('Update'), 'PluginController', 'update', array('archive_url' => urlencode($plugin['download'])), true) ?> <?php else: ?> <i class="fa fa-check-circle-o" aria-hidden="true"></i> <?= t('Up to date') ?> diff --git a/app/Template/plugin/remove.php b/app/Template/plugin/remove.php index bd8f4eb8..1280f8aa 100644 --- a/app/Template/plugin/remove.php +++ b/app/Template/plugin/remove.php @@ -5,9 +5,9 @@ <div class="confirm"> <p class="alert alert-info"><?= t('Do you really want to remove this plugin: "%s"?', $plugin->getPluginName()) ?></p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'PluginController', 'uninstall', array('pluginId' => $plugin_id), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'PluginController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'PluginController', + 'uninstall', + array('pluginId' => $plugin_id) + ) ?> </div> diff --git a/app/Template/plugin/show.php b/app/Template/plugin/show.php index 9c3d6d20..266568ac 100644 --- a/app/Template/plugin/show.php +++ b/app/Template/plugin/show.php @@ -1,3 +1,43 @@ +<?php if (! empty($incompatible_plugins)): ?> + <div class="page-header"> + <h2><?= t('Incompatible Plugins') ?></h2> + </div> + <table> + <tr> + <th class="column-35"><?= t('Name') ?></th> + <th class="column-25"><?= t('Author') ?></th> + <th class="column-10"><?= t('Version') ?></th> + <th class="column-12"><?= t('Compatibility') ?></th> + <?php if ($is_configured): ?> + <th><?= t('Action') ?></th> + <?php endif ?> + </tr> + + <?php foreach ($incompatible_plugins as $pluginFolder => $plugin): ?> + <tr> + <td> + <?php if ($plugin->getPluginHomepage()): ?> + <a href="<?= $plugin->getPluginHomepage() ?>" target="_blank" rel="noreferrer"><?= $this->text->e($plugin->getPluginName()) ?></a> + <?php else: ?> + <?= $this->text->e($plugin->getPluginName()) ?> + <?php endif ?> + </td> + <td><?= $this->text->e($plugin->getPluginAuthor()) ?></td> + <td><?= $this->text->e($plugin->getPluginVersion()) ?></td> + <td><?= $this->text->e($plugin->getCompatibleVersion()) ?></td> + <?php if ($is_configured): ?> + <td> + <?= $this->modal->confirm('trash-o', t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder)) ?> + </td> + <?php endif ?> + </tr> + <tr> + <td colspan="<?= $is_configured ? 6 : 5 ?>"><?= $this->text->e($plugin->getPluginDescription()) ?></td> + </tr> + <?php endforeach ?> + </table> +<?php endif ?> + <div class="page-header"> <h2><?= t('Installed Plugins') ?></h2> </div> @@ -28,8 +68,7 @@ <td><?= $this->text->e($plugin->getPluginVersion()) ?></td> <?php if ($is_configured): ?> <td> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Uninstall'), 'PluginController', 'confirm', array('pluginId' => $pluginFolder)) ?> </td> <?php endif ?> </tr> diff --git a/app/Template/project/dropdown.php b/app/Template/project/dropdown.php index e3cf41c2..447cd0b4 100644 --- a/app/Template/project/dropdown.php +++ b/app/Template/project/dropdown.php @@ -2,42 +2,35 @@ <a href="#" class="dropdown-menu dashboard-table-link">#<?= $project['id'] ?></a> <ul> <li> - <i class="fa fa-th fa-fw"></i> - <?= $this->url->link(t('Board'), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->icon('th', t('Board'), 'BoardViewController', 'show', array('project_id' => $project['id'])) ?> </li> <li> - <i class="fa fa-calendar fa-fw"></i> - <?= $this->url->link(t('Calendar'), 'CalendarController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->icon('calendar', t('Calendar'), 'CalendarController', 'show', array('project_id' => $project['id'])) ?> </li> <li> - <i class="fa fa-list fa-fw"></i> - <?= $this->url->link(t('Listing'), 'TaskListController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->icon('list', t('Listing'), 'TaskListController', 'show', array('project_id' => $project['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> <li> - <i class="fa fa-sliders fa-fw"></i> - <?= $this->url->link(t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->icon('sliders', t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <li> - <i class="fa fa-dashboard fa-fw"></i> - <?= $this->url->link(t('Activity'), 'ActivityController', 'project', array('project_id' => $project['id'])) ?> + <?= $this->modal->medium('dashboard', t('Activity'), 'ActivityController', 'project', array('project_id' => $project['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('AnalyticController', 'taskDistribution', $project['id'])): ?> <li> - <i class="fa fa-line-chart fa-fw"></i> - <?= $this->url->link(t('Analytics'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> + <?= $this->modal->large('line-chart', t('Analytics'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <?= $this->hook->render('template:project:dropdown', array('project' => $project)) ?> - <?php if ($this->user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> <li> - <i class="fa fa-cog fa-fw"></i> - <?= $this->url->link(t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->icon('cog', t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php index 6e7fff05..812eb351 100644 --- a/app/Template/project/sidebar.php +++ b/app/Template/project/sidebar.php @@ -9,9 +9,9 @@ </li> <?php endif ?> - <?php if ($this->user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> <li <?= $this->app->checkMenuSelection('ProjectEditController') ?>> - <?= $this->url->link(t('Edit project'), 'ProjectEditController', 'edit', array('project_id' => $project['id'])) ?> + <?= $this->url->link(t('Edit project'), 'ProjectEditController', 'show', array('project_id' => $project['id'])) ?> </li> <li <?= $this->app->checkMenuSelection('ProjectViewController', 'share') ?>> <?= $this->url->link(t('Public access'), 'ProjectViewController', 'share', array('project_id' => $project['id'])) ?> @@ -50,15 +50,15 @@ </li> <?php if ($project['is_active']): ?> <li> - <?= $this->url->link(t('Disable'), 'ProjectStatusController', 'confirmDisable', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->confirmLink(t('Disable'), 'ProjectStatusController', 'confirmDisable', array('project_id' => $project['id'])) ?> <?php else: ?> <li> - <?= $this->url->link(t('Enable'), 'ProjectStatusController', 'confirmEnable', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->confirmLink(t('Enable'), 'ProjectStatusController', 'confirmEnable', array('project_id' => $project['id'])) ?> <?php endif ?> </li> <?php if ($this->user->hasProjectAccess('ProjectStatusController', 'remove', $project['id'])): ?> <li> - <?= $this->url->link(t('Remove'), 'ProjectStatusController', 'confirmRemove', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->confirmLink(t('Remove'), 'ProjectStatusController', 'confirmRemove', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <?php endif ?> diff --git a/app/Template/project_action_duplication/show.php b/app/Template/project_action_duplication/show.php index 2eebb262..c2f52e35 100644 --- a/app/Template/project_action_duplication/show.php +++ b/app/Template/project_action_duplication/show.php @@ -4,16 +4,12 @@ <?php if (empty($projects_list)): ?> <p class="alert"><?= t('There is no available project.') ?></p> <?php else: ?> - <form class="popover-form" method="post" action="<?= $this->url->href('ProjectActionDuplicationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('ProjectActionDuplicationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->label(t('Create from another project'), 'src_project_id') ?> <?= $this->form->select('src_project_id', $projects_list) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'Action', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php endif ?> diff --git a/app/Template/project_creation/create.php b/app/Template/project_creation/create.php index 1df15d7d..171bd17a 100644 --- a/app/Template/project_creation/create.php +++ b/app/Template/project_creation/create.php @@ -2,7 +2,7 @@ <div class="page-header"> <h2><?= $title ?></h2> </div> - <form class="popover-form" id="project-creation-form" method="post" action="<?= $this->url->href('ProjectCreationController', 'save') ?>" autocomplete="off"> + <form id="project-creation-form" method="post" action="<?= $this->url->href('ProjectCreationController', 'save') ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('is_private', $values) ?> @@ -29,11 +29,7 @@ <?= $this->form->checkbox('projectTaskDuplicationModel', t('Tasks'), 1, false) ?> </div> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectListController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php if ($is_private): ?> <div class="alert alert-info"> diff --git a/app/Template/project_edit/dates.php b/app/Template/project_edit/dates.php deleted file mode 100644 index 1c2c3dd4..00000000 --- a/app/Template/project_edit/dates.php +++ /dev/null @@ -1,22 +0,0 @@ -<div class="page-header"> - <h2><?= t('Edit project') ?></h2> - <ul> - <li ><?= $this->url->link(t('General'), 'ProjectEditController', 'edit', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li class="active"><?= $this->url->link(t('Dates'), 'ProjectEditController', 'dates', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Task priority'), 'ProjectEditController', 'priority', array('project_id' => $project['id']), false, 'popover-link') ?></li> - </ul> -</div> -<form method="post" class="popover-form" action="<?= $this->url->href('ProjectEditController', 'update', array('project_id' => $project['id'], 'redirect' => 'dates')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('name', $values) ?> - <?= $this->form->date(t('Start date'), 'start_date', $values, $errors) ?> - <?= $this->form->date(t('End date'), 'end_date', $values, $errors) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> - -<p class="alert alert-info"><?= t('Those dates are useful for the project Gantt chart.') ?></p> diff --git a/app/Template/project_edit/description.php b/app/Template/project_edit/description.php deleted file mode 100644 index 586ddfcb..00000000 --- a/app/Template/project_edit/description.php +++ /dev/null @@ -1,19 +0,0 @@ -<div class="page-header"> - <h2><?= t('Edit project') ?></h2> - <ul> - <li><?= $this->url->link(t('General'), 'ProjectEditController', 'edit', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Dates'), 'ProjectEditController', 'dates', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li class="active"><?= $this->url->link(t('Description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Task priority'), 'ProjectEditController', 'priority', array('project_id' => $project['id']), false, 'popover-link') ?></li> - </ul> -</div> -<form method="post" class="popover-form" action="<?= $this->url->href('ProjectEditController', 'update', array('project_id' => $project['id'], 'redirect' => 'description')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('name', $values) ?> - <?= $this->form->textEditor('description', $values, $errors, array('autofocus' => true)) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> diff --git a/app/Template/project_edit/general.php b/app/Template/project_edit/general.php deleted file mode 100644 index c7421477..00000000 --- a/app/Template/project_edit/general.php +++ /dev/null @@ -1,36 +0,0 @@ -<div class="page-header"> - <h2><?= t('Edit project') ?></h2> - <ul> - <li class="active"><?= $this->url->link(t('General'), 'ProjectEditController', 'edit', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Dates'), 'ProjectEditController', 'dates', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Task priority'), 'ProjectEditController', 'priority', array('project_id' => $project['id']), false, 'popover-link') ?></li> - </ul> -</div> -<form method="post" class="popover-form" action="<?= $this->url->href('ProjectEditController', 'update', array('project_id' => $project['id'], 'redirect' => 'edit')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - - <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors, array('required', 'maxlength="50"')) ?> - - <?= $this->form->label(t('Identifier'), 'identifier') ?> - <?= $this->form->text('identifier', $values, $errors, array('maxlength="50"')) ?> - <p class="form-help"><?= t('The project identifier is optional and must be alphanumeric, example: MYPROJECT.') ?></p> - - <hr> - <div class="form-inline"> - <?= $this->form->label(t('Project owner'), 'owner_id') ?> - <?= $this->form->select('owner_id', $owners, $values, $errors) ?> - </div> - - <?php if ($this->user->hasProjectAccess('ProjectCreationController', 'create', $project['id'])): ?> - <hr> - <?= $this->form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> - <p class="form-help"><?= t('Private projects do not have users and groups management.') ?></p> - <?php endif ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> diff --git a/app/Template/project_edit/show.php b/app/Template/project_edit/show.php new file mode 100644 index 00000000..46cdb8fa --- /dev/null +++ b/app/Template/project_edit/show.php @@ -0,0 +1,58 @@ +<div class="page-header"> + <h2><?= $this->text->e($project['name']) ?> > <?= t('Edit project') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('ProjectEditController', 'update', array('project_id' => $project['id'], 'redirect' => 'edit')) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + <?= $this->form->hidden('id', $values) ?> + + <fieldset> + <legend><?= t('General') ?></legend> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array('required', 'maxlength="50"', 'autofocus', 'tabindex="1"')) ?> + + <?= $this->form->label(t('Identifier'), 'identifier') ?> + <?= $this->form->text('identifier', $values, $errors, array('maxlength="50"', 'tabindex="2"')) ?> + <p class="form-help"><?= t('The project identifier is optional and must be alphanumeric, example: MYPROJECT.') ?></p> + + <?= $this->form->label(t('Description'), 'description') ?> + <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 3)) ?> + </fieldset> + + <fieldset> + <legend><?= t('Permissions and ownership') ?></legend> + + <?php if ($this->user->hasProjectAccess('ProjectCreationController', 'create', $project['id'])): ?> + <?= $this->form->checkbox('is_private', t('Private project'), 1, $project['is_private'] == 1) ?> + <p class="form-help"><?= t('Private projects do not have users and groups management.') ?></p> + <?php endif ?> + + <div class="form-inline"> + <?= $this->form->label(t('Project owner'), 'owner_id') ?> + <?= $this->form->select('owner_id', $owners, $values, $errors, array('tabindex="5"')) ?> + </div> + </fieldset> + + <fieldset> + <legend><?= t('Dates') ?></legend> + + <?= $this->form->date(t('Start date'), 'start_date', $values, $errors, array('tabindex="6"')) ?> + <?= $this->form->date(t('End date'), 'end_date', $values, $errors, array('tabindex="7"')) ?> + </fieldset> + + <fieldset> + <legend><?= t('Priorities') ?></legend> + + <?= $this->form->label(t('Default priority'), 'priority_default') ?> + <?= $this->form->number('priority_default', $values, $errors, array('tabindex="8"')) ?> + + <?= $this->form->label(t('Lowest priority'), 'priority_start') ?> + <?= $this->form->number('priority_start', $values, $errors, array('tabindex="9"')) ?> + + <?= $this->form->label(t('Highest priority'), 'priority_end') ?> + <?= $this->form->number('priority_end', $values, $errors, array('tabindex="10"')) ?> + <p class="form-help"><?= t('If you put zero to the low and high priority, this feature will be disabled.') ?></p> + </fieldset> + + <?= $this->modal->submitButtons(array('tabindex' => 11)) ?> +</form> diff --git a/app/Template/project_edit/task_priority.php b/app/Template/project_edit/task_priority.php deleted file mode 100644 index 3ef4b3cb..00000000 --- a/app/Template/project_edit/task_priority.php +++ /dev/null @@ -1,29 +0,0 @@ -<div class="page-header"> - <h2><?= t('Edit project') ?></h2> - <ul> - <li ><?= $this->url->link(t('General'), 'ProjectEditController', 'edit', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Dates'), 'ProjectEditController', 'dates', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li><?= $this->url->link(t('Description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), false, 'popover-link') ?></li> - <li class="active"><?= $this->url->link(t('Task priority'), 'ProjectEditController', 'priority', array('project_id' => $project['id']), false, 'popover-link') ?></li> - </ul> -</div> -<form method="post" class="popover-form" action="<?= $this->url->href('ProjectEditController', 'update', array('project_id' => $project['id'], 'redirect' => 'priority')) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('name', $values) ?> - - <?= $this->form->label(t('Default priority'), 'priority_default') ?> - <?= $this->form->number('priority_default', $values, $errors) ?> - - <?= $this->form->label(t('Lowest priority'), 'priority_start') ?> - <?= $this->form->number('priority_start', $values, $errors) ?> - - <?= $this->form->label(t('Highest priority'), 'priority_end') ?> - <?= $this->form->number('priority_end', $values, $errors) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - </div> -</form> - -<p class="alert alert-info"><?= t('If you put zero to the low and high priority, this feature will be disabled.') ?></p> diff --git a/app/Template/project_file/create.php b/app/Template/project_file/create.php index e262799b..de35f87c 100644 --- a/app/Template/project_file/create.php +++ b/app/Template/project_file/create.php @@ -1,33 +1,20 @@ <div class="page-header"> <h2><?= t('Attach a document') ?></h2> </div> -<div id="file-done" style="display:none"> - <p class="alert alert-success"> - <?= t('All files have been uploaded successfully.') ?> - <?= $this->url->link(t('View uploaded files'), 'ProjectOverviewController', 'show', array('project_id' => $project['id'])) ?> - </p> -</div> - -<div id="file-error-max-size" style="display:none"> - <p class="alert alert-error"> - <?= t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) ?> - <a href="#" id="file-browser"><?= t('Choose files again') ?></a> - </p> -</div> -<div - id="file-dropzone" - data-max-size="<?= $max_size ?>" - data-url="<?= $this->url->href('ProjectFileController', 'save', array('project_id' => $project['id'])) ?>"> - <div id="file-dropzone-inner"> - <?= t('Drag and drop your files here') ?> <?= t('or') ?> <a href="#" id="file-browser"><?= t('choose files') ?></a> - </div> -</div> - -<input type="file" name="files[]" multiple style="display:none" id="file-form-element"> +<?= $this->app->component('file-upload', array( + 'maxSize' => $max_size, + 'url' => $this->url->to('ProjectFileController', 'save', array('project_id' => $project['id'])), + 'labelDropzone' => t('Drag and drop your files here'), + 'labelOr' => t('or'), + 'labelChooseFiles' => t('choose files'), + 'labelOversize' => t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)), + 'labelSuccess' => t('All files have been uploaded successfully.'), + 'labelCloseSuccess' => t('Close this window'), + 'labelUploadError' => t('Unable to upload this file.'), +)) ?> -<div class="form-actions"> - <input type="submit" value="<?= t('Upload files') ?>" class="btn btn-blue" id="file-upload-button" disabled> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectOverviewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> -</div> +<?= $this->modal->submitButtons(array( + 'submitLabel' => t('Upload files'), + 'disabled' => true, +)) ?> diff --git a/app/Template/project_file/remove.php b/app/Template/project_file/remove.php index 0517a9e7..043b8fc8 100644 --- a/app/Template/project_file/remove.php +++ b/app/Template/project_file/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this file: "%s"?', $this->text->e($file['name'])) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectFileController', 'remove', array('project_id' => $project['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectOverviewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectFileController', + 'remove', + array('project_id' => $project['id'], 'file_id' => $file['id']) + ) ?> </div> diff --git a/app/Template/project_gantt/show.php b/app/Template/project_gantt/show.php index af22a6ed..725f348d 100644 --- a/app/Template/project_gantt/show.php +++ b/app/Template/project_gantt/show.php @@ -1,11 +1,23 @@ <section id="main"> <div class="page-header"> <ul> + <?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?> + <li> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> + </li> + <?php endif ?> + <?php if ($this->app->config('disable_private_project', 0) == 0): ?> + <li> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> + </li> + <?php endif ?> <li> - <i class="fa fa-folder fa-fw"></i><?= $this->url->link(t('Projects list'), 'ProjectListController', 'show') ?> + <?= $this->url->icon('folder', t('Projects list'), 'ProjectListController', 'show') ?> </li> <?php if ($this->user->hasAccess('ProjectUserOverviewController', 'managers')): ?> - <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'ProjectUserOverviewController', 'managers') ?></li> + <li> + <?= $this->url->icon('user', t('Users overview'), 'ProjectUserOverviewController', 'managers') ?> + </li> <?php endif ?> </ul> </div> diff --git a/app/Template/project_header/dropdown.php b/app/Template/project_header/dropdown.php index baf4cc16..83c2b97f 100644 --- a/app/Template/project_header/dropdown.php +++ b/app/Template/project_header/dropdown.php @@ -4,12 +4,10 @@ <?php if ($board_view): ?> <li> <span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? '' : 'style="display: none;"' ?>> - <i class="fa fa-expand fa-fw"></i> - <?= $this->url->link(t('Expand tasks'), 'BoardAjaxController', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?> + <?= $this->url->icon('expand', t('Expand tasks'), 'BoardAjaxController', 'expand', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?> </span> <span class="filter-display-mode" <?= $this->board->isCollapsed($project['id']) ? 'style="display: none;"' : '' ?>> - <i class="fa fa-compress fa-fw"></i> - <?= $this->url->link(t('Collapse tasks'), 'BoardAjaxController', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?> + <?= $this->url->icon('compress', t('Collapse tasks'), 'BoardAjaxController', 'collapse', array('project_id' => $project['id']), false, 'board-display-mode', t('Keyboard shortcut: "%s"', 's')) ?> </span> </li> <li> @@ -24,27 +22,23 @@ <?php if ($this->user->hasProjectAccess('TaskCreationController', 'show', $project['id'])): ?> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->large('plus', t('Add a new task'), 'TaskCreationController', 'show', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <li> - <i class="fa fa-dashboard fa-fw"></i> - <?= $this->url->link(t('Activity'), 'ActivityController', 'project', array('project_id' => $project['id'])) ?> + <?= $this->modal->medium('dashboard', t('Activity'), 'ActivityController', 'project', array('project_id' => $project['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('CustomFilterController', 'index', $project['id'])): ?> <li> - <i class="fa fa-filter fa-fw"></i> - <?= $this->url->link(t('Custom filters'), 'CustomFilterController', 'index', array('project_id' => $project['id'])) ?> + <?= $this->modal->medium('filter', t('Add custom filters'), 'CustomFilterController', 'create', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <?php if ($project['is_public']): ?> <li> - <i class="fa fa-share-alt fa-fw"></i> - <?= $this->url->link(t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?> + <?= $this->url->icon('share-alt', t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?> </li> <?php endif ?> @@ -52,35 +46,30 @@ <?php if ($this->user->hasProjectAccess('AnalyticController', 'taskDistribution', $project['id'])): ?> <li> - <i class="fa fa-line-chart fa-fw"></i> - <?= $this->url->link(t('Analytics'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> + <?= $this->modal->large('line-chart', t('Analytics'), 'AnalyticController', 'taskDistribution', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <?php if ($this->user->hasProjectAccess('ExportController', 'tasks', $project['id'])): ?> <li> - <i class="fa fa-upload fa-fw"></i> - <?= $this->url->link(t('Exports'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> + <?= $this->modal->medium('upload', t('Exports'), 'ExportController', 'tasks', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <?php if ($this->user->hasProjectAccess('TaskImportController', 'tasks', $project['id'])): ?> <li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Imports'), 'TaskImportController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->modal->medium('download', t('Import tasks'), 'TaskImportController', 'show', array('project_id' => $project['id'])) ?> </li> <?php endif ?> - <?php if ($this->user->hasProjectAccess('ProjectEditController', 'edit', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> <li> - <i class="fa fa-cog fa-fw"></i> - <?= $this->url->link(t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> + <?= $this->url->icon('cog', t('Settings'), 'ProjectViewController', 'show', array('project_id' => $project['id'])) ?> </li> <?php endif ?> <li> - <i class="fa fa-folder fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Manage projects'), 'ProjectListController', 'show') ?> + <?= $this->url->icon('folder', t('Manage projects'), 'ProjectListController', 'show') ?> </li> </ul> </div> diff --git a/app/Template/project_header/views.php b/app/Template/project_header/views.php index f8a5b39b..0328a051 100644 --- a/app/Template/project_header/views.php +++ b/app/Template/project_header/views.php @@ -1,24 +1,19 @@ <ul class="views"> <li <?= $this->app->checkMenuSelection('ProjectOverviewController') ?>> - <i class="fa fa-eye fa-fw"></i> - <?= $this->url->link(t('Overview'), 'ProjectOverviewController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?> + <?= $this->url->icon('eye', t('Overview'), 'ProjectOverviewController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-overview', t('Keyboard shortcut: "%s"', 'v o')) ?> </li> <li <?= $this->app->checkMenuSelection('BoardViewController') ?>> - <i class="fa fa-th fa-fw"></i> - <?= $this->url->link(t('Board'), 'BoardViewController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?> + <?= $this->url->icon('th', t('Board'), 'BoardViewController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-board', t('Keyboard shortcut: "%s"', 'v b')) ?> </li> <li <?= $this->app->checkMenuSelection('CalendarController') ?>> - <i class="fa fa-calendar fa-fw"></i> - <?= $this->url->link(t('Calendar'), 'CalendarController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?> + <?= $this->url->icon('calendar', t('Calendar'), 'CalendarController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-calendar', t('Keyboard shortcut: "%s"', 'v c')) ?> </li> <li <?= $this->app->checkMenuSelection('TaskListController') ?>> - <i class="fa fa-list fa-fw"></i> - <?= $this->url->link(t('List'), 'TaskListController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?> + <?= $this->url->icon('list', t('List'), 'TaskListController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-listing', t('Keyboard shortcut: "%s"', 'v l')) ?> </li> <?php if ($this->user->hasProjectAccess('TaskGanttController', 'show', $project['id'])): ?> <li <?= $this->app->checkMenuSelection('TaskGanttController') ?>> - <i class="fa fa-sliders fa-fw"></i> - <?= $this->url->link(t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?> + <?= $this->url->icon('sliders', t('Gantt'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'search' => $filters['search']), false, 'view-gantt', t('Keyboard shortcut: "%s"', 'v g')) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/project_list/show.php b/app/Template/project_list/show.php index f8f5862c..a6364585 100644 --- a/app/Template/project_list/show.php +++ b/app/Template/project_list/show.php @@ -2,12 +2,26 @@ <div class="page-header"> <ul> <?= $this->hook->render('template:project-list:menu:before') ?> + + <?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?> + <li> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> + </li> + <?php endif ?> + <?php if ($this->app->config('disable_private_project', 0) == 0): ?> + <li> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> + </li> + <?php endif ?> + <?php if ($this->user->hasAccess('ProjectUserOverviewController', 'managers')): ?> - <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('Users overview'), 'ProjectUserOverviewController', 'managers') ?></li> + <li><?= $this->url->icon('user', t('Users overview'), 'ProjectUserOverviewController', 'managers') ?></li> <?php endif ?> + <?php if ($this->user->hasAccess('ProjectGanttController', 'show')): ?> - <li><i class="fa fa-sliders fa-fw"></i><?= $this->url->link(t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?></li> + <li><?= $this->url->icon('sliders', t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?></li> <?php endif ?> + <?= $this->hook->render('template:project-list:menu:after') ?> </ul> </div> diff --git a/app/Template/project_overview/attachments.php b/app/Template/project_overview/attachments.php index ab8cf2ad..b8baadd0 100644 --- a/app/Template/project_overview/attachments.php +++ b/app/Template/project_overview/attachments.php @@ -5,7 +5,7 @@ <div class="accordion-content"> <?php if ($this->user->hasProjectAccess('ProjectFileController', 'create', $project['id'])): ?> <div class="buttons-header"> - <?= $this->url->button('fa-plus', t('Upload a file'), 'ProjectFileController', 'create', array('project_id' => $project['id']), 'popover') ?> + <?= $this->modal->mediumButton('plus', t('Upload a file'), 'ProjectFileController', 'create', array('project_id' => $project['id'])) ?> </div> <?php endif ?> diff --git a/app/Template/project_overview/description.php b/app/Template/project_overview/description.php index 0c2027ed..80b93efe 100644 --- a/app/Template/project_overview/description.php +++ b/app/Template/project_overview/description.php @@ -3,9 +3,9 @@ <h3><a href="#" class="fa accordion-toggle"></a> <?= t('Description') ?></h3> </div> <div class="accordion-content"> - <?php if ($this->user->hasProjectAccess('ProjectEditController', 'description', $project['id'])): ?> + <?php if ($this->user->hasProjectAccess('ProjectEditController', 'show', $project['id'])): ?> <div class="buttons-header"> - <?= $this->url->button('fa-edit', t('Edit description'), 'ProjectEditController', 'description', array('project_id' => $project['id']), 'popover') ?> + <?= $this->modal->mediumButton('edit', t('Edit description'), 'ProjectEditController', 'show', array('project_id' => $project['id'])) ?> </div> <?php endif ?> <article class="markdown"> diff --git a/app/Template/project_overview/files.php b/app/Template/project_overview/files.php index 826e6325..85de52f7 100644 --- a/app/Template/project_overview/files.php +++ b/app/Template/project_overview/files.php @@ -15,18 +15,19 @@ <ul> <?php if ($this->file->getPreviewType($file['name']) !== null): ?> <li> - <i class="fa fa-eye fa-fw"></i> - <?= $this->url->link(t('View file'), 'FileViewerController', 'show', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> + </li> + <?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?> + <li> + <?= $this->url->icon('eye', t('View file'), 'FileViewerController', 'browser', array('project_id' => $project['id'], 'file_id' => $file['id']), false, '', '', true) ?> </li> <?php endif ?> <li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Download'), 'FileViewerController', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> + <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('ProjectFileController', 'remove', $project['id'])): ?> <li> - <i class="fa fa-trash fa-fw"></i> - <?= $this->url->link(t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/project_overview/images.php b/app/Template/project_overview/images.php index 3b575d3f..7e7962e8 100644 --- a/app/Template/project_overview/images.php +++ b/app/Template/project_overview/images.php @@ -19,13 +19,11 @@ <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a> <ul> <li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Download'), 'FileViewerController', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> + <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('ProjectFileController', 'remove', $project['id'])): ?> <li> - <i class="fa fa-trash fa-fw"></i> - <?= $this->url->link(t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ProjectFileController', 'confirm', array('project_id' => $project['id'], 'file_id' => $file['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/project_overview/information.php b/app/Template/project_overview/information.php index fdf0f753..0fe53e08 100644 --- a/app/Template/project_overview/information.php +++ b/app/Template/project_overview/information.php @@ -3,7 +3,7 @@ <h3><a href="#" class="fa accordion-toggle"></a> <?= t('Information') ?></h3> </div> <div class="accordion-content"> - <div class="listing"> + <div class="panel"> <ul> <?php if ($project['owner_id'] > 0): ?> <li><?= t('Project owner: ') ?><strong><?= $this->text->e($project['owner_name'] ?: $project['owner_username']) ?></strong></li> @@ -29,9 +29,9 @@ <?php endif ?> <?php if ($project['is_public']): ?> - <li><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li> + <li><?= $this->url->icon('share-alt', t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> + <li><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li> + <li><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li> <?php endif ?> </ul> </div> diff --git a/app/Template/project_overview/show.php b/app/Template/project_overview/show.php index 6b2bc2cf..d87b2775 100644 --- a/app/Template/project_overview/show.php +++ b/app/Template/project_overview/show.php @@ -1,6 +1,7 @@ <section id="main"> <?= $this->projectHeader->render($project, 'ProjectOverviewController', 'show') ?> <?= $this->render('project_overview/columns', array('project' => $project)) ?> + <?= $this->hook->render('template:project-overview:before-description', array('project' => $project)) ?> <?= $this->render('project_overview/description', array('project' => $project)) ?> <?= $this->render('project_overview/attachments', array('project' => $project, 'images' => $images, 'files' => $files)) ?> <?= $this->render('project_overview/information', array('project' => $project, 'users' => $users, 'roles' => $roles)) ?> diff --git a/app/Template/project_permission/groups.php b/app/Template/project_permission/groups.php index 582643a2..c9914344 100644 --- a/app/Template/project_permission/groups.php +++ b/app/Template/project_permission/groups.php @@ -25,8 +25,7 @@ )) ?> </td> <td> - <i class="fa fa-trash-o" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ProjectPermissionController', 'removeGroup', array('project_id' => $project['id'], 'group_id' => $group['id']), true) ?> + <?= $this->url->icon('trash-o', t('Remove'), 'ProjectPermissionController', 'removeGroup', array('project_id' => $project['id'], 'group_id' => $group['id']), true) ?> </td> </tr> <?php endforeach ?> @@ -34,7 +33,7 @@ <?php endif ?> <?php if ($project['is_private'] == 0): ?> - <div class="listing"> + <div class="panel"> <form method="post" action="<?= $this->url->href('ProjectPermissionController', 'addGroup', array('project_id' => $project['id'])) ?>" autocomplete="off" class="form-inline"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?> diff --git a/app/Template/project_permission/users.php b/app/Template/project_permission/users.php index 71cf1c4a..bc92d060 100644 --- a/app/Template/project_permission/users.php +++ b/app/Template/project_permission/users.php @@ -21,8 +21,7 @@ )) ?> </td> <td> - <i class="fa fa-trash-o" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ProjectPermissionController', 'removeUser', array('project_id' => $project['id'], 'user_id' => $user['id']), true) ?> + <?= $this->url->icon('trash-o', t('Remove'), 'ProjectPermissionController', 'removeUser', array('project_id' => $project['id'], 'user_id' => $user['id']), true) ?> </td> </tr> <?php endforeach ?> @@ -30,7 +29,7 @@ <?php endif ?> <?php if ($project['is_private'] == 0): ?> - <div class="listing"> + <div class="panel"> <form method="post" action="<?= $this->url->href('ProjectPermissionController', 'addUser', array('project_id' => $project['id'])) ?>" autocomplete="off" class="form-inline"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', array('project_id' => $project['id'])) ?> diff --git a/app/Template/project_role/create.php b/app/Template/project_role/create.php index d0092243..f554eb17 100644 --- a/app/Template/project_role/create.php +++ b/app/Template/project_role/create.php @@ -1,16 +1,12 @@ <div class="page-header"> <h2><?= t('New custom project role') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ProjectRoleController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('ProjectRoleController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Role'), 'role') ?> <?= $this->form->text('role', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/project_role/edit.php b/app/Template/project_role/edit.php index 3aa9e5cf..740ac0fe 100644 --- a/app/Template/project_role/edit.php +++ b/app/Template/project_role/edit.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit custom project role') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('ProjectRoleController', 'update', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('ProjectRoleController', 'update', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->hidden('role_id', $values) ?> @@ -9,9 +9,5 @@ <?= $this->form->label(t('Role'), 'role') ?> <?= $this->form->text('role', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/project_role/remove.php b/app/Template/project_role/remove.php index 25875e3a..44d24eda 100644 --- a/app/Template/project_role/remove.php +++ b/app/Template/project_role/remove.php @@ -7,8 +7,9 @@ <?= t('Do you really want to remove this custom role: "%s"? All people assigned to this role will become project member.', $role['role']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectRoleController', 'remove', array('project_id' => $project['id'], 'role_id' => $role['role_id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectRoleController', + 'remove', + array('project_id' => $project['id'], 'role_id' => $role['role_id']) + ) ?> </div> diff --git a/app/Template/project_role/show.php b/app/Template/project_role/show.php index 59200fc9..5377f7bb 100644 --- a/app/Template/project_role/show.php +++ b/app/Template/project_role/show.php @@ -2,8 +2,7 @@ <h2><?= t('Custom Project Roles') ?></h2> <ul> <li> - <i class="fa fa-plus fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Add a new custom role'), 'ProjectRoleController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new custom role'), 'ProjectRoleController', 'create', array('project_id' => $project['id'])) ?> </li> </ul> </div> @@ -19,24 +18,19 @@ <a href="#" class="dropdown-menu"><?= t('Restrictions for the role "%s"', $role['role']) ?> <i class="fa fa-caret-down"></i></a> <ul> <li> - <i class="fa fa-plus fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Add a new project restriction'), 'ProjectRoleRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new project restriction'), 'ProjectRoleRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?> </li> <li> - <i class="fa fa-plus fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Add a new drag and drop restriction'), 'ColumnMoveRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new drag and drop restriction'), 'ColumnMoveRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?> </li> <li> - <i class="fa fa-plus fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Add a new column restriction'), 'ColumnRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new column restriction'), 'ColumnRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?> </li> <li> - <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Edit this role'), 'ProjectRoleController', 'edit', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit this role'), 'ProjectRoleController', 'edit', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?> </li> <li> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove this role'), 'ProjectRoleController', 'confirm', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove this role'), 'ProjectRoleController', 'confirm', array('project_id' => $project['id'], 'role_id' => $role['role_id'])) ?> </li> </ul> </div> @@ -59,8 +53,7 @@ <?= $this->text->e($restriction['title']) ?> </td> <td> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ProjectRoleRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ProjectRoleRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id'])) ?> </td> </tr> <?php endforeach ?> @@ -77,8 +70,7 @@ <?= $this->text->e($restriction['title']) ?> </td> <td> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ColumnRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ColumnRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id'])) ?> </td> </tr> <?php endforeach ?> @@ -91,8 +83,7 @@ <?= t('Only moving task between those columns is permitted') ?> </td> <td> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ColumnMoveRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ColumnMoveRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/project_role_restriction/create.php b/app/Template/project_role_restriction/create.php index f49eafb3..2b6a61dc 100644 --- a/app/Template/project_role_restriction/create.php +++ b/app/Template/project_role_restriction/create.php @@ -2,7 +2,7 @@ <div class="page-header"> <h2><?= t('New project restriction for the role "%s"', $role['role']) ?></h2> </div> - <form class="popover-form" method="post" action="<?= $this->url->href('ProjectRoleRestrictionController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('ProjectRoleRestrictionController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->hidden('role_id', $values) ?> @@ -10,10 +10,6 @@ <?= $this->form->label(t('Restriction'), 'rule') ?> <?= $this->form->select('rule', $restrictions, $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> </section> diff --git a/app/Template/project_role_restriction/remove.php b/app/Template/project_role_restriction/remove.php index db1148e1..1a994199 100644 --- a/app/Template/project_role_restriction/remove.php +++ b/app/Template/project_role_restriction/remove.php @@ -7,8 +7,9 @@ <?= t('Do you really want to remove this project restriction: "%s"?', $this->text->in($restriction['rule'], $restrictions)) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectRoleRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectRoleRestrictionController', + 'remove', + array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']) + ) ?> </div> diff --git a/app/Template/project_status/disable.php b/app/Template/project_status/disable.php index d8145d3c..d607cedb 100644 --- a/app/Template/project_status/disable.php +++ b/app/Template/project_status/disable.php @@ -7,8 +7,9 @@ <?= t('Do you really want to disable this project: "%s"?', $project['name']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectStatusController', 'disable', array('project_id' => $project['id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectStatusController', + 'disable', + array('project_id' => $project['id']) + ) ?> </div> diff --git a/app/Template/project_status/enable.php b/app/Template/project_status/enable.php index 1f76d093..fd8f8c72 100644 --- a/app/Template/project_status/enable.php +++ b/app/Template/project_status/enable.php @@ -7,8 +7,9 @@ <?= t('Do you really want to enable this project: "%s"?', $project['name']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectStatusController', 'enable', array('project_id' => $project['id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectStatusController', + 'enable', + array('project_id' => $project['id']) + ) ?> </div> diff --git a/app/Template/project_status/remove.php b/app/Template/project_status/remove.php index 8959ef75..27ae2ae0 100644 --- a/app/Template/project_status/remove.php +++ b/app/Template/project_status/remove.php @@ -7,8 +7,9 @@ <?= t('Do you really want to remove this project: "%s"?', $project['name']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectStatusController', 'remove', array('project_id' => $project['id']), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'ProjectViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectStatusController', + 'remove', + array('project_id' => $project['id']) + ) ?> </div> diff --git a/app/Template/project_tag/create.php b/app/Template/project_tag/create.php index bfd1084a..a0e6243b 100644 --- a/app/Template/project_tag/create.php +++ b/app/Template/project_tag/create.php @@ -1,16 +1,12 @@ <div class="page-header"> <h2><?= t('Add new tag') ?></h2> </div> -<form method="post" class="popover-form" action="<?= $this->url->href('ProjectTagController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('ProjectTagController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectTagController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/project_tag/edit.php b/app/Template/project_tag/edit.php index 9bf261bd..8cb1e209 100644 --- a/app/Template/project_tag/edit.php +++ b/app/Template/project_tag/edit.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit a tag') ?></h2> </div> -<form method="post" class="popover-form" action="<?= $this->url->href('ProjectTagController', 'update', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('ProjectTagController', 'update', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> @@ -9,9 +9,5 @@ <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectTagController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/project_tag/index.php b/app/Template/project_tag/index.php index f77e21ee..29d7082b 100644 --- a/app/Template/project_tag/index.php +++ b/app/Template/project_tag/index.php @@ -2,8 +2,7 @@ <h2><?= t('Project tags') ?></h2> <ul> <li> - <i class="fa fa-plus" aria-hidden="true"></i> - <?= $this->url->link(t('Add new tag'), 'ProjectTagController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add new tag'), 'ProjectTagController', 'create', array('project_id' => $project['id'])) ?> </li> </ul> </div> @@ -20,10 +19,8 @@ <tr> <td><?= $this->text->e($tag['name']) ?></td> <td> - <i class="fa fa-times" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'ProjectTagController', 'confirm', array('tag_id' => $tag['id'], 'project_id' => $project['id']), false, 'popover') ?> - <i class="fa fa-pencil-square-o" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'ProjectTagController', 'edit', array('tag_id' => $tag['id'], 'project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'ProjectTagController', 'edit', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'ProjectTagController', 'confirm', array('tag_id' => $tag['id'], 'project_id' => $project['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/project_tag/remove.php b/app/Template/project_tag/remove.php index f4aadab1..9f957d10 100644 --- a/app/Template/project_tag/remove.php +++ b/app/Template/project_tag/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this tag: "%s"?', $tag['name']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'ProjectTagController', 'remove', array('tag_id' => $tag['id'], 'project_id' => $project['id']), true, 'btn btn-red popover-link') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'ProjectTagController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'ProjectTagController', + 'remove', + array('tag_id' => $tag['id'], 'project_id' => $project['id']) + ) ?> </div> diff --git a/app/Template/project_user_overview/layout.php b/app/Template/project_user_overview/layout.php index 19b83436..9115ef3c 100644 --- a/app/Template/project_user_overview/layout.php +++ b/app/Template/project_user_overview/layout.php @@ -1,20 +1,27 @@ <section id="main"> <div class="page-header"> <ul> + <?php if ($this->user->hasAccess('ProjectCreationController', 'create')): ?> + <li> + <?= $this->modal->medium('plus', t('New project'), 'ProjectCreationController', 'create') ?> + </li> + <?php endif ?> + <?php if ($this->app->config('disable_private_project', 0) == 0): ?> + <li> + <?= $this->modal->medium('lock', t('New private project'), 'ProjectCreationController', 'createPrivate') ?> + </li> + <?php endif ?> <li> - <i class="fa fa-folder fa-fw"></i> - <?= $this->url->link(t('Projects list'), 'ProjectListController', 'show') ?> + <?= $this->url->icon('folder', t('Projects list'), 'ProjectListController', 'show') ?> </li> <?php if ($this->user->hasAccess('ProjectGanttController', 'show')): ?> <li> - <i class="fa fa-sliders fa-fw"></i> - <?= $this->url->link(t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?> + <?= $this->url->icon('sliders', t('Projects Gantt chart'), 'ProjectGanttController', 'show') ?> </li> <?php endif ?> </ul> </div> <section class="sidebar-container"> - <?= $this->render($sidebar_template, array('users' => $users, 'filter' => $filter)) ?> <div class="sidebar-content"> diff --git a/app/Template/project_view/share.php b/app/Template/project_view/share.php index 409f37e6..87c63916 100644 --- a/app/Template/project_view/share.php +++ b/app/Template/project_view/share.php @@ -4,11 +4,11 @@ <?php if ($project['is_public']): ?> - <div class="listing"> + <div class="panel"> <ul class="no-bullet"> - <li><strong><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('share-alt', t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token']), false, '', '', true) ?></strong></li> </ul> </div> diff --git a/app/Template/project_view/show.php b/app/Template/project_view/show.php index afe60384..29d558b1 100644 --- a/app/Template/project_view/show.php +++ b/app/Template/project_view/show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Summary') ?></h2> </div> -<ul class="listing"> +<ul class="panel"> <li><strong><?= $project['is_active'] ? t('Active') : t('Inactive') ?></strong></li> <?php if ($project['owner_id'] > 0): ?> @@ -13,9 +13,9 @@ <?php endif ?> <?php if ($project['is_public']): ?> - <li><i class="fa fa-share-alt"></i> <?= $this->url->link(t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li> - <li><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li> + <li><?= $this->url->icon('share-alt', t('Public link'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?></li> + <li><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'project', array('token' => $project['token']), false, '', '', true) ?></li> + <li><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'project', array('token' => $project['token'])) ?></li> <?php else: ?> <li><?= t('Public access disabled') ?></li> <?php endif ?> diff --git a/app/Template/search/activity.php b/app/Template/search/activity.php index 1dfd9234..2582162b 100644 --- a/app/Template/search/activity.php +++ b/app/Template/search/activity.php @@ -2,8 +2,7 @@ <div class="page-header"> <ul> <li> - <i class="fa fa-search fa-fw"></i> - <?= $this->url->link(t('Search tasks'), 'SearchController', 'index') ?> + <?= $this->url->icon('search', t('Search tasks'), 'SearchController', 'index') ?> </li> </ul> </div> @@ -23,7 +22,7 @@ </div> <?php if (empty($values['search'])): ?> - <div class="listing"> + <div class="panel"> <h3><?= t('Advanced search') ?></h3> <p><?= t('Example of query: ') ?><strong>project:"My project" creator:me</strong></p> <ul> diff --git a/app/Template/search/index.php b/app/Template/search/index.php index c59a5c99..9a5f2931 100644 --- a/app/Template/search/index.php +++ b/app/Template/search/index.php @@ -2,8 +2,7 @@ <div class="page-header"> <ul> <li> - <i class="fa fa-search fa-fw"></i> - <?= $this->url->link(t('Activity stream search'), 'SearchController', 'activity') ?> + <?= $this->url->icon('search', t('Activity stream search'), 'SearchController', 'activity') ?> </li> </ul> </div> @@ -23,7 +22,7 @@ </div> <?php if (empty($values['search'])): ?> - <div class="listing"> + <div class="panel"> <h3><?= t('Advanced search') ?></h3> <p><?= t('Example of query: ') ?><strong>project:"My project" assignee:me due:tomorrow</strong></p> <ul> diff --git a/app/Template/subtask/create.php b/app/Template/subtask/create.php index cc4ccba6..96ad7a46 100644 --- a/app/Template/subtask/create.php +++ b/app/Template/subtask/create.php @@ -2,20 +2,17 @@ <h2><?= t('Add a sub-task') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('SubtaskController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('SubtaskController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', $values) ?> - <?= $this->subtask->selectTitle($values, $errors, array('autofocus')) ?> - <?= $this->subtask->selectAssignee($users_list, $values, $errors) ?> - <?= $this->subtask->selectTimeEstimated($values, $errors) ?> + <?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?> + <?= $this->subtask->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->subtask->renderTimeEstimatedField($values, $errors) ?> + <?= $this->hook->render('template:subtask:form:create', array('values' => $values, 'errors' => $errors)) ?> <?= $this->form->checkbox('another_subtask', t('Create another sub-task'), 1, isset($values['another_subtask']) && $values['another_subtask'] == 1) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/subtask/edit.php b/app/Template/subtask/edit.php index 07419f79..7c0266a8 100644 --- a/app/Template/subtask/edit.php +++ b/app/Template/subtask/edit.php @@ -2,20 +2,17 @@ <h2><?= t('Edit a sub-task') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('SubtaskController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off"> - +<form method="post" action="<?= $this->url->href('SubtaskController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('task_id', $values) ?> - <?= $this->subtask->selectTitle($values, $errors, array('autofocus')) ?> - <?= $this->subtask->selectAssignee($users_list, $values, $errors) ?> - <?= $this->subtask->selectTimeEstimated($values, $errors) ?> - <?= $this->subtask->selectTimeSpent($values, $errors) ?> + + <?= $this->subtask->renderTitleField($values, $errors, array('autofocus')) ?> + <?= $this->subtask->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->subtask->renderTimeEstimatedField($values, $errors) ?> + <?= $this->subtask->renderTimeSpentField($values, $errors) ?> + <?= $this->hook->render('template:subtask:form:edit', array('values' => $values, 'errors' => $errors)) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/subtask/menu.php b/app/Template/subtask/menu.php index d5d1bf85..a0743a70 100644 --- a/app/Template/subtask/menu.php +++ b/app/Template/subtask/menu.php @@ -2,16 +2,13 @@ <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> - <i class="fa fa-pencil-square-o" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'SubtaskController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> </li> <li> - <i class="fa fa-trash-o" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'SubtaskController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'SubtaskController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> </li> <li> - <i class="fa fa-clone" aria-hidden="true"></i> - <?= $this->url->link(t('Convert to task'), 'SubtaskConverterController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), false, 'popover') ?> + <?= $this->modal->confirm('clone', t('Convert to task'), 'SubtaskConverterController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?> </li> </ul> </div> diff --git a/app/Template/subtask/remove.php b/app/Template/subtask/remove.php index 426c1a93..cf9bbc35 100644 --- a/app/Template/subtask/remove.php +++ b/app/Template/subtask/remove.php @@ -12,9 +12,9 @@ </ul> </div> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'SubtaskController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'SubtaskController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']) + ) ?> </div> diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php index bea49aed..156e08c1 100644 --- a/app/Template/subtask/table.php +++ b/app/Template/subtask/table.php @@ -45,12 +45,10 @@ <?php if ($editable && $subtask['user_id'] == $this->user->getId()): ?> <li> <?php if ($subtask['is_timer_started']): ?> - <i class="fa fa-pause"></i> - <?= $this->url->link(t('Stop timer'), 'SubtaskStatusController', 'timer', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> + <?= $this->url->icon('pause', t('Stop timer'), 'SubtaskStatusController', 'timer', array('timer' => 'stop', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> (<?= $this->dt->age($subtask['timer_start_date']) ?>) <?php else: ?> - <i class="fa fa-play-circle-o"></i> - <?= $this->url->link(t('Start timer'), 'SubtaskStatusController', 'timer', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> + <?= $this->url->icon('play-circle-o', t('Start timer'), 'SubtaskStatusController', 'timer', array('timer' => 'start', 'project_id' => $task['project_id'], 'task_id' => $subtask['task_id'], 'subtask_id' => $subtask['id']), false, 'subtask-toggle-timer') ?> <?php endif ?> </li> <?php endif ?> diff --git a/app/Template/subtask_converter/show.php b/app/Template/subtask_converter/show.php index 63f45482..9ecc70c8 100644 --- a/app/Template/subtask_converter/show.php +++ b/app/Template/subtask_converter/show.php @@ -12,9 +12,9 @@ </ul> </div> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'SubtaskConverterController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'SubtaskConverterController', + 'save', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id']) + ) ?> </div> diff --git a/app/Template/subtask_restriction/show.php b/app/Template/subtask_restriction/show.php index ec8b8d5b..b6c56a12 100644 --- a/app/Template/subtask_restriction/show.php +++ b/app/Template/subtask_restriction/show.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('You already have one subtask in progress') ?></h2> </div> -<form class="popover-form" action="<?= $this->url->href('SubtaskRestrictionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post"> +<form action="<?= $this->url->href('SubtaskRestrictionController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'subtask_id' => $subtask['id'])) ?>" method="post"> <?= $this->form->csrf() ?> @@ -9,9 +9,5 @@ <?= $this->form->radios('status', $status_list) ?> <?= $this->form->hidden('id', $subtask_inprogress) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-red"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/swimlane/create.php b/app/Template/swimlane/create.php index 207b526c..7d05e731 100644 --- a/app/Template/swimlane/create.php +++ b/app/Template/swimlane/create.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Add a new swimlane') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('SwimlaneController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('SwimlaneController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> @@ -12,9 +12,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="3"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/swimlane/edit.php b/app/Template/swimlane/edit.php index d225b345..c1c41196 100644 --- a/app/Template/swimlane/edit.php +++ b/app/Template/swimlane/edit.php @@ -2,7 +2,7 @@ <h2><?= t('Swimlane modification for the project "%s"', $project['name']) ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('SwimlaneController', 'update', array('project_id' => $project['id'], 'swimlane_id' => $values['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('SwimlaneController', 'update', array('project_id' => $project['id'], 'swimlane_id' => $values['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -15,9 +15,5 @@ <?= $this->form->label(t('Description'), 'description') ?> <?= $this->form->textEditor('description', $values, $errors, array('tabindex' => 2)) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="3"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/swimlane/edit_default.php b/app/Template/swimlane/edit_default.php index 8a0c0a15..a2c3ee73 100644 --- a/app/Template/swimlane/edit_default.php +++ b/app/Template/swimlane/edit_default.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Change default swimlane') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('SwimlaneController', 'updateDefault', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('SwimlaneController', 'updateDefault', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -10,9 +10,5 @@ <?= $this->form->checkbox('show_default_swimlane', t('Show default swimlane'), 1, $values['show_default_swimlane'] == 1) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/swimlane/index.php b/app/Template/swimlane/index.php index 4f78a405..e05b9088 100644 --- a/app/Template/swimlane/index.php +++ b/app/Template/swimlane/index.php @@ -2,8 +2,7 @@ <h2><?= t('Swimlanes') ?></h2> <ul> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a new swimlane'), 'SwimlaneController', 'create', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a new swimlane'), 'SwimlaneController', 'create', array('project_id' => $project['id'])) ?> </li> </ul> </div> diff --git a/app/Template/swimlane/remove.php b/app/Template/swimlane/remove.php index f16b778c..02d1e322 100644 --- a/app/Template/swimlane/remove.php +++ b/app/Template/swimlane/remove.php @@ -1,17 +1,15 @@ -<section id="main"> - <div class="page-header"> - <h2><?= t('Remove a swimlane') ?></h2> - </div> +<div class="page-header"> + <h2><?= t('Remove a swimlane') ?></h2> +</div> - <div class="confirm"> - <p class="alert alert-info"> - <?= t('Do you really want to remove this swimlane: "%s"?', $swimlane['name']) ?> - </p> +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to remove this swimlane: "%s"?', $swimlane['name']) ?> + </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'SwimlaneController', 'remove', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'SwimlaneController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> - </div> -</section> + <?= $this->modal->confirmButtons( + 'SwimlaneController', + 'remove', + array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']) + ) ?> +</div> diff --git a/app/Template/swimlane/table.php b/app/Template/swimlane/table.php index 81daed01..2d783a00 100644 --- a/app/Template/swimlane/table.php +++ b/app/Template/swimlane/table.php @@ -20,16 +20,13 @@ <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> - <i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'SwimlaneController', 'editDefault', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'SwimlaneController', 'editDefault', array('project_id' => $project['id'])) ?> </li> <li> <?php if ($default_swimlane['show_default_swimlane'] == 1): ?> - <i class="fa fa-toggle-off fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Disable'), 'SwimlaneController', 'disableDefault', array('project_id' => $project['id']), true) ?> + <?= $this->url->icon('toggle-off', t('Disable'), 'SwimlaneController', 'disableDefault', array('project_id' => $project['id']), true) ?> <?php else: ?> - <i class="fa fa-toggle-on fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Enable'), 'SwimlaneController', 'enableDefault', array('project_id' => $project['id']), true) ?> + <?= $this->url->icon('toggle-on', t('Enable'), 'SwimlaneController', 'enableDefault', array('project_id' => $project['id']), true) ?> <?php endif ?> </li> </ul> @@ -58,21 +55,17 @@ <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> - <i class="fa fa-pencil-square-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'SwimlaneController', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'SwimlaneController', 'edit', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?> </li> <li> <?php if ($swimlane['is_active']): ?> - <i class="fa fa-toggle-off fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Disable'), 'SwimlaneController', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> + <?= $this->url->icon('toggle-off', t('Disable'), 'SwimlaneController', 'disable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> <?php else: ?> - <i class="fa fa-toggle-on fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Enable'), 'SwimlaneController', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> + <?= $this->url->icon('toggle-on', t('Enable'), 'SwimlaneController', 'enable', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), true) ?> <?php endif ?> </li> <li> - <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'SwimlaneController', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'SwimlaneController', 'confirm', array('project_id' => $project['id'], 'swimlane_id' => $swimlane['id'])) ?> </li> </ul> </div> diff --git a/app/Template/tag/create.php b/app/Template/tag/create.php index 9b32bc46..752a63e5 100644 --- a/app/Template/tag/create.php +++ b/app/Template/tag/create.php @@ -1,16 +1,12 @@ <div class="page-header"> <h2><?= t('Add new tag') ?></h2> </div> -<form method="post" class="popover-form" action="<?= $this->url->href('TagController', 'save') ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('TagController', 'save') ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('project_id', $values) ?> <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/tag/edit.php b/app/Template/tag/edit.php index f751ff49..adef3568 100644 --- a/app/Template/tag/edit.php +++ b/app/Template/tag/edit.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Edit a tag') ?></h2> </div> -<form method="post" class="popover-form" action="<?= $this->url->href('TagController', 'update', array('tag_id' => $tag['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('TagController', 'update', array('tag_id' => $tag['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> @@ -9,9 +9,5 @@ <?= $this->form->label(t('Name'), 'name') ?> <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="255"')) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/tag/index.php b/app/Template/tag/index.php index 8e0c9a06..834e8e7c 100644 --- a/app/Template/tag/index.php +++ b/app/Template/tag/index.php @@ -2,8 +2,7 @@ <h2><?= t('Global tags') ?></h2> <ul> <li> - <i class="fa fa-plus" aria-hidden="true"></i> - <?= $this->url->link(t('Add new tag'), 'TagController', 'create', array(), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add new tag'), 'TagController', 'create') ?> </li> </ul> </div> @@ -20,10 +19,8 @@ <tr> <td><?= $this->text->e($tag['name']) ?></td> <td> - <i class="fa fa-times" aria-hidden="true"></i> - <?= $this->url->link(t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id']), false, 'popover') ?> - <i class="fa fa-pencil-square-o" aria-hidden="true"></i> - <?= $this->url->link(t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'TagController', 'edit', array('tag_id' => $tag['id'])) ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TagController', 'confirm', array('tag_id' => $tag['id'])) ?> </td> </tr> <?php endforeach ?> diff --git a/app/Template/tag/remove.php b/app/Template/tag/remove.php index 46ea3f99..47ba8d3d 100644 --- a/app/Template/tag/remove.php +++ b/app/Template/tag/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this tag: "%s"?', $tag['name']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TagController', 'remove', array('tag_id' => $tag['id']), true, 'btn btn-red popover-link') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TagController', 'index', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TagController', + 'remove', + array('tag_id' => $tag['id']) + ) ?> </div> diff --git a/app/Template/task/analytics.php b/app/Template/task/analytics.php index 28c0189c..2d968188 100644 --- a/app/Template/task/analytics.php +++ b/app/Template/task/analytics.php @@ -9,7 +9,7 @@ <h2><?= t('Analytics') ?></h2> </div> -<div class="listing"> +<div class="panel"> <ul> <li><?= t('Lead time: ').'<strong>'.$this->dt->duration($lead_time) ?></strong></li> <li><?= t('Cycle time: ').'<strong>'.$this->dt->duration($cycle_time) ?></strong></li> diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 202991d2..24099a3c 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -33,16 +33,14 @@ <?php if ($project['is_public']): ?> <li> <small> - <i class="fa fa-external-link fa-fw"></i> - <?= $this->url->link(t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> + <?= $this->url->icon('external-link', t('Public link'), 'TaskViewController', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> </small> </li> <?php endif ?> <?php if ($project['is_public'] && !$editable): ?> <li> <small> - <i class="fa fa-th fa-fw"></i> - <?= $this->url->link(t('Back to the board'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?> + <?= $this->url->icon('th', t('Back to the board'), 'BoardViewController', 'readonly', array('token' => $project['token'])) ?> </small> </li> <?php endif ?> @@ -168,7 +166,7 @@ <?php if ($editable && empty($task['date_started'])): ?> <div class="buttons-header"> - <?= $this->url->button('fa-play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->button('play', t('Set start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </div> <?php endif ?> diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 86428059..1daf8896 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -3,60 +3,47 @@ <ul> <?php if (array_key_exists('date_started', $task) && empty($task['date_started'])): ?> <li> - <i class="fa fa-play fa-fw"></i> - <?= $this->url->link(t('Set automatically the start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('play', t('Set automatically the start date'), 'TaskModificationController', 'start', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> <li> - <i class="fa fa-pencil-square-o fa-fw"></i> - <?= $this->url->link(t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-code-fork fa-fw"></i> - <?= $this->url->link(t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-external-link fa-fw"></i> - <?= $this->url->link(t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-comment-o fa-fw"></i> - <?= $this->url->link(t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-camera fa-fw"></i> - <?= $this->url->link(t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskPopoverController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-files-o fa-fw"></i> - <?= $this->url->link(t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-clipboard fa-fw"></i> - <?= $this->url->link(t('Duplicate to another project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('clipboard', t('Duplicate to another project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-clone fa-fw"></i> - <?= $this->url->link(t('Move to another project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('clone', t('Move to another project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php if ($this->projectRole->canRemoveTask($task)): ?> <li> - <i class="fa fa-trash-o fa-fw"></i> - <?= $this->url->link(t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> <?php if (isset($task['is_active']) && $this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?> <li> <?php if ($task['is_active'] == 1): ?> - <i class="fa fa-times fa-fw"></i> - <?= $this->url->link(t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php else: ?> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> <?php endif ?> </li> <?php endif ?> diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 9472b6ba..f8f1ebde 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -4,25 +4,20 @@ </div> <ul> <li <?= $this->app->checkMenuSelection('TaskViewController', 'show') ?>> - <i class="fa fa-newspaper-o fa-fw"></i> - <?= $this->url->link(t('Summary'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('newspaper-o', t('Summary'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li <?= $this->app->checkMenuSelection('ActivityController', 'task') ?>> - <i class="fa fa-dashboard fa-fw"></i> - <?= $this->url->link(t('Activity stream'), 'ActivityController', 'task', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('dashboard', t('Activity stream'), 'ActivityController', 'task', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li <?= $this->app->checkMenuSelection('TaskViewController', 'transitions') ?>> - <i class="fa fa-arrows-h fa-fw"></i> - <?= $this->url->link(t('Transitions'), 'TaskViewController', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('arrows-h', t('Transitions'), 'TaskViewController', 'transitions', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li <?= $this->app->checkMenuSelection('TaskViewController', 'analytics') ?>> - <i class="fa fa-bar-chart fa-fw"></i> - <?= $this->url->link(t('Analytics'), 'TaskViewController', 'analytics', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('bar-chart', t('Analytics'), 'TaskViewController', 'analytics', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?> <li <?= $this->app->checkMenuSelection('TaskViewController', 'timetracking') ?>> - <i class="fa fa-clock-o fa-fw"></i> - <?= $this->url->link(t('Time tracking'), 'TaskViewController', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> + <?= $this->url->icon('clock-o', t('Time tracking'), 'TaskViewController', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> @@ -35,72 +30,57 @@ </div> <ul> <li> - <i class="fa fa-pencil-square-o fa-fw"></i> - <?= $this->url->link(t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->large('edit', t('Edit the task'), 'TaskModificationController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-refresh fa-rotate-90 fa-fw"></i> - <?= $this->url->link(t('Edit recurrence'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('refresh fa-rotate-90', t('Edit recurrence'), 'TaskRecurrenceController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('plus', t('Add a sub-task'), 'SubtaskController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-code-fork fa-fw"></i> - <?= $this->url->link(t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('code-fork', t('Add internal link'), 'TaskInternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-external-link fa-fw"></i> - <?= $this->url->link(t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('external-link', t('Add external link'), 'TaskExternalLinkController', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-comment-o fa-fw"></i> - <?= $this->url->link(t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('comment-o', t('Add a comment'), 'CommentController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-file fa-fw"></i> - <?= $this->url->link(t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('file', t('Attach a document'), 'TaskFileController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-camera fa-fw"></i> - <?= $this->url->link(t('Add a screenshot'), 'TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('camera', t('Add a screenshot'), 'TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-files-o fa-fw"></i> - <?= $this->url->link(t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('files-o', t('Duplicate'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-clipboard fa-fw"></i> - <?= $this->url->link(t('Duplicate to another project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('clipboard', t('Duplicate to another project'), 'TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-clone fa-fw"></i> - <?= $this->url->link(t('Move to another project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('clone', t('Move to another project'), 'TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php if ($task['is_active'] == 1 && $this->projectRole->isSortableColumn($task['project_id'], $task['column_id'])): ?> <li> - <i class="fa fa-arrows fa-fw"></i> - <?= $this->url->link(t('Move position'), 'TaskMovePositionController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->small('arrows', t('Move position'), 'TaskMovePositionController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> <?php if ($this->projectRole->canChangeTaskStatusInColumn($task['project_id'], $task['column_id'])): ?> <?php if ($task['is_active'] == 1): ?> <li> - <i class="fa fa-times fa-fw"></i> - <?= $this->url->link(t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('times', t('Close this task'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php else: ?> <li> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('check-square-o', t('Open this task'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <?php endif ?> <?php endif ?> <?php if ($this->projectRole->canRemoveTask($task)): ?> <li> - <i class="fa fa-trash-o fa-fw"></i> - <?= $this->url->link(t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board'), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskSuppressionController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => 'board')) ?> </li> <?php endif ?> diff --git a/app/Template/task/time_tracking_summary.php b/app/Template/task/time_tracking_summary.php index 9886ccfa..63de733a 100644 --- a/app/Template/task/time_tracking_summary.php +++ b/app/Template/task/time_tracking_summary.php @@ -1,13 +1,13 @@ <?php if ($task['time_estimated'] > 0 || $task['time_spent'] > 0): ?> + <div class="page-header"> + <h2><?= t('Time tracking') ?></h2> + </div> -<div class="page-header"> - <h2><?= t('Time tracking') ?></h2> -</div> - -<ul class="listing"> - <li><?= t('Estimate:') ?> <strong><?= $this->text->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li> - <li><?= t('Spent:') ?> <strong><?= $this->text->e($task['time_spent']) ?></strong> <?= t('hours') ?></li> - <li><?= t('Remaining:') ?> <strong><?= $this->text->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li> -</ul> - + <div class="panel"> + <ul> + <li><?= t('Estimate:') ?> <strong><?= $this->text->e($task['time_estimated']) ?></strong> <?= t('hours') ?></li> + <li><?= t('Spent:') ?> <strong><?= $this->text->e($task['time_spent']) ?></strong> <?= t('hours') ?></li> + <li><?= t('Remaining:') ?> <strong><?= $this->text->e($task['time_estimated'] - $task['time_spent']) ?></strong> <?= t('hours') ?></li> + </ul> + </div> <?php endif ?>
\ No newline at end of file diff --git a/app/Template/task_bulk/show.php b/app/Template/task_bulk/show.php index 11ddea31..acf80d8c 100644 --- a/app/Template/task_bulk/show.php +++ b/app/Template/task_bulk/show.php @@ -2,23 +2,20 @@ <h2><?= $this->text->e($project['name']) ?> > <?= t('Create tasks in bulk') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('TaskBulkController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('TaskBulkController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('column_id', $values) ?> <?= $this->form->hidden('swimlane_id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $this->task->renderCategoryField($categories_list, $values, $errors) ?> <?= $this->form->label(t('Tasks'), 'tasks') ?> <?= $this->form->textarea('tasks', $values, $errors, array('placeholder="'.t('My task title').'"')) ?> <p class="form-help"><?= t('Enter one task by line.') ?></p> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_creation/duplicate_projects.php b/app/Template/task_creation/duplicate_projects.php index dc0fa105..202b3ffe 100644 --- a/app/Template/task_creation/duplicate_projects.php +++ b/app/Template/task_creation/duplicate_projects.php @@ -5,10 +5,10 @@ <?php if (empty($projects_list)): ?> <p class="alert"><?= t('There is no destination project available.') ?></p> <div class="form-actions"> - <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover btn') ?> + <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'js-modal-close btn') ?> </div> <?php else: ?> - <form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'duplicateProjects', array('project_id' => $task['project_id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('TaskCreationController', 'duplicateProjects', array('project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', $values) ?> @@ -20,9 +20,6 @@ array('multiple') ) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Duplicate') ?></button> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php endif ?> diff --git a/app/Template/task_creation/show.php b/app/Template/task_creation/show.php index 840d1804..e957087f 100644 --- a/app/Template/task_creation/show.php +++ b/app/Template/task_creation/show.php @@ -1,50 +1,48 @@ <div class="page-header"> <h2><?= $this->text->e($project['name']) ?> > <?= t('New task') ?><?= $this->task->getNewTaskDropdown($project['id'], $values['swimlane_id'], $values['column_id']) ?></h2> </div> - -<form class="popover-form" method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('TaskCreationController', 'save', array('project_id' => $project['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> + <?= $this->form->hidden('project_id', $values) ?> + + <div class="task-form-container"> + <div class="task-form-main-column"> + <?= $this->task->renderTitleField($values, $errors) ?> + <?= $this->task->renderDescriptionField($values, $errors) ?> + <?= $this->task->renderTagField($project) ?> - <div class="form-columns"> - <div class="form-column"> - <?= $this->task->selectTitle($values, $errors) ?> - <?= $this->task->selectDescription($values, $errors) ?> - <?= $this->task->selectTags($project) ?> - <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> - - <?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 ?> </div> - <div class="form-column"> - <?= $this->form->hidden('project_id', $values) ?> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> - <?= $this->task->selectColumn($columns_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectReference($values, $errors) ?> + <div class="task-form-secondary-column"> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $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="form-column"> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectTimeSpent($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectDueDate($values, $errors) ?> + <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> - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'BoardViewController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> + <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/app/Template/task_duplication/copy.php b/app/Template/task_duplication/copy.php index 65cfe4d6..d96960fc 100644 --- a/app/Template/task_duplication/copy.php +++ b/app/Template/task_duplication/copy.php @@ -5,25 +5,25 @@ <?php if (empty($projects_list)): ?> <p class="alert"><?= t('There is no destination project available.') ?></p> <div class="form-actions"> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover btn') ?> + <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-close btn') ?> </div> <?php else: ?> - <form class="popover-form" method="post" action="<?= $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> - + <form method="post" action="<?= $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->label(t('Project'), 'project_id') ?> - <?= $this->form->select( - 'project_id', - $projects_list, - $values, - array(), - array('data-redirect="'.$this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')).'"'), - 'task-reload-project-destination' - ) ?> - <span class="loading-icon" style="display: none"> <i class="fa fa-spinner fa-spin"></i></span> + <?= $this->app->component('select-dropdown-autocomplete', array( + 'name' => 'project_id', + 'items' => $projects_list, + 'defaultValue' => isset($values['project_id']) ? $values['project_id'] : null, + 'placeholder' => t('Choose a project'), + 'replace' => array( + 'regex' => 'PROJECT_ID', + 'url' => $this->url->href('TaskDuplicationController', 'copy', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')), + ) + )) ?> <?= $this->form->label(t('Swimlane'), 'swimlane_id') ?> <?= $this->form->select('swimlane_id', $swimlanes_list, $values) ?> @@ -41,10 +41,6 @@ <?= $this->form->select('owner_id', $users_list, $values) ?> <p class="form-help"><?= t('Current assignee: %s', ($task['assignee_name'] ?: $task['assignee_username']) ?: e('not assigned')) ?></p> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php endif ?> diff --git a/app/Template/task_duplication/duplicate.php b/app/Template/task_duplication/duplicate.php index c0baf94e..aa02b78c 100644 --- a/app/Template/task_duplication/duplicate.php +++ b/app/Template/task_duplication/duplicate.php @@ -7,9 +7,9 @@ <?= t('Do you really want to duplicate this task?') ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskDuplicationController', 'duplicate', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskDuplicationController', + 'duplicate', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') + ) ?> </div> diff --git a/app/Template/task_duplication/move.php b/app/Template/task_duplication/move.php index 717d15e9..16ce2464 100644 --- a/app/Template/task_duplication/move.php +++ b/app/Template/task_duplication/move.php @@ -5,25 +5,26 @@ <?php if (empty($projects_list)): ?> <p class="alert"><?= t('There is no destination project available.') ?></p> <div class="form-actions"> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover btn') ?> + <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'js-modal-close btn') ?> </div> <?php else: ?> - <form class="popover-form" method="post" action="<?= $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->label(t('Project'), 'project_id') ?> - <?= $this->form->select( - 'project_id', - $projects_list, - $values, - array(), - array('data-redirect="'.$this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')).'"'), - 'task-reload-project-destination' - ) ?> - <span class="loading-icon" style="display: none"> <i class="fa fa-spinner fa-spin"></i></span> + <?= $this->app->component('select-dropdown-autocomplete', array( + 'name' => 'project_id', + 'items' => $projects_list, + 'defaultValue' => isset($values['project_id']) ? $values['project_id'] : null, + 'placeholder' => t('Choose a project'), + 'replace' => array( + 'regex' => 'PROJECT_ID', + 'url' => $this->url->href('TaskDuplicationController', 'move', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'dst_project_id' => 'PROJECT_ID')), + ) + )) ?> <?= $this->form->label(t('Swimlane'), 'swimlane_id') ?> <?= $this->form->select('swimlane_id', $swimlanes_list, $values) ?> @@ -41,11 +42,7 @@ <?= $this->form->select('owner_id', $users_list, $values) ?> <p class="form-help"><?= t('Current assignee: %s', ($task['assignee_name'] ?: $task['assignee_username']) ?: e('not assigned')) ?></p> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php endif ?> diff --git a/app/Template/task_external_link/create.php b/app/Template/task_external_link/create.php index beddfc90..04d9bed0 100644 --- a/app/Template/task_external_link/create.php +++ b/app/Template/task_external_link/create.php @@ -2,12 +2,7 @@ <h2><?= t('Add a new external link') ?></h2> </div> -<form class="popover-form" action="<?= $this->url->href('TaskExternalLinkController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> +<form action="<?= $this->url->href('TaskExternalLinkController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <?= $this->render('task_external_link/form', array('task' => $task, 'dependencies' => $dependencies, 'values' => $values, 'errors' => $errors)) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskExternalLinkController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_external_link/edit.php b/app/Template/task_external_link/edit.php index 917a28b9..df10d444 100644 --- a/app/Template/task_external_link/edit.php +++ b/app/Template/task_external_link/edit.php @@ -2,12 +2,7 @@ <h2><?= t('Edit external link') ?></h2> </div> -<form class="popover-form" action="<?= $this->url->href('TaskExternalLinkController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> +<form action="<?= $this->url->href('TaskExternalLinkController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <?= $this->render('task_external_link/form', array('task' => $task, 'dependencies' => $dependencies, 'values' => $values, 'errors' => $errors)) ?> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskExternalLinkController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_external_link/find.php b/app/Template/task_external_link/find.php index a88b29ce..a3665c0d 100644 --- a/app/Template/task_external_link/find.php +++ b/app/Template/task_external_link/find.php @@ -2,7 +2,7 @@ <h2><?= t('Add a new external link') ?></h2> </div> -<form class="popover-form" action="<?= $this->url->href('TaskExternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> +<form action="<?= $this->url->href('TaskExternalLinkController', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?> @@ -20,9 +20,5 @@ <?= $this->form->label(t('Link type'), 'type') ?> <?= $this->form->select('type', $types, $values) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Next') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_external_link/remove.php b/app/Template/task_external_link/remove.php index 2a888a60..ed8ad15f 100644 --- a/app/Template/task_external_link/remove.php +++ b/app/Template/task_external_link/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this link: "%s"?', $link['title']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskExternalLinkController', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskExternalLinkController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskExternalLinkController', + 'remove', + array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']) + ) ?> </div> diff --git a/app/Template/task_external_link/table.php b/app/Template/task_external_link/table.php index a5fc7a33..aaa234bb 100644 --- a/app/Template/task_external_link/table.php +++ b/app/Template/task_external_link/table.php @@ -33,12 +33,10 @@ <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> - <i class="fa fa-edit fa-fw"></i> - <?= $this->url->link(t('Edit'), 'TaskExternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'TaskExternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-trash-o fa-fw"></i> - <?= $this->url->link(t('Remove'), 'TaskExternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskExternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> </ul> </div> diff --git a/app/Template/task_file/create.php b/app/Template/task_file/create.php index e05cf829..eebb08eb 100644 --- a/app/Template/task_file/create.php +++ b/app/Template/task_file/create.php @@ -1,33 +1,20 @@ <div class="page-header"> <h2><?= t('Attach a document') ?></h2> </div> -<div id="file-done" style="display:none"> - <p class="alert alert-success"> - <?= t('All files have been uploaded successfully.') ?> - <?= $this->url->link(t('View uploaded files'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> - </p> -</div> - -<div id="file-error-max-size" style="display:none"> - <p class="alert alert-error"> - <?= t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) ?> - <a href="#" id="file-browser"><?= t('Choose files again') ?></a> - </p> -</div> -<div - id="file-dropzone" - data-max-size="<?= $max_size ?>" - data-url="<?= $this->url->href('TaskFileController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> - <div id="file-dropzone-inner"> - <?= t('Drag and drop your files here') ?> <?= t('or') ?> <a href="#" id="file-browser"><?= t('choose files') ?></a> - </div> -</div> - -<input type="file" name="files[]" multiple style="display:none" id="file-form-element"> +<?= $this->app->component('file-upload', array( + 'maxSize' => $max_size, + 'url' => $this->url->to('TaskFileController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + 'labelDropzone' => t('Drag and drop your files here'), + 'labelOr' => t('or'), + 'labelChooseFiles' => t('choose files'), + 'labelOversize' => t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)), + 'labelSuccess' => t('All files have been uploaded successfully.'), + 'labelCloseSuccess' => t('Close this window'), + 'labelUploadError' => t('Unable to upload this file.'), +)) ?> -<div class="form-actions"> - <input type="submit" value="<?= t('Upload files') ?>" class="btn btn-blue" id="file-upload-button" disabled> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> -</div> +<?= $this->modal->submitButtons(array( + 'submitLabel' => t('Upload files'), + 'disabled' => true, +)) ?> diff --git a/app/Template/task_file/files.php b/app/Template/task_file/files.php index 94c26f73..28633dc4 100644 --- a/app/Template/task_file/files.php +++ b/app/Template/task_file/files.php @@ -15,18 +15,20 @@ <ul> <?php if ($this->file->getPreviewType($file['name']) !== null): ?> <li> + <?= $this->modal->large('eye', t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + </li> + <?php elseif ($this->file->getBrowserViewType($file['name']) !== null): ?> + <li> <i class="fa fa-eye fa-fw"></i> - <?= $this->url->link(t('View file'), 'FileViewerController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->url->link(t('View file'), 'FileViewerController', 'browser', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, '', '', true) ?> </li> <?php endif ?> <li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?> <li> - <i class="fa fa-trash fa-fw"></i> - <?= $this->url->link(t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/task_file/images.php b/app/Template/task_file/images.php index 8be89274..2143455d 100644 --- a/app/Template/task_file/images.php +++ b/app/Template/task_file/images.php @@ -16,16 +16,14 @@ <div class="file-thumbnail-content"> <div class="file-thumbnail-title"> <div class="dropdown"> - <a href="#" class="dropdown-menu dropdown-menu-link-text"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a> + <a href="#" class="dropdown-menu dropdown-menu-link-text" title="<?= $this->text->e($file['name']) ?>"><?= $this->text->e($file['name']) ?> <i class="fa fa-caret-down"></i></a> <ul> <li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> + <?= $this->url->icon('download', t('Download'), 'FileViewerController', 'download', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> </li> <?php if ($this->user->hasProjectAccess('TaskFileController', 'remove', $task['project_id'])): ?> <li> - <i class="fa fa-trash fa-fw"></i> - <?= $this->url->link(t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskFileController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/task_file/remove.php b/app/Template/task_file/remove.php index 42894f05..e7ffe560 100644 --- a/app/Template/task_file/remove.php +++ b/app/Template/task_file/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this file: "%s"?', $this->text->e($file['name'])) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskFileController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskFileController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']) + ) ?> </div> diff --git a/app/Template/task_file/screenshot.php b/app/Template/task_file/screenshot.php index 6300159f..dad8c233 100644 --- a/app/Template/task_file/screenshot.php +++ b/app/Template/task_file/screenshot.php @@ -6,14 +6,10 @@ <p id="screenshot-inner"><?= t('Take a screenshot and press CTRL+V or ⌘+V to paste here.') ?></p> </div> -<form class="popover-form" action="<?= $this->url->href('TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post"> - <input type="hidden" name="screenshot"/> +<form action="<?= $this->url->href('TaskFileController', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post"> <?= $this->form->csrf() ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->app->component('screenshot') ?> + <?= $this->modal->submitButtons() ?> </form> <p class="alert alert-info"><?= t('This feature does not work with all browsers.') ?></p> diff --git a/app/Template/task_gantt/show.php b/app/Template/task_gantt/show.php index c5d338fb..61a476b7 100644 --- a/app/Template/task_gantt/show.php +++ b/app/Template/task_gantt/show.php @@ -3,16 +3,13 @@ <div class="menu-inline"> <ul> <li <?= $sorting === 'board' ? 'class="active"' : '' ?>> - <i class="fa fa-sort-numeric-asc fa-fw"></i> - <?= $this->url->link(t('Sort by position'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'board')) ?> + <?= $this->url->icon('sort-numeric-asc', t('Sort by position'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'board')) ?> </li> <li <?= $sorting === 'date' ? 'class="active"' : '' ?>> - <i class="fa fa-sort-amount-asc fa-fw"></i> - <?= $this->url->link(t('Sort by date'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'date')) ?> + <?= $this->url->icon('sort-amount-asc', t('Sort by date'), 'TaskGanttController', 'show', array('project_id' => $project['id'], 'sorting' => 'date')) ?> </li> <li> - <i class="fa fa-plus fa-fw"></i> - <?= $this->url->link(t('Add task'), 'TaskGanttCreationController', 'show', array('project_id' => $project['id']), false, 'popover') ?> + <?= $this->modal->large('plus', t('Add task'), 'TaskCreationController', 'show', array('project_id' => $project['id'])) ?> </li> </ul> </div> diff --git a/app/Template/task_gantt_creation/show.php b/app/Template/task_gantt_creation/show.php deleted file mode 100644 index 7906c39a..00000000 --- a/app/Template/task_gantt_creation/show.php +++ /dev/null @@ -1,46 +0,0 @@ -<div class="page-header"> - <h2><?= $this->text->e($project['name']) ?> > <?= t('New task') ?></h2> -</div> -<form class="popover-form" method="post" action="<?= $this->url->href('TaskGanttCreationController', 'save', array('project_id' => $values['project_id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('project_id', $values) ?> - <?= $this->form->hidden('column_id', $values) ?> - <?= $this->form->hidden('position', $values) ?> - - <div class="form-columns"> - <div class="form-column"> - <?= $this->task->selectTitle($values, $errors) ?> - <?= $this->task->selectDescription($values, $errors) ?> - <?= $this->task->selectTags($project) ?> - - <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> - </div> - - <div class="form-column"> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectSwimlane($swimlanes_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectReference($values, $errors) ?> - - <?= $this->hook->render('template:task:form:second-column', array('values' => $values, 'errors' => $errors)) ?> - </div> - - <div class="form-column"> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectTimeSpent($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectDueDate($values, $errors) ?> - - <?= $this->hook->render('template:task:form:third-column', array('values' => $values, 'errors' => $errors)) ?> - </div> - </div> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskGanttController', 'show', array('project_id' => $values['project_id']), false, 'close-popover') ?> - </div> -</form> diff --git a/app/Template/task_import/show.php b/app/Template/task_import/show.php index cc6a7b3a..20b020d3 100644 --- a/app/Template/task_import/show.php +++ b/app/Template/task_import/show.php @@ -15,14 +15,11 @@ <p class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></p> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Import') ?></button> - </div> + <?= $this->modal->submitButtons(array('submitLabel' => t('Import'))) ?> </form> -<div class="page-header"> - <h2><?= t('Instructions') ?></h2> -</div> -<div class="alert"> + +<div class="panel"> + <h3><?= t('Instructions') ?></h3> <ul> <li><?= t('Your file must use the predefined CSV format') ?></li> <li><?= t('Your file must be encoded in UTF-8') ?></li> @@ -30,5 +27,7 @@ <li><?= t('Duplicates are not verified for you') ?></li> <li><?= t('The due date must use the ISO format: YYYY-MM-DD') ?></li> </ul> + <p class="margin-top"> + <?= $this->url->icon('download', t('Download CSV template'), 'TaskImportController', 'template', array('project_id' => $project['id'])) ?> + </p> </div> -<p><i class="fa fa-download fa-fw"></i><?= $this->url->link(t('Download CSV template'), 'TaskImportController', 'template', array('project_id' => $project['id'])) ?></p> diff --git a/app/Template/task_import/sidebar.php b/app/Template/task_import/sidebar.php deleted file mode 100644 index 04896948..00000000 --- a/app/Template/task_import/sidebar.php +++ /dev/null @@ -1,8 +0,0 @@ -<div class="sidebar"> - <ul> - <li <?= $this->app->checkMenuSelection('TaskImportController', 'show') ?>> - <?= $this->url->link(t('Tasks').' (CSV)', 'TaskImportController', 'show', array('project_id' => $project['id'])) ?> - </li> - <?= $this->hook->render('template:task-import:sidebar') ?> - </ul> -</div> diff --git a/app/Template/task_internal_link/create.php b/app/Template/task_internal_link/create.php index fed29605..3c39b87c 100644 --- a/app/Template/task_internal_link/create.php +++ b/app/Template/task_internal_link/create.php @@ -2,7 +2,7 @@ <h2><?= t('Add a new link') ?></h2> </div> -<form class="popover-form" action="<?= $this->url->href('TaskInternalLinkController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> +<form action="<?= $this->url->href('TaskInternalLinkController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?> @@ -25,9 +25,5 @@ ), 'autocomplete') ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_internal_link/edit.php b/app/Template/task_internal_link/edit.php index f4df57bd..5abf7b65 100644 --- a/app/Template/task_internal_link/edit.php +++ b/app/Template/task_internal_link/edit.php @@ -26,9 +26,5 @@ ), 'autocomplete') ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_internal_link/remove.php b/app/Template/task_internal_link/remove.php index 966ad116..f8d91a81 100644 --- a/app/Template/task_internal_link/remove.php +++ b/app/Template/task_internal_link/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this link with task #%d?', $link['opposite_task_id']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskInternalLinkController', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskInternalLinkController', + 'remove', + array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']) + ) ?> </div> diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php index 3a3a2b88..255ecc97 100644 --- a/app/Template/task_internal_link/table.php +++ b/app/Template/task_internal_link/table.php @@ -73,12 +73,10 @@ <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> - <i class="fa fa-edit fa-fw"></i> - <?= $this->url->link(t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->medium('edit', t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> <li> - <i class="fa fa-trash-o fa-fw"></i> - <?= $this->url->link(t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> </li> </ul> </div> diff --git a/app/Template/task_modification/show.php b/app/Template/task_modification/show.php index 734b247a..710abedf 100644 --- a/app/Template/task_modification/show.php +++ b/app/Template/task_modification/show.php @@ -1,44 +1,42 @@ <div class="page-header"> <h2><?= $this->text->e($project['name']) ?> > <?= $this->text->e($task['title']) ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->url->href('TaskModificationController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> <?= $this->form->hidden('project_id', $values) ?> - <div class="form-columns"> - <div class="form-column"> - <?= $this->task->selectTitle($values, $errors) ?> - <?= $this->task->selectDescription($values, $errors) ?> - <?= $this->task->selectTags($project, $tags) ?> + <div class="task-form-container"> + <div class="task-form-main-column"> + <?= $this->task->renderTitleField($values, $errors) ?> + <?= $this->task->renderDescriptionField($values, $errors) ?> + <?= $this->task->renderTagField($project, $tags) ?> <?= $this->hook->render('template:task:form:first-column', array('values' => $values, 'errors' => $errors)) ?> </div> - <div class="form-column"> - <?= $this->task->selectColor($values) ?> - <?= $this->task->selectAssignee($users_list, $values, $errors) ?> - <?= $this->task->selectCategory($categories_list, $values, $errors) ?> - <?= $this->task->selectPriority($project, $values) ?> - <?= $this->task->selectScore($values, $errors) ?> - <?= $this->task->selectReference($values, $errors) ?> + <div class="task-form-secondary-column"> + <?= $this->task->renderColorField($values) ?> + <?= $this->task->renderAssigneeField($users_list, $values, $errors) ?> + <?= $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="form-column"> - <?= $this->task->selectTimeEstimated($values, $errors) ?> - <?= $this->task->selectTimeSpent($values, $errors) ?> - <?= $this->task->selectStartDate($values, $errors) ?> - <?= $this->task->selectDueDate($values, $errors) ?> + <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> - <div class="form-actions"> - <button type="submit" class="btn btn-blue" tabindex="15"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + <div class="task-form-bottom"> + <?= $this->modal->submitButtons() ?> + </div> </div> </form> diff --git a/app/Template/task_move_position/show.php b/app/Template/task_move_position/show.php index 91241016..a73be785 100644 --- a/app/Template/task_move_position/show.php +++ b/app/Template/task_move_position/show.php @@ -14,10 +14,6 @@ 'afterLabel' => t('Insert after this task'), )) ?> -<?= $this->app->component('submit-cancel', array( - 'submitLabel' => t('Save'), - 'orLabel' => t('or'), - 'cancelLabel' => t('cancel'), -)) ?> +<?= $this->modal->submitButtons() ?> </form> diff --git a/app/Template/task_recurrence/edit.php b/app/Template/task_recurrence/edit.php index 09d14826..0db27d46 100644 --- a/app/Template/task_recurrence/edit.php +++ b/app/Template/task_recurrence/edit.php @@ -3,7 +3,7 @@ </div> <?php if ($task['recurrence_status'] != \Kanboard\Model\TaskModel::RECURRING_STATUS_NONE): ?> -<div class="listing"> +<div class="panel"> <?= $this->render('task_recurrence/info', array( 'task' => $task, 'recurrence_trigger_list' => $recurrence_trigger_list, @@ -15,7 +15,7 @@ <?php if ($task['recurrence_status'] != \Kanboard\Model\TaskModel::RECURRING_STATUS_PROCESSED): ?> - <form class="popover-form" method="post" action="<?= $this->url->href('TaskRecurrenceController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> + <form method="post" action="<?= $this->url->href('TaskRecurrenceController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> @@ -37,11 +37,7 @@ <?= $this->form->label(t('Base date to calculate new due date'), 'recurrence_basedate') ?> <?= $this->form->select('recurrence_basedate', $recurrence_basedate_list, $values, $errors) ?> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons() ?> </form> <?php endif ?> diff --git a/app/Template/task_status/close.php b/app/Template/task_status/close.php index 2d7b0ce5..0bf3c8e3 100644 --- a/app/Template/task_status/close.php +++ b/app/Template/task_status/close.php @@ -7,9 +7,9 @@ <?= t('Do you really want to close the task "%s" as well as all subtasks?', $task['title']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskStatusController', 'close', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskStatusController', + 'close', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') + ) ?> </div> diff --git a/app/Template/task_status/open.php b/app/Template/task_status/open.php index 242b5db5..42765e34 100644 --- a/app/Template/task_status/open.php +++ b/app/Template/task_status/open.php @@ -7,9 +7,9 @@ <?= t('Do you really want to open this task: "%s"?', $task['title']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskStatusController', 'open', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes'), true, 'btn btn-red popover-link') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskStatusController', + 'open', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'confirmation' => 'yes') + ) ?> </div> diff --git a/app/Template/task_suppression/remove.php b/app/Template/task_suppression/remove.php index 5d0f7720..4b0666d8 100644 --- a/app/Template/task_suppression/remove.php +++ b/app/Template/task_suppression/remove.php @@ -7,9 +7,9 @@ <?= t('Do you really want to remove this task: "%s"?', $this->text->e($task['title'])) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TaskSuppressionController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect), true, 'btn btn-red popover-link') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'TaskSuppressionController', + 'remove', + array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'redirect' => $redirect) + ) ?> </div> diff --git a/app/Template/twofactor/disable.php b/app/Template/twofactor/disable.php index bc419181..c44c450f 100644 --- a/app/Template/twofactor/disable.php +++ b/app/Template/twofactor/disable.php @@ -7,8 +7,9 @@ <?= t('Do you really want to disable the two factor authentication for this user: "%s"?', $user['name'] ?: $user['username']) ?> </p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'TwoFactorController', 'disable', array('user_id' => $user['id'], 'disable' => 'yes'), true, 'btn btn-red') ?> - <?= t('or') ?> <?= $this->url->link(t('cancel'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?> - </div> + <?= $this->modal->confirmButtons( + 'TwoFactorController', + 'disable', + array('user_id' => $user['id'], 'disable' => 'yes') + ) ?> </div> diff --git a/app/Template/twofactor/show.php b/app/Template/twofactor/show.php index 0aeef427..a5bdeccb 100644 --- a/app/Template/twofactor/show.php +++ b/app/Template/twofactor/show.php @@ -3,7 +3,7 @@ </div> <?php if (! empty($secret) || ! empty($qrcode_url) || ! empty($key_url)): ?> -<div class="listing"> +<div class="panel"> <?php if (! empty($secret)): ?> <p><?= t('Secret key: ') ?><strong><?= $this->text->e($secret) ?></strong></p> <?php endif ?> diff --git a/app/Template/user_creation/remote.php b/app/Template/user_creation/remote.php deleted file mode 100644 index 41d0d3c7..00000000 --- a/app/Template/user_creation/remote.php +++ /dev/null @@ -1,51 +0,0 @@ -<div class="page-header"> - <h2><?= t('New remote user') ?></h2> -</div> -<form class="popover-form" method="post" action="<?= $this->url->href('UserCreationController', 'save') ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('is_ldap_user', array('is_ldap_user' => 1)) ?> - - <div class="form-columns"> - <div class="form-column"> - <?= $this->form->label(t('Username'), 'username') ?> - <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> - - <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors) ?> - - <?= $this->form->label(t('Email'), 'email') ?> - <?= $this->form->email('email', $values, $errors) ?> - - <?= $this->hook->render('template:user:create-remote:form', array('values' => $values, 'errors' => $errors)) ?> - </div> - - <div class="form-column"> - <?= $this->form->label(t('Add project member'), 'project_id') ?> - <?= $this->form->select('project_id', $projects, $values, $errors) ?> - - <?= $this->form->label(t('Timezone'), 'timezone') ?> - <?= $this->form->select('timezone', $timezones, $values, $errors) ?> - - <?= $this->form->label(t('Language'), 'language') ?> - <?= $this->form->select('language', $languages, $values, $errors) ?> - - <?= $this->form->label(t('Role'), 'role') ?> - <?= $this->form->select('role', $roles, $values, $errors) ?> - - <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> - <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> - </div> - </div> - - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> - </div> -</form> -<div class="alert alert-info"> - <ul> - <li><?= t('Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.') ?></li> - <li><?= t('If you check the box "Disallow login form", credentials entered in the login form will be ignored.') ?></li> - </ul> -</div> diff --git a/app/Template/user_creation/show.php b/app/Template/user_creation/show.php new file mode 100644 index 00000000..597dce55 --- /dev/null +++ b/app/Template/user_creation/show.php @@ -0,0 +1,67 @@ +<div class="page-header"> + <h2><?= t('New User') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('UserCreationController', 'save') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <div class="form-columns"> + <div class="form-column"> + <fieldset> + <legend><?= t('Profile') ?></legend> + + <?= $this->form->label(t('Username'), 'username') ?> + <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> + + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors) ?> + + <?= $this->form->label(t('Email'), 'email') ?> + <?= $this->form->email('email', $values, $errors) ?> + </fieldset> + + <fieldset> + <legend><?= t('Authentication') ?></legend> + <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?> + <p class="form-help"><?= t('If checked, this user will use a third-party system for authentication.') ?></p> + + <?= $this->form->label(t('Password'), 'password') ?> + <?= $this->form->password('password', $values, $errors) ?> + <p class="form-help"><?= t('The password is necessary only for local users.') ?></p> + + <?= $this->form->label(t('Confirmation'), 'confirmation') ?> + <?= $this->form->password('confirmation', $values, $errors) ?> + </fieldset> + </div> + + <div class="form-column"> + <fieldset> + <legend><?= t('Security') ?></legend> + + <?= $this->form->label(t('Role'), 'role') ?> + <?= $this->form->select('role', $roles, $values, $errors) ?> + + <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + </fieldset> + + <fieldset> + <legend><?= t('Preferences') ?></legend> + <?= $this->form->label(t('Timezone'), 'timezone') ?> + <?= $this->form->select('timezone', $timezones, $values, $errors) ?> + + <?= $this->form->label(t('Language'), 'language') ?> + <?= $this->form->select('language', $languages, $values, $errors) ?> + + <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> + </fieldset> + + <fieldset> + <legend><?= t('Projects') ?></legend> + + <?= $this->form->label(t('Add this person to this project'), 'project_id') ?> + <?= $this->form->select('project_id', $projects, $values, $errors) ?> + </fieldset> + </div> + </div> + + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/user_credential/authentication.php b/app/Template/user_credential/authentication.php index fbe2e915..98c0d758 100644 --- a/app/Template/user_credential/authentication.php +++ b/app/Template/user_credential/authentication.php @@ -4,13 +4,15 @@ <form method="post" action="<?= $this->url->href('UserCredentialController', 'saveAuthentication', array('user_id' => $user['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->hidden('username', $values) ?> + <fieldset> + <?= $this->form->hidden('id', $values) ?> + <?= $this->form->hidden('username', $values) ?> - <?= $this->hook->render('template:user:authentication:form', array('values' => $values, 'errors' => $errors, 'user' => $user)) ?> + <?= $this->hook->render('template:user:authentication:form', array('values' => $values, 'errors' => $errors, 'user' => $user)) ?> - <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?> - <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?> + <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> diff --git a/app/Template/user_credential/password.php b/app/Template/user_credential/password.php index 5a6e4403..bd7a47da 100644 --- a/app/Template/user_credential/password.php +++ b/app/Template/user_credential/password.php @@ -6,14 +6,16 @@ <?= $this->form->hidden('id', $values) ?> <?= $this->form->csrf() ?> - <?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?> - <?= $this->form->password('current_password', $values, $errors) ?> + <fieldset> + <?= $this->form->label(t('Current password for the user "%s"', $this->user->getFullname()), 'current_password') ?> + <?= $this->form->password('current_password', $values, $errors) ?> - <?= $this->form->label(t('New password for the user "%s"', $this->user->getFullname($user)), 'password') ?> - <?= $this->form->password('password', $values, $errors) ?> + <?= $this->form->label(t('New password for the user "%s"', $this->user->getFullname($user)), 'password') ?> + <?= $this->form->password('password', $values, $errors) ?> - <?= $this->form->label(t('Confirmation'), 'confirmation') ?> - <?= $this->form->password('confirmation', $values, $errors) ?> + <?= $this->form->label(t('Confirmation'), 'confirmation') ?> + <?= $this->form->password('confirmation', $values, $errors) ?> + </fieldset> <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> diff --git a/app/Template/user_import/show.php b/app/Template/user_import/show.php index 663f107e..3b0e599c 100644 --- a/app/Template/user_import/show.php +++ b/app/Template/user_import/show.php @@ -2,8 +2,7 @@ <h2><?= t('Import users from CSV file') ?></h2> <ul> <li> - <i class="fa fa-download fa-fw"></i> - <?= $this->url->link(t('Download CSV template'), 'UserImportController', 'template') ?> + <?= $this->url->icon('download', t('Download CSV template'), 'UserImportController', 'template') ?> </li> </ul> </div> @@ -33,9 +32,5 @@ <p class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></p> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Import') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->submitButtons(array('submitLabel' => t('Import'))) ?> </form> diff --git a/app/Template/user_invite/email.php b/app/Template/user_invite/email.php new file mode 100644 index 00000000..674e4a84 --- /dev/null +++ b/app/Template/user_invite/email.php @@ -0,0 +1,12 @@ +<p> + <?= t('You have been invited to register on Kanboard.') ?> +</p> + +<p> + <?= $this->url->absoluteLink(t('Click here to join your team'), 'UserInviteController', 'signup', array('token' => $token)) ?> +</p> + +<?php if ($this->app->config('application_url')): ?> + <hr> + <a href="<?= $this->app->config('application_url') ?>">Kanboard</a> +<?php endif ?> diff --git a/app/Template/user_invite/show.php b/app/Template/user_invite/show.php new file mode 100644 index 00000000..9d822248 --- /dev/null +++ b/app/Template/user_invite/show.php @@ -0,0 +1,15 @@ +<div class="page-header"> + <h2><?= t('Invite people') ?></h2> +</div> +<form method="post" action="<?= $this->url->href('UserInviteController', 'save') ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <?= $this->form->label(t('Emails'), 'emails') ?> + <?= $this->form->textarea('emails', $values, $errors, array('required', 'autofocus')) ?> + <p class="form-help"><?= t('Enter one email address by line.') ?></p> + + <?= $this->form->label(t('Add these people to this project'), 'project_id') ?> + <?= $this->form->select('project_id', $projects, $values, $errors) ?> + + <?= $this->modal->submitButtons() ?> +</form> diff --git a/app/Template/user_creation/local.php b/app/Template/user_invite/signup.php index 059a0114..51edbab7 100644 --- a/app/Template/user_creation/local.php +++ b/app/Template/user_invite/signup.php @@ -1,11 +1,13 @@ -<div class="page-header"> - <h2><?= t('New local user') ?></h2> -</div> -<form class="popover-form" method="post" action="<?= $this->url->href('UserCreationController', 'save') ?>" autocomplete="off"> - <?= $this->form->csrf() ?> +<div class="form-login"> + <div class="page-header"> + <h2><?= t('Sign-up') ?></h2> + </div> + <form method="post" action="<?= $this->url->href('UserInviteController', 'register', array('token' => $token)) ?>" autocomplete="off"> + <?= $this->form->csrf() ?> + + <fieldset> + <legend><?= t('Profile') ?></legend> - <div class="form-columns"> - <div class="form-column"> <?= $this->form->label(t('Username'), 'username') ?> <?= $this->form->text('username', $values, $errors, array('autofocus', 'required', 'maxlength="50"')) ?> @@ -13,18 +15,20 @@ <?= $this->form->text('name', $values, $errors) ?> <?= $this->form->label(t('Email'), 'email') ?> - <?= $this->form->email('email', $values, $errors) ?> + <?= $this->form->email('email', $values, $errors, array('required')) ?> + </fieldset> + <fieldset> + <legend><?= t('Credentials') ?></legend> <?= $this->form->label(t('Password'), 'password') ?> <?= $this->form->password('password', $values, $errors, array('required')) ?> <?= $this->form->label(t('Confirmation'), 'confirmation') ?> <?= $this->form->password('confirmation', $values, $errors, array('required')) ?> - </div> + </fieldset> - <div class="form-column"> - <?= $this->form->label(t('Add project member'), 'project_id') ?> - <?= $this->form->select('project_id', $projects, $values, $errors) ?> + <fieldset> + <legend><?= t('Preferences') ?></legend> <?= $this->form->label(t('Timezone'), 'timezone') ?> <?= $this->form->select('timezone', $timezones, $values, $errors) ?> @@ -32,16 +36,11 @@ <?= $this->form->label(t('Language'), 'language') ?> <?= $this->form->select('language', $languages, $values, $errors) ?> - <?= $this->form->label(t('Role'), 'role') ?> - <?= $this->form->select('role', $roles, $values, $errors) ?> - <?= $this->form->checkbox('notifications_enabled', t('Enable email notifications'), 1, isset($values['notifications_enabled']) && $values['notifications_enabled'] == 1 ? true : false) ?> - </div> - </div> + </fieldset> - <div class="form-actions"> - <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> - </div> -</form> + <div class="form-actions"> + <button class="btn btn-blue"><?= t('Sign-up') ?></button> + </div> + </form> +</div>
\ No newline at end of file diff --git a/app/Template/user_list/dropdown.php b/app/Template/user_list/dropdown.php index 9e90c230..d18f20aa 100644 --- a/app/Template/user_list/dropdown.php +++ b/app/Template/user_list/dropdown.php @@ -2,25 +2,21 @@ <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> - <i class="fa fa-user fa-fw"></i> - <?= $this->url->link(t('View profile'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?> + <?= $this->url->icon('user', t('View profile'), 'UserViewController', 'show', array('user_id' => $user['id'])) ?> </li> <?php if ($user['is_active'] == 1 && $this->user->hasAccess('UserStatusController', 'disable') && ! $this->user->isCurrentUser($user['id'])): ?> <li> - <i class="fa fa-times fa-fw"></i> - <?= $this->url->link(t('Disable'), 'UserStatusController', 'confirmDisable', array('user_id' => $user['id']), false, 'popover') ?> + <?= $this->modal->confirm('times', t('Disable'), 'UserStatusController', 'confirmDisable', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($user['is_active'] == 0 && $this->user->hasAccess('UserStatusController', 'enable') && ! $this->user->isCurrentUser($user['id'])): ?> <li> - <i class="fa fa-check-square-o fa-fw"></i> - <?= $this->url->link(t('Enable'), 'UserStatusController', 'confirmEnable', array('user_id' => $user['id']), false, 'popover') ?> + <?= $this->modal->confirm('check-square-o', t('Enable'), 'UserStatusController', 'confirmEnable', array('user_id' => $user['id'])) ?> </li> <?php endif ?> <?php if ($this->user->hasAccess('UserStatusController', 'remove') && ! $this->user->isCurrentUser($user['id'])): ?> <li> - <i class="fa fa-trash-o fa-fw"></i> - <?= $this->url->link(t('Remove'), 'UserStatusController', 'confirmRemove', array('user_id' => $user['id']), false, 'popover') ?> + <?= $this->modal->confirm('trash-o', t('Remove'), 'UserStatusController', 'confirmRemove', array('user_id' => $user['id'])) ?> </li> <?php endif ?> </ul> diff --git a/app/Template/user_list/show.php b/app/Template/user_list/show.php index 5e285c89..e83895ea 100644 --- a/app/Template/user_list/show.php +++ b/app/Template/user_list/show.php @@ -2,10 +2,18 @@ <div class="page-header"> <?php if ($this->user->hasAccess('UserCreationController', 'show')): ?> <ul> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'UserCreationController', 'show', array(), false, 'popover') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'UserCreationController', 'show', array('remote' => 1), false, 'popover') ?></li> - <li><i class="fa fa-upload fa-fw"></i><?= $this->url->link(t('Import'), 'UserImportController', 'show', array(), false, 'popover') ?></li> - <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li> + <li> + <?= $this->modal->medium('plus', t('New user'), 'UserCreationController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('paper-plane', t('Invite people'), 'UserInviteController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('upload', t('Import'), 'UserImportController', 'show') ?> + </li> + <li> + <?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?> + </li> </ul> <?php endif ?> </div> diff --git a/app/Template/user_modification/show.php b/app/Template/user_modification/show.php index 506c9161..d3f3e0cc 100644 --- a/app/Template/user_modification/show.php +++ b/app/Template/user_modification/show.php @@ -2,29 +2,36 @@ <h2><?= t('Edit user') ?></h2> </div> <form method="post" action="<?= $this->url->href('UserModificationController', 'save', array('user_id' => $user['id'])) ?>" autocomplete="off"> - <?= $this->form->csrf() ?> - <?= $this->form->hidden('id', $values) ?> - <?= $this->form->label(t('Username'), 'username') ?> - <?= $this->form->text('username', $values, $errors, array('required', isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?> + <fieldset> + <legend><?= t('Profile') ?></legend> + <?= $this->form->label(t('Username'), 'username') ?> + <?= $this->form->text('username', $values, $errors, array('required', isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1 ? 'readonly' : '', 'maxlength="50"')) ?> - <?= $this->form->label(t('Name'), 'name') ?> - <?= $this->form->text('name', $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_name') ? '' : 'readonly')) ?> + <?= $this->form->label(t('Name'), 'name') ?> + <?= $this->form->text('name', $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_name') ? '' : 'readonly')) ?> - <?= $this->form->label(t('Email'), 'email') ?> - <?= $this->form->email('email', $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_email') ? '' : 'readonly')) ?> + <?= $this->form->label(t('Email'), 'email') ?> + <?= $this->form->email('email', $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_email') ? '' : 'readonly')) ?> + </fieldset> - <?= $this->form->label(t('Timezone'), 'timezone') ?> - <?= $this->form->select('timezone', $timezones, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_timezone') ? '' : 'disabled')) ?> + <fieldset> + <legend><?= t('Preferences') ?></legend> + <?= $this->form->label(t('Timezone'), 'timezone') ?> + <?= $this->form->select('timezone', $timezones, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_timezone') ? '' : 'disabled')) ?> - <?= $this->form->label(t('Language'), 'language') ?> - <?= $this->form->select('language', $languages, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_language') ? '' : 'disabled')) ?> + <?= $this->form->label(t('Language'), 'language') ?> + <?= $this->form->select('language', $languages, $values, $errors, array($this->user->hasAccess('UserModificationController', 'show/edit_language') ? '' : 'disabled')) ?> + </fieldset> <?php if ($this->user->isAdmin()): ?> - <?= $this->form->label(t('Role'), 'role') ?> + <fieldset> + <legend><?= t('Security') ?></legend> + <?= $this->form->label(t('Application role'), 'role') ?> <?= $this->form->select('role', $roles, $values, $errors) ?> + </fieldset> <?php endif ?> <div class="form-actions"> diff --git a/app/Template/user_status/disable.php b/app/Template/user_status/disable.php index d30b0c20..1309b080 100644 --- a/app/Template/user_status/disable.php +++ b/app/Template/user_status/disable.php @@ -5,9 +5,9 @@ <div class="confirm"> <p class="alert alert-info"><?= t('Do you really want to disable this user: "%s"?', $user['name'] ?: $user['username']) ?></p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'UserStatusController', 'disable', array('user_id' => $user['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'UserStatusController', + 'disable', + array('user_id' => $user['id']) + ) ?> </div> diff --git a/app/Template/user_status/enable.php b/app/Template/user_status/enable.php index 29d25eee..2413739e 100644 --- a/app/Template/user_status/enable.php +++ b/app/Template/user_status/enable.php @@ -5,9 +5,9 @@ <div class="confirm"> <p class="alert alert-info"><?= t('Do you really want to enable this user: "%s"?', $user['name'] ?: $user['username']) ?></p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'UserStatusController', 'enable', array('user_id' => $user['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'UserStatusController', + 'enable', + array('user_id' => $user['id']) + ) ?> </div> diff --git a/app/Template/user_status/remove.php b/app/Template/user_status/remove.php index 2b8f2df5..6cd3f63a 100644 --- a/app/Template/user_status/remove.php +++ b/app/Template/user_status/remove.php @@ -5,9 +5,9 @@ <div class="confirm"> <p class="alert alert-info"><?= t('Do you really want to remove this user: "%s"?', $user['name'] ?: $user['username']) ?></p> - <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'UserStatusController', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?> - <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'UserListController', 'show', array(), false, 'close-popover') ?> - </div> + <?= $this->modal->confirmButtons( + 'UserStatusController', + 'remove', + array('user_id' => $user['id']) + ) ?> </div> diff --git a/app/Template/user_view/layout.php b/app/Template/user_view/layout.php index c3604b99..8f24adcc 100644 --- a/app/Template/user_view/layout.php +++ b/app/Template/user_view/layout.php @@ -2,11 +2,18 @@ <div class="page-header"> <?php if ($this->user->hasAccess('UserCreationController', 'show')): ?> <ul> - <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'UserListController', 'show') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'UserCreationController', 'show', array(), false, 'popover') ?></li> - <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'UserCreationController', 'show', array('remote' => 1), false, 'popover') ?></li> - <li><i class="fa fa-upload fa-fw"></i><?= $this->url->link(t('Import'), 'UserImportController', 'show', array(), false, 'popover') ?></li> - <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li> + <li> + <?= $this->url->icon('user', t('All users'), 'UserListController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('plus', t('New user'), 'UserCreationController', 'show') ?> + </li> + <li> + <?= $this->modal->medium('upload', t('Import'), 'UserImportController', 'show') ?> + </li> + <li> + <?= $this->url->icon('users', t('View all groups'), 'GroupListController', 'index') ?> + </li> </ul> <?php endif ?> </div> diff --git a/app/Template/user_view/profile.php b/app/Template/user_view/profile.php index 9c9d3282..486ca428 100644 --- a/app/Template/user_view/profile.php +++ b/app/Template/user_view/profile.php @@ -1,9 +1,11 @@ <section id="main"> <br> <?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path']) ?> - <ul class="listing"> - <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> - <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> - <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li> - </ul> -</section>
\ No newline at end of file + <div class="panel"> + <ul> + <li><?= t('Login:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> + <li><?= t('Full Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> + <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li> + </ul> + </div> +</section> diff --git a/app/Template/user_view/share.php b/app/Template/user_view/share.php index 570b766e..318d98ea 100644 --- a/app/Template/user_view/share.php +++ b/app/Template/user_view/share.php @@ -3,10 +3,10 @@ </div> <?php if (! empty($user['token'])): ?> - <div class="listing"> + <div class="panel"> <ul class="no-bullet"> - <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> </ul> </div> <?= $this->url->link(t('Disable public access'), 'UserViewController', 'share', array('user_id' => $user['id'], 'switch' => 'disable'), true, 'btn btn-red') ?> diff --git a/app/Template/user_view/show.php b/app/Template/user_view/show.php index 2f5a73af..e57fd4cd 100644 --- a/app/Template/user_view/show.php +++ b/app/Template/user_view/show.php @@ -1,9 +1,9 @@ <div class="page-header"> <h2><?= t('Summary') ?></h2> </div> -<ul class="listing"> - <li><?= t('Username:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> - <li><?= t('Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> +<ul class="panel"> + <li><?= t('Login:') ?> <strong><?= $this->text->e($user['username']) ?></strong></li> + <li><?= t('Full Name:') ?> <strong><?= $this->text->e($user['name']) ?: t('None') ?></strong></li> <li><?= t('Email:') ?> <strong><?= $this->text->e($user['email']) ?: t('None') ?></strong></li> <li><?= t('Status:') ?> <strong><?= $user['is_active'] ? t('Active') : t('Inactive') ?></strong></li> </ul> @@ -11,7 +11,7 @@ <div class="page-header"> <h2><?= t('Security') ?></h2> </div> -<ul class="listing"> +<ul class="panel"> <li><?= t('Role:') ?> <strong><?= $this->user->getRoleName($user['role']) ?></strong></li> <li><?= t('Account type:') ?> <strong><?= $user['is_ldap_user'] ? t('Remote') : t('Local') ?></strong></li> <li><?= $user['twofactor_activated'] == 1 ? t('Two factor authentication enabled') : t('Two factor authentication disabled') ?></li> @@ -29,7 +29,7 @@ <div class="page-header"> <h2><?= t('Preferences') ?></h2> </div> -<ul class="listing"> +<ul class="panel"> <li><?= t('Timezone:') ?> <strong><?= $this->text->in($user['timezone'], $timezones) ?></strong></li> <li><?= t('Language:') ?> <strong><?= $this->text->in($user['language'], $languages) ?></strong></li> <li><?= t('Notifications:') ?> <strong><?= $user['notifications_enabled'] == 1 ? t('Enabled') : t('Disabled') ?></strong></li> @@ -40,10 +40,10 @@ <h2><?= t('Public access') ?></h2> </div> - <div class="listing"> + <div class="panel"> <ul class="no-bullet"> - <li><strong><i class="fa fa-rss-square"></i> <?= $this->url->link(t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> - <li><strong><i class="fa fa-calendar"></i> <?= $this->url->link(t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('rss-square', t('RSS feed'), 'FeedController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> + <li><strong><?= $this->url->icon('calendar', t('iCal feed'), 'ICalendarController', 'user', array('token' => $user['token']), false, '', '', true) ?></strong></li> </ul> </div> <?php endif ?> |
