mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-04 23:55:46 +00:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
@ -2,31 +2,30 @@
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/form.bulk_delete') }}
|
||||
{{ trans('general.bulk_delete') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<p>{{ trans('admin/hardware/form.bulk_delete_help') }}</p>
|
||||
<form class="form-horizontal" method="post" action="{{ route('hardware/bulkdelete') }}" autocomplete="off" role="form">
|
||||
<form class="form-horizontal" method="post" action="{{ route('hardware.bulkdelete.store') }}" autocomplete="off" role="form">
|
||||
{{csrf_field()}}
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h2 class="box-title" style="color: red">{{ trans('admin/hardware/form.bulk_delete_warn', ['asset_count' => count($assets)]) }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
|
||||
<div class="callout callout-warning">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
{{ trans('admin/hardware/form.bulk_delete_warn', ['asset_count' => count($assets)]) }}
|
||||
</div>
|
||||
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{{ trans('admin/hardware/table.id') }}</th>
|
||||
@ -34,7 +33,7 @@
|
||||
<th>{{ trans('admin/hardware/table.location')}}</th>
|
||||
<th>{{ trans('admin/hardware/table.assigned_to') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
@ -60,7 +59,7 @@
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">
|
||||
<a class="btn btn-link pull-left" href="{{ URL::previous() }}">
|
||||
{{ trans('button.cancel') }}
|
||||
</a>
|
||||
<button type="submit" class="btn btn-success" id="submit-button">
|
||||
|
||||
@ -290,7 +290,7 @@
|
||||
<div class="col-md-12 hidden-print" style="padding-top: 5px;">
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('hardware/bulkedit') }}"
|
||||
action="{{ route('hardware.bulkdelete.store') }}"
|
||||
accept-charset="UTF-8"
|
||||
class="form-inline"
|
||||
target="_blank"
|
||||
|
||||
@ -43,25 +43,25 @@
|
||||
|
||||
:root {
|
||||
color-scheme: light dark;
|
||||
--main-theme-color: {{ $snipeSettings->header_color ?? '#5fa4cc' }};
|
||||
--btn-theme-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l + 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--btn-theme-hover-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l - 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--btn-theme-hover: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l - 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--btn-theme-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l + 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--color-fg: light-dark(#373636, #ffffff);
|
||||
--main-footer-bg-color: light-dark(#ffffff,#3d4144);
|
||||
--main-footer-text-color: light-dark(#605e5e, #d2d6de);
|
||||
--main-footer-top-border-color: light-dark(#d2d6de,#605e5e);
|
||||
--main-theme-color: {{ $snipeSettings->header_color ?? '#5fa4cc' }};
|
||||
--nav-hover-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l - 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--nav-primary-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l - 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--search-highlight: #e9d15b;
|
||||
--sidenav-hover-color-bg: #4c4b4b;
|
||||
--sidenav-text-hover-color: #fff;
|
||||
--sidenav-text-nohover-color: #b8c7ce;
|
||||
--sidenav-hover-color-bg: #4c4b4b;
|
||||
--search-highlight: #e9d15b;
|
||||
--color-fg: light-dark(#373636, #ffffff);
|
||||
--text-danger: light-dark(#a94442,#dd4b39);
|
||||
--text-help: light-dark(#605e5e,#a6a4a4);
|
||||
--text-info: light-dark(#31708f,#2baae6);
|
||||
--text-success: light-dark(#039516,#4ced61);
|
||||
--text-warning: light-dark(#da9113,#f3a51f);
|
||||
--text-info: light-dark(#31708f,#2baae6);
|
||||
--text-help: light-dark(#605e5e,#a6a4a4);
|
||||
--nav-primary-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l - 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--nav-hover-text-color: {{ $nav_link_color ?? 'light-dark(hsl(from var(--main-theme-color) h s calc(l - 10)),hsl(from var(--main-theme-color) h s calc(l - 10)))' }};
|
||||
--main-footer-bg-color: light-dark(#ffffff,#3d4144);
|
||||
--main-footer-top-border-color: light-dark(#d2d6de,#605e5e);
|
||||
--main-footer-text-color: light-dark(#605e5e, #d2d6de);
|
||||
|
||||
}
|
||||
|
||||
@ -80,17 +80,18 @@
|
||||
--callout-left-border: var(--box-header-top-border-color);
|
||||
--color-bg: #ecf0f5;
|
||||
--header-color: #000000;
|
||||
--input-group-bg: hsl(from var(--box-bg) h s calc(l - 5));
|
||||
--input-group-fg: hsl(from var(--input-group-bg) h s calc(l - 50));
|
||||
--link-color: {{ $link_light_color ?? '#296282' }};
|
||||
--link-hover: hsl(from var(--link-color) h s calc(l - 10));
|
||||
--main-theme-hover: hsl(from var(--main-theme-color) h s calc(l - 10));
|
||||
--tab-bottom-border: 1px solid var(--box-header-top-border-color);
|
||||
--table-border-row-top: 1px solid #ecf0f5;
|
||||
--table-border-row: 1px solid #ecf0f5;
|
||||
--table-stripe-bg-alt: rgba(211, 211, 211, 0.25);
|
||||
--table-stripe-bg: #ffffff;
|
||||
--text-legend-help: var(--text-help);
|
||||
--text-warning: #da9113;
|
||||
--input-group-bg: hsl(from var(--box-bg) h s calc(l - 5));
|
||||
--input-group-fg: hsl(from var(--input-group-bg) h s calc(l - 50));
|
||||
|
||||
}
|
||||
|
||||
@ -109,6 +110,8 @@
|
||||
--callout-left-border: #323131;
|
||||
--color-bg: #222222;
|
||||
--header-color: #ffffff;
|
||||
--input-group-bg: hsl(from var(--box-bg) h s calc(l + 10));
|
||||
--input-group-fg: hsl(from var(--input-group-bg) h s calc(l + 50));
|
||||
--link-color: {{ $link_dark_color ?? '#5fa4cc' }};
|
||||
--link-hover: hsl(from var(--link-color) h s calc(l + 15));
|
||||
--main-theme-hover: hsl(from var(--main-theme-color) h s calc(l - 10));
|
||||
@ -117,8 +120,6 @@
|
||||
--table-stripe-bg-alt: #323131;
|
||||
--table-stripe-bg: #494747;
|
||||
--text-legend-help: #d6d6d6;
|
||||
--input-group-bg: hsl(from var(--box-bg) h s calc(l + 10));
|
||||
--input-group-fg: hsl(from var(--input-group-bg) h s calc(l + 50));
|
||||
|
||||
}
|
||||
|
||||
@ -437,7 +438,7 @@
|
||||
.table > tbody > tr > td,
|
||||
.table > tfoot > tr > td
|
||||
{
|
||||
border-top: var(--table-border-row);
|
||||
border-top: var(--table-border-row) !important;
|
||||
}
|
||||
|
||||
|
||||
@ -800,6 +801,10 @@
|
||||
color: var(--color-fg) !important;
|
||||
}
|
||||
|
||||
.table > tbody + tbody {
|
||||
border-top: 0px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
{{-- Custom CSS --}}
|
||||
|
||||
@ -2,16 +2,11 @@
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
Bulk Edit
|
||||
{{ trans('general.bluk_edit') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-sm btn-theme pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
@ -29,22 +24,21 @@
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@foreach ($models as $model)
|
||||
<table class="table table-striped">
|
||||
@foreach ($models as $model)
|
||||
|
||||
<tr{!! (($model->assets_count > 0 ) ? ' class="warning"' : ' class="success"') !!}>
|
||||
<td>
|
||||
<i class="fa {!! (($model->assets_count > 0 ) ? 'fa-warning info' : 'fa-check success') !!}"></i>
|
||||
{{ $model->display_name }}
|
||||
<tr>
|
||||
<td>
|
||||
<i class="fa {!! (($model->assets_count > 0 ) ? 'fa-warning text-warning' : 'fa-check success') !!}"></i>
|
||||
{{ $model->display_name }}
|
||||
|
||||
@if ($model->model_number)
|
||||
({{ $model->model_number }})
|
||||
@endif
|
||||
@if ($model->model_number)
|
||||
({{ $model->model_number }})
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $model->assets_count }} assets
|
||||
</td>
|
||||
<td>{{ $model->assets_count }} assets
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</table>
|
||||
@ -100,15 +94,9 @@
|
||||
<div class="col-md-9">
|
||||
<div class="form-inline" style="display: flex; align-items: center; gap: 8px;">
|
||||
<input type="checkbox" name="require_serial" value="1" id="require_serial" aria-label="require_serial" />
|
||||
<a
|
||||
href="#"
|
||||
data-tooltip="true"
|
||||
title="{{ trans('admin/hardware/general.require_serial_help') }}"
|
||||
style="display: inline-flex; align-items: center;"
|
||||
>
|
||||
<x-icon type="info-circle" />
|
||||
<span class="sr-only">{{ trans('admin/hardware/general.require_serial_help') }}</span>
|
||||
</a>
|
||||
<x-form-tooltip>
|
||||
{{ trans('admin/hardware/general.require_serial_help') }}
|
||||
</x-form-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -142,7 +130,7 @@
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link pull-left" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><x-icon type="checkmark" /> {{ trans('general.update') }}</button>
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><x-icon type="checkmark" /> {{ trans('general.save') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div> <!--/.box.box-default-->
|
||||
</form>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<div id="{{ (isset($id_divname)) ? $id_divname : 'assetsBulkEditToolbar' }}" style="min-width:400px">
|
||||
<form
|
||||
method="POST"
|
||||
action="{{ route('hardware/bulkedit') }}"
|
||||
action="{{ route('hardware.bulkedit.show') }}"
|
||||
accept-charset="UTF-8"
|
||||
class="form-inline"
|
||||
id="{{ (isset($id_formname)) ? $id_formname : 'assetsBulkForm' }}"
|
||||
|
||||
@ -143,12 +143,15 @@ Route::group(
|
||||
Route::post(
|
||||
'bulkedit',
|
||||
[BulkAssetsController::class, 'edit']
|
||||
)->name('hardware/bulkedit');
|
||||
)->name('hardware.bulkedit.show')
|
||||
->breadcrumbs(fn (Trail $trail) =>
|
||||
$trail->parent('hardware.index')
|
||||
->push(trans('general.bulk_delete'), route('hardware.index')));
|
||||
|
||||
Route::post(
|
||||
'bulkdelete',
|
||||
[BulkAssetsController::class, 'destroy']
|
||||
)->name('hardware/bulkdelete');
|
||||
)->name('hardware.bulkdelete.store');
|
||||
|
||||
Route::post(
|
||||
'bulkrestore',
|
||||
|
||||
@ -59,7 +59,10 @@ Route::group(['prefix' => 'models', 'middleware' => ['auth']], function () {
|
||||
BulkAssetModelsController::class,
|
||||
'edit'
|
||||
]
|
||||
)->name('models.bulkedit.index');
|
||||
)->name('models.bulkedit.index')
|
||||
->breadcrumbs(fn (Trail $trail) =>
|
||||
$trail->parent('models.index')
|
||||
->push(trans('general.bulk_edit'), route('models.index')));
|
||||
|
||||
Route::post(
|
||||
'bulksave',
|
||||
|
||||
@ -76,7 +76,7 @@ class BulkDeleteAssetsTest extends TestCase
|
||||
$id_array = $assets->pluck('id')->toArray();
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->from(route('hardware/bulkedit'))
|
||||
->from(route('hardware.bulkdelete.store'))
|
||||
->post('/hardware/bulkdelete', [
|
||||
'ids' => $id_array,
|
||||
'bulk_actions' => 'delete',
|
||||
@ -109,7 +109,7 @@ class BulkDeleteAssetsTest extends TestCase
|
||||
$this->assertTrue($test_ran, "Test never actually ran!");
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->from(route('hardware/bulkedit'))
|
||||
->from(route('hardware.bulkdelete.store'))
|
||||
->post(route('hardware/bulkrestore'), [
|
||||
'ids' => [$asset->id],
|
||||
])->assertStatus(302);
|
||||
@ -132,7 +132,7 @@ class BulkDeleteAssetsTest extends TestCase
|
||||
$asset = Asset::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->from(route('hardware/bulkedit'))
|
||||
->from(route('hardware.bulkdelete.store'))
|
||||
->post('/hardware/bulkdelete', [
|
||||
'ids' => [$asset->id],
|
||||
'bulk_actions' => 'delete',
|
||||
@ -159,7 +159,7 @@ class BulkDeleteAssetsTest extends TestCase
|
||||
$asset = Asset::factory()->deleted()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->from(route('hardware/bulkedit'))
|
||||
->from(route('hardware.bulkdelete.store'))
|
||||
->post(route('hardware/bulkrestore'), [
|
||||
'ids' => [$asset->id],
|
||||
'bulk_actions' => 'restore',
|
||||
@ -186,7 +186,7 @@ class BulkDeleteAssetsTest extends TestCase
|
||||
]);
|
||||
|
||||
$response = $this->actingAs($user)
|
||||
->from(route('hardware/bulkedit'))
|
||||
->from(route('hardware.bulkdelete.store'))
|
||||
->post('/hardware/bulkdelete', [
|
||||
'ids' => [$asset->id],
|
||||
'bulk_actions' => 'delete',
|
||||
|
||||
Reference in New Issue
Block a user