diff --git a/app/Models/Dataset.php b/app/Models/Dataset.php index 39057e3..63f13b1 100644 --- a/app/Models/Dataset.php +++ b/app/Models/Dataset.php @@ -227,6 +227,10 @@ class Dataset extends Model { return $this->belongsToMany(License::class, 'link_documents_licences', 'document_id', 'licence_id'); } + public function license() + { + return $this->belongsToMany(License::class, 'link_documents_licences', 'document_id', 'licence_id')->first(); + } public function files() { diff --git a/resources/views/frontend/dataset/show.blade.php b/resources/views/frontend/dataset/show.blade.php index 9c3a77d..ef45b40 100644 --- a/resources/views/frontend/dataset/show.blade.php +++ b/resources/views/frontend/dataset/show.blade.php @@ -17,60 +17,99 @@
{{ $dataset->id }}
{{ $dataset->mainAbstract()->value }}
- @if($dataset->authors()->exists()) -- Ersteller/Autor: {{ $dataset->authors->implode('full_name', ', ') }} -
- @endif + + {{-- + --}} - @if($dataset->contributors()->exists()) -- Beitragende: {{ $dataset->contributors->implode('full_name', ', ') }} -
- @endif +- Schlüsselwörter: {{ $dataset->subjects->implode('value', ', ') }} -
- @endif + +Erstellungsjahr: {{ $dataset->server_date_published->year }}
-Sprache: {{ $dataset->language }}
-Objekttyp: {{ $dataset->type }}
+ + +Path Name | +
---|
+ @if($file->exists() === true) + {{ $file->label }} + @else + missing file: {{ $file->path_name }} + @endif + | +