mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 05:24:29 -04:00
Add projects to top level navigation
This commit is contained in:
parent
c4e74f35d1
commit
31d7481903
@ -216,7 +216,6 @@ class Account extends Eloquent
|
|||||||
ENTITY_QUOTE => 4,
|
ENTITY_QUOTE => 4,
|
||||||
ENTITY_TASK => 8,
|
ENTITY_TASK => 8,
|
||||||
ENTITY_EXPENSE => 16,
|
ENTITY_EXPENSE => 16,
|
||||||
ENTITY_VENDOR => 32,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $dashboardSections = [
|
public static $dashboardSections = [
|
||||||
@ -1617,10 +1616,17 @@ class Account extends Eloquent
|
|||||||
ENTITY_TASK,
|
ENTITY_TASK,
|
||||||
ENTITY_EXPENSE,
|
ENTITY_EXPENSE,
|
||||||
ENTITY_VENDOR,
|
ENTITY_VENDOR,
|
||||||
|
ENTITY_PROJECT,
|
||||||
])) {
|
])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($entityType == ENTITY_VENDOR) {
|
||||||
|
$entityType = ENTITY_EXPENSE;
|
||||||
|
} elseif ($entityType == ENTITY_PROJECT) {
|
||||||
|
$entityType = ENTITY_TASK;
|
||||||
|
}
|
||||||
|
|
||||||
// note: single & checks bitmask match
|
// note: single & checks bitmask match
|
||||||
return $this->enabled_modules & static::$modules[$entityType];
|
return $this->enabled_modules & static::$modules[$entityType];
|
||||||
}
|
}
|
||||||
|
@ -327,6 +327,7 @@ class EntityModel extends Eloquent
|
|||||||
'settings' => 'cog',
|
'settings' => 'cog',
|
||||||
'self-update' => 'download',
|
'self-update' => 'download',
|
||||||
'reports' => 'th-list',
|
'reports' => 'th-list',
|
||||||
|
'projects' => 'briefcase',
|
||||||
];
|
];
|
||||||
|
|
||||||
return array_get($icons, $entityType);
|
return array_get($icons, $entityType);
|
||||||
|
@ -2588,6 +2588,11 @@ $LANG = array(
|
|||||||
'archived_subscription' => 'Successfully archived subscription',
|
'archived_subscription' => 'Successfully archived subscription',
|
||||||
'project_error_multiple_clients' => 'The projects can\'t belong to different clients',
|
'project_error_multiple_clients' => 'The projects can\'t belong to different clients',
|
||||||
'invoice_project' => 'Invoice Project',
|
'invoice_project' => 'Invoice Project',
|
||||||
|
'module_recurring_invoice' => 'Recurring Invoices',
|
||||||
|
'module_credit' => 'Credits',
|
||||||
|
'module_quote' => 'Quotes',
|
||||||
|
'module_task' => 'Tasks & Projects',
|
||||||
|
'module_expense' => 'Expenses & Vendors',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@
|
|||||||
@foreach (\App\Models\Account::$modules as $entityType => $value)
|
@foreach (\App\Models\Account::$modules as $entityType => $value)
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label for="modules_{{ $value}}">
|
<label for="modules_{{ $value}}">
|
||||||
<input name="modules[]" id="modules_{{ $value}}" type="checkbox" {{ Auth::user()->account->isModuleEnabled($entityType) ? 'checked="checked"' : '' }} value="{{ $value }}">{{ trans("texts.{$entityType}s") }}
|
<input name="modules[]" id="modules_{{ $value}}" type="checkbox" {{ Auth::user()->account->isModuleEnabled($entityType) ? 'checked="checked"' : '' }} value="{{ $value }}">{{ trans("texts.module_{$entityType}") }}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@ -347,6 +347,7 @@
|
|||||||
'payments' => false,
|
'payments' => false,
|
||||||
'credits' => false,
|
'credits' => false,
|
||||||
'quotes' => false,
|
'quotes' => false,
|
||||||
|
'projects' => false,
|
||||||
'tasks' => false,
|
'tasks' => false,
|
||||||
'expenses' => false,
|
'expenses' => false,
|
||||||
'vendors' => false,
|
'vendors' => false,
|
||||||
@ -373,6 +374,7 @@
|
|||||||
'payments',
|
'payments',
|
||||||
'credits',
|
'credits',
|
||||||
'quotes',
|
'quotes',
|
||||||
|
'projects',
|
||||||
'tasks',
|
'tasks',
|
||||||
'expenses',
|
'expenses',
|
||||||
'vendors',
|
'vendors',
|
||||||
|
@ -85,19 +85,6 @@
|
|||||||
</script>
|
</script>
|
||||||
@elseif ($entityType == ENTITY_TASK)
|
@elseif ($entityType == ENTITY_TASK)
|
||||||
{!! Button::normal(trans('texts.time_tracker'))->asLinkTo('javascript:openTimeTracker()')->appendIcon(Icon::create('time')) !!}
|
{!! Button::normal(trans('texts.time_tracker'))->asLinkTo('javascript:openTimeTracker()')->appendIcon(Icon::create('time')) !!}
|
||||||
{!! DropdownButton::normal(trans('texts.projects'))
|
|
||||||
->withAttributes(['class'=>'projectsDropdown'])
|
|
||||||
->withContents([
|
|
||||||
['label' => trans('texts.new_project'), 'url' => url('/projects/create')],
|
|
||||||
]
|
|
||||||
)->split() !!}
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$('.projectsDropdown:not(.dropdown-toggle)').click(function(event) {
|
|
||||||
openUrlOnClick('{{ url('/projects') }}', event);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (Auth::user()->can('create', $entityType) && empty($vendorId))
|
@if (Auth::user()->can('create', $entityType) && empty($vendorId))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user