mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on projects
This commit is contained in:
parent
e7a47a9f42
commit
9e4afb9b99
@ -49,6 +49,20 @@ class ProjectController extends BaseController
|
||||
return $this->projectService->getDatatable($search, $userId);
|
||||
}
|
||||
|
||||
public function show(ProjectRequest $request)
|
||||
{
|
||||
$project = $request->entity();
|
||||
|
||||
$data = [
|
||||
'account' => auth()->user()->account,
|
||||
'project' => $project,
|
||||
'title' => trans('texts.view_project'),
|
||||
'showBreadcrumbs' => false,
|
||||
];
|
||||
|
||||
return View::make('projects.show', $data);
|
||||
}
|
||||
|
||||
public function create(ProjectRequest $request)
|
||||
{
|
||||
$data = [
|
||||
|
@ -21,7 +21,7 @@ class ProjectDatatable extends EntityDatatable
|
||||
return $model->project;
|
||||
}
|
||||
|
||||
$str = link_to("projects/{$model->public_id}/edit", $model->project)->toHtml();
|
||||
$str = link_to("projects/{$model->public_id}", $model->project)->toHtml();
|
||||
return $this->addNote($str, $model->private_notes);
|
||||
},
|
||||
],
|
||||
|
@ -2624,6 +2624,8 @@ $LANG = array(
|
||||
'convert_products_help' => 'Automatically convert product prices to the client\'s currency',
|
||||
'improve_client_portal_link' => 'Set a subdomain to shorten the client portal link.',
|
||||
'budgeted_hours' => 'Budgeted Hours',
|
||||
'progress' => 'Progress',
|
||||
'view_project' => 'View Project',
|
||||
|
||||
);
|
||||
|
||||
|
86
resources/views/projects/show.blade.php
Normal file
86
resources/views/projects/show.blade.php
Normal file
@ -0,0 +1,86 @@
|
||||
@extends('header')
|
||||
|
||||
@section('head')
|
||||
@parent
|
||||
|
||||
<script src="{{ asset('js/select2.min.js') }}" type="text/javascript"></script>
|
||||
<link href="{{ asset('css/select2.css') }}" rel="stylesheet" type="text/css"/>
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<ol class="breadcrumb">
|
||||
<li>{{ link_to('/projects', trans('texts.projects')) }}</li>
|
||||
<li class='active'>{{ $project->name }}</li> {!! $project->present()->statusLabel !!}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="pull-right">
|
||||
|
||||
{!! Former::open('vendors/bulk')->addClass('mainForm') !!}
|
||||
<div style="display:none">
|
||||
{!! Former::text('action') !!}
|
||||
{!! Former::text('public_id')->value($project->public_id) !!}
|
||||
</div>
|
||||
|
||||
@if ( ! $project->is_deleted)
|
||||
@can('edit', $project)
|
||||
{!! DropdownButton::normal(trans('texts.edit_project'))
|
||||
->withAttributes(['class'=>'normalDropDown'])
|
||||
->withContents([
|
||||
($project->trashed() ? false : ['label' => trans('texts.archive_project'), 'url' => "javascript:onArchiveClick()"]),
|
||||
['label' => trans('texts.delete_project'), 'url' => "javascript:onDeleteClick()"],
|
||||
]
|
||||
)->split() !!}
|
||||
@endcan
|
||||
@if ( ! $project->trashed())
|
||||
@can('create', ENTITY_TASK)
|
||||
{!! Button::primary(trans("texts.new_task"))
|
||||
->asLinkTo(URL::to("/tasks/create/{$project->client->public_id}/{$project->public_id}"))
|
||||
->appendIcon(Icon::create('plus-sign')) !!}
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($project->trashed())
|
||||
@can('edit', $project)
|
||||
{!! Button::primary(trans('texts.restore_project'))
|
||||
->appendIcon(Icon::create('cloud-download'))
|
||||
->withAttributes(['onclick' => 'onRestoreClick()']) !!}
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
{!! Former::close() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<h3>{{ trans('texts.details') }}</h3>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h3>{{ trans('texts.notes') }}</h3>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h3>{{ trans('texts.progress') }}</h3>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
@ -158,7 +158,7 @@ Route::group(['middleware' => ['lookup:user', 'auth:user']], function () {
|
||||
Route::post('projects', 'ProjectController@store');
|
||||
Route::put('projects/{projects}', 'ProjectController@update');
|
||||
Route::get('projects/{projects}/edit', 'ProjectController@edit');
|
||||
Route::get('projects/{projects}', 'ProjectController@edit');
|
||||
Route::get('projects/{projects}', 'ProjectController@show');
|
||||
Route::post('projects/bulk', 'ProjectController@bulk');
|
||||
|
||||
Route::get('api/recurring_invoices/{client_id?}', 'InvoiceController@getRecurringDatatable');
|
||||
|
Loading…
x
Reference in New Issue
Block a user