asso.blade.php 1.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
@extends('layouts.subPages')

@section('title', $title )

@section('content')
	<style>
		form div.input-group-addon button {
			padding: 9px;
		}
10
11
12
13
14
15
16
17
18
19
20
21
22
23

		.reasso {
			color: rgb(0, 102, 204);
		}
		.reasso:hover {
			color: red;
		}

		td.association {
			display: flex;
		}
		.asso-search-link {
			margin-right: 10px;
		}
24
25
26
	</style>
	<h1 class="page-title">{{ trans('asso.head.1') }}</h1>
	<div class="card-heavy">
27
		<p>{{ trans('asso.1.1') }} <a href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/datenschutz') }}" target="_blank">{{ trans('asso.1.2') }}</a>.</p>
28
		
29
		<form method="post">
30
			<div class="input-group">
31
				<input type="text" class="form-control" placeholder="Zu assoziierender Begriff" @if(isset($keywords)) value="{{$keywords}}" @endif name="q" required autofocus/>
32
33
34
35
				<div class="input-group-addon"><button type="submit"><i class="fa fa-search" aria-hidden="true"></i></button></div>
			</div>
		</form>
	</div>
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
	@if(isset($words))
	<div class="card-heavy">
		<div class="table-responsive">
			<table class="table">
				<caption>Assoziationen für "{{ $keywords }}"</caption>
				<thead>
					<tr>
						<th>#</th>
						<th>Assoziation</th>
						<th>Relevanz</th>
					</tr>
				</thead>
				<tbody>
					@php $i = 1; @endphp
					@foreach($words as $key => $value)
					<tr>
						<td>{{ $i }}</td>
53
54
55
56
57
58
						<td class="association">
							<a class="asso-search-link" href="{{ action('MetaGerSearch@search', ['eingabe' => $key]) }}" title="{{ trans('asso.searchasso.title') }}"><i class="fa fa-search" aria-hidden="true"></i></a>
							<form method="POST">
								<button name="q" value="{{ $key }}" class="reasso" type="submit" title="{{ trans('asso.reasso.title') }}">{{ $key }}</button>
							</form>
						</td>
59
60
61
62
63
64
65
66
67
						<td>{{ round(($value / $wordCount) * 100, 2) }}%</td>
						@php $i++; @endphp
					</tr>
					@endforeach
				</tbody>
			</table>
		</div>
	</div>
	@endif
68
@endsection