MMC alpha ready

This commit is contained in:
Александр Бабкин
2022-07-14 17:00:24 +03:00
parent 58c92adfbc
commit ba97a6afc1
10 changed files with 154 additions and 144 deletions

View File

@@ -62,7 +62,7 @@
</tr>
@forelse ($top_auks as $top_auk)
<tr class="p-2 border border-gray-200 text-center">
<td class="p-2 border border-gray-200 text-center">{{ $top_auk->auk_name }}</td>
<td class="p-2 border border-gray-200 text-left">{{ $top_auk->auk_name }}</td>
<td class="p-2 border border-gray-200 text-center">
<table>
@forelse ($top_auk->mmcs as $mmc)
@@ -73,7 +73,7 @@
@empty
<tr>
<td>No MMC
<a href="{{ route('mmc.scan') }}">
<a href="{{ route('mmc.scan',$top_auk->id) }}" class="pl-2">
<button
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
<i class="fa fa-search pr-2"></i>{{ __('Scan mmc') }}

View File

@@ -10,37 +10,7 @@
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200">
<div class="w-96 mx-auto">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" target="_blank" rel="nofollow noreferrer"
target="_blank" rel="nofollow noreferrer" href="#collapse1">123</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse">
<div class="panel-body">123123123</div>
<div class="panel-footer">123</div>
</div>
</div>
</div>
{{-- <div class="mb-4 border-b border-gray-200 dark:border-gray-700">
<ul class="flex flex-wrap -mb-px text-sm font-medium text-center" id="aukTab" data-tabs-toggle="#aukTabContent" role="tablist">
@foreach ($MMC as $key => $value)
<li class="mr-2" role="presentation">
<button class="inline-block p-4 rounded-t-lg border-b-2" id="auk{{ $key }}-tab" data-tabs-target="#auk{{ $key }}" type="button" role="tab" aria-controls="auk{{ $key }}" aria-selected="false">AUK {{ $key }}</button>
</li>
@endforeach
</ul>
</div>
<div id="aukTabContent">
@foreach ($MMC as $key => $value)
<div class="hidden p-4 bg-gray-50 rounded-lg dark:bg-gray-800" id="auk{{ $key }}" role="tabpanel" aria-labelledby="auk{{ $key }}-tab">
<p class="text-sm text-gray-500 dark:text-gray-400">This is some placeholder content the <strong class="font-medium text-gray-800 dark:text-white">Profile tab's associated content</strong>. Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the content visibility and styling.</p>
</div>
@endforeach
</div> --}}
{{-- <h3 class="font-bold text-l text-gray-800 leading-tight">АУК {{ $key }}</h3>
<h3 class="font-bold text-l text-gray-800 leading-tight pb-2">{{ $AUK->auk_name }}</h3>
<table class="table table-sm border-b border-gray-200">
<tr class="border border-gray-200">
<th class="p-2 border border-gray-200">
@@ -52,30 +22,52 @@
<th class="p-2 border border-gray-200">
{{ __('MTime') }}
</th>
<th class="p-2 border border-gray-200">
{{-- <th class="p-2 border border-gray-200">
{{ __('ATime') }}
</th>
<th class="p-2 border border-gray-200">
{{ __('Actions') }}
</th>
</th> --}}
</tr>
@forelse ($value['images'] as $image)
@forelse ($MMC as $image)
<tr class="border border-gray-200">
<td class="p-2 border border-gray-200">{{ $image['file'] }}</td>
<td class="p-2 border border-gray-200">{{ $image['filename'] }}</td>
<td class="p-2 border border-gray-200">{{ $image['size'] }}</td>
<td class="p-2 border border-gray-200">{{ $image['mtime'] }}</td>
<td class="p-2 border border-gray-200">{{ $image['atime'] }}</td>
<td class="p-2 border border-gray-200">&nbsp;</td>
{{-- <td class="p-2 border border-gray-200">{{ $image['atime'] }}</td> --}}
</tr>
@empty
<tr>
<td colspan="5" class="p-2 border border-gray-200 text-center">No Documents!
<td colspan="4" class="p-2 border border-gray-200 text-center">No Images!
</td>
</tr>
@endforelse
</table> --}}
</table>
@if (count($MMC))
<form method="POST" action="{{ route('mmc.load',$AUK->id) }}">
@csrf
<input type="hidden" name="auk_id" id="auk_id" value="{{ $AUK->id }}">
@for($i = 0; $i < count($MMC); $i++)
<input type="hidden" name="filename_{{$i}}" id="filename_{{$i}}" value="{{ $MMC[$i]['filename'] }}">
<input type="hidden" name="size_{{$i}}" id="size_{{$i}}" value="{{ $MMC[$i]['size'] }}">
<input type="hidden" name="mtime_{{$i}}" id="mtime_{{$i}}" value="{{ $MMC[$i]['mtime'] }}">
{{-- <input type="hidden" name="atime_{{$i}}" id="atime_{{$i}}" value="{{ $image['atime'] }}"> --}}
@endfor
<div class="flex items-center justify-end mt-4">
<button
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
<i class="fa fa-add pr-2"></i>{{ __('Insert Images') }}
</button>
<div class="pl-2">
<a href="{{ route('mmc.index') }}"
class="btn bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 rounded-full">
<i class="fa fa-cancel pr-2"></i>{{ __('Cancel') }}
</a>
</div>
</div>
</form>
@endif
</div>
</div>
</div>

View File

@@ -1,9 +1,29 @@
@foreach ($childs as $child)
<tr class="p-2 border border-gray-200 text-center">
<tr class="p-2 border border-gray-200 text-left">
<td class="p-2 border border-gray-200 text-center">
{{ str_pad('', $level, '-') . ' ' . $child->auk_name }}
</td>
<td>
<table>
@forelse ($child->mmcs as $mmc)
<tr>
<td>{{ $mmc->filename }}</td>
</tr>
@empty
<tr>
<td>No MMC
<a href="{{ route('mmc.scan',$top_auk->id) }}" class="pl-2">
<button
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
<i class="fa fa-search pr-2"></i>{{ __('Scan mmc') }}
</button>
</a>
</td>
</tr>
@endforelse
</table>
</td>
</tr>