Projekt

Obecné

Profil

Stáhnout (2.68 KB) Statistiky
| Větev: | Tag: | Revize:
1
@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
    <div class="container">
12
        <div class="metadata-area">
13
            <div class="text-center mt-5">
14
                <h2>notes</h2>
15
            </div>
16
            <span class="arrow-down"></span>
17

    
18
            @if(count($metadata) > 0)
19
                @foreach($metadata as $meta)
20
                    <div  id="row_{{$meta->id}}" class="row text-page">
21
                        <div class="pin-horizontal">
22
                            <div class="metadata">
23
                                <span>page {{$meta->page}}</span>
24
                                <a href="#meta_{{$meta->id}}" class="arrow-down" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')"></a>
25
                            </div>
26
                        </div>
27
                        <div id="meta_{{$meta->id}}" class="metadata-text collapse">
28
                            <p>
29
                                {{$meta->noteEN}}
30
                            </p>
31
                            <div class="artefact-info">
32
                                <div class="artefact-name">
33
                                    {{$meta->artefact->name}}
34
                                </div>
35
                                <div class="artefact-author">
36
                                    {{$meta->artefact->author}}
37
                                </div>
38
                                <div class="text-center">
39
                                    <a href="{{  action('FavoriteMetadataController@unlike', ['id' => $meta->id]) }}">
40
                                        <button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
41
                                    </a>
42
                                </div>
43
                            </div>
44
                        </div>
45
                    </div>
46
                @endforeach
47
            @else
48
                <h2>No favourite metadata yet!</h2>
49
            @endif
50
        </div>
51
    </div>
52

    
53
    <script>
54
        function openNote(element) {
55
            let metadata = $(element);
56
            let showed = metadata.find(".metadata-text").hasClass('show');
57

    
58
            if (showed === false)
59
            {
60
                metadata.find('.pin-horizontal').addClass("white-pin");
61
            }
62
            else
63
            {
64
                metadata.find('.pin-horizontal').removeClass("white-pin");
65
            }
66

    
67
        }
68
    </script>
69
@endsection
    (1-1/1)