2021-04-16 01:00:00 +02:00
|
|
|
@extends('layouts.sidebar')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
2022-08-05 17:29:49 +02:00
|
|
|
@if(Request::is('studio/links/10'))
|
2022-11-08 16:11:59 +01:00
|
|
|
@php setcookie("LinkCount", "10", time()+60*60*24*5, "/"); @endphp
|
2022-08-05 17:29:49 +02:00
|
|
|
@elseif(Request::is('studio/links/20'))
|
2022-11-08 16:11:59 +01:00
|
|
|
@php setcookie("LinkCount", "20", time()+60*60*24*5, "/"); @endphp
|
2022-08-05 17:29:49 +02:00
|
|
|
@elseif(Request::is('studio/links/30'))
|
2022-11-08 16:11:59 +01:00
|
|
|
@php setcookie("LinkCount", "30", time()+60*60*24*5, "/"); @endphp
|
2022-08-05 17:29:49 +02:00
|
|
|
@elseif(Request::is('studio/links/all'))
|
2022-11-08 16:11:59 +01:00
|
|
|
@php setcookie("LinkCount", "all", time()+60*60*24*5, "/"); @endphp
|
2022-08-05 17:29:49 +02:00
|
|
|
@endif
|
|
|
|
|
2022-11-08 16:11:59 +01:00
|
|
|
<section class=' shadow text-gray-400'>
|
|
|
|
<h3 class="card-header"><i class="bi bi-link-45deg">My Links</i>
|
|
|
|
<a class="btn btn-primary float-right" href="{{ url('/studio/add-link') }}">Add new <span class='d-none d-md-inline'>item</span></a>
|
|
|
|
|
|
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class='card-body p-0 p-md-3'>
|
|
|
|
|
|
|
|
{{-- <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> --}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div style="overflow-y: none;" class="col col-md-7 ">
|
|
|
|
|
|
|
|
|
|
|
|
<div id="links-table-body" data-page="{{request('page', 1)}}" data-per-page="{{$pagePage ? $pagePage : 0}}">
|
|
|
|
@foreach($links as $link)
|
|
|
|
<div class='row h-100 pb-0 mb-2 border rounded hvr-glow ' data-id="{{$link->id}}">
|
|
|
|
|
|
|
|
|
|
|
|
<div class='col-auto p-2 my-auto mr-2' title="{{ $link->link }}">
|
|
|
|
<span class=" sortable-handle"></span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='col border-left h-100'>
|
|
|
|
|
|
|
|
<div class='row h-100'>
|
|
|
|
<div class='col-12 p-2' title="{{ $link->title }}">
|
|
|
|
<span class='h6'>
|
|
|
|
@if($link->typename == 'predefined')
|
|
|
|
<span class='button button-{{$link->params['button']}} p-0' style='max-width: 25px; max-height: 25px; line-height: 0; cursor: none;'>
|
|
|
|
|
|
|
|
<img alt="button-icon" height="15" class="m-1 " src="{{ asset('\/littlelink/icons\/') . $link->params['button'] }}.svg ">
|
|
|
|
</span>
|
|
|
|
|
|
|
|
@else
|
|
|
|
{{-- Change later!!!! fa-external-link --}}
|
|
|
|
<i class="fa-external-link" title="{{$link->title}}"></i>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
{{$link->title}}</span>
|
|
|
|
|
|
|
|
@if(!empty($link->link))
|
|
|
|
<br /><a title='{{$link->link}}' href="{{ $link->link}}" target="_blank" class="ml-4 text-muted small">{{Str::limit($link->link, 75 )}}</a>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class='col' class="text-right">
|
|
|
|
{{Str::limit($link->params['text'] ?? null, 150) }}
|
|
|
|
|
|
|
|
@if($link->typename == 'video')
|
|
|
|
@php
|
|
|
|
$embed = OEmbed::get($link->link);
|
|
|
|
if ($embed && $embed->hasThumbnail()) {
|
|
|
|
echo "<img style='max-height: 150px;' src='".$embed->thumbnailUrl()."' />";
|
|
|
|
|
|
|
|
}
|
|
|
|
@endphp
|
|
|
|
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class='col-12 py-1 px-3 m-0 bg-blend-darken card-footer mt-2'>
|
|
|
|
|
|
|
|
<a href="{{ route('editLink', $link->id ) }}" class="hvr-grow mr-2"><i class='bi bi-pencil'></i> Edit</a>
|
|
|
|
|
|
|
|
@if(env('ENABLE_BUTTON_EDITOR') === true)
|
2022-11-09 23:02:22 +01:00
|
|
|
@if($link->button_id == '1' or $link->button_id == '2')
|
2022-11-08 16:11:59 +01:00
|
|
|
<a href="{{ route('editCSS', $link->id ) }}" class="mr-2 hvr-grow text-success">Customize</a>
|
|
|
|
@endif
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if(!empty($link->link))
|
|
|
|
<span class='hvr-grow'><i class="bi bi-bar-chart-line"></i> {{ $link->click_number }} Clicks</span>
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<a href="{{ route('deleteLink', $link->id ) }}" onclick="return confirm('Are you sure you want to delete `{{$link->title}}` ?')" class="float-right hvr-grow p-1 text-danger"><i class='bi bi-trash'></i></a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2022-08-14 21:05:26 +02:00
|
|
|
<script type="text/javascript">
|
2022-11-08 16:11:59 +01:00
|
|
|
const linksTableOrders = "{{ implode(' | ', $links->pluck('id')->toArray()) }}"
|
2022-08-14 21:05:26 +02:00
|
|
|
</script>
|
2022-11-08 16:11:59 +01:00
|
|
|
</div>
|
2021-04-16 01:00:00 +02:00
|
|
|
|
2022-11-08 16:11:59 +01:00
|
|
|
<ul class="pagination justify-content-center">
|
|
|
|
{!! $links ?? ''->links() !!}
|
|
|
|
</ul>
|
2022-05-04 10:33:59 +02:00
|
|
|
|
2022-11-08 16:11:59 +01:00
|
|
|
<a class="btn btn-primary" href="{{ url('/studio/add-link') }}">Add new item</a>
|
|
|
|
</div>
|
|
|
|
</section>
|
2021-04-16 01:00:00 +02:00
|
|
|
@endsection
|