mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Show archived/deleted in breadcrumbs
This commit is contained in:
parent
597f0f5548
commit
733890ec3f
@ -134,6 +134,7 @@ class ExpenseController extends BaseController
|
|||||||
$data = [
|
$data = [
|
||||||
'vendor' => null,
|
'vendor' => null,
|
||||||
'expense' => $expense,
|
'expense' => $expense,
|
||||||
|
'entity' => $expense,
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
'url' => 'expenses/'.$expense->public_id,
|
'url' => 'expenses/'.$expense->public_id,
|
||||||
'title' => 'Edit Expense',
|
'title' => 'Edit Expense',
|
||||||
|
@ -142,11 +142,13 @@ class PaymentController extends BaseController
|
|||||||
'invoices' => Invoice::scope()->invoiceType(INVOICE_TYPE_STANDARD)->where('is_recurring', '=', false)
|
'invoices' => Invoice::scope()->invoiceType(INVOICE_TYPE_STANDARD)->where('is_recurring', '=', false)
|
||||||
->with('client', 'invoice_status')->orderBy('invoice_number')->get(),
|
->with('client', 'invoice_status')->orderBy('invoice_number')->get(),
|
||||||
'payment' => $payment,
|
'payment' => $payment,
|
||||||
|
'entity' => $payment,
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
'url' => 'payments/'.$payment->public_id,
|
'url' => 'payments/'.$payment->public_id,
|
||||||
'title' => trans('texts.edit_payment'),
|
'title' => trans('texts.edit_payment'),
|
||||||
'paymentTypes' => Cache::get('paymentTypes'),
|
'paymentTypes' => Cache::get('paymentTypes'),
|
||||||
'clients' => Client::scope()->with('contacts')->orderBy('name')->get(), ];
|
'clients' => Client::scope()->with('contacts')->orderBy('name')->get(),
|
||||||
|
];
|
||||||
|
|
||||||
return View::make('payments.edit', $data);
|
return View::make('payments.edit', $data);
|
||||||
}
|
}
|
||||||
|
@ -81,11 +81,13 @@ class ProductController extends BaseController
|
|||||||
public function edit($publicId)
|
public function edit($publicId)
|
||||||
{
|
{
|
||||||
$account = Auth::user()->account;
|
$account = Auth::user()->account;
|
||||||
|
$product = Product::scope($publicId)->withTrashed()->firstOrFail();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'taxRates' => $account->invoice_item_taxes ? TaxRate::scope()->get(['id', 'name', 'rate']) : null,
|
'taxRates' => $account->invoice_item_taxes ? TaxRate::scope()->get(['id', 'name', 'rate']) : null,
|
||||||
'product' => Product::scope($publicId)->withTrashed()->firstOrFail(),
|
'product' => $product,
|
||||||
|
'entity' => $product,
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
'url' => 'products/'.$publicId,
|
'url' => 'products/'.$publicId,
|
||||||
'title' => trans('texts.edit_product'),
|
'title' => trans('texts.edit_product'),
|
||||||
|
@ -177,6 +177,7 @@ class TaskController extends BaseController
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'task' => $task,
|
'task' => $task,
|
||||||
|
'entity' => $task,
|
||||||
'clientPublicId' => $task->client ? $task->client->public_id : 0,
|
'clientPublicId' => $task->client ? $task->client->public_id : 0,
|
||||||
'method' => 'PUT',
|
'method' => 'PUT',
|
||||||
'url' => 'tasks/'.$task->public_id,
|
'url' => 'tasks/'.$task->public_id,
|
||||||
@ -185,7 +186,6 @@ class TaskController extends BaseController
|
|||||||
'actions' => $actions,
|
'actions' => $actions,
|
||||||
'timezone' => Auth::user()->account->timezone ? Auth::user()->account->timezone->name : DEFAULT_TIMEZONE,
|
'timezone' => Auth::user()->account->timezone ? Auth::user()->account->timezone->name : DEFAULT_TIMEZONE,
|
||||||
'datetimeFormat' => Auth::user()->account->getMomentDateTimeFormat(),
|
'datetimeFormat' => Auth::user()->account->getMomentDateTimeFormat(),
|
||||||
//'entityStatus' => $task->present()->status,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$data = array_merge($data, self::getViewModel());
|
$data = array_merge($data, self::getViewModel());
|
||||||
|
@ -23,22 +23,4 @@ class ClientPresenter extends EntityPresenter {
|
|||||||
|
|
||||||
return $account->formatMoney($client->paid_to_date, $client);
|
return $account->formatMoney($client->paid_to_date, $client);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function status()
|
|
||||||
{
|
|
||||||
$class = $text = '';
|
|
||||||
|
|
||||||
if ($this->entity->is_deleted) {
|
|
||||||
$class = 'danger';
|
|
||||||
$text = trans('texts.deleted');
|
|
||||||
} elseif ($this->entity->trashed()) {
|
|
||||||
$class = 'warning';
|
|
||||||
$text = trans('texts.archived');
|
|
||||||
} else {
|
|
||||||
$class = 'success';
|
|
||||||
$text = trans('texts.active');
|
|
||||||
}
|
|
||||||
|
|
||||||
return "<span class=\"label label-{$class}\">{$text}</span>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,24 @@ class EntityPresenter extends Presenter
|
|||||||
return URL::to($link);
|
return URL::to($link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function statusLabel()
|
||||||
|
{
|
||||||
|
$class = $text = '';
|
||||||
|
|
||||||
|
if ($this->entity->is_deleted) {
|
||||||
|
$class = 'danger';
|
||||||
|
$text = trans('texts.deleted');
|
||||||
|
} elseif ($this->entity->trashed()) {
|
||||||
|
$class = 'warning';
|
||||||
|
$text = trans('texts.archived');
|
||||||
|
} else {
|
||||||
|
//$class = 'success';
|
||||||
|
//$text = trans('texts.active');
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<span style=\"font-size:13px\" class=\"label label-{$class}\">{$text}</span>";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
@ -117,7 +117,7 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($status) {
|
if ($status) {
|
||||||
$str .= ' ' . $status;
|
$str .= $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $str . '</ol>';
|
return $str . '</ol>';
|
||||||
|
2
public/css/built.css
vendored
2
public/css/built.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
resources/assets/css/style.css
vendored
5
resources/assets/css/style.css
vendored
@ -1220,3 +1220,8 @@ div.panel-body div.panel-body {
|
|||||||
background-color: #eee!important;
|
background-color: #eee!important;
|
||||||
color: #999!important;
|
color: #999!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.breadcrumb .label {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
|
@ -23,12 +23,10 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<div>
|
<ol class="breadcrumb">
|
||||||
<span style="font-size:28px">{{ $client->getDisplayName() }}</span>
|
<li>{{ link_to('/clients', trans('texts.clients')) }}</li>
|
||||||
@if ($client->trashed())
|
<li class='active'>{{ $client->getDisplayName() }}</li> {!! $client->present()->statusLabel !!}
|
||||||
{!! $client->present()->status !!}
|
</ol>
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@ -83,7 +81,6 @@
|
|||||||
{{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)) }}
|
{{ trans('texts.last_logged_in') }} {{ Utils::timestampToDateTimeString(strtotime($client->last_login)) }}
|
||||||
</small></h3>
|
</small></h3>
|
||||||
@endif
|
@endif
|
||||||
<br/>
|
|
||||||
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
@ -585,7 +585,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (!isset($showBreadcrumbs) || $showBreadcrumbs)
|
@if (!isset($showBreadcrumbs) || $showBreadcrumbs)
|
||||||
{!! Form::breadcrumbs(isset($entityStatus) ? $entityStatus : '') !!}
|
{!! Form::breadcrumbs((isset($entity) && $entity->exists) ? $entity->present()->statusLabel : false) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@yield('content')
|
@yield('content')
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
<li>{!! link_to(($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'), trans('texts.' . ($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'))) !!}</li>
|
<li>{!! link_to(($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'), trans('texts.' . ($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'))) !!}</li>
|
||||||
<li class="active">{{ $invoice->invoice_number }}</li>
|
<li class="active">{{ $invoice->invoice_number }}</li>
|
||||||
@endif
|
@endif
|
||||||
|
{!! $invoice->present()->statusLabel !!}
|
||||||
</ol>
|
</ol>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
<div id="upgrade-modal" class="container" style="">
|
<div id="upgrade-modal" class="container" style="">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-10 text-right">
|
<div class="col-md-10 text-right">
|
||||||
<a href="#"><i class="fa fa-close" onclick="hideUpgradeModal()"></i></a>
|
<a href="#"><i class="fa fa-close" onclick="hideUpgradeModal()" title="{{ trans('texts.close') }}"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
13
resources/views/vendors/show.blade.php
vendored
13
resources/views/vendors/show.blade.php
vendored
@ -21,7 +21,16 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-7">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li>{{ link_to('/vendors', trans('texts.vendors')) }}</li>
|
||||||
|
<li class='active'>{{ $vendor->getDisplayName() }}</li> {!! $vendor->present()->statusLabel !!}
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
|
||||||
{!! Former::open('vendors/bulk')->addClass('mainForm') !!}
|
{!! Former::open('vendors/bulk')->addClass('mainForm') !!}
|
||||||
<div style="display:none">
|
<div style="display:none">
|
||||||
{!! Former::text('action') !!}
|
{!! Former::text('action') !!}
|
||||||
@ -59,9 +68,11 @@
|
|||||||
{!! Former::close() !!}
|
{!! Former::close() !!}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>{{ $vendor->getDisplayName() }}</h2>
|
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user