mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Proposals
This commit is contained in:
parent
b4bf222d5d
commit
d3a891375c
@ -8,6 +8,7 @@ use App\Http\Requests\UpdateProposalRequest;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Proposal;
|
||||
use App\Models\ProposalTemplate;
|
||||
use App\Models\ProposalSnippet;
|
||||
use App\Ninja\Datatables\ProposalDatatable;
|
||||
use App\Ninja\Repositories\ProposalRepository;
|
||||
use App\Services\ProposalService;
|
||||
@ -63,6 +64,7 @@ class ProposalController extends BaseController
|
||||
'quotes' => Invoice::scope()->with('client.contacts')->quotes()->orderBy('id')->get(),
|
||||
'templates' => ProposalTemplate::whereAccountId($account->id)->orWhereNull('account_id')->orderBy('name')->get(),
|
||||
'quotePublicId' => $request->quote_id,
|
||||
'snippets' => ProposalSnippet::scope()->with('proposal_category')->orderBy('name')->get(),
|
||||
];
|
||||
|
||||
return View::make('proposals.edit', $data);
|
||||
@ -90,6 +92,7 @@ class ProposalController extends BaseController
|
||||
'templates' => ProposalTemplate::whereAccountId($account->id)->orWhereNull('account_id')->orderBy('name')->get(),
|
||||
'quotePublicId' => $proposal->quote ? $proposal->quote->public_id : null,
|
||||
'templatePublicId' => $proposal->proposal_template ? $proposal->proposal_template->public_id : null,
|
||||
'snippets' => ProposalSnippet::scope()->with('proposal_category')->orderBy('name')->get(),
|
||||
];
|
||||
|
||||
return View::make('proposals.edit', $data);
|
||||
|
@ -2722,6 +2722,7 @@ $LANG = array(
|
||||
'deleted_proposal_categories' => 'Successfully archived :count categories',
|
||||
'restored_proposal_category' => 'Successfully restored category',
|
||||
'delete_status' => 'Delete Status',
|
||||
'standard' => 'Standard',
|
||||
|
||||
);
|
||||
|
||||
|
@ -120,34 +120,39 @@
|
||||
components: '{!! $proposal ? $proposal->html : '' !!}',
|
||||
style: '{!! $proposal ? $proposal->css : '' !!}',
|
||||
showDevices: false,
|
||||
categoryLabel: 'tes',
|
||||
plugins: ['gjs-preset-newsletter'],
|
||||
//plugins: ['gjs-blocks-basic'],
|
||||
pluginsOpts: {
|
||||
'gjs-preset-newsletter': {
|
||||
'categoryLabel': "{{ trans('texts.standard') }}"
|
||||
}
|
||||
},
|
||||
storageManager: {type: 'none'},
|
||||
panels: {
|
||||
Xdefaults : [{
|
||||
id : 'commands',
|
||||
buttons : [{
|
||||
id : 'smile',
|
||||
className : 'fa fa-smile-o',
|
||||
attributes : { title: 'Smile' }
|
||||
}],
|
||||
}],
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
var blockManager = editor.BlockManager;
|
||||
blockManager.add('h1-block', {
|
||||
label: 'Heading',
|
||||
category: 'Basic',
|
||||
content: '<h1>Put your title here</h1>',
|
||||
attributes: {
|
||||
title: 'Insert h1 block',
|
||||
class:'fa fa-smile-o'
|
||||
var blockManager = grapesjsEditor.BlockManager;
|
||||
|
||||
@foreach ($snippets as $snippet)
|
||||
blockManager.add('h1-block', {
|
||||
label: '{{ $snippet->name }}',
|
||||
category: '{{ $snippet->proposal_category ? $snippet->proposal_category->name : trans('texts.custom') }}',
|
||||
content: '{!! $snippet->html !!}',
|
||||
style: '{!! $snippet->css !!}',
|
||||
attributes: {
|
||||
title: '{!! $snippet->private_notes !!}',
|
||||
class:'fa fa-smile-o'
|
||||
}
|
||||
});
|
||||
@endforeach
|
||||
|
||||
@if (count($snippets))
|
||||
var blockCategories = blockManager.getCategories();
|
||||
for (var i=0; i<blockCategories.models.length; i++) {
|
||||
var blockCategory = blockCategories.models[i];
|
||||
blockCategory.set('open', false);
|
||||
}
|
||||
});
|
||||
*/
|
||||
})
|
||||
@endif
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user