Skip to content

Commit

Permalink
rename to record book
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt committed Oct 19, 2023
1 parent fd2f63b commit f9e8bd7
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 27 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Users/InventoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,11 @@ private function postAct(Request $request) {
}

/**
* Displays the user's sticker book.
* Displays the user's record book.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getStickerBook() {
public function getRecordBook() {
$user = Auth::user();
$categories = ItemCategory::visible(Auth::check() ? Auth::user() : null)->orderBy('sort', 'DESC')->get();
$items = count($categories) ?
Expand All @@ -403,7 +403,7 @@ public function getStickerBook() {
->get()
->groupBy('item_category_id');

return view('home.sticker_book', [
return view('home.record_book', [
'user' => $user,
'categories' => $categories->keyBy('id'),
'items' => $items,
Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Users/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ public function getUserOwnCharacterFavorites(Request $request, $name) {
}

/**
* Shows a user's sticker collection.
* Shows a user's record collection.
*/
public function getUserStickerBook(Request $request, $name) {
public function getUserRecordBook(Request $request, $name) {
$user = $this->user;
$categories = ItemCategory::visible(Auth::check() ? Auth::user() : null)->orderBy('sort', 'DESC')->get();
$items = count($categories) ?
Expand All @@ -363,7 +363,7 @@ public function getUserStickerBook(Request $request, $name) {
->get()
->groupBy('item_category_id');

return view('user.sticker_book', [
return view('user.record_book', [
'user' => $user,
'categories' => $categories->keyBy('id'),
'items' => $items,
Expand Down
2 changes: 1 addition & 1 deletion resources/views/home/_sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="sidebar-item"><a href="{{ url('characters/myos') }}" class="{{ set_active('characters/myos') }}">My MYO Slots</a></div>
<div class="sidebar-item"><a href="{{ url('inventory') }}" class="{{ set_active('inventory*') }}">Inventory</a></div>
<div class="sidebar-item"><a href="{{ url('bank') }}" class="{{ set_active('bank*') }}">Bank</a></div>
<div class="sidebar-item"><a href="{{ url('sticker-book') }}" class="{{ set_active('sticker-book*') }}">Sticker Book</a></div>
<div class="sidebar-item"><a href="{{ url('record-book') }}" class="{{ set_active('record-book*') }}">Record Book</a></div>
</li>
<li class="sidebar-section">
<div class="sidebar-section-header">Activity</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@extends('home.layout')

@section('home-title')
Sticker Book
Record Book
@endsection

@section('home-content')
{!! breadcrumbs(['Sticker Book' => 'sticker-book']) !!}
{!! breadcrumbs(['Record Book' => 'record-book']) !!}
<h1>
My Sticker Book
My Record Book
</h1>

<p>Here is a record of all items you've ever owned, and ones you've yet to receive.</p>
Expand All @@ -30,14 +30,16 @@
<div class="card-body p-2 collapse show row" id="categoryId_{!! isset($categories[$categoryId]) ? $categories[$categoryId]->id : 'miscellaneous' !!}">
@foreach ($categoryItems as $item)
<div class="col-lg-3 col-sm-4 col-12 text-center">
@php $check = !$user->items()->where('item_id', $item->id)->exists() @endphp
@if ($item->has_image)
<img src="{{ $item->imageUrl }}" class="img-fluid" style="{{ $check ? 'filter: grayscale(100%) blur(.15em); opacity: 0.75;' : ''}}" alt="{{ $item->name }}" />
@endif
<div>
{!! $check ? '<p class="text-danger mb-0">Not Unlocked</p>' : '' !!}
<a href="{{ $item->idUrl }}" ><h5>{{ $item->name }}</h5></a>
</div>
<a href="{{ $item->idUrl }}" >
@php $check = !$user->items()->where('item_id', $item->id)->exists() @endphp
@if ($item->has_image)
<img src="{{ $item->imageUrl }}" class="img-fluid" style="{{ $check ? 'filter: grayscale(100%) blur(.15em); opacity: 0.75;' : ''}}" alt="{{ $item->name }}" />
@endif
<div>
{!! $check ? '<p class="text-danger mb-0">Not Unlocked</p>' : '' !!}
<h5>{{ $item->name }}</h5>
</div>
</a>
</div>
@endforeach
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layouts/_nav.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<a class="dropdown-item" href="{{ url('bank') }}">
Bank
</a>
<a class="dropdown-item" href="{{ url('sticker-book') }}">
Sticker Book
<a class="dropdown-item" href="{{ url('record-book') }}">
Record Book
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ url('comments/liked') }}">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/user/_sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="sidebar-item"><a href="{{ $user->url . '/myos' }}" class="{{ set_active('user/' . $user->name . '/myos*') }}">MYO Slots</a></div>
<div class="sidebar-item"><a href="{{ $user->url . '/inventory' }}" class="{{ set_active('user/' . $user->name . '/inventory*') }}">Inventory</a></div>
<div class="sidebar-item"><a href="{{ $user->url . '/bank' }}" class="{{ set_active('user/' . $user->name . '/bank*') }}">Bank</a></div>
<div class="sidebar-item"><a href="{{ $user->url . '/sticker-book' }}" class="{{ set_active('user/' . $user->name . '/sticker-book*') }}">Sticker Book</a></div>
<div class="sidebar-item"><a href="{{ $user->url . '/record-book' }}" class="{{ set_active('user/' . $user->name . '/record-book*') }}">Record Book</a></div>
</li>
<li class="sidebar-section">
<div class="sidebar-section-header">History</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@extends('user.layout')

@section('profile-title')
Sticker Book
Record Book
@endsection

@section('profile-content')
{!! breadcrumbs(['Sticker Book' => 'sticker-book']) !!}
{!! breadcrumbs(['Record Book' => 'record-book']) !!}
<h1>
{!! $user->displayName !!}'s Sticker Book
{!! $user->displayName !!}'s Record Book
</h1>

<style>
Expand Down
2 changes: 1 addition & 1 deletion routes/lorekeeper/browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
Route::get('{name}/item-logs', 'UserController@getUserItemLogs');
Route::get('{name}/ownership', 'UserController@getUserOwnershipLogs');
Route::get('{name}/submissions', 'UserController@getUserSubmissions');
Route::get('{name}/sticker-book', 'UserController@getUserStickerBook');
Route::get('{name}/record-book', 'UserController@getUserRecordBook');
});

/**************************************************************************************************
Expand Down
4 changes: 2 additions & 2 deletions routes/lorekeeper/members.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@
Route::get('/liked', 'CommentController@getLikedComments');
});

Route::group(['prefix' => 'sticker-book', 'namespace' => 'Users'], function () {
Route::get('/', 'InventoryController@getStickerBook');
Route::group(['prefix' => 'record-book', 'namespace' => 'Users'], function () {
Route::get('/', 'InventoryController@getRecordBook');
});

0 comments on commit f9e8bd7

Please sign in to comment.