Upload beautify
This commit is contained in:
44
resources/views/user/buddies.blade.php
Normal file
44
resources/views/user/buddies.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid legacy-page">
|
||||
<div class="effect2 page-header-wrap">
|
||||
<header class="page-heading">
|
||||
<h1 class="page-header">{{ $page_title ?? 'Followers' }}</h1>
|
||||
<p>Members who follow you</p>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="icon-grid">
|
||||
@forelse($followers as $f)
|
||||
@php
|
||||
$icon = $f->icon ?? 'default.jpg';
|
||||
$uname = $f->uname ?? 'Unknown';
|
||||
$followerId = $f->user_id ?? null;
|
||||
@endphp
|
||||
|
||||
<div class="icon-flex">
|
||||
<div>
|
||||
<a href="/profile/{{ $followerId }}/{{ Str::slug($uname) }}">
|
||||
<h4>{{ $uname }}</h4>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a href="/profile/{{ $followerId }}/{{ Str::slug($uname) }}">
|
||||
<img src="{{ \App\Support\AvatarUrl::forUser((int) $followerId, null, 50) }}" alt="{{ $uname }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<p>No followers yet.</p>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@if(method_exists($followers, 'links'))
|
||||
<div class="mt-3">{{ $followers->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
73
resources/views/user/favourites.blade.php
Normal file
73
resources/views/user/favourites.blade.php
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.legacy')
|
||||
|
||||
@section('content')
|
||||
<div class="container legacy-page">
|
||||
<div class="page-header-wrap">
|
||||
<h1 class="page-header">Favourites</h1>
|
||||
<p class="text-muted">List of uploaded Artworks which were added to user's favourites list</p>
|
||||
</div>
|
||||
|
||||
@if(session('status'))
|
||||
<div class="alert alert-success">{{ session('status') }}</div>
|
||||
@endif
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Thumb</th>
|
||||
<th>Name</th>
|
||||
<th>Author</th>
|
||||
<th>Date</th>
|
||||
<th>Dls</th>
|
||||
<th>Views</th>
|
||||
<th>Zoom</th>
|
||||
<th>Rating</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($results as $ar)
|
||||
@php
|
||||
$artId = (int)($ar->id ?? 0);
|
||||
$nid = (int)($artId / 100);
|
||||
$picture = rawurlencode($ar->picture ?? '');
|
||||
@endphp
|
||||
<tr>
|
||||
<td style="width:80px;">
|
||||
<a href="/art/{{ $artId }}/{{ $ar->slug }}"><img src="/files/archive/shots/{{ $nid }}/{{ $picture }}" height="60" alt="{{ $ar->name }}"></a>
|
||||
</td>
|
||||
<td>
|
||||
@if(auth()->check() && auth()->id() == ($ar->user_id ?? null))
|
||||
<form method="POST" action="{{ route('legacy.favourites.delete', ['userId' => auth()->id(), 'artworkId' => $artId]) }}" style="display:inline" onsubmit="return confirm('Really Remove From Favourites: {{ addslashes($ar->name ?? '') }}');">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-link"><img src="/gfx/icon_delete.gif" alt="Delete"></button>
|
||||
</form>
|
||||
@endif
|
||||
<a href="/art/{{ $artId }}/{{ $ar->slug }}">{{ $ar->name }}</a>
|
||||
</td>
|
||||
<td><a href="/profile.php?uname={{ urlencode($ar->uname ?? '') }}">{{ $ar->uname ?? '' }}</a></td>
|
||||
<td>{{ is_string($ar->datum) ? date('d.m.Y', strtotime($ar->datum)) : '' }}</td>
|
||||
<td>{{ (int)($ar->dls ?? 0) }}</td>
|
||||
<td>{{ (int)($ar->views ?? 0) }}</td>
|
||||
<td>{{ e($ar->zoom ?? '') }}</td>
|
||||
<td>{{ e($ar->rating ?? '') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- Simple pagination controls --}}
|
||||
@php
|
||||
$pages = (int) ceil($total / $hits);
|
||||
@endphp
|
||||
@if($pages > 1)
|
||||
<nav>
|
||||
<ul class="pagination">
|
||||
@for($i=1;$i<=$pages;$i++)
|
||||
<li class="{{ $i == $page ? 'active' : '' }}"><a href="{{ route('legacy.favourites', ['id' => $user_id, 'page' => $i]) }}">{{ $i }}</a></li>
|
||||
@endfor
|
||||
</ul>
|
||||
</nav>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user