mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
Merge pull request #18456 from grokability/container-component-phase-2
Next step in container+box component
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
@props([
|
||||
'class' => 'col-md-12',
|
||||
'class' => 'col-md-12',
|
||||
'columns' => 1,
|
||||
])
|
||||
|
||||
<!-- Start container+row component -->
|
||||
<div class="row">
|
||||
<div class="{{ $class }}">
|
||||
<div {{ $attributes->merge(['class' => 'row']) }}>
|
||||
|
||||
<!-- Only one column, so set the general col-md-12 div -->
|
||||
@if ($columns == 1)
|
||||
<x-page-column class="{{ $class }}">
|
||||
{{ $slot }}
|
||||
</x-page-column>
|
||||
|
||||
@else
|
||||
<!-- the page using this should specify column names via the page-column component -->
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
8
resources/views/blade/page-column.blade.php
Normal file
8
resources/views/blade/page-column.blade.php
Normal file
@@ -0,0 +1,8 @@
|
||||
@props([
|
||||
'class' => 'col-md-12',
|
||||
])
|
||||
|
||||
<!-- Start column component -->
|
||||
<div class="{{ $class }}">
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@@ -8,35 +8,36 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\CompanyPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="companiesTable"
|
||||
data-id-table="companiesTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-advanced-search="false"
|
||||
id="companiesTable"
|
||||
data-buttons="companyButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.companies.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-companies-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h2>{{ trans('admin/companies/general.about_companies') }}</h2>
|
||||
<p>{{ trans('admin/companies/general.about_companies_description') }}</p>
|
||||
</div>
|
||||
<x-container columns="2">
|
||||
|
||||
<x-page-column class="col-md-9">
|
||||
<x-box>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\CompanyPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="companiesTable"
|
||||
data-id-table="companiesTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-advanced-search="false"
|
||||
id="companiesTable"
|
||||
data-buttons="companyButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.companies.index') }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-companies-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
</x-page-column>
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<x-page-column class="col-md-3">
|
||||
<h2>{{ trans('admin/companies/general.about_companies') }}</h2>
|
||||
<p>{{ trans('admin/companies/general.about_companies_description') }}</p>
|
||||
</x-page-column>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<x-container>
|
||||
<x-box>
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
|
||||
@@ -22,7 +21,6 @@
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
|
||||
{!! ($company->assets()->AssetsForShow()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($company->assets()->AssetsForShow()->count()).'</span>' : '' !!}
|
||||
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -207,8 +205,8 @@
|
||||
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
|
||||
@@ -9,40 +9,33 @@
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('departments.edit', ['department' => $department->id]) }}" class="btn btn-sm btn-theme pull-right">{{ trans('admin/departments/table.update') }} </a>
|
||||
<a href="{{ route('departments.edit', ['department' => $department->id]) }}" class="btn btn-sm btn-theme pull-right">{{ trans('general.update') }} </a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="departmentsUsersTable"
|
||||
data-id-table="departmentsUsersTable"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="departmentsUsersTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.users.index',['department_id'=> $department->id]) }}"
|
||||
data-export-options='{
|
||||
<x-container>
|
||||
<x-box>
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\UserPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="departmentsUsersTable"
|
||||
data-id-table="departmentsUsersTable"
|
||||
data-show-footer="true"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
id="departmentsUsersTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.users.index',['department_id'=> $department->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-departments-{{ str_slug($department->name) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-box>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
<x-page-column>
|
||||
<x-box>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\DepreciationPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="depreciationsTable"
|
||||
data-id-table="depreciationsTable"
|
||||
@@ -28,19 +27,12 @@
|
||||
"fileName": "export-depreciations-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.col-md-9-->
|
||||
</table>
|
||||
|
||||
</x-box>
|
||||
</x-page-column>
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h2>{{ trans('admin/depreciations/general.about_asset_depreciations') }}</h2>
|
||||
<p>{{ trans('admin/depreciations/general.about_depreciations') }} </p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('groups.create') }}" class="btn btn-primary text-right"> {{ trans('general.create') }}</a>
|
||||
<a href="{{ route('settings.index') }}" class="btn btn-default text-right">{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
@@ -8,20 +8,15 @@
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('groups.edit', ['group' => $group->id]) }}" class="btn btn-primary text-right">{{ trans('admin/groups/titles.update') }} </a>
|
||||
<a href="{{ route('groups.index') }}" class="btn btn-default pull-right">{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container columns="2">
|
||||
<x-page-column class="col-md-9">
|
||||
<x-box>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<table
|
||||
@@ -36,13 +31,11 @@
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
</x-page-column>
|
||||
|
||||
<x-page-column class="col-md-3">
|
||||
|
||||
@if (is_array($group->decodePermissions()))
|
||||
<ul class="list-unstyled">
|
||||
@@ -55,8 +48,8 @@
|
||||
<p>{{ trans('admin/groups/titles.no_permissions') }}</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</x-page-column>
|
||||
</x-container>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -7,38 +7,31 @@
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<x-container>
|
||||
<x-box>
|
||||
@include('partials.asset-bulk-actions')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
@include('partials.asset-bulk-actions')
|
||||
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="assetsListingTable"
|
||||
data-id-table="assetsListingTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
data-bulk-form-id="#assetsBulkForm"
|
||||
id="assetsListingTable"
|
||||
data-show-columns-search="true"
|
||||
data-buttons="assetButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-assets-{{ str_slug($statuslabel->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
<table
|
||||
data-columns="{{ \App\Presenters\AssetPresenter::dataTableLayout() }}"
|
||||
data-cookie-id-table="assetsListingTable"
|
||||
data-id-table="assetsListingTable"
|
||||
data-side-pagination="server"
|
||||
data-sort-order="asc"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
data-bulk-form-id="#assetsBulkForm"
|
||||
id="assetsListingTable"
|
||||
data-show-columns-search="true"
|
||||
data-buttons="assetButtons"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.assets.index', ['status_id' => $statuslabel->id]) }}"
|
||||
data-export-options='{
|
||||
"fileName": "export-assets-{{ str_slug($statuslabel->name) }}-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
</table>
|
||||
</x-box>
|
||||
</x-container>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
Reference in New Issue
Block a user