listing files in backend

This commit is contained in:
Arno Kaimbacher 2018-10-11 16:49:08 +02:00
parent 4ac1c34b6a
commit ccff83fa66
9 changed files with 153 additions and 93 deletions

View File

@ -11,6 +11,7 @@ use Illuminate\View\View;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\File;
class DatasetController extends Controller class DatasetController extends Controller
{ {
@ -109,7 +110,7 @@ class DatasetController extends Controller
public function edit($id) : View public function edit($id) : View
{ {
$document = Dataset::findOrFail($id); $document = Dataset::findOrFail($id);
$document->load('licenses', 'titles', 'abstracts'); $document->load('licenses', 'titles', 'abstracts', 'files');
$projects = Project::pluck('label', 'id'); $projects = Project::pluck('label', 'id');
@ -191,6 +192,7 @@ class DatasetController extends Controller
return redirect()->route('settings.document'); return redirect()->route('settings.document');
} }
/** /**
* Remove the specified resource from storage. * Remove the specified resource from storage.
* *

View File

@ -0,0 +1,18 @@
<?php
namespace App\Http\Controllers\Settings;
use App\Http\Controllers\Controller;
use Illuminate\View\View;
use Illuminate\Http\Request;
use App\Models\File;
class FileController extends Controller
{
public function download($id)
{
//$report = $this->report->find($id);
$file = File::findOrFail($id);
$file_path = public_path('storage/' . $file->path_name);
return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]);
}
}

View File

@ -66,4 +66,9 @@ class File extends Model
{ {
return storage_path('app/public/' . $this->path_name); return storage_path('app/public/' . $this->path_name);
} }
public function exists()
{
return \Illuminate\Support\Facades\File::exists(public_path('storage/' . $this->path_name));
}
} }

167
composer.lock generated
View File

@ -279,16 +279,16 @@
}, },
{ {
"name": "egulias/email-validator", "name": "egulias/email-validator",
"version": "2.1.5", "version": "2.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/egulias/EmailValidator.git", "url": "https://github.com/egulias/EmailValidator.git",
"reference": "54859fabea8b3beecbb1a282888d5c990036b9e3" "reference": "0578b32b30b22de3e8664f797cf846fc9246f786"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/54859fabea8b3beecbb1a282888d5c990036b9e3", "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0578b32b30b22de3e8664f797cf846fc9246f786",
"reference": "54859fabea8b3beecbb1a282888d5c990036b9e3", "reference": "0578b32b30b22de3e8664f797cf846fc9246f786",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -332,7 +332,7 @@
"validation", "validation",
"validator" "validator"
], ],
"time": "2018-08-16T20:49:45+00:00" "time": "2018-09-25T20:47:26+00:00"
}, },
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
@ -502,32 +502,32 @@
}, },
{ {
"name": "jakub-onderka/php-console-color", "name": "jakub-onderka/php-console-color",
"version": "0.1", "version": "v0.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git", "url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" "reference": "d5deaecff52a0d61ccb613bb3804088da0307191"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", "reference": "d5deaecff52a0d61ccb613bb3804088da0307191",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.2" "php": ">=5.4.0"
}, },
"require-dev": { "require-dev": {
"jakub-onderka/php-code-style": "1.0", "jakub-onderka/php-code-style": "1.0",
"jakub-onderka/php-parallel-lint": "0.*", "jakub-onderka/php-parallel-lint": "1.0",
"jakub-onderka/php-var-dump-check": "0.*", "jakub-onderka/php-var-dump-check": "0.*",
"phpunit/phpunit": "3.7.*", "phpunit/phpunit": "~4.3",
"squizlabs/php_codesniffer": "1.*" "squizlabs/php_codesniffer": "1.*"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-0": { "psr-4": {
"JakubOnderka\\PhpConsoleColor": "src/" "JakubOnderka\\PhpConsoleColor\\": "src/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -537,11 +537,10 @@
"authors": [ "authors": [
{ {
"name": "Jakub Onderka", "name": "Jakub Onderka",
"email": "jakub.onderka@gmail.com", "email": "jakub.onderka@gmail.com"
"homepage": "http://www.acci.cz"
} }
], ],
"time": "2014-04-08T15:00:19+00:00" "time": "2018-09-29T17:23:10+00:00"
}, },
{ {
"name": "jakub-onderka/php-console-highlighter", "name": "jakub-onderka/php-console-highlighter",
@ -589,16 +588,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.5.43", "version": "v5.5.44",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "84f4ed02ec6eb4a56629fb6acbee1df56891e3c7" "reference": "00615aa27eb98f0ee6fb9f2160c6c60ae04abd1b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/84f4ed02ec6eb4a56629fb6acbee1df56891e3c7", "url": "https://api.github.com/repos/laravel/framework/zipball/00615aa27eb98f0ee6fb9f2160c6c60ae04abd1b",
"reference": "84f4ed02ec6eb4a56629fb6acbee1df56891e3c7", "reference": "00615aa27eb98f0ee6fb9f2160c6c60ae04abd1b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -719,7 +718,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2018-09-02T11:45:05+00:00" "time": "2018-10-04T14:51:24+00:00"
}, },
{ {
"name": "laravel/tinker", "name": "laravel/tinker",
@ -1115,16 +1114,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v4.0.4", "version": "v4.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "fa6ee28600d21d49b2b4e1006b48426cec8e579c" "reference": "d0230c5c77a7e3cfa69446febf340978540958c0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fa6ee28600d21d49b2b4e1006b48426cec8e579c", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0",
"reference": "fa6ee28600d21d49b2b4e1006b48426cec8e579c", "reference": "d0230c5c77a7e3cfa69446febf340978540958c0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1140,7 +1139,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "4.0-dev" "dev-master": "4.1-dev"
} }
}, },
"autoload": { "autoload": {
@ -1162,7 +1161,7 @@
"parser", "parser",
"php" "php"
], ],
"time": "2018-09-18T07:03:24+00:00" "time": "2018-10-10T09:24:14+00:00"
}, },
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
@ -1628,16 +1627,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73" "reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/6b217594552b9323bcdcfc14f8a0ce126e84cd73", "url": "https://api.github.com/repos/symfony/console/zipball/3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b",
"reference": "6b217594552b9323bcdcfc14f8a0ce126e84cd73", "reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1693,20 +1692,20 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-07-26T11:19:56+00:00" "time": "2018-10-02T16:33:53+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v4.1.4", "version": "v4.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "2a4df7618f869b456f9096781e78c57b509d76c7" "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/2a4df7618f869b456f9096781e78c57b509d76c7", "url": "https://api.github.com/repos/symfony/css-selector/zipball/d67de79a70a27d93c92c47f37ece958bf8de4d8a",
"reference": "2a4df7618f869b456f9096781e78c57b509d76c7", "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1746,20 +1745,20 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-07-26T09:10:45+00:00" "time": "2018-10-02T16:36:10+00:00"
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/debug.git", "url": "https://github.com/symfony/debug.git",
"reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd" "reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/c4625e75341e4fb309ce0c049cbf7fb84b8897cd", "url": "https://api.github.com/repos/symfony/debug/zipball/0a612e9dfbd2ccce03eb174365f31ecdca930ff6",
"reference": "c4625e75341e4fb309ce0c049cbf7fb84b8897cd", "reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1802,11 +1801,11 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-08-03T10:42:44+00:00" "time": "2018-10-02T16:33:53+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
@ -1869,16 +1868,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a" "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/8a84fcb207451df0013b2c74cbbf1b62d47b999a", "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d",
"reference": "8a84fcb207451df0013b2c74cbbf1b62d47b999a", "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1914,20 +1913,20 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-07-26T11:19:56+00:00" "time": "2018-10-03T08:46:40+00:00"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "2fb33cb6eefe6e790e4023f7c534a9e4214252fc" "reference": "3a4498236ade473c52b92d509303e5fd1b211ab1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/2fb33cb6eefe6e790e4023f7c534a9e4214252fc", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/3a4498236ade473c52b92d509303e5fd1b211ab1",
"reference": "2fb33cb6eefe6e790e4023f7c534a9e4214252fc", "reference": "3a4498236ade473c52b92d509303e5fd1b211ab1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1968,20 +1967,20 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-08-27T17:45:33+00:00" "time": "2018-10-03T08:48:18+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "2819693b25f480966cbfa13b651abccfed4871ca" "reference": "a0944a9a1d8845da724236cde9a310964acadb1c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/2819693b25f480966cbfa13b651abccfed4871ca", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a0944a9a1d8845da724236cde9a310964acadb1c",
"reference": "2819693b25f480966cbfa13b651abccfed4871ca", "reference": "a0944a9a1d8845da724236cde9a310964acadb1c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2057,7 +2056,7 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-08-28T06:06:12+00:00" "time": "2018-10-03T12:03:34+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -2237,16 +2236,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "4d6b125d5293cbceedc2aa10f2c71617e76262e7" "reference": "1dc2977afa7d70f90f3fefbcd84152813558910e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/4d6b125d5293cbceedc2aa10f2c71617e76262e7", "url": "https://api.github.com/repos/symfony/process/zipball/1dc2977afa7d70f90f3fefbcd84152813558910e",
"reference": "4d6b125d5293cbceedc2aa10f2c71617e76262e7", "reference": "1dc2977afa7d70f90f3fefbcd84152813558910e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2282,20 +2281,20 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-08-03T10:42:44+00:00" "time": "2018-10-02T12:28:39+00:00"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "e20f4bb79502c3c0db86d572f7683a30d4143911" "reference": "585f6e2d740393d546978769dd56e496a6233e0b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/e20f4bb79502c3c0db86d572f7683a30d4143911", "url": "https://api.github.com/repos/symfony/routing/zipball/585f6e2d740393d546978769dd56e496a6233e0b",
"reference": "e20f4bb79502c3c0db86d572f7683a30d4143911", "reference": "585f6e2d740393d546978769dd56e496a6233e0b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2359,20 +2358,20 @@
"uri", "uri",
"url" "url"
], ],
"time": "2018-07-26T11:19:56+00:00" "time": "2018-10-02T12:28:39+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
"version": "v4.1.4", "version": "v4.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/translation.git",
"reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f" "reference": "9f0b61e339160a466ebcde167a6c5521c810e304"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/fa2182669f7983b7aa5f1a770d053f79f0ef144f", "url": "https://api.github.com/repos/symfony/translation/zipball/9f0b61e339160a466ebcde167a6c5521c810e304",
"reference": "fa2182669f7983b7aa5f1a770d053f79f0ef144f", "reference": "9f0b61e339160a466ebcde167a6c5521c810e304",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2428,20 +2427,20 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-08-07T12:45:11+00:00" "time": "2018-10-02T16:36:10+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v3.4.15", "version": "v3.4.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "f62a394bd3de96f2f5e8f4c7d685035897fb3cb3" "reference": "ff8ac19e97e5c7c3979236b584719a1190f84181"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/f62a394bd3de96f2f5e8f4c7d685035897fb3cb3", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ff8ac19e97e5c7c3979236b584719a1190f84181",
"reference": "f62a394bd3de96f2f5e8f4c7d685035897fb3cb3", "reference": "ff8ac19e97e5c7c3979236b584719a1190f84181",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2497,7 +2496,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2018-07-26T11:19:56+00:00" "time": "2018-10-02T16:33:53+00:00"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@ -2598,16 +2597,16 @@
}, },
{ {
"name": "yajra/laravel-datatables-oracle", "name": "yajra/laravel-datatables-oracle",
"version": "v8.8.0", "version": "v8.9.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yajra/laravel-datatables.git", "url": "https://github.com/yajra/laravel-datatables.git",
"reference": "f2959bf773fc315e1b3319fb0a34c880b97706d5" "reference": "851c4d4d307a66a4f8ab5c12444c1eb0104ecc80"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/f2959bf773fc315e1b3319fb0a34c880b97706d5", "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/851c4d4d307a66a4f8ab5c12444c1eb0104ecc80",
"reference": "f2959bf773fc315e1b3319fb0a34c880b97706d5", "reference": "851c4d4d307a66a4f8ab5c12444c1eb0104ecc80",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2665,7 +2664,7 @@
"jquery", "jquery",
"laravel" "laravel"
], ],
"time": "2018-09-05T05:43:38+00:00" "time": "2018-10-05T06:10:33+00:00"
}, },
{ {
"name": "zizaco/entrust", "name": "zizaco/entrust",

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@ const app = new Vue({
dataset: { dataset: {
type: '', type: '',
state: '', state: '',
rights: 0, rights: null,
project_id: '', project_id: '',
creating_corporation: "GBA", creating_corporation: "GBA",

View File

@ -111,6 +111,32 @@
</fieldset> </fieldset>
<fieldset id="fieldset-abstracts">
<legend>Files</legend>
<table id="items" class="pure-table pure-table-horizontal">
<thead>
<tr>
<th>Path Name</th>
<th>Label</th>
</tr>
</thead>
<tbody>
@foreach($document->files as $key => $file)
<tr>
<td>
@if($file->exists() === true)
<a href="{{ route('settings.file.download', ['id' => $file->id]) }}"> {{ $file->path_name }} </a>
@else
<span class="alert">missing file: {{ $file->path_name }}</span>
@endif
</td>
<td> {{ $file->label }} </td>
</tr>
@endforeach
</tbody>
</table>
</fieldset>
<br /> <br />
<div class="pure-controls"> <div class="pure-controls">
<button type="submit" class="pure-button button-small"> <button type="submit" class="pure-button button-small">

View File

@ -17,13 +17,13 @@
{!! Form::text('search', null, array('class'=>'pure-u-1 pure-u-md-1-2', 'placeholder'=>'filter for the title...')) !!} {!! Form::text('search', null, array('class'=>'pure-u-1 pure-u-md-1-2', 'placeholder'=>'filter for the title...')) !!}
<div class="select pure-u-1 pure-u-md-1-2"> <div class="select pure-u-1 pure-u-md-1-2">
{!! Form::select('state', Config::get('enums.server_states'), 'published', ['class' => 'pure-u-1']) !!} {!! Form::select('state', Config::get('enums.server_states'), 'published', ['class' => 'pure-u-1', 'onchange' => "this.form.submit()"]) !!}
</div> </div>
<div class="pure-u-1 pure-u-md-1-2"> <div class="pure-u-1 pure-u-md-1-2">
<button type="submit"> {{-- <button type="submit">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</button> </button> --}}
</div> </div>
</p> </p>
<input type="hidden" name="searchtype" id="searchtype" value="simple" /> <input type="hidden" name="searchtype" id="searchtype" value="simple" />
@ -81,14 +81,15 @@
</table> </table>
</div> </div>
{!! Form::close() !!}
<div class="pure-u-1"> <div class="pure-u-1">
{{ $documents {{ $documents
->appends(Input::except('page')) ->appends(Input::except('page'))
->links('vendor.pagination.default') }} ->links('vendor.pagination.default') }}
</div> </div>
{!! Form::close() !!}
</div> </div>

View File

@ -16,7 +16,7 @@ use Illuminate\Support\Facades\Route;
Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']); Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']);
//=================================================publish dataasets================================================ //=================================================publish datasets================================================
Route::group( Route::group(
[ [
'namespace' => 'Publish', 'namespace' => 'Publish',
@ -119,6 +119,15 @@ Route::group(['middleware' => ['permission:settings']], function () {
Route::patch('settings/document/update/{id}', [ Route::patch('settings/document/update/{id}', [
'as' => 'settings.document.update', 'uses' => 'Settings\DatasetController@update', 'as' => 'settings.document.update', 'uses' => 'Settings\DatasetController@update',
]); ]);
Route::get('settings/file/download/{id}', [
'as' => 'settings.file.download', 'uses' => 'Settings\DatasetController@download',
]);
//=============================================================================================================
//=================================================setting file=============================================
Route::get('settings/file/download/{id}', [
'as' => 'settings.file.download', 'uses' => 'Settings\FileController@download',
]);
//=================================================setting collection============================================= //=================================================setting collection=============================================
Route::get('/settings/collection', [ Route::get('/settings/collection', [
'as' => 'settings.collection.index', 'uses' => 'Settings\CollectionController@index', 'as' => 'settings.collection.index', 'uses' => 'Settings\CollectionController@index',