mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Proposals
This commit is contained in:
parent
2000e66c9d
commit
427c5c3721
@ -21,6 +21,11 @@ class ProposalComposer
|
||||
*/
|
||||
public function compose(View $view)
|
||||
{
|
||||
$view->with('snippets', ProposalSnippet::scope()->with('proposal_category')->orderBy('name')->get());
|
||||
$snippets = ProposalSnippet::scope()
|
||||
->with('proposal_category')
|
||||
->orderBy('name')
|
||||
->get();
|
||||
|
||||
$view->with('snippets', $snippets);
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,12 @@ class ProposalDatatable extends EntityDatatable
|
||||
return link_to("proposals/{$model->public_id}/edit", Utils::timestampToDateString(strtotime($model->created_at)))->toHtml();
|
||||
},
|
||||
],
|
||||
[
|
||||
'content',
|
||||
function ($model) {
|
||||
return $this->showWithTooltip(strip_tags($model->content));
|
||||
},
|
||||
],
|
||||
[
|
||||
'private_notes',
|
||||
function ($model) {
|
||||
|
@ -34,6 +34,12 @@ class ProposalSnippetDatatable extends EntityDatatable
|
||||
return link_to("proposals/categories/{$model->category_public_id}/edit", $model->category ?: ' ')->toHtml();
|
||||
},
|
||||
],
|
||||
[
|
||||
'content',
|
||||
function ($model) {
|
||||
return $this->showWithTooltip(strip_tags($model->content));
|
||||
},
|
||||
],
|
||||
[
|
||||
'private_notes',
|
||||
function ($model) {
|
||||
|
@ -26,6 +26,12 @@ class ProposalTemplateDatatable extends EntityDatatable
|
||||
//return $this->addNote($str, $model->private_notes);
|
||||
},
|
||||
],
|
||||
[
|
||||
'content',
|
||||
function ($model) {
|
||||
return $this->showWithTooltip(strip_tags($model->content));
|
||||
},
|
||||
],
|
||||
[
|
||||
'private_notes',
|
||||
function ($model) {
|
||||
|
@ -39,6 +39,7 @@ class ProposalRepository extends BaseRepository
|
||||
'proposals.created_at',
|
||||
'proposals.is_deleted',
|
||||
'proposals.private_notes',
|
||||
'proposals.html as content',
|
||||
DB::raw("COALESCE(NULLIF(clients.name,''), NULLIF(CONCAT(contacts.first_name, ' ', contacts.last_name),''), NULLIF(contacts.email,'')) client_name"),
|
||||
'clients.user_id as client_user_id',
|
||||
'clients.public_id as client_public_id',
|
||||
|
@ -32,6 +32,7 @@ class ProposalSnippetRepository extends BaseRepository
|
||||
'proposal_snippets.deleted_at',
|
||||
'proposal_snippets.is_deleted',
|
||||
'proposal_snippets.private_notes',
|
||||
'proposal_snippets.html as content',
|
||||
'proposal_categories.name as category',
|
||||
'proposal_categories.public_id as category_public_id',
|
||||
'proposal_categories.user_id as category_user_id'
|
||||
|
@ -29,6 +29,7 @@ class ProposalTemplateRepository extends BaseRepository
|
||||
'proposal_templates.user_id',
|
||||
'proposal_templates.deleted_at',
|
||||
'proposal_templates.is_deleted',
|
||||
'proposal_templates.html as content',
|
||||
'proposal_templates.private_notes'
|
||||
);
|
||||
|
||||
|
@ -20,7 +20,7 @@ $(function() {
|
||||
var blockManager = grapesjsEditor.BlockManager;
|
||||
|
||||
@foreach ($snippets as $snippet)
|
||||
blockManager.add('h1-block', {
|
||||
blockManager.add("h{{ ($loop->index + 1) }}-block", {
|
||||
label: '{{ $snippet->name }}',
|
||||
category: '{{ $snippet->proposal_category ? $snippet->proposal_category->name : trans('texts.custom') }}',
|
||||
content: '{!! $snippet->html !!}',
|
||||
|
@ -52,11 +52,12 @@
|
||||
->addGroupClass('category-select') !!}
|
||||
{!! Former::select('icon')
|
||||
->addGroupClass('icon-select')
|
||||
->addOption('', '')
|
||||
->options($icons) !!}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{!! Former::textarea('private_notes')
|
||||
->style('height:98px') !!}
|
||||
->style('height:160px') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user