MMC alpha ready
This commit is contained in:
@@ -184,18 +184,18 @@ class AUKController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function load(Request $request)
|
public function load(Request $request)
|
||||||
{
|
{
|
||||||
Log::alert("In load");
|
// Log::alert("In load");
|
||||||
$project_id = $request->session()->get('project_id');
|
$project_id = $request->session()->get('project_id');
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($request->input('auk_name_' . $i) !== null) {
|
while ($request->input('auk_name_' . $i) !== null) {
|
||||||
Log::alert("Loading " . $i);
|
// Log::alert("Loading " . $i);
|
||||||
$auk_name = $request->input('auk_name_' . $i);
|
$auk_name = $request->input('auk_name_' . $i);
|
||||||
$auk_path = $request->input('auk_path_' . $i);
|
$auk_path = $request->input('auk_path_' . $i);
|
||||||
$image_dir = $request->input('image_dir_' . $i);
|
$image_dir = $request->input('image_dir_' . $i);
|
||||||
Log::alert("auk_name \"" . $auk_name . "\"");
|
// Log::alert("auk_name \"" . $auk_name . "\"");
|
||||||
Log::alert("auk_path \"" . $auk_path . "\"");
|
// Log::alert("auk_path \"" . $auk_path . "\"");
|
||||||
Log::alert("image_dir \"" . $image_dir . "\"");
|
// Log::alert("image_dir \"" . $image_dir . "\"");
|
||||||
|
|
||||||
AUK::create([
|
AUK::create([
|
||||||
'project_id' => $project_id,
|
'project_id' => $project_id,
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ namespace App\Http\Controllers;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Models\Project;
|
use App\Models\Project;
|
||||||
use App\Models\AUK;
|
use App\Models\AUK;
|
||||||
use App\Models\Document;
|
use App\Models\MMC;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MMCController extends Controller
|
class MMCController extends Controller
|
||||||
@@ -21,8 +23,7 @@ class MMCController extends Controller
|
|||||||
$project_id = $request->session()->get('project_id');
|
$project_id = $request->session()->get('project_id');
|
||||||
$project = Project::find($project_id);
|
$project = Project::find($project_id);
|
||||||
$top_auks = $project->auks()->where('parent_id', 0)->get()->sortBy('auk_name');
|
$top_auks = $project->auks()->where('parent_id', 0)->get()->sortBy('auk_name');
|
||||||
if(count($top_auks))
|
if (count($top_auks)) {
|
||||||
{
|
|
||||||
$mmc = $top_auks[0]->mmcs;
|
$mmc = $top_auks[0]->mmcs;
|
||||||
}
|
}
|
||||||
return view('mmc.list', ['project' => $project, 'top_auks' => $top_auks]);
|
return view('mmc.list', ['project' => $project, 'top_auks' => $top_auks]);
|
||||||
@@ -136,46 +137,30 @@ class MMCController extends Controller
|
|||||||
$project_id = $request->session()->get('project_id');
|
$project_id = $request->session()->get('project_id');
|
||||||
$project = Project::find($project_id);
|
$project = Project::find($project_id);
|
||||||
|
|
||||||
|
$auk = AUK::find($auk_id);
|
||||||
$MMC = array();
|
$MMC = array();
|
||||||
$total_size = 0;
|
$total_size = 0;
|
||||||
$total_count = 0;
|
$total_count = 0;
|
||||||
$MMC_PATH = $project->mmc_path;
|
$MMC_PATH = $project->mmc_path . '/' . $auk->auk_path . '/' . $auk->image_dir;
|
||||||
$mmc_dir = scandir($MMC_PATH);
|
$mmc_dir = scandir($MMC_PATH);
|
||||||
|
|
||||||
|
|
||||||
foreach ($mmc_dir as $entry) {
|
foreach ($mmc_dir as $image) {
|
||||||
$course_path = $MMC_PATH . '/' . $entry;
|
$image_file_path = $MMC_PATH . '/' . $image;
|
||||||
if (is_dir($course_path)) {
|
|
||||||
if (intval($entry) > 0 && intval($entry) < 99) {
|
|
||||||
// $MMC[] = $entry;
|
|
||||||
// echo ($entry . "\n");
|
|
||||||
$mmc_course_dir = scandir($course_path);
|
|
||||||
foreach ($mmc_course_dir as $course_entry) {
|
|
||||||
// VVV Images VVV
|
|
||||||
if (strcasecmp($course_entry, 'images') == 0) {
|
|
||||||
$course_image_path = $course_path . '/' . $course_entry;
|
|
||||||
if (is_dir($course_image_path)) {
|
|
||||||
// echo ($course_image_path . "\n");
|
|
||||||
$MMC[$entry]['image_dir'] = $course_entry;
|
|
||||||
$course_images = scandir($course_image_path);
|
|
||||||
foreach ($course_images as $image) {
|
|
||||||
$image_file_path = $course_image_path . '/' . $image;
|
|
||||||
if (is_file($image_file_path)) {
|
if (is_file($image_file_path)) {
|
||||||
if (strncmp($entry, $image, 2) == 0) {
|
if (strncmp($auk->auk_path, $image, 2) == 0) {
|
||||||
if (
|
if (
|
||||||
strcasecmp(substr($image, -3, 3), 'jpg') == 0 ||
|
strcasecmp(substr($image, -3, 3), 'jpg') == 0 ||
|
||||||
strcasecmp(substr($image, -3, 3), 'svg') == 0 ||
|
strcasecmp(substr($image, -3, 3), 'svg') == 0 ||
|
||||||
strcasecmp(substr($image, -3, 3), 'swf') == 0
|
strcasecmp(substr($image, -3, 3), 'swf') == 0
|
||||||
) {
|
) {
|
||||||
// $MMC[$entry][] = $image;
|
|
||||||
$tmp_array = array();
|
$tmp_array = array();
|
||||||
$tmp_array['file'] = $image;
|
$tmp_array['filename'] = $image;
|
||||||
$tmp_array['size'] = filesize($image_file_path);
|
$tmp_array['size'] = filesize($image_file_path);
|
||||||
$tmp_array['mtime'] = filemtime($image_file_path);
|
$tmp_array['mtime'] = filemtime($image_file_path);
|
||||||
$tmp_array['atime'] = fileatime($image_file_path);
|
$tmp_array['atime'] = fileatime($image_file_path);
|
||||||
|
|
||||||
$MMC[$entry]['images'][] = $tmp_array;
|
$MMC[] = $tmp_array;
|
||||||
|
|
||||||
$total_size += $tmp_array['size'];
|
$total_size += $tmp_array['size'];
|
||||||
$total_count++;
|
$total_count++;
|
||||||
@@ -183,14 +168,39 @@ class MMCController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
return view('mmc.scan', ['project' => $project, 'AUK' => $auk, 'MMC' => $MMC]);
|
||||||
// ^^^ Images ^^^
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('mmc.scan', ['project' => $project, 'MMC' => $MMC]);
|
/**
|
||||||
|
* Load Images from file system
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function load(Request $request, $auk_id)
|
||||||
|
{
|
||||||
|
// Log::alert("In load");
|
||||||
|
$project_id = $request->session()->get('project_id');
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($request->input('filename_' . $i) !== null) {
|
||||||
|
$filename = $request->input('filename_' . $i);
|
||||||
|
$size = $request->input('size_' . $i);
|
||||||
|
$mtime= $request->input('mtime_' . $i);
|
||||||
|
// Log::alert("filename \"" . $filename . "\"");
|
||||||
|
// Log::alert("size \"" . $size . "\"");
|
||||||
|
// Log::alert("mtime \"" . $mtime . "\"");
|
||||||
|
// $atime= $request->input('atime_' . $i);
|
||||||
|
|
||||||
|
MMC::create([
|
||||||
|
'filename' => $filename,
|
||||||
|
'size' => $size,
|
||||||
|
'mtime' => $mtime,
|
||||||
|
// 'atime' => $atime,
|
||||||
|
])->auks()->attach($auk_id);
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
return redirect(route('mmc.index'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,13 +21,11 @@ class AUK extends Model
|
|||||||
|
|
||||||
public function childs()
|
public function childs()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\AUK','parent_id','id');
|
return $this->hasMany('App\Models\AUK', 'parent_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mmcs()
|
public function mmcs()
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(MMC::class,'auk_mmc','auk_id','mmc_id');
|
return $this->belongsToMany(MMC::class, 'auk_mmc', 'auk_id', 'mmc_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ class MMC extends Model
|
|||||||
|
|
||||||
public function auks()
|
public function auks()
|
||||||
{
|
{
|
||||||
return $this->belongsToMany(AUK::class);
|
return $this->belongsToMany(AUK::class, 'auk_mmc', 'mmc_id', 'auk_id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class CreateMMCSTable extends Migration
|
|||||||
$table->string('filename');
|
$table->string('filename');
|
||||||
$table->string('size');
|
$table->string('size');
|
||||||
$table->string('mtime');
|
$table->string('mtime');
|
||||||
$table->string('atime');
|
// $table->string('atime');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -707,6 +707,9 @@ select {
|
|||||||
.-ml-px {
|
.-ml-px {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
}
|
}
|
||||||
|
.mt-4 {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
.ml-1 {
|
.ml-1 {
|
||||||
margin-left: 0.25rem;
|
margin-left: 0.25rem;
|
||||||
}
|
}
|
||||||
@@ -719,9 +722,6 @@ select {
|
|||||||
.ml-2 {
|
.ml-2 {
|
||||||
margin-left: 0.5rem;
|
margin-left: 0.5rem;
|
||||||
}
|
}
|
||||||
.mt-4 {
|
|
||||||
margin-top: 1rem;
|
|
||||||
}
|
|
||||||
.ml-4 {
|
.ml-4 {
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
@@ -734,6 +734,9 @@ select {
|
|||||||
.-mt-px {
|
.-mt-px {
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
|
.mt-1 {
|
||||||
|
margin-top: 0.25rem;
|
||||||
|
}
|
||||||
.-mr-2 {
|
.-mr-2 {
|
||||||
margin-right: -0.5rem;
|
margin-right: -0.5rem;
|
||||||
}
|
}
|
||||||
@@ -743,15 +746,9 @@ select {
|
|||||||
.mt-6 {
|
.mt-6 {
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
}
|
}
|
||||||
.mt-1 {
|
|
||||||
margin-top: 0.25rem;
|
|
||||||
}
|
|
||||||
.mb-4 {
|
.mb-4 {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
.-mb-px {
|
|
||||||
margin-bottom: -1px;
|
|
||||||
}
|
|
||||||
.block {
|
.block {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@@ -800,12 +797,18 @@ select {
|
|||||||
.w-5 {
|
.w-5 {
|
||||||
width: 1.25rem;
|
width: 1.25rem;
|
||||||
}
|
}
|
||||||
|
.w-96 {
|
||||||
|
width: 24rem;
|
||||||
|
}
|
||||||
.w-8 {
|
.w-8 {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
}
|
}
|
||||||
.w-auto {
|
.w-auto {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
.w-full {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.w-4 {
|
.w-4 {
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
@@ -815,12 +818,6 @@ select {
|
|||||||
.w-48 {
|
.w-48 {
|
||||||
width: 12rem;
|
width: 12rem;
|
||||||
}
|
}
|
||||||
.w-full {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.w-96 {
|
|
||||||
width: 24rem;
|
|
||||||
}
|
|
||||||
.w-20 {
|
.w-20 {
|
||||||
width: 5rem;
|
width: 5rem;
|
||||||
}
|
}
|
||||||
@@ -879,9 +876,6 @@ select {
|
|||||||
.flex-col {
|
.flex-col {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.flex-wrap {
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
.items-center {
|
.items-center {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@@ -927,10 +921,6 @@ select {
|
|||||||
border-top-right-radius: 0.375rem;
|
border-top-right-radius: 0.375rem;
|
||||||
border-bottom-right-radius: 0.375rem;
|
border-bottom-right-radius: 0.375rem;
|
||||||
}
|
}
|
||||||
.rounded-t-lg {
|
|
||||||
border-top-left-radius: 0.5rem;
|
|
||||||
border-top-right-radius: 0.5rem;
|
|
||||||
}
|
|
||||||
.border {
|
.border {
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
@@ -977,22 +967,18 @@ select {
|
|||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
|
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
.bg-gray-800 {
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
|
|
||||||
}
|
|
||||||
.bg-gray-500 {
|
.bg-gray-500 {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
|
.bg-gray-800 {
|
||||||
|
--tw-bg-opacity: 1;
|
||||||
|
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
|
||||||
|
}
|
||||||
.bg-indigo-50 {
|
.bg-indigo-50 {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
|
background-color: rgb(238 242 255 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
.bg-gray-50 {
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
|
||||||
}
|
|
||||||
.fill-current {
|
.fill-current {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
@@ -1002,9 +988,6 @@ select {
|
|||||||
.p-2 {
|
.p-2 {
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
.p-4 {
|
|
||||||
padding: 1rem;
|
|
||||||
}
|
|
||||||
.px-4 {
|
.px-4 {
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
@@ -1047,6 +1030,12 @@ select {
|
|||||||
.pt-4 {
|
.pt-4 {
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
|
.pb-2 {
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
.pl-2 {
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
}
|
||||||
.pt-8 {
|
.pt-8 {
|
||||||
padding-top: 2rem;
|
padding-top: 2rem;
|
||||||
}
|
}
|
||||||
@@ -1059,23 +1048,23 @@ select {
|
|||||||
.pb-1 {
|
.pb-1 {
|
||||||
padding-bottom: 0.25rem;
|
padding-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
.pb-4 {
|
||||||
|
padding-bottom: 1rem;
|
||||||
|
}
|
||||||
.pt-6 {
|
.pt-6 {
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
}
|
}
|
||||||
.pt-1 {
|
.pt-1 {
|
||||||
padding-top: 0.25rem;
|
padding-top: 0.25rem;
|
||||||
}
|
}
|
||||||
.pl-2 {
|
|
||||||
padding-left: 0.5rem;
|
|
||||||
}
|
|
||||||
.pl-3 {
|
.pl-3 {
|
||||||
padding-left: 0.75rem;
|
padding-left: 0.75rem;
|
||||||
}
|
}
|
||||||
.pr-4 {
|
.pr-4 {
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
}
|
}
|
||||||
.pb-4 {
|
.text-left {
|
||||||
padding-bottom: 1rem;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.text-center {
|
.text-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -9086,14 +9075,14 @@ readers do not read off random characters that represent icons */
|
|||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
.hover\:bg-gray-100:hover {
|
|
||||||
--tw-bg-opacity: 1;
|
|
||||||
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
|
||||||
}
|
|
||||||
.hover\:bg-gray-700:hover {
|
.hover\:bg-gray-700:hover {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
background-color: rgb(55 65 81 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
|
.hover\:bg-gray-100:hover {
|
||||||
|
--tw-bg-opacity: 1;
|
||||||
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||||
|
}
|
||||||
.hover\:bg-gray-50:hover {
|
.hover\:bg-gray-50:hover {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@forelse ($top_auks as $top_auk)
|
@forelse ($top_auks as $top_auk)
|
||||||
<tr class="p-2 border border-gray-200 text-center">
|
<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">
|
<td class="p-2 border border-gray-200 text-center">
|
||||||
<table>
|
<table>
|
||||||
@forelse ($top_auk->mmcs as $mmc)
|
@forelse ($top_auk->mmcs as $mmc)
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
@empty
|
@empty
|
||||||
<tr>
|
<tr>
|
||||||
<td>No MMC
|
<td>No MMC
|
||||||
<a href="{{ route('mmc.scan') }}">
|
<a href="{{ route('mmc.scan',$top_auk->id) }}" class="pl-2">
|
||||||
<button
|
<button
|
||||||
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full">
|
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') }}
|
<i class="fa fa-search pr-2"></i>{{ __('Scan mmc') }}
|
||||||
|
|||||||
@@ -10,37 +10,7 @@
|
|||||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
||||||
<div class="p-6 bg-white border-b border-gray-200">
|
<div class="p-6 bg-white border-b border-gray-200">
|
||||||
<div class="w-96 mx-auto">
|
<div class="w-96 mx-auto">
|
||||||
<div class="panel-group">
|
<h3 class="font-bold text-l text-gray-800 leading-tight pb-2">{{ $AUK->auk_name }}</h3>
|
||||||
<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>
|
|
||||||
<table class="table table-sm border-b border-gray-200">
|
<table class="table table-sm border-b border-gray-200">
|
||||||
<tr class="border border-gray-200">
|
<tr class="border border-gray-200">
|
||||||
<th class="p-2 border border-gray-200">
|
<th class="p-2 border border-gray-200">
|
||||||
@@ -52,30 +22,52 @@
|
|||||||
<th class="p-2 border border-gray-200">
|
<th class="p-2 border border-gray-200">
|
||||||
{{ __('MTime') }}
|
{{ __('MTime') }}
|
||||||
</th>
|
</th>
|
||||||
<th class="p-2 border border-gray-200">
|
{{-- <th class="p-2 border border-gray-200">
|
||||||
{{ __('ATime') }}
|
{{ __('ATime') }}
|
||||||
</th>
|
</th> --}}
|
||||||
<th class="p-2 border border-gray-200">
|
|
||||||
{{ __('Actions') }}
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
@forelse ($value['images'] as $image)
|
@forelse ($MMC as $image)
|
||||||
<tr class="border border-gray-200">
|
<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['size'] }}</td>
|
||||||
<td class="p-2 border border-gray-200">{{ $image['mtime'] }}</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">{{ $image['atime'] }}</td> --}}
|
||||||
<td class="p-2 border border-gray-200"> </td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
@empty
|
@empty
|
||||||
<tr>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforelse
|
@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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,29 @@
|
|||||||
@foreach ($childs as $child)
|
@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">
|
<td class="p-2 border border-gray-200 text-center">
|
||||||
{{ str_pad('', $level, '-') . ' ' . $child->auk_name }}
|
{{ str_pad('', $level, '-') . ' ' . $child->auk_name }}
|
||||||
</td>
|
</td>
|
||||||
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ Route::post('/project/{project}/select',SelectProjectController::class)->middlew
|
|||||||
|
|
||||||
Route::resource('/mmc', MMCController::class)->middleware(['auth'])->only(['index','create']);
|
Route::resource('/mmc', MMCController::class)->middleware(['auth'])->only(['index','create']);
|
||||||
Route::get('/mmc/scan/{auk}', [MMCController::class, 'scan'])->middleware(['auth'])->name('mmc.scan');
|
Route::get('/mmc/scan/{auk}', [MMCController::class, 'scan'])->middleware(['auth'])->name('mmc.scan');
|
||||||
|
Route::post('/mmc/load/{auk}', [MMCController::class, 'load'])->middleware(['auth'])->name('mmc.load');
|
||||||
Route::resource('/documents', DocumentController::class)->except('show')->middleware(['auth']);
|
Route::resource('/documents', DocumentController::class)->except('show')->middleware(['auth']);
|
||||||
Route::resource('/auks', AUKController::class)->except('show')->middleware(['auth']);
|
Route::resource('/auks', AUKController::class)->except('show')->middleware(['auth']);
|
||||||
Route::get('/auks/scan', [AUKController::class, 'scan'])->middleware(['auth'])->name('auks.scan');
|
Route::get('/auks/scan', [AUKController::class, 'scan'])->middleware(['auth'])->name('auks.scan');
|
||||||
|
|||||||
Reference in New Issue
Block a user