1 |
b323292b
|
Marek Lovčí
|
@extends('layouts.app')
|
2 |
e765fd91
|
Marek Lovčí
|
|
3 |
|
|
@section('title', 'Categories')
|
4 |
|
|
|
5 |
|
|
@section('content')
|
6 |
75508baf
|
Marek Lovčí
|
<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">
|
15 |
b323292b
|
Marek Lovčí
|
{{$categoryNames[$k]->nameCZ}}
|
16 |
75508baf
|
Marek Lovčí
|
</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 |
|
|
--}}
|
37 |
e765fd91
|
Marek Lovčí
|
</div>
|
38 |
75508baf
|
Marek Lovčí
|
</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>
|
56 |
e765fd91
|
Marek Lovčí
|
@endsection
|