widget refactoring
This commit is contained in:
@ -1,3 +0,0 @@
|
||||
@stack('content_start')
|
||||
@yield('widget-content')
|
||||
@stack('content_end')
|
@ -1,41 +0,0 @@
|
||||
@if (trim($__env->yieldContent('widget-title')))
|
||||
<div class="card-header">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-4 text-nowrap">
|
||||
<h4 class="mb-0">@yield('widget-title')</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-8 text-right d-none d-sm-block">
|
||||
@yield('button')
|
||||
|
||||
<span>
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-muted"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
<a class="dropdown-item" href="#" @click.prevent="onAction('edit')">{{ trans('general.edit') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($config->widget, 'common/widgets') !!}
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<span>
|
||||
<div class="dropdown card-action-button">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-white"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
<a class="dropdown-item" href="#" @click.prevent="onAction('edit')">{{ trans('general.edit') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($config->widget, 'common/widgets') !!}
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
@endif
|
29
resources/views/partials/widgets/standard_header.blade.php
Normal file
29
resources/views/partials/widgets/standard_header.blade.php
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="card-header border-bottom-0">
|
||||
<div class="row align-items-center">
|
||||
|
||||
<div class="col-6 text-nowrap">
|
||||
<h4 class="mb-0">{{ $model->name }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-6 hidden-sm">
|
||||
<span class="float-right">
|
||||
<div class="dropdown">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-muted"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
{!! Form::button(trans('general.edit'), [
|
||||
'type' => 'button',
|
||||
'class' => 'dropdown-item',
|
||||
'title' => trans('general.edit'),
|
||||
'@click' => 'onEditWidget(' . $model->id . ')'
|
||||
]) !!}
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($model, 'common/widgets') !!}
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
resources/views/partials/widgets/stats_header.blade.php
Normal file
18
resources/views/partials/widgets/stats_header.blade.php
Normal file
@ -0,0 +1,18 @@
|
||||
<span>
|
||||
<div class="dropdown card-action-button">
|
||||
<a class="btn btn-sm items-align-center py-2 mr-0 shadow-none--hover" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fa fa-ellipsis-v text-white"></i>
|
||||
</a>
|
||||
|
||||
<div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
|
||||
{!! Form::button(trans('general.edit'), [
|
||||
'type' => 'button',
|
||||
'class' => 'dropdown-item',
|
||||
'title' => trans('general.edit'),
|
||||
'@click' => 'onEditWidget(' . $model->id . ')'
|
||||
]) !!}
|
||||
<div class="dropdown-divider"></div>
|
||||
{!! Form::deleteLink($model, 'common/widgets') !!}
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
Reference in New Issue
Block a user