Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted comments fixes #1164

Merged
merged 3 commits into from
Dec 27, 2024
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
20 changes: 12 additions & 8 deletions resources/views/character/_image_info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,12 @@
<div class="alert alert-secondary">
[character={{ $character->slug }}]
</div>
In a comment:
<div class="alert alert-secondary">
[{{ $character->fullName }}]({{ $character->url }})
</div>
@if (!config('lorekeeper.settings.wysiwyg_comments'))
In a comment:
<div class="alert alert-secondary">
[{{ $character->fullName }}]({{ $character->url }})
</div>
@endif
<hr>
<div class="my-2">
<strong>For Thumbnails:</strong>
Expand All @@ -189,10 +191,12 @@
<div class="alert alert-secondary">
[charthumb={{ $character->slug }}]
</div>
In a comment:
<div class="alert alert-secondary">
[![Thumbnail of {{ $character->fullName }}]({{ $character->image->thumbnailUrl }})]({{ $character->url }})
</div>
@if (!config('lorekeeper.settings.wysiwyg_comments'))
In a comment:
<div class="alert alert-secondary">
[![Thumbnail of {{ $character->fullName }}]({{ $character->image->thumbnailUrl }})]({{ $character->url }})
</div>
@endif
</div>
@endif

Expand Down
4 changes: 2 additions & 2 deletions resources/views/comments/_actions.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class="ml-2 d-none d-sm-inline-block">Delete</span></button>
<div class="modal-body">
<div class="form-group">
{!! Form::label('message', 'Update your message here:') !!}
{!! Form::textarea('message', $comment->comment, ['class' => 'form-control ' . config('lorekeeper.settings.wysiwyg_comments') ? 'comment-wysiwyg' : '', 'rows' => 3, config('lorekeeper.settings.wysiwyg_comments') ? '' : 'required']) !!}
{!! Form::textarea('message', $comment->comment, ['class' => 'form-control ' . (config('lorekeeper.settings.wysiwyg_comments') ? 'comment-wysiwyg' : ''), 'rows' => 3, config('lorekeeper.settings.wysiwyg_comments') ? '' : 'required']) !!}
<small class="form-text text-muted"><a target="_blank" href="https://help.github.com/articles/basic-writing-and-formatting-syntax">Markdown</a> cheatsheet.</small>
</div>
</div>
Expand Down Expand Up @@ -98,7 +98,7 @@ class="ml-2 d-none d-sm-inline-block">Delete</span></button>
<div class="modal-body">
<div class="form-group">
{!! Form::label('message', 'Enter your message here:') !!}
{!! Form::textarea('message', null, ['class' => 'form-control ' . config('lorekeeper.settings.wysiwyg_comments') ? 'comment-wysiwyg' : '', 'rows' => 3, config('lorekeeper.settings.wysiwyg_comments') ? '' : 'required']) !!}
{!! Form::textarea('message', null, ['class' => 'form-control ' . (config('lorekeeper.settings.wysiwyg_comments') ? 'comment-wysiwyg' : ''), 'rows' => 3, config('lorekeeper.settings.wysiwyg_comments') ? '' : 'required']) !!}
<small class="form-text text-muted"><a target="_blank" href="https://help.github.com/articles/basic-writing-and-formatting-syntax">Markdown</a> cheatsheet.</small>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion resources/views/comments/_form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<div class="form-group">
{!! Form::label('message', 'Enter your message here:') !!}
{!! Form::textarea('message', null, ['class' => 'form-control ' . (config('lorekeeper.settings.wysiwyg_comments') ? 'comment-wysiwyg' : ''), 'rows' => 5, config('lorekeeper.settings.wysiwyg_comments') ? '' : 'required']) !!}
<small class="form-text text-muted"><a target="_blank" href="https://help.github.com/articles/basic-writing-and-formatting-syntax">Markdown</a> cheatsheet.</small>
@if (!config('lorekeeper.settings.wysiwyg_comments'))
<small class="form-text text-muted"><a target="_blank" href="https://help.github.com/articles/basic-writing-and-formatting-syntax">Markdown</a> cheatsheet.</small>
@endif
</div>

{!! Form::submit('Submit', ['class' => 'btn btn-sm btn-outline-success text-uppercase']) !!}
Expand Down
4 changes: 3 additions & 1 deletion resources/views/comments/comments.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
@endisset

@auth
@include('comments._form')
@include('comments._form', [
'compact' => isset($type) && $type == 'Staff-Staff' && config('lorekeeper.settings.wysiwyg_comments') ? true : false,
])
@else
<div class="card mt-3">
<div class="card-body">
Expand Down
20 changes: 11 additions & 9 deletions resources/views/galleries/submission.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,17 @@
<div class="alert alert-secondary">
[thumb={{ $submission->id }}]
</div>
In a comment:
<div class="alert alert-secondary">
@if (isset($submission->hash) && !isset($submission->content_warning))
[![Image]({{ $submission->thumbnailUrl }})]({{ $submission->url }})
@else
[{{ $submission->displayTitle }} by {{ $submission->creditsPlain }}
{{ isset($submission->hash) ? '(Art)' : '(Literature)' }}{{ isset($submission->content_warning) ? ' ・ **Content Warning:** ' . nl2br(htmlentities($submission->content_warning)) : '' }}]({{ $submission->url }})
@endif
</div>
@if (!config('lorekeeper.settings.wysiwyg_comments'))
In a comment:
<div class="alert alert-secondary">
@if (isset($submission->hash) && !isset($submission->content_warning))
[![Image]({{ $submission->thumbnailUrl }})]({{ $submission->url }})
@else
[{{ $submission->displayTitle }} by {{ $submission->creditsPlain }}
{{ isset($submission->hash) ? '(Art)' : '(Literature)' }}{{ isset($submission->content_warning) ? ' ・ **Content Warning:** ' . nl2br(htmlentities($submission->content_warning)) : '' }}]({{ $submission->url }})
@endif
</div>
@endif
</div>
</div>
</div>
Expand Down
20 changes: 12 additions & 8 deletions resources/views/user/_profile_content.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,24 @@
<div class="alert alert-secondary">
{{ '@' . $user->name }}
</div>
In a comment:
<div class="alert alert-secondary">
[{{ $user->name }}]({{ $user->url }})
</div>
@if (!config('lorekeeper.settings.wysiwyg_comments'))
In a comment:
<div class="alert alert-secondary">
[{{ $user->name }}]({{ $user->url }})
</div>
@endif
<hr>
<div class="my-2"><strong>For Names and Avatars:</strong></div>
In the rich text editor:
<div class="alert alert-secondary">
{{ '%' . $user->name }}
</div>
In a comment:
<div class="alert alert-secondary">
[![{{ $user->name }}'s Avatar]({{ $user->avatarUrl }})]({{ $user->url }}) [{{ $user->name }}]({{ $user->url }})
</div>
@if (!config('lorekeeper.settings.wysiwyg_comments'))
In a comment:
<div class="alert alert-secondary">
[![{{ $user->name }}'s Avatar]({{ $user->avatarUrl }})]({{ $user->url }}) [{{ $user->name }}]({{ $user->url }})
</div>
@endif
</div>
@if (Auth::check() && Auth::user()->isStaff)
<div class="card-footer">
Expand Down
Loading