1 |
09795926
|
Adam Mištera
|
@extends('layouts.app')
|
2 |
|
|
|
3 |
|
|
@section('title', 'Favorite metadata')
|
4 |
|
|
|
5 |
|
|
@section('breadcrumb')
|
6 |
|
|
<li class="breadcrumb-item"><a href="{{ url('/') }}">Home</a></li>
|
7 |
|
|
<li class="breadcrumb-item active" aria-current="page">Favorite metadata</li>
|
8 |
|
|
@endsection
|
9 |
|
|
|
10 |
|
|
@section('content')
|
11 |
d668e889
|
Adam Mištera
|
<div class="container">
|
12 |
3c062db9
|
Adam Mištera
|
<div class="metadata-area">
|
13 |
3e4f999e
|
Adam Mištera
|
<span class="arrow-down"></span>
|
14 |
09795926
|
Adam Mištera
|
|
15 |
d668e889
|
Adam Mištera
|
@if(count($metadata) > 0)
|
16 |
3c062db9
|
Adam Mištera
|
@foreach($metadata as $meta)
|
17 |
3e4f999e
|
Adam Mištera
|
<div id="row_{{$meta->id}}" class="row text-page">
|
18 |
3c062db9
|
Adam Mištera
|
<div class="pin-horizontal">
|
19 |
|
|
<div class="metadata">
|
20 |
aed76813
|
Adam Mištera
|
<a href="#meta_{{$meta->id}}" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')">
|
21 |
|
|
<span>page {{$meta->page}}</span>
|
22 |
|
|
</a>
|
23 |
3e4f999e
|
Adam Mištera
|
<a href="#meta_{{$meta->id}}" class="arrow-down" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')"></a>
|
24 |
3c062db9
|
Adam Mištera
|
</div>
|
25 |
|
|
</div>
|
26 |
|
|
<div id="meta_{{$meta->id}}" class="metadata-text collapse">
|
27 |
26e128a8
|
Adam Mištera
|
<p>
|
28 |
|
|
{{$meta->noteEN}}
|
29 |
|
|
</p>
|
30 |
3c062db9
|
Adam Mištera
|
<div class="artefact-info">
|
31 |
3e4f999e
|
Adam Mištera
|
<div class="artefact-name">
|
32 |
3c062db9
|
Adam Mištera
|
{{$meta->artefact->name}}
|
33 |
|
|
</div>
|
34 |
|
|
<div class="artefact-author">
|
35 |
|
|
{{$meta->artefact->author}}
|
36 |
|
|
</div>
|
37 |
3e4f999e
|
Adam Mištera
|
<div class="text-center">
|
38 |
26e128a8
|
Adam Mištera
|
<a href="{{ action('FavoriteMetadataController@unlike', ['id' => $meta->id]) }}">
|
39 |
|
|
<button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
|
40 |
|
|
</a>
|
41 |
3e4f999e
|
Adam Mištera
|
</div>
|
42 |
3c062db9
|
Adam Mištera
|
</div>
|
43 |
d668e889
|
Adam Mištera
|
</div>
|
44 |
3c062db9
|
Adam Mištera
|
</div>
|
45 |
|
|
@endforeach
|
46 |
d668e889
|
Adam Mištera
|
@else
|
47 |
3c062db9
|
Adam Mištera
|
<h2>No favourite metadata yet!</h2>
|
48 |
d668e889
|
Adam Mištera
|
@endif
|
49 |
|
|
</div>
|
50 |
09795926
|
Adam Mištera
|
</div>
|
51 |
3e4f999e
|
Adam Mištera
|
|
52 |
|
|
<script>
|
53 |
|
|
function openNote(element) {
|
54 |
|
|
let metadata = $(element);
|
55 |
|
|
let showed = metadata.find(".metadata-text").hasClass('show');
|
56 |
|
|
|
57 |
|
|
if (showed === false)
|
58 |
|
|
{
|
59 |
|
|
metadata.find('.pin-horizontal').addClass("white-pin");
|
60 |
|
|
}
|
61 |
|
|
else
|
62 |
|
|
{
|
63 |
|
|
metadata.find('.pin-horizontal').removeClass("white-pin");
|
64 |
|
|
}
|
65 |
|
|
}
|
66 |
|
|
</script>
|
67 |
09795926
|
Adam Mištera
|
@endsection
|