mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Proposals
This commit is contained in:
parent
839d535728
commit
11a3e9ab1e
@ -355,6 +355,15 @@ class EntityModel extends Eloquent
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getFormUrl($entityType)
|
||||
{
|
||||
if (in_array($entityType, [ENTITY_PROPOSAL_CATEGORY, ENTITY_PROPOSAL_SNIPPET, ENTITY_PROPOSAL_TEMPLATE])) {
|
||||
return str_replace('_', 's/', Utils::pluralizeEntityType($entityType));
|
||||
} else {
|
||||
return Utils::pluralizeEntityType($entityType);
|
||||
}
|
||||
}
|
||||
|
||||
public static function getStates($entityType = false)
|
||||
{
|
||||
$data = [];
|
||||
|
@ -96,6 +96,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
});
|
||||
|
||||
Form::macro('breadcrumbs', function ($status = false) {
|
||||
|
||||
$str = '<ol class="breadcrumb">';
|
||||
|
||||
// Get the breadcrumbs by exploding the current path.
|
||||
@ -133,6 +134,9 @@ class AppServiceProvider extends ServiceProvider
|
||||
if ($i == count($crumbs) - 1) {
|
||||
$str .= "<li class='active'>$name</li>";
|
||||
} else {
|
||||
if (count($crumbs) > 2 && $crumbs[1] == 'proposals' && $crumb != 'proposals') {
|
||||
$crumb = 'proposals/' . $crumb;
|
||||
}
|
||||
$str .= '<li>'.link_to($crumb, $name).'</li>';
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{!! Former::open(Utils::pluralizeEntityType($entityType) . '/bulk')
|
||||
{!! Former::open(\App\Models\EntityModel::getFormUrl($entityType) . '/bulk')
|
||||
->addClass('listForm_' . $entityType) !!}
|
||||
|
||||
<div style="display:none">
|
||||
|
@ -205,18 +205,25 @@ Route::group(['middleware' => ['lookup:user', 'auth:user']], function () {
|
||||
Route::get('api/quotes/{client_id?}', 'QuoteController@getDatatable');
|
||||
Route::post('quotes/bulk', 'QuoteController@bulk');
|
||||
|
||||
Route::post('proposals/categories/bulk', 'ProposalCategoryController@bulk');
|
||||
Route::get('proposals/categories/{proposal_categories}/edit', 'ProposalCategoryController@edit');
|
||||
Route::get('proposals/categories/create', 'ProposalCategoryController@create');
|
||||
Route::resource('proposals/categories', 'ProposalCategoryController');
|
||||
Route::get('api/proposal_categories', 'ProposalCategoryController@getDatatable');
|
||||
|
||||
Route::post('proposals/snippets/bulk', 'ProposalSnippetController@bulk');
|
||||
Route::get('proposals/snippets/{proposal_snippets}/edit', 'ProposalSnippetController@edit');
|
||||
Route::get('proposals/snippets/create', 'ProposalSnippetController@create');
|
||||
Route::resource('proposals/snippets', 'ProposalSnippetController');
|
||||
Route::get('api/proposal_snippets', 'ProposalSnippetController@getDatatable');
|
||||
|
||||
Route::post('proposals/templates/bulk', 'ProposalTemplateController@bulk');
|
||||
Route::get('proposals/templates/{proposal_templates}/edit', 'ProposalTemplateController@edit');
|
||||
Route::get('proposals/templates/create', 'ProposalTemplateController@create');
|
||||
Route::resource('proposals/templates', 'ProposalTemplateController');
|
||||
Route::get('api/proposal_templates', 'ProposalTemplateController@getDatatable');
|
||||
|
||||
Route::post('proposals/proposals/bulk', 'ProposalController@bulk');
|
||||
Route::get('proposals/{proposals}/edit', 'ProposalController@edit');
|
||||
Route::get('proposals/create/{quote_id?}', 'ProposalController@create');
|
||||
Route::resource('proposals', 'ProposalController');
|
||||
|
Loading…
Reference in New Issue
Block a user