1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Proposals

This commit is contained in:
Hillel Coren 2018-02-09 16:35:36 +02:00
parent a59a59ebd2
commit d27eb414c6
3 changed files with 11 additions and 2 deletions

View File

@ -17,11 +17,13 @@ class ProposalSnippetDatatable extends EntityDatatable
[
'name',
function ($model) {
$icon = '<i class="fa fa-' . $model->icon . '"></i>&nbsp;&nbsp;';
if (! Auth::user()->can('editByOwner', [ENTITY_PROPOSAL_SNIPPET, $model->user_id])) {
return $model->name;
return $icon . $model->name;
}
return link_to("proposals/snippets/{$model->public_id}/edit", $model->name)->toHtml();
return $icon . link_to("proposals/snippets/{$model->public_id}/edit", $model->name)->toHtml();
},
],
[

View File

@ -31,6 +31,7 @@ class ProposalSnippetRepository extends BaseRepository
'proposal_snippets.user_id',
'proposal_snippets.deleted_at',
'proposal_snippets.is_deleted',
'proposal_snippets.icon',
'proposal_snippets.private_notes',
'proposal_snippets.html as content',
'proposal_categories.name as category',

View File

@ -5,6 +5,12 @@
@include('proposals.grapesjs_header')
<style>
.icon-select {
font-family: FontAwesome, sans-serif;
}
</style>
@stop
@section('content')