Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/Http/Controllers/Admin/Stats/LevelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class LevelController extends Controller {
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function getLevels($type = 'Character') {
public function getLevels(Request $request, $type = 'Character') {
$levels = Level::ordered($type);

$page = (int) request('page', 1);
$perPage = 20;
// $page = (int) request('page', 1);
// $perPage = 20;

return view('admin.levels.levels', [
'type' => $type,
'levels' => $levels->forPage($page, $perPage),
'levels' => $levels->paginate(20)->appends($request->query()),
]);
}

Expand Down
4 changes: 2 additions & 2 deletions app/Models/Claymore/Gear.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public function getImageUrlAttribute() {
* @return string
*/
public function getUrlAttribute() {
return url('world/gear?name='.$this->name);
return url('world/gears?name='.$this->name);
}

/**
Expand All @@ -244,7 +244,7 @@ public function getUrlAttribute() {
* @return string
*/
public function getIdUrlAttribute() {
return url('world/gear/'.$this->id);
return url('world/gears/'.$this->id);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Stat/StatService.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function updateStat($stat, $data) {
if (!isset($data['name'])) {
throw new \Exception('Please provide a name for the stat.');
}
if (!isset($data['base'])) {
if ($stat->id !== config('lorekeeper.claymores_and_companions.stat_points.general_id') && !isset($data['base'])) {
throw new \Exception('Please set a base stat value.');
}
if (isset($data['colour'])) {
Expand Down
25 changes: 25 additions & 0 deletions database/migrations/2026_03_07_225854_fix_gear_descriptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
/**
* Run the migrations.
*/
public function up(): void {
Schema::table('gears', function (Blueprint $table) {
$table->text('description')->change();
});
}

/**
* Reverse the migrations.
*/
public function down(): void {
Schema::table('gears', function (Blueprint $table) {
$table->string('description')->change();
});
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
'description' => $gear->description,
'searchUrl' => $gear->searchUrl,
'visible' => $gear->is_visible,
'edit' => [
'title' => 'Edit Gear',
'object' => $gear,
],
])
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@
<h3>Preview</h3>
<div class="card mb-3">
<div class="card-body">
@include('world._claymore_entry', [
'item' => null,
@include('world._entry', [
'edit' => ['object' => $category, 'title' => 'Gear Category'],
'item' => $category,
'imageUrl' => $category->categoryImageUrl,
'name' => $category->displayName,
'description' => $category->description,
'description' => $category->parsed_description,
'searchUrl' => $category->searchUrl,
'category' => $category,
'visible' => $category->is_visible,
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
'description' => $weapon->description,
'searchUrl' => $weapon->searchUrl,
'visible' => $weapon->is_visible,
'edit' => [
'title' => 'Edit Weapon',
'object' => $weapon,
],
])
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@
<h3>Preview</h3>
<div class="card mb-3">
<div class="card-body">
@include('world._claymore_entry', [
'item' => null,
@include('world._entry', [
'edit' => ['object' => $category, 'title' => 'Weapon Category'],
'item' => $category,
'imageUrl' => $category->categoryImageUrl,
'name' => $category->displayName,
'description' => $category->description,
'description' => $category->parsed_description,
'searchUrl' => $category->searchUrl,
'category' => $category,
'visible' => $category->is_visible,
])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@

@section('scripts')
@parent
@include('js._tinymce_wysiwyg')
<script>
$(document).ready(function() {
$('.selectize').selectize();
Expand Down
3 changes: 3 additions & 0 deletions resources/views/admin/levels/levels.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
{!! Form::close() !!}
</div>

{!! $levels->render() !!}
@if (!count($levels))
<p>No levels found.</p>
@else
Expand Down Expand Up @@ -68,4 +69,6 @@
</tbody>
</table>
@endif
{!! $levels->render() !!}

@endsection
1 change: 1 addition & 0 deletions resources/views/admin/skills/create_edit_skill.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@

@section('scripts')
@parent
@include('js._tinymce_wysiwyg')
<script>
$(document).ready(function() {
$('.selectize').selectize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@

@section('scripts')
@parent
@include('js._tinymce_wysiwyg')
<script>
$(document).ready(function() {
$('.delete-category-button').on('click', function(e) {
Expand Down
7 changes: 6 additions & 1 deletion resources/views/admin/stats/create_edit_stat.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@
</div>
<div class="col-md form-group">
{!! Form::label('Colour') !!} {!! add_help('This is the colour that will be used to display the stat on the character page. Set it to white to disable.') !!}
{!! Form::color('colour', $stat->colour, ['class' => 'form-control']) !!}
<div class="input-group cp">
{!! Form::text('colour', $stat->colour, ['class' => 'form-control']) !!}
<span class="input-group-append">
<span class="input-group-text colorpicker-input-addon"><i></i></span>
</span>
</div>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@

@section('scripts')
@parent
@include('js._tinymce_wysiwyg')
<script>
$(document).ready(function() {
$('#add-severity').on('click', function(e) {
Expand Down
4 changes: 2 additions & 2 deletions resources/views/world/_sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="sidebar-item"><a href="{{ url('world/levels/character') }}" class="{{ set_active('world/levels/character*') }}">Character Levels</a></div>
@endif
@if (config('lorekeeper.claymores_and_companions.visibility_settings.character_stats'))
<div class="sidebar-item"><a href="{{ url('world/character-stats') }}" class="{{ set_active('world/character-stats*') }}">Character Stats</a></div>
<div class="sidebar-item"><a href="{{ url('world/stats') }}" class="{{ set_active('world/stats*') }}">Character Stats</a></div>
@endif
</li>
@endif
Expand All @@ -58,7 +58,7 @@
@endif
@if (config('lorekeeper.claymores_and_companions.visibility_settings.gear'))
<div class="sidebar-item"><a href="{{ url('world/gear-categories') }}" class="{{ set_active('world/gear-categories*') }}">Gear Categories</a></div>
<div class="sidebar-item"><a href="{{ url('world/gear') }}" class="{{ set_active('world/gear*') }}">All Gear</a></div>
<div class="sidebar-item"><a href="{{ url('world/gears') }}" class="{{ set_active('world/gears*') }}">All Gear</a></div>
@endif
</li>
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/world/gear_categories.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
@foreach ($categories as $category)
<div class="card mb-3">
<div class="card-body">
@include('world._claymore_entry', [
@include('world._entry', [
'edit' => ['object' => $category, 'title' => 'Gear Category'],
'item' => null,
'item' => $category,
'imageUrl' => $category->categoryImageUrl,
'name' => $category->displayName,
'description' => $category->parsed_description,
Expand Down
5 changes: 3 additions & 2 deletions resources/views/world/weapon_categories.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
@foreach ($categories as $category)
<div class="card mb-3">
<div class="card-body">
@include('world._claymore_entry', [
@include('world._entry', [
'edit' => ['object' => $category, 'title' => 'Weapon Category'],
'item' => null,
'item' => $category,
'imageUrl' => $category->categoryImageUrl,
'name' => $category->displayName,
'description' => $category->parsed_description,
'searchUrl' => $category->searchUrl,
'category' => $category,
'visible' => $category->is_visible,
])
Expand Down
4 changes: 2 additions & 2 deletions routes/lorekeeper/browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
Route::get('weapons', 'WorldController@getWeapons');
Route::get('weapons/{id}', 'WorldController@getWeapon');
Route::get('gear-categories', 'WorldController@getGearCategories');
Route::get('gear', 'WorldController@getGears');
Route::get('gear/{id}', 'WorldController@getGear');
Route::get('gears', 'WorldController@getGears');
Route::get('gears/{id}', 'WorldController@getGear');
Route::get('character-classes', 'WorldController@getCharacterClasses');
Route::get('skill-categories', 'WorldController@getSkillCategories');
Route::get('skills', 'WorldController@getSkills');
Expand Down