Projekt

Obecné

Profil

Stáhnout (2.09 KB) Statistiky
| Větev: | Tag: | Revize:
1
@extends('layouts.app')
2

    
3
@section('title', 'Categories')
4

    
5
@section('content')
6
    <div class="container">
7
        @if(isset($user))
8

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