Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 75508baf

Přidáno uživatelem Marek Lovčí před asi 4 roky(ů)

Merge origin/develop into master

Zobrazit rozdíly:

resources/views/categories/index.blade.php
3 3
@section('title', 'Categories')
4 4

  
5 5
@section('content')
6
    @if(isset($user))
7
        {{--<p><?php dd($categories); ?></p>--}}
8
        <div class="cat-main-div" onclick="resetEnter()">
9
            <div class="head-title text-center">
10
                <h1>choose a topic</h1>
11
            </div>
12
            {{--@for($k = 1; $k <= count($categories);$k++)--}}
13
            @for($k = 0; $k < $count;$k++)
14
                @if($k % 6 == 0)
15
                    <div class="row">
16
                @endif
17
                    <div class="col-md-2 cat-col-md-2">
18
                        <a href="{{ url('/category/' . $categoryNames[$k]->id) }}">
19
                            <button class="btn btn-dark cat-tile">
6
    <div class="container">
7
        @if(isset($user))
8

  
9
            <div class="cat-main-div" {{--onclick="resetEnter()"--}}>
10
                <div class="d-flex flex-wrap justify-content-around btn-group" data-toggle="buttons">
11
                    @for($k = 0; $k < $count;$k++)
12
                        <div class="d-flex col-sm-12 col-md-6 col-lg-4 col-xl-3">
13
                            <a id="cat-but-id{{$categoryNames[$k]->id}}"{{--href="{{ url('/category/' . $categoryNames[$k]->id) }}"--}}
14
                                class="btn btn-dark cat-tile w-100 mt-4">
20 15
                                {{$categoryNames[$k]->nameCZ}}
21
                            </button>
22
                        </a>
23
                    </div>
24
                @if($k % 6 == 5 || $k + 1 == $count)
25
                    </div>
26
                @endif
27
            @endfor
16
                            </a>
17
                        </div>
18
                    @endfor
19
                </div>
20
            </div>
21
        @else
22
            <ul class="list-group">
23
                <li class="list-group-item">
24
                    <h3>Not found the USER in the database with number id {{$user->id}}!</h3>
25
                </li>
26
            </ul>
27
        @endif
28
    </div>
29
    <div class="cat-wrapper">
30
        <a class="btn button-square cat-enter-butt" onclick="test()" role="button">enter</a>
31
    </div>
32
    <div class="row justify-content-md-center">
33
        <div class="col-md-auto">
34
{{--
35
            <a class="btn button-square cat-enter-butt" onclick="test()" role="button">enter</a>
36
--}}
28 37
        </div>
29
    @else
30
        <ul class="list-group">
31
            <li class="list-group-item">
32
                <h3>Not found the USER in the database with number id {{$user->id}}!</h3>
33
            </li>
34
        </ul>
35
    @endif
38
    </div>
39
    <script>
40
        function test()
41
        {
42
            var btns = $(".btn-dark:not(:disabled):not(.disabled).active");
43
            if(btns.length > 0)
44
            {
45
                var text = "";
46
                for(var i = 0; i < btns.length;i++)
47
                {
48
                    var idE =  btns[i].id;
49
                    var num = idE.substring(10, idE.length);
50
                    text += num + ",";
51
                }
52
                window.location.href = "{{url('/category/multi/')}}/" + text;
53
            }
54
        }
55
    </script>
36 56
@endsection

Také k dispozici: Unified diff