mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Use split dropdowns on list pages
This commit is contained in:
parent
098151bff0
commit
c5ae69e300
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(url('/expense_categories'))->appendIcon(Icon::create('remove-circle')) !!}
|
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/expense_categories'))->appendIcon(Icon::create('remove-circle')) !!}
|
||||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||||
@if ($category && Auth::user()->can('create', ENTITY_EXPENSE))
|
@if ($category && Auth::user()->can('create', ENTITY_EXPENSE))
|
||||||
{!! Button::primary(trans('texts.new_expense'))->large()
|
{!! Button::primary(trans('texts.new_expense'))->large()
|
||||||
|
@ -50,10 +50,43 @@
|
|||||||
class="form-control pull-left" placeholder="{{ trans('texts.filter') }}" value="{{ Input::get('filter') }}"/>
|
class="form-control pull-left" placeholder="{{ trans('texts.filter') }}" value="{{ Input::get('filter') }}"/>
|
||||||
|
|
||||||
@if ($entityType == ENTITY_EXPENSE)
|
@if ($entityType == ENTITY_EXPENSE)
|
||||||
{!! Button::normal(trans('texts.recurring'))->asLinkTo(URL::to('/recurring_expenses'))->appendIcon(Icon::create('list')) !!}
|
{!! DropdownButton::normal(trans('texts.recurring'))
|
||||||
{!! Button::normal(trans('texts.categories'))->asLinkTo(URL::to('/expense_categories'))->appendIcon(Icon::create('list')) !!}
|
->withAttributes(['class'=>'recurringDropdown'])
|
||||||
|
->withContents([
|
||||||
|
['label' => trans('texts.new_recurring_expense'), 'url' => url('/recurring_expenses/create')],
|
||||||
|
]
|
||||||
|
)->split() !!}
|
||||||
|
{!! DropdownButton::normal(trans('texts.categories'))
|
||||||
|
->withAttributes(['class'=>'categoriesDropdown'])
|
||||||
|
->withContents([
|
||||||
|
['label' => trans('texts.new_expense_category'), 'url' => url('/expense_categories/create')],
|
||||||
|
]
|
||||||
|
)->split() !!}
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function() {
|
||||||
|
$('.recurringDropdown:not(.dropdown-toggle)').click(function() {
|
||||||
|
window.location = '{{ url('/recurring_expenses') }}';
|
||||||
|
});
|
||||||
|
$('.categoriesDropdown:not(.dropdown-toggle)').click(function() {
|
||||||
|
window.location = '{{ url('/expense_categories') }}';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
@elseif ($entityType == ENTITY_TASK)
|
@elseif ($entityType == ENTITY_TASK)
|
||||||
{!! Button::normal(trans('texts.projects'))->asLinkTo(URL::to('/projects'))->appendIcon(Icon::create('list')) !!}
|
{!! 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() {
|
||||||
|
window.location = '{{ url('projects') }}';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if (Auth::user()->can('create', $entityType) && empty($vendorId))
|
@if (Auth::user()->can('create', $entityType) && empty($vendorId))
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<center class="buttons">
|
<center class="buttons">
|
||||||
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(url('/projects'))->appendIcon(Icon::create('remove-circle')) !!}
|
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/projects'))->appendIcon(Icon::create('remove-circle')) !!}
|
||||||
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
|
||||||
@if ($project && Auth::user()->can('create', ENTITY_TASK))
|
@if ($project && Auth::user()->can('create', ENTITY_TASK))
|
||||||
{!! Button::primary(trans('texts.new_task'))->large()
|
{!! Button::primary(trans('texts.new_task'))->large()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user