- add search to menu

- better dataset.show view for new ui
This commit is contained in:
Arno Kaimbacher 2019-09-13 11:53:33 +02:00
parent e526a95960
commit 5c66a33e51
5 changed files with 168 additions and 165 deletions

102
composer.lock generated
View File

@ -495,26 +495,26 @@
}, },
{ {
"name": "felixkiss/uniquewith-validator", "name": "felixkiss/uniquewith-validator",
"version": "3.2.0", "version": "3.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/felixkiss/uniquewith-validator.git", "url": "https://github.com/felixkiss/uniquewith-validator.git",
"reference": "11e3c12758f8f1c335618ab8eabecd338985aff9" "reference": "c9d088543f93d3ebca6c1cc40ba8cbd6d855d79c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/felixkiss/uniquewith-validator/zipball/11e3c12758f8f1c335618ab8eabecd338985aff9", "url": "https://api.github.com/repos/felixkiss/uniquewith-validator/zipball/c9d088543f93d3ebca6c1cc40ba8cbd6d855d79c",
"reference": "11e3c12758f8f1c335618ab8eabecd338985aff9", "reference": "c9d088543f93d3ebca6c1cc40ba8cbd6d855d79c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"illuminate/support": "5.*", "illuminate/support": "5.*|^6.0",
"illuminate/validation": "5.*", "illuminate/validation": "5.*|^6.0",
"php": ">=5.6.0" "php": "^7.1.3"
}, },
"require-dev": { "require-dev": {
"bossa/phpspec2-expect": "^2.3", "bossa/phpspec2-expect": "^3.0",
"phpspec/phpspec": "^3.4" "phpspec/phpspec": "^5.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@ -544,7 +544,7 @@
"keywords": [ "keywords": [
"laravel" "laravel"
], ],
"time": "2019-02-12T18:30:56+00:00" "time": "2019-09-10T07:24:13+00:00"
}, },
{ {
"name": "fideloper/proxy", "name": "fideloper/proxy",
@ -1089,16 +1089,16 @@
}, },
{ {
"name": "mcamara/laravel-localization", "name": "mcamara/laravel-localization",
"version": "1.4.0", "version": "1.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mcamara/laravel-localization.git", "url": "https://github.com/mcamara/laravel-localization.git",
"reference": "7d6f2de6e020be33164da93af35e5f9bb52a3d89" "reference": "82d06c66cdf1e3ed17783842886d87cbd5aadd43"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/7d6f2de6e020be33164da93af35e5f9bb52a3d89", "url": "https://api.github.com/repos/mcamara/laravel-localization/zipball/82d06c66cdf1e3ed17783842886d87cbd5aadd43",
"reference": "7d6f2de6e020be33164da93af35e5f9bb52a3d89", "reference": "82d06c66cdf1e3ed17783842886d87cbd5aadd43",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1147,20 +1147,20 @@
"localization", "localization",
"php" "php"
], ],
"time": "2019-09-06T07:38:59+00:00" "time": "2019-09-08T13:56:19+00:00"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "1.25.0", "version": "1.25.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "c5dcc05defbaf8780c728c1ea31b1a0704d44f56" "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/c5dcc05defbaf8780c728c1ea31b1a0704d44f56", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/70e65a5470a42cfec1a7da00d30edb6e617e8dcf",
"reference": "c5dcc05defbaf8780c728c1ea31b1a0704d44f56", "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1225,7 +1225,7 @@
"logging", "logging",
"psr-3" "psr-3"
], ],
"time": "2019-09-06T12:21:24+00:00" "time": "2019-09-06T13:49:17+00:00"
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
@ -3493,35 +3493,33 @@
}, },
{ {
"name": "phpdocumentor/reflection-common", "name": "phpdocumentor/reflection-common",
"version": "1.0.1", "version": "2.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.5" "php": ">=7.1"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.6" "phpunit/phpunit": "~6"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "2.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"phpDocumentor\\Reflection\\": [ "phpDocumentor\\Reflection\\": "src/"
"src"
]
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -3543,30 +3541,30 @@
"reflection", "reflection",
"static analysis" "static analysis"
], ],
"time": "2017-09-11T18:02:19+00:00" "time": "2018-08-07T13:53:10+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "4.3.1", "version": "4.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.0", "php": "^7.0",
"phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
"phpdocumentor/type-resolver": "^0.4.0", "phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
"webmozart/assert": "^1.0" "webmozart/assert": "^1.0"
}, },
"require-dev": { "require-dev": {
"doctrine/instantiator": "~1.0.5", "doctrine/instantiator": "^1.0.5",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"phpunit/phpunit": "^6.4" "phpunit/phpunit": "^6.4"
}, },
@ -3594,41 +3592,40 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2019-04-30T17:48:53+00:00" "time": "2019-09-12T14:27:41+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "0.4.0", "version": "1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
"reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.5 || ^7.0", "php": "^7.1",
"phpdocumentor/reflection-common": "^1.0" "phpdocumentor/reflection-common": "^2.0"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "^0.9.4", "ext-tokenizer": "^7.1",
"phpunit/phpunit": "^5.2||^4.8.24" "mockery/mockery": "~1",
"phpunit/phpunit": "^7.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.x-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"phpDocumentor\\Reflection\\": [ "phpDocumentor\\Reflection\\": "src"
"src/"
]
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -3641,7 +3638,8 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2017-07-14T14:27:02+00:00" "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"time": "2019-08-22T18:11:29+00:00"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",

View File

@ -1,70 +1,63 @@
@extends('layouts.app') @extends('layouts.app')
@section('content') @section('content')
<div> <section class="normal dataset u-full-width">
<div class="container">
<div class="blog-meta">
created: <?= $dataset->created_at->toDayDateTimeString() ?>
</div>
<div class="post-description">
{{-- @foreach ($dataset->authors as $author)
<em>Author: {{ $author->full_name }}</em>
<br />
@endforeach --}}
@foreach ($dataset->titles as $title)
<em>Main Title: {{ $title->value }}</em>
<br />
@endforeach
@foreach ($dataset->abstracts as $abstract)
<em>Abstract: {{ $abstract->value }}</em>
<br />
@endforeach
@foreach ($authors as $author)
<em>Author: {{ $author->full_name }}</em>
<br />
@endforeach
@foreach ($contributors as $contributor)
<em>Contributor: {{ $contributor->full_name }}</em>
<br />
@endforeach
@foreach ($submitters as $submitter)
<em>Submitter: {{ $submitter->full_name }}</em>
<br />
@endforeach
<section class="post"> <table id="items" class="pure-table pure-table-horizontal">
<header class="post-header"> <thead>
<tr>
<th>Path Name</th>
<th>Label</th>
</tr>
</thead>
<tbody>
@foreach($dataset->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>
</header> </div>
<div class="blog-meta"> </div>
created: <?= $dataset->created_at->toDayDateTimeString() ?>
</div>
<div class="post-description">
{{-- @foreach ($dataset->authors as $author)
<em>Author: {{ $author->full_name }}</em>
<br />
@endforeach --}}
@foreach ($dataset->titles as $title)
<em>Main Title: {{ $title->value }}</em>
<br />
@endforeach
@foreach ($dataset->abstracts as $abstract)
<em>Abstract: {{ $abstract->value }}</em>
<br />
@endforeach
@foreach ($authors as $author)
<em>Author: {{ $author->full_name }}</em>
<br />
@endforeach
@foreach ($contributors as $contributor)
<em>Contributor: {{ $contributor->full_name }}</em>
<br />
@endforeach
@foreach ($submitters as $submitter)
<em>Submitter: {{ $submitter->full_name }}</em>
<br />
@endforeach
<table id="items" class="pure-table pure-table-horizontal">
<thead>
<tr>
<th>Path Name</th>
<th>Label</th>
</tr>
</thead>
<tbody>
@foreach($dataset->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>
</div>
</section>
</div>
</section>
@stop @stop

View File

@ -3,7 +3,9 @@
{!! Form::text('query', isset($filter) ? $filter : '', array('class'=>'pure-input-1', 'placeholder'=>'Search for a dataset...')) !!} {!! Form::text('query', isset($filter) ? $filter : '', array('class'=>'u-full-width', 'placeholder'=>'Search for a dataset...')) !!}
{{-- <input class="u-full-width" placeholder="Search for a dataset..." id="query"></input> --}}
<!--<div id="edit-submit-search-wrapper" class="form-item"> <!--<div id="edit-submit-search-wrapper" class="form-item">
<span class="form-submit-wrapper"> <span class="form-submit-wrapper">

View File

@ -5,63 +5,67 @@
@section('content') @section('content')
<!-- Help -->
<section data-sr id="search" class="normal search u-full-width">
<div class="container">
<div class="row">
<div class="two-thirds column">
<div class="content">
<h1>Suche</h1>
@include('frontend.partials.simpleSearchForm')
<div id="searchbar">
@if (isset($results))
<div id="search_results" class="plugin-simplesearch-result search_results">
@foreach($results as $result)
<div class="result">
<dt class="results_title">
@if (!is_null($result->getAsset( 'abstract_output' )))
<img src="../img/theme/icon-on-off.png" alt="results_hideabstract_alt"
onclick="$(function(){$('#abstractText_{{ $result->getId() }}').toggle();});" />
@endif
@if (!is_null($result->getAsset('title_output')))
<a href="{{ route('frontend.dataset.show', $result->getId()) }}">
{{ $result->getAsset('title_output') }}
</a>
@else
<a>results_missingtitle</a>
@endif
@if ($result->getAsset('year'))
<span>( {{ $result->getAsset('year') }} )</span>
@endif
</dt>
<div class="pure-g"> @if (!is_null($result->getAsset('author')))
<dt class="results_author">
@foreach($result->getAsset('author') as $authorIndex => $author)
<a>{{ htmlspecialchars($author)}}</a>
@endforeach
</dt>
@endif
<div class="pure-u-1 pure-u-md-2-3"> <dt class="abstractText" id="abstractText_{{ $result->getId() }}">
<div class="content"> {{ htmlspecialchars($result->getAsset('abstract_output')) }}
<h1>Suche</h1> </dt>
@include('frontend.partials.simpleSearchForm')
<div id="searchbar"> </div>
@if (isset($results))
<div id="search_results" class="plugin-simplesearch-result search_results">
@foreach($results as $result)
<div class="result">
<dt class="results_title">
@if (!is_null($result->getAsset( 'abstract_output' )))
<img src="../img/theme/icon-on-off.png" alt="results_hideabstract_alt" onclick="$(function(){$('#abstractText_{{ $result->getId() }}').toggle();});" />
@endif
@if (!is_null($result->getAsset('title_output')))
<a href="{{ route('frontend.dataset.show', $result->getId()) }}">
{{ $result->getAsset('title_output') }}
</a>
@else
<a>results_missingtitle</a>
@endif
@if ($result->getAsset('year'))
<span>( {{ $result->getAsset('year') }} )</span>
@endif
</dt>
@if (!is_null($result->getAsset('author')))
<dt class="results_author">
@foreach($result->getAsset('author') as $authorIndex => $author)
<a>{{ htmlspecialchars($author)}}</a>
@endforeach @endforeach
</dt> </div>
@endif @endif
@include('frontend.solrsearch.pagination')
<dt class="abstractText" id="abstractText_{{ $result->getId() }}">
{{ htmlspecialchars($result->getAsset('abstract_output')) }}
</dt>
</div> </div>
@endforeach
</div>
@endif
@include('frontend.solrsearch.pagination') </div>
</div> </div>
</div> </div>
</div> </div>
</div> </section>
@endsection @endsection
@ -72,4 +76,4 @@
$('.abstractText').hide(); $('.abstractText').hide();
}); });
</script> </script>
@endsection @endsection

View File

@ -50,7 +50,7 @@
<header class="header"> <header class="header">
<nav class="navigation"> <nav class="navigation">
<a href="#" class="menu-icon {{ Route::currentRouteName() != 'frontend.home.index' ? 'active' : '' }}""> <a href="#" class="menu-icon {{ Route::currentRouteName() != 'frontend.home.index' ? 'active' : '' }}"">
<i class="fa fa-bars"></i> <i class=" fa fa-bars"></i>
</a> </a>
<div class="container"> <div class="container">
<ul class="menu"> <ul class="menu">
@ -64,6 +64,11 @@
<a class="{{ Route::currentRouteName() == 'frontend.home.intro' ? 'current' : '' }}" <a class="{{ Route::currentRouteName() == 'frontend.home.intro' ? 'current' : '' }}"
href="{{ route('frontend.home.intro') }}">Intro</a> href="{{ route('frontend.home.intro') }}">Intro</a>
</li> </li>
<li>
<a class="pure-menu-item {{ Route::currentRouteName() == 'frontend.search.index' ? 'current' : '' }}"
href="{{ route('frontend.search.index') }}"> SEARCH</a>
</li>
<!-- <li><a href="#work">Work</a></li> --> <!-- <li><a href="#work">Work</a></li> -->
<li> <li>
<a class="{{ Route::currentRouteName() == 'frontend.home.services' ? 'current' : '' }}" <a class="{{ Route::currentRouteName() == 'frontend.home.services' ? 'current' : '' }}"
@ -76,9 +81,10 @@
</li> </li>
<!-- <li><a href="#clients">Clients</a></li> --> <!-- <li><a href="#clients">Clients</a></li> -->
<!-- <li><a href="#about">About</a></li> --> <!-- <li><a href="#about">About</a></li> -->
<li><a class="{{ Route::currentRouteName() == 'frontend.pages.show' ? 'current' : '' }}" <!-- <li>
href="{!! url('/pages/about') !!}">About</a> <a class="{{ Route::currentRouteName() == 'frontend.pages.show' ? 'current' : '' }}"
</li> href="{!! url('/pages/about') !!}">About</a>
</li> -->
<li class="right"><a href="{{ URL::route('oai') }}" target="_blank"> OAI</a></li> <li class="right"><a href="{{ URL::route('oai') }}" target="_blank"> OAI</a></li>
<!-- <li><a href="#why-us">Why us?</a></li> <!-- <li><a href="#why-us">Why us?</a></li>