You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
4.1 KiB
PHTML
95 lines
4.1 KiB
PHTML
@extends('layouts.admin')
|
|
|
|
@section('content')
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<form id="search-form">
|
|
<div class="form-row">
|
|
<div class="col-auto form-inline pr-0">
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
<select name="field" class="custom-select rounded-start">
|
|
@if($searchs)
|
|
@foreach($searchs as $key => $value)
|
|
<option value="{{ $key }}"{{ (@$search['field'] == $key) ? ' selected="selected"' : '' }}>{{ $value }}</option>
|
|
@endforeach
|
|
@endif
|
|
</select>
|
|
</div>
|
|
<input type="text" name="word" class="form-control" size="20" value="{{ @$search['word'] }}" placeholder="검색어 입력" />
|
|
<div class="input-group-append">
|
|
<button type="submit" class="btn btn-info"><i class="fas fa-search"></i> 검색</button>
|
|
</div>
|
|
<div class="input-group-append">
|
|
<a href="#modalBox" data-id="" data-toggle="modal" data-target="#modalBox" class="btn btn-danger"><i class="fas fa-pen"></i> 등록</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body pl-3 pr-3 pt-1 pb-1">
|
|
<table class="table table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th class="width-100">변수키</th>
|
|
<th class="width-100 width-clear">변수명</th>
|
|
<th class="mobileNone">변수값</th>
|
|
<th class="text-center width-60">시스템</th>
|
|
<th class="text-center width-60">관리</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($data as $i => $row)
|
|
<tr>
|
|
<td><a href="#modalBox" data-id="{{ $row->id }}" data-toggle="modal" data-target="#modalBox" class="view-link">{{ $row->key }}</a></td>
|
|
<td class="nowrap">{{ $row->name }}</td>
|
|
<td class="ellipsis ellipsis-wide mobileNone"><span>{{ $row->value }}</span></td>
|
|
<td class="text-center"><i class="fas fa-dot-circle @if($row->system) check-on @else check-off @endif"></i></td>
|
|
<td class="text-center"><a href="{{ route('cms.setting.delete') }}" data-id="{{ $row->id }}" data-system="{{ $row->system }}" class="btn btn-sm @if($row->system) btn-secondary @else btn-info @endif btn-delete rounded-0">삭제</a></td>
|
|
</tr>
|
|
@endforeach
|
|
@if(!$data->count())
|
|
<tr>
|
|
<td colspan="5" class="none-data">데이터가 없습니다.</td>
|
|
</tr>
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@include('admin.setting.create')
|
|
@stop
|
|
|
|
@push('scripts')
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$('.btn-delete').click(function() {
|
|
if ($(this).data('system') == '1') {
|
|
alertModal('시스템 변수는 삭제할 수 없습니다.');
|
|
return false;
|
|
}
|
|
|
|
if (confirm('해당 데이터를 삭제하시겠습니까?')) {
|
|
$.post($(this).attr('href'), {'id': $(this).data('id') }, function(result) {
|
|
if (result.success) {
|
|
window.location.reload();
|
|
} else {
|
|
alert(result.message);
|
|
}
|
|
}).fail(function(result) {
|
|
var data = result.responseJSON;
|
|
if (!data.success) {
|
|
alert(data.message);
|
|
}
|
|
});
|
|
}
|
|
|
|
return false;
|
|
});
|
|
});
|
|
</script>
|
|
@endpush
|