1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Default documents

This commit is contained in:
Hillel Coren 2017-07-21 17:15:37 +03:00
parent e0c080947b
commit e6802e0e3b
2 changed files with 31 additions and 16 deletions

View File

@ -119,13 +119,19 @@ class DatatableService
$dropdown_contents .= '<li class="divider"></li>';
}
if (($datatable->entityType != ENTITY_USER || $model->public_id) && $can_edit) {
$dropdown_contents .= "<li><a href=\"javascript:submitForm_{$datatable->entityType}('archive', {$model->public_id})\">"
. mtrans($datatable->entityType, "archive_{$datatable->entityType}") . '</a></li>';
if (! $model->deleted_at || $model->deleted_at == '0000-00-00') {
if (($datatable->entityType != ENTITY_USER || $model->public_id) && $can_edit) {
$dropdown_contents .= "<li><a href=\"javascript:submitForm_{$datatable->entityType}('archive', {$model->public_id})\">"
. mtrans($datatable->entityType, "archive_{$datatable->entityType}") . '</a></li>';
}
}
}
if ($model->deleted_at && $model->deleted_at != '0000-00-00') {
if ($can_edit) {
$dropdown_contents .= "<li><a href=\"javascript:submitForm_{$datatable->entityType}('restore', {$model->public_id})\">"
. mtrans($datatable->entityType, "restore_{$datatable->entityType}") . '</a></li>';
}
} elseif ($can_edit) {
$dropdown_contents .= "<li><a href=\"javascript:submitForm_{$datatable->entityType}('restore', {$model->public_id})\">"
. mtrans($datatable->entityType, "restore_{$datatable->entityType}") . '</a></li>';
}
if (property_exists($model, 'is_deleted') && ! $model->is_deleted && $can_edit) {

View File

@ -330,7 +330,7 @@
<div class="panel-heading">
<h3 class="panel-title">{!! trans('texts.defaults') !!}</h3>
</div>
<div class="panel-body form-padding-right">
<div class="panel-body" style="min-height:350px">
<div role="tabpanel">
<ul class="nav nav-tabs" role="tablist" style="border: none">
@ -338,7 +338,12 @@
<li role="presentation"><a href="#invoice_footer" aria-controls="invoice_footer" role="tab" data-toggle="tab">{{ trans('texts.invoice_footer') }}</a></li>
<li role="presentation"><a href="#quote_terms" aria-controls="quote_terms" role="tab" data-toggle="tab">{{ trans('texts.quote_terms') }}</a></li>
@if ($account->hasFeature(FEATURE_DOCUMENTS))
<li role="presentation"><a href="#documents" aria-controls="documents" role="tab" data-toggle="tab">{{ trans('texts.documents') }}</a></li>
<li role="presentation"><a href="#documents" aria-controls="documents" role="tab" data-toggle="tab">
{{ trans('texts.documents') }}
@if ($count = $account->defaultDocuments->count())
({{ $count }})
@endif
</a></li>
@endif
</ul>
</div>
@ -347,32 +352,36 @@
<div class="panel-body">
{!! Former::textarea('invoice_terms')
->label(trans('texts.default_invoice_terms'))
->rows(4) !!}
->rows(8)
->raw() !!}
</div>
</div>
<div role="tabpanel" class="tab-pane" id="invoice_footer">
<div class="panel-body">
{!! Former::textarea('invoice_footer')
->label(trans('texts.default_invoice_footer'))
->help($account->hasFeature(FEATURE_REMOVE_CREATED_BY) && ! $account->isTrial() ? 'invoice_footer_help' : '')
->rows(4) !!}
->rows(8)
->raw() !!}
@if ($account->hasFeature(FEATURE_REMOVE_CREATED_BY) && ! $account->isTrial())
<div class="help-block">
{{ trans('texts.invoice_footer_help')}}
</div>
@endif
</div>
</div>
<div role="tabpanel" class="tab-pane" id="quote_terms">
<div class="panel-body">
{!! Former::textarea('quote_terms')
->label(trans('texts.default_quote_terms'))
->rows(4) !!}
->rows(8)
->raw() !!}
</div>
</div>
@if ($account->hasFeature(FEATURE_DOCUMENTS))
<div role="tabpanel" class="tab-pane" id="documents">
<div class="panel-body">
<div class="form-group">
<label for="public_notes" class="control-label col-lg-4 col-sm-4">
{{trans('texts.default_documents')}}
</label>
<div class="col-lg-8 col-sm-8">
<div class="col-lg-12 col-sm-12">
<div role="tabpanel" class="tab-pane" id="attached-documents" style="position:relative;z-index:9">
<div id="document-upload">
<div class="dropzone">