2021-04-16 01:00:00 +02:00
|
|
|
@extends('layouts.sidebar')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
2022-08-31 13:35:56 +02:00
|
|
|
@push('sidebar-stylesheets')
|
|
|
|
<base href="{{asset('')}}" />
|
|
|
|
@endpush
|
|
|
|
|
2022-08-05 17:29:49 +02:00
|
|
|
@if(Request::is('studio/links/10'))
|
|
|
|
@php setcookie("LinkCount", "10", time()+60*60*24*5, "/"); @endphp
|
|
|
|
@elseif(Request::is('studio/links/20'))
|
|
|
|
@php setcookie("LinkCount", "20", time()+60*60*24*5, "/"); @endphp
|
|
|
|
@elseif(Request::is('studio/links/30'))
|
|
|
|
@php setcookie("LinkCount", "30", time()+60*60*24*5, "/"); @endphp
|
|
|
|
@elseif(Request::is('studio/links/all'))
|
|
|
|
@php setcookie("LinkCount", "all", time()+60*60*24*5, "/"); @endphp
|
|
|
|
@endif
|
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
<h2 class="mb-4"><i class="bi bi-link-45deg"> Links</i></h2>
|
|
|
|
|
2022-08-05 17:29:49 +02:00
|
|
|
<div style="text-align: right;"><a href="{{ url('/studio/links') }}/10">10</a> | <a href="{{ url('/studio/links') }}/20">20</a> | <a href="{{ url('/studio/links') }}/30">30</a> | <a href="{{ url('/studio/links') }}/all">all</a></div>
|
2022-05-09 17:46:20 +02:00
|
|
|
<div style="overflow-y: auto;">
|
2021-04-16 01:00:00 +02:00
|
|
|
<table class="table table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">Link</th>
|
2021-07-06 10:52:40 +02:00
|
|
|
<th scope="col">Title</th>
|
2022-07-11 13:44:52 +02:00
|
|
|
<th scope="col">Clicks</th>
|
2021-07-06 10:52:40 +02:00
|
|
|
<th scope="col">Order ⏶</th>
|
2022-08-31 13:39:19 +02:00
|
|
|
{{-- <th scope="col">Pin Link ⏶</th> --}}
|
2021-07-06 10:52:40 +02:00
|
|
|
<th scope="col">Edit</th>
|
2022-05-04 10:14:04 +02:00
|
|
|
@if(env('ENABLE_BUTTON_EDITOR') === true)<th scope="col">Button Editor</th>@endif
|
2021-04-16 01:00:00 +02:00
|
|
|
<th scope="col">Delete</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2022-08-14 21:05:26 +02:00
|
|
|
<tbody id="links-table-body" data-page="{{request('page', 1)}}" data-per-page="{{$pagePage ? $pagePage : 0}}">
|
2021-04-16 01:00:00 +02:00
|
|
|
@foreach($links as $link)
|
2022-08-14 21:05:26 +02:00
|
|
|
<tr data-id="{{$link->id}}">
|
|
|
|
<td title="{{ $link->link }}"><span class="sortable-handle"></span> {{ Str::limit($link->link, 30) }}</td>
|
2021-07-06 12:20:58 +02:00
|
|
|
<td title="{{ $link->title }}">{{ Str::limit($link->title, 30) }}</td>
|
2021-07-06 12:50:38 +02:00
|
|
|
<td class="text-right">{{ $link->click_number }}</td>
|
|
|
|
<td class="text-right">{{ $link->order }}</td>
|
2022-08-31 13:39:19 +02:00
|
|
|
{{-- <td><a href="{{ route('upLink', ['up' => $link->up_link, 'id' => $link->id]) }}" class="text-primary">{{ $link->up_link }}</a></td> --}}
|
2021-07-06 10:52:40 +02:00
|
|
|
<td><a href="{{ route('editLink', $link->id ) }}">Edit</a></td>
|
2022-05-04 10:12:01 +02:00
|
|
|
@if(env('ENABLE_BUTTON_EDITOR') === true)
|
2022-04-27 20:55:19 +02:00
|
|
|
@if($link->button_id == 1 or $link->button_id == 2)
|
|
|
|
<td><a href="{{ route('editCSS', $link->id ) }}" class="text-success">Customize Button</a></td>
|
|
|
|
@else
|
|
|
|
<td><a> - </a></td>
|
|
|
|
@endif
|
2022-05-04 10:12:01 +02:00
|
|
|
@endif
|
2021-04-16 01:00:00 +02:00
|
|
|
<td><a href="{{ route('deleteLink', $link->id ) }}" class="text-danger">Delete</a></td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2022-08-14 21:05:26 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
const linksTableOrders = "{{ implode("|", $links->pluck('id')->toArray()) }}"
|
|
|
|
</script>
|
2022-05-09 17:46:20 +02:00
|
|
|
</div>
|
2021-04-16 01:00:00 +02:00
|
|
|
|
|
|
|
<ul class="pagination justify-content-center">
|
|
|
|
{!! $links ?? ''->links() !!}
|
|
|
|
</ul>
|
|
|
|
|
2022-05-04 10:33:59 +02:00
|
|
|
<a class="btn btn-primary" href="{{ url('/studio/add-link') }}">Add a link</a>
|
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
@endsection
|