Revize 75508baf
Přidáno uživatelem Marek Lovčí před téměř 5 roky(ů)
resources/views/detail/index.blade.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
@section('title', 'Detail') |
4 | 4 |
|
5 |
@section('breadcrumb') |
|
6 |
<li class="breadcrumb-item" aria-current="page"><a href="{{ url('/') }}">Home</a></li> |
|
7 |
<li class="breadcrumb-item" aria-current="page"><a href="{{ url('/artefact') }}">Artefacts</a></li> |
|
8 |
<li class="breadcrumb-item" aria-current="page"><a href="{{ url('/artefact/' . $id) }}">Artefact</a></li> |
|
9 |
<li class="breadcrumb-item active" aria-current="page">Notes</li> |
|
10 |
@endsection |
|
11 |
|
|
12 | 5 |
@section('content') |
13 | 6 |
<div class="container"> |
14 |
<div class="jumbotron mt-5"> |
|
15 |
<div class="text-center"> |
|
16 |
@if (isset($arrArtefact)) |
|
17 |
<h1>Notes list</h1> |
|
18 |
<p> |
|
19 |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
|
20 |
Mauris dolor felis, sagittis at, luctus sed, aliquam non, tellus. |
|
21 |
Fusce tellus odio, dapibus id fermentum quis, suscipit id erat. |
|
22 |
Morbi scelerisque luctus velit. Vivamus porttitor turpis ac leo. |
|
23 |
Morbi scelerisque luctus velit. |
|
24 |
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
|
25 |
</p> |
|
26 |
@else |
|
27 |
<h2>Given artefact does not exist!</h2> |
|
28 |
@endif |
|
7 |
<div class="metadata-area"> |
|
8 |
<div class="text-center mt-5"> |
|
9 |
<h2>notes</h2> |
|
29 | 10 |
</div> |
30 |
</div> |
|
31 |
@if(isset($arrArtefact)) |
|
32 |
<div class="artefact-area text-center mb-4"> |
|
33 |
<h2>{{$arrArtefact->name}}</h2> |
|
34 |
<h4>{{$arrArtefact->author}}, {{$arrArtefact->year}}</h4> |
|
35 |
<h5 class="text-muted">{{$arrArtefact->pages}} pages, <i class="fas fa-thumbs-up"></i> {{$likes}}</h5> |
|
36 |
</div> |
|
37 |
@if(count($metadata) > 0) |
|
38 |
<ul class="list-group"> |
|
39 |
@foreach($metadata as $meta) |
|
40 |
<div class="note-area mb-3"> |
|
41 |
<li class="list-group-item"> |
|
42 |
On {{$meta->page}} page:<br> |
|
43 |
{{$meta->noteCZ}}<br> |
|
44 |
{{$meta->noteEN}}<br> |
|
45 |
</li> |
|
11 |
<span class="arrow-down"></span> |
|
12 |
|
|
13 |
@if(!empty($metadata) || count($metadata) > 0) |
|
14 |
@foreach($metadata as $meta) |
|
15 |
<div id="row_{{$meta->id}}" class="row text-page"> |
|
16 |
<div class="pin-horizontal"> |
|
17 |
<div class="metadata"> |
|
18 |
<span>page {{$meta->page}}</span> |
|
19 |
<a href="#meta_{{$meta->id}}" class="arrow-down" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')"></a> |
|
20 |
</div> |
|
46 | 21 |
</div> |
47 |
@endforeach |
|
48 |
</ul> |
|
22 |
<div id="meta_{{$meta->id}}" class="metadata-text collapse"> |
|
23 |
<p> |
|
24 |
{{$meta->noteEN}} |
|
25 |
</p> |
|
26 |
<div class="artefact-info"> |
|
27 |
<div class="artefact-name"> |
|
28 |
{{$meta->artefact->name}} |
|
29 |
</div> |
|
30 |
<div class="artefact-author"> |
|
31 |
{{$meta->artefact->author}} |
|
32 |
</div> |
|
33 |
<div class="text-center"> |
|
34 |
@if ($meta->favourite) |
|
35 |
<a href="{{ action('DetailsController@unlike', ['id' => $meta->id]) }}"> |
|
36 |
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button> |
|
37 |
</a> |
|
38 |
@else |
|
39 |
<a href="{{ action('DetailsController@like', ['id' => $meta->id]) }}"> |
|
40 |
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like"></button> |
|
41 |
</a> |
|
42 |
@endif |
|
43 |
</div> |
|
44 |
</div> |
|
45 |
</div> |
|
46 |
</div> |
|
47 |
@endforeach |
|
49 | 48 |
@else |
50 |
<ul class="list-group"> |
|
51 |
<li class="list-group-item"> |
|
52 |
<h3>No notes for this BOOK were found!</h3> |
|
53 |
</li> |
|
54 |
</ul> |
|
49 |
<div class="text-center mt-5"> |
|
50 |
<h2>No metadata!</h2> |
|
51 |
</div> |
|
55 | 52 |
@endif |
56 |
@endif
|
|
53 |
</div>
|
|
57 | 54 |
</div> |
55 |
|
|
56 |
<script> |
|
57 |
function openNote(element) { |
|
58 |
let metadata = $(element); |
|
59 |
let showed = metadata.find(".metadata-text").hasClass('show'); |
|
60 |
|
|
61 |
if (showed === false) |
|
62 |
{ |
|
63 |
metadata.find('.pin-horizontal').addClass("white-pin"); |
|
64 |
} |
|
65 |
else |
|
66 |
{ |
|
67 |
metadata.find('.pin-horizontal').removeClass("white-pin"); |
|
68 |
} |
|
69 |
|
|
70 |
} |
|
71 |
</script> |
|
58 | 72 |
@endsection |
Také k dispozici: Unified diff
Merge origin/develop into master