- ersistent Identifier: ID mit Url bei technischen Metadaten
- Embargo-Datum in den Tab "Inhalt" - Filegröße in den Tab "Inhalt" - Publisher und Herausgeber in den Tab "Technische Metadaten" - usätzliche Titel, Referenzen - OAI Link unten bei Hilfe - composer updates
This commit is contained in:
parent
9ab92b5fa0
commit
27464d08f7
|
@ -187,6 +187,10 @@ class Dataset extends Model
|
|||
{
|
||||
return $this->hasMany(Title::class, 'document_id', 'id');
|
||||
}
|
||||
public function additionalTitles()
|
||||
{
|
||||
return $this->hasMany(Title::class, 'document_id', 'id')->where('type', '!=', 'Main');
|
||||
}
|
||||
|
||||
public function mainTitle()
|
||||
{
|
||||
|
|
|
@ -72,4 +72,14 @@ class File extends Model
|
|||
{
|
||||
return \Illuminate\Support\Facades\File::exists(public_path('storage/' . $this->path_name));
|
||||
}
|
||||
|
||||
public function formatSize($precision = 1)
|
||||
{
|
||||
$size = $this->file_size;
|
||||
$unit = ['Byte', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'];
|
||||
for ($i = 0; $size >= 1024 && $i < count($unit) - 1; $i++) {
|
||||
$size /= 1024;
|
||||
}
|
||||
return round($size, $precision) . ' ' . $unit[$i];
|
||||
}
|
||||
}
|
||||
|
|
26
composer.lock
generated
26
composer.lock
generated
|
@ -496,26 +496,26 @@
|
|||
},
|
||||
{
|
||||
"name": "felixkiss/uniquewith-validator",
|
||||
"version": "3.3.1",
|
||||
"version": "3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/felixkiss/uniquewith-validator.git",
|
||||
"reference": "c9d088543f93d3ebca6c1cc40ba8cbd6d855d79c"
|
||||
"reference": "7ce4ff83c9003718e8febe1d4670eb869a720c5c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/felixkiss/uniquewith-validator/zipball/c9d088543f93d3ebca6c1cc40ba8cbd6d855d79c",
|
||||
"reference": "c9d088543f93d3ebca6c1cc40ba8cbd6d855d79c",
|
||||
"url": "https://api.github.com/repos/felixkiss/uniquewith-validator/zipball/7ce4ff83c9003718e8febe1d4670eb869a720c5c",
|
||||
"reference": "7ce4ff83c9003718e8febe1d4670eb869a720c5c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/support": "5.*|^6.0",
|
||||
"illuminate/validation": "5.*|^6.0",
|
||||
"illuminate/support": "^5.5|^6.0|^7.0",
|
||||
"illuminate/validation": "^5.5|^6.0|^7.0",
|
||||
"php": "^7.1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"bossa/phpspec2-expect": "^3.0",
|
||||
"phpspec/phpspec": "^5.0"
|
||||
"phpspec/phpspec": "^5.0|^6.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -545,7 +545,7 @@
|
|||
"keywords": [
|
||||
"laravel"
|
||||
],
|
||||
"time": "2019-09-10T07:24:13+00:00"
|
||||
"time": "2020-03-10T21:45:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "fideloper/proxy",
|
||||
|
@ -970,16 +970,16 @@
|
|||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.64",
|
||||
"version": "1.0.65",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "d13c43dbd4b791f815215959105a008515d1a2e0"
|
||||
"reference": "8f17b3ba67097aafb8318cd5c553b1acf7c891c8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d13c43dbd4b791f815215959105a008515d1a2e0",
|
||||
"reference": "d13c43dbd4b791f815215959105a008515d1a2e0",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8f17b3ba67097aafb8318cd5c553b1acf7c891c8",
|
||||
"reference": "8f17b3ba67097aafb8318cd5c553b1acf7c891c8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1050,7 +1050,7 @@
|
|||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"time": "2020-02-05T18:14:17+00:00"
|
||||
"time": "2020-03-08T18:53:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mcamara/laravel-localization",
|
||||
|
|
|
@ -42,6 +42,18 @@
|
|||
|
||||
<div class="tab-pane content-metadata active" id="one">
|
||||
|
||||
@if($dataset->additionalTitles()->exists())
|
||||
<p class="dataset__abstract">
|
||||
Zusätzliche Titel:
|
||||
<ul>
|
||||
@foreach ($dataset->additionalTitles as $title)
|
||||
<li>{{ $title->type }}: {{ $title->value }}</li>
|
||||
<br />
|
||||
@endforeach
|
||||
</ul>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<p class="dataset__abstract">{{ $dataset->mainAbstract()->value }}</p>
|
||||
|
||||
@if($dataset->authors()->exists())
|
||||
|
@ -62,23 +74,40 @@
|
|||
</p>
|
||||
@endif
|
||||
|
||||
@if($dataset->references()->exists())
|
||||
<p class="dataset__abstract">
|
||||
Referenzen:
|
||||
<ul>
|
||||
@foreach ($dataset->references as $reference)
|
||||
<li>{{ $reference->value }}</li>
|
||||
<br />
|
||||
@endforeach
|
||||
</ul>
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<p class="dataset__abstract">Erstellungsjahr: {{ $dataset->server_date_published->year }}</p>
|
||||
<p class="dataset__abstract">Sprache: {{ $dataset->language }}</p>
|
||||
<p class="dataset__abstract">Objekttyp: {{ $dataset->type }}</p>
|
||||
<p class="dataset__abstract">Lizenz: {{ $dataset->license()->name_long }}</p>
|
||||
|
||||
<p class="dataset__abstract">Herausgeber: {{ $dataset->creating_corporation }}</p>
|
||||
<p class="dataset__abstract">Publisher: {{ $dataset->publisher_name }}</p>
|
||||
<p class="dataset__abstract">Coverage: {{ $dataset->geoLocation() }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane content-file" id="two">
|
||||
@if($dataset->embargo_date != null)
|
||||
<p class="dataset__abstract">Ende des Embargo-Zeitraums:
|
||||
{{ $dataset->embargo_date->toDateString() }}</p>
|
||||
@else
|
||||
<p class="dataset__abstract">Ende des Embargo-Zeitraums: - </p>
|
||||
@endif
|
||||
|
||||
@if($dataset->hasEmbargoPassed() == true)
|
||||
<table id="items" class="pure-table pure-table-horizontal">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Path Name</th>
|
||||
<th>File Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -91,6 +120,9 @@
|
|||
<span class="alert">missing file: {{ $file->path_name }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ $file->formatSize(2) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@ -101,14 +133,14 @@
|
|||
</div>
|
||||
|
||||
<div class="tab-pane content-technical-metadata" id="three">
|
||||
<p class="dataset__abstract">Persistenter Identifikator:
|
||||
{{ "http://www.tethys.at/" . $dataset->id }}</p>
|
||||
<p class="dataset__abstract">Status: {{ $dataset->server_state }}</p>
|
||||
<p class="dataset__abstract">Eingestellt von: {{ $dataset->user->login }}</p>
|
||||
<p class="dataset__abstract">Erstellt am: {{ $dataset->created_at->toDateString() }}</p>
|
||||
@if($dataset->embargo_date != null)
|
||||
<p class="dataset__abstract">Ende des Embargo-Zeitraums: {{ $dataset->embargo_date->toDateString() }}</p>
|
||||
@else
|
||||
<p class="dataset__abstract">Ende des Embargo-Zeitraums: - </p>
|
||||
@endif
|
||||
<p class="dataset__abstract">Herausgeber: {{ $dataset->creating_corporation }}</p>
|
||||
<p class="dataset__abstract">Publisher: {{ $dataset->publisher_name }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -150,6 +182,9 @@
|
|||
|
||||
ul.tab-nav li span.active.button {
|
||||
border-bottom: 0.175em solid #fff;
|
||||
border-bottom-color: #00bfffcc;
|
||||
color: #00bfffcc;
|
||||
/* background-color: #6c6e6b; */
|
||||
}
|
||||
|
||||
.tab-content .tab-pane {
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
<div class="block">
|
||||
<h3 class="block-title">About TETHYS</h3>
|
||||
<ul>
|
||||
<li class="first"><a href="{{ URL::route('oai') }}" target="_blank"> OAI</a></li>
|
||||
<li class="last"><a
|
||||
href="{!! URL::route('frontend.pages.show', ['page_slug'=>'about']) !!}">About
|
||||
Us</a></li>
|
||||
|
|
Loading…
Reference in New Issue
Block a user