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

View File

@ -1,70 +1,63 @@
@extends('layouts.app')
@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">
<header class="post-header">
<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>
</header>
<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
<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>
</div>
</div>
</section>
@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">
<span class="form-submit-wrapper">

View File

@ -5,63 +5,67 @@
@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">
<div class="content">
<h1>Suche</h1>
@include('frontend.partials.simpleSearchForm')
<dt class="abstractText" id="abstractText_{{ $result->getId() }}">
{{ htmlspecialchars($result->getAsset('abstract_output')) }}
</dt>
<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>
@if (!is_null($result->getAsset('author')))
<dt class="results_author">
@foreach($result->getAsset('author') as $authorIndex => $author)
<a>{{ htmlspecialchars($author)}}</a>
</div>
@endforeach
</dt>
</div>
@endif
<dt class="abstractText" id="abstractText_{{ $result->getId() }}">
{{ htmlspecialchars($result->getAsset('abstract_output')) }}
</dt>
@include('frontend.solrsearch.pagination')
</div>
@endforeach
</div>
@endif
@include('frontend.solrsearch.pagination')
</div>
</div>
</div>
</div>
</div>
</section>
@endsection
@ -72,4 +76,4 @@
$('.abstractText').hide();
});
</script>
@endsection
@endsection

View File

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