From 388928a6f0e3309c7eddf579ef9dcc55de2712f0 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 16 Jan 2017 11:30:31 +0200 Subject: [PATCH] Clean up project workflow --- app/Ninja/Presenters/TaskPresenter.php | 2 +- resources/views/list.blade.php | 1 + resources/views/projects/edit.blade.php | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/Ninja/Presenters/TaskPresenter.php b/app/Ninja/Presenters/TaskPresenter.php index bec387f065..5ac73af531 100644 --- a/app/Ninja/Presenters/TaskPresenter.php +++ b/app/Ninja/Presenters/TaskPresenter.php @@ -40,7 +40,7 @@ class TaskPresenter extends EntityPresenter $str = ''; if ($showProject && $project = $this->project()) { - $str .= "##{$project}\n\n"; + $str .= "## {$project}\n\n"; } if ($description = trim($this->entity->description)) { diff --git a/resources/views/list.blade.php b/resources/views/list.blade.php index b2019484d2..ebb9006053 100644 --- a/resources/views/list.blade.php +++ b/resources/views/list.blade.php @@ -53,6 +53,7 @@ {!! Button::normal(trans('texts.categories'))->asLinkTo(URL::to('/expense_categories'))->appendIcon(Icon::create('list')) !!} @elseif ($entityType == ENTITY_TASK) {!! Button::normal(trans('texts.projects'))->asLinkTo(URL::to('/projects'))->appendIcon(Icon::create('list')) !!} + {!! Button::primary(trans('texts.new_project'))->asLinkTo(URL::to('/projects/create/' . (isset($clientId) ? $clientId : '')))->appendIcon(Icon::create('plus-sign')) !!} @endif @if (Auth::user()->can('create', $entityType) && empty($vendorId)) diff --git a/resources/views/projects/edit.blade.php b/resources/views/projects/edit.blade.php index 62f68e5ed2..e9e366a832 100644 --- a/resources/views/projects/edit.blade.php +++ b/resources/views/projects/edit.blade.php @@ -76,9 +76,14 @@ @if ($clientPublicId) $clientSelect.val({{ $clientPublicId }}); @endif - $clientSelect.combobox().focus(); - $('.client-select input.form-control').focus(); + $clientSelect.combobox(); + + @if ($clientPublicId) + $('#name').focus(); + @else + $('.client-select input.form-control').focus(); + @endif });