Skip to content

Commit

Permalink
feat: Add Bootstrap 5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
zooley committed May 2, 2024
1 parent 6d867b1 commit c4c1481
Show file tree
Hide file tree
Showing 67 changed files with 401 additions and 401 deletions.
4 changes: 2 additions & 2 deletions app/Modules/Config/Resources/views/admin/module.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<form action="{{ route('admin.config.module.update', ['module' => $module->element]) }}" id="adminForm{{ request()->ajax() ? '-ajax' : '' }}" method="post" name="adminform" autocomplete="off" class="form-validate">
@if (request()->ajax())
<div class="toolbar-box">
<div class="pagetitle text-right">
<div class="pagetitle text-right text-end">
{!! Toolbar::render() !!}
</div>
</div>
Expand All @@ -52,7 +52,7 @@
@endphp
@foreach ($fieldSets as $name => $fieldSet)
<li class="nav-item" role="presentation">
<a class="nav-link{{ $i == 0 ? ' active' : '' }}" href="#config-tab-{{ $name }}" data-toggle="tab" role="tab" id="config-tab-{{ $name }}-tab" aria-controls="config-tab-{{ $name }}" aria-selected="true">
<a class="nav-link{{ $i == 0 ? ' active' : '' }}" href="#config-tab-{{ $name }}" data-toggle="tab" data-bs-toggle="tab" role="tab" id="config-tab-{{ $name }}-tab" aria-controls="config-tab-{{ $name }}" aria-selected="true">
{{ trans(empty($fieldSet->label) ? 'config::modules.' . $name . ' fieldset label' : $fieldSet->label) }}
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion app/Modules/ContactReports/Formatters/FixHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function handle(array $data, Closure $next): array
$text = $data['content'];

$text = str_replace('<th>', '<th scope="col">', $text);
$text = str_replace('align="right"', 'class="text-right"', $text);
$text = str_replace('align="right"', 'class="text-right text-end"', $text);

$text = preg_replace('/<p>([^\n]+)<\/p>\n(<table.*?>)(.*?<\/table>)/usm', '$2 <caption>$1</caption>$3', $text);
$text = preg_replace('/src="\/include\/images\/(.*?)"/i', 'src="' . asset("files/$1") . '"', $text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<button class="btn btn-secondary" type="submit">submit</button>
</div>
<div class="col col-md-8 filter-select text-right">
<div class="col col-md-8 filter-select text-right text-end">
<label class="sr-only visually-hidden" for="filter_state">state</label>
<select name="state" class="form-control filter filter-submit">
<option value="*">all states</option>
Expand Down Expand Up @@ -51,7 +51,7 @@
<th scope="col" colspan="2">
Publish window
</th>
<th scope="col" class="text-right">
<th scope="col" class="text-right text-end">
Updates !
</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<span class="none">(none)</span>
</span>
</td>
<td class="priority-4 text-right">
<td class="priority-4 text-right text-end">
<a href="#updates">
{{ updates.length }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="card-body panel-body crmcomment crmcommenttext" v-html="formattedbody">
</div>
<div class="card-footer panel-footer bg-white">
<div class="crmcommentpostedby text-right">
<div class="crmcommentpostedby text-right text-end">
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,34 +198,34 @@
<div class="modal-content dialog-content shadow-sm">
<div class="modal-header">
<div class="modal-title" id="markdown-title">MarkDown Help</div>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
<button type="button" class="btn-close close" data-dismiss="modal" data-bs-dismiss="modal" aria-label="Close">
<span class="visually-hidden" aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body dialog-body">

<nav class="container-fluid">
<ul id="help-tabs" class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a href="#help1a" id="help1a-tab" class="nav-link active" data-toggle="tab" role="tab" aria-controls="help1a" aria-selected="true">Fonts</a>
<a href="#help1a" id="help1a-tab" class="nav-link active" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1a" aria-selected="true">Fonts</a>
</li>
<li class="nav-item" role="presentation">
<a href="#help1b" id="help1b-tab" class="nav-link" data-toggle="tab" role="tab" aria-controls="help1b" aria-selected="false">Lists</a>
<a href="#help1b" id="help1b-tab" class="nav-link" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1b" aria-selected="false">Lists</a>
</li>
<li class="nav-item" role="presentation">
<a href="#help1c" id="help1c-tab" class="nav-link" data-toggle="tab" role="tab" aria-controls="help1c" aria-selected="false">Links</a>
<a href="#help1c" id="help1c-tab" class="nav-link" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1c" aria-selected="false">Links</a>
</li>
<li class="nav-item" role="presentation">
<a href="#help1d" id="help1d-tab" class="nav-link" data-toggle="tab" role="tab" aria-controls="help1d" aria-selected="false">Other Reports</a>
<a href="#help1d" id="help1d-tab" class="nav-link" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1d" aria-selected="false">Other Reports</a>
</li>
<li class="nav-item" role="presentation">
<a href="#help1e" id="help1e-tab" class="nav-link" data-toggle="tab" role="tab" aria-controls="help1e" aria-selected="false">Line Breaks</a>
<a href="#help1e" id="help1e-tab" class="nav-link" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1e" aria-selected="false">Line Breaks</a>
</li>
<li class="nav-item" role="presentation">
<a href="#help1f" id="help1f-tab" class="nav-link" data-toggle="tab" role="tab" aria-controls="help1f" aria-selected="false">Code</a>
<a href="#help1f" id="help1f-tab" class="nav-link" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1f" aria-selected="false">Code</a>
</li>
<li class="nav-item" role="presentation">
<a href="#help1g" id="help1g-tab" class="nav-link" data-toggle="tab" role="tab" aria-controls="help1g" aria-selected="false">Tables</a>
<a href="#help1g" id="help1g-tab" class="nav-link" data-toggle="tab" data-bs-toggle="tab" role="tab" aria-controls="help1g" aria-selected="false">Tables</a>
</li>
</ul>
</nav>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$lastyear = Carbon\Carbon::now()->modify('-1 year');
?>
Time range
<button class="btn btn-form-control btn-block dropdown-toggle text-left" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-form-control btn-block dropdown-toggle text-left" type="button" id="dropdownMenuButton" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<?php
$active = 'all';
$text = 'All time';
Expand All @@ -91,42 +91,42 @@
{
if ($filters['start'] == $thisweek->startOfWeek()->format('Y-m-d') && $filters['stop'] == $thisweek->endOfWeek()->format('Y-m-d'))
{
$text = 'This week <span class="text-muted float-right">' . $thisweek->startOfWeek()->format('d M') . ' - ' . $thisweek->endOfWeek()->format('d M') . ', ' . $thisweek->format('Y') . '</span>';
$text = 'This week <span class="text-muted float-right float-end">' . $thisweek->startOfWeek()->format('d M') . ' - ' . $thisweek->endOfWeek()->format('d M') . ', ' . $thisweek->format('Y') . '</span>';
$active = 'thisweek';
$filters['start'] = '';
$filters['stop'] = '';
}
elseif ($filters['start'] == $thismonth->startOfMonth()->format('Y-m-d') && $filters['stop'] == $thismonth->endOfMonth()->format('Y-m-d'))
{
$text = 'This month <span class="text-muted float-right">' . $thismonth->startOfMonth()->format('M, Y') . '</span>';
$text = 'This month <span class="text-muted float-right float-end">' . $thismonth->startOfMonth()->format('M, Y') . '</span>';
$active = 'thismonth';
$filters['start'] = '';
$filters['stop'] = '';
}
elseif ($filters['start'] == $thisyear->format('Y-01-01') && $filters['stop'] == $thisyear->format('Y-12-31'))
{
$text = 'This year <span class="text-muted float-right">' . $thisyear->format('Y') . '</span>';
$text = 'This year <span class="text-muted float-right float-end">' . $thisyear->format('Y') . '</span>';
$active = 'thisyear';
$filters['start'] = '';
$filters['stop'] = '';
}
elseif ($filters['start'] == $lastweek->startOfWeek()->format('Y-m-d') && $filters['stop'] == $lastweek->endOfWeek()->format('Y-m-d'))
{
$text = 'Last week <span class="text-muted float-right">' . $lastweek->startOfWeek()->format('d M') . ' - ' . $lastweek->endOfWeek()->format('d M') . ', ' . $lastweek->format('Y') . '</span>';
$text = 'Last week <span class="text-muted float-right float-end">' . $lastweek->startOfWeek()->format('d M') . ' - ' . $lastweek->endOfWeek()->format('d M') . ', ' . $lastweek->format('Y') . '</span>';
$active = 'lastweek';
$filters['start'] = '';
$filters['stop'] = '';
}
elseif ($filters['start'] == $lastmonth->startOfMonth()->format('Y-m-d') && $filters['stop'] == $lastmonth->endOfMonth()->format('Y-m-d'))
{
$text = 'Last month <span class="text-muted float-right">' . $lastmonth->startOfMonth()->format('M, Y') . '</span>';
$text = 'Last month <span class="text-muted float-right float-end">' . $lastmonth->startOfMonth()->format('M, Y') . '</span>';
$active = 'lastmonth';
$filters['start'] = '';
$filters['stop'] = '';
}
elseif ($filters['start'] == $lastyear->format('Y-01-01') && $filters['stop'] == $lastyear->format('Y-12-31'))
{
$text = 'Last year <span class="text-muted float-right">' . $lastyear->format('Y') . '</span>';
$text = 'Last year <span class="text-muted float-right float-end">' . $lastyear->format('Y') . '</span>';
$active = 'lastyear';
$filters['start'] = '';
$filters['stop'] = '';
Expand Down Expand Up @@ -158,13 +158,13 @@
<a class="dropdown-item<?php if ($active == 'all') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => '', 'stop' => '']) }}">All time</span></a>
<div class="dropdown-divider"></div>
@endif
<a class="dropdown-item<?php if ($active == 'thisweek') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $thisweek->startOfWeek()->format('Y-m-d'), 'stop' => $thisweek->endOfWeek()->format('Y-m-d')]) }}">This week <span class="text-muted float-right">{{ $thisweek->startOfWeek()->format('d M') }} - {{ $thisweek->endOfWeek()->format('d M') }}, {{ $thisweek->format('Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'thismonth') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $thismonth->startOfMonth()->format('Y-m-d'), 'stop' => $thismonth->endOfMonth()->format('Y-m-d')]) }}">This month <span class="text-muted float-right">{{ $thismonth->format('M, Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'thisyear') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $thisyear->format('Y') . '-01-01', 'stop' => $thisyear->format('Y-12-31')]) }}">This year <span class="text-muted float-right">{{ $thisyear->format('Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'thisweek') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $thisweek->startOfWeek()->format('Y-m-d'), 'stop' => $thisweek->endOfWeek()->format('Y-m-d')]) }}">This week <span class="text-muted float-right float-end">{{ $thisweek->startOfWeek()->format('d M') }} - {{ $thisweek->endOfWeek()->format('d M') }}, {{ $thisweek->format('Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'thismonth') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $thismonth->startOfMonth()->format('Y-m-d'), 'stop' => $thismonth->endOfMonth()->format('Y-m-d')]) }}">This month <span class="text-muted float-right float-end">{{ $thismonth->format('M, Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'thisyear') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $thisyear->format('Y') . '-01-01', 'stop' => $thisyear->format('Y-12-31')]) }}">This year <span class="text-muted float-right float-end">{{ $thisyear->format('Y') }}</span></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item<?php if ($active == 'lastweek') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $lastweek->startOfWeek()->format('Y-m-d'), 'stop' => $lastweek->endOfWeek()->format('Y-m-d')]) }}">Last week <span class="text-muted float-right">{{ $lastweek->startOfWeek()->format('d M') }} - {{ $lastweek->endOfWeek()->format('d M') }}, {{ $lastweek->format('Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'lastmonth') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $lastmonth->startOfMonth()->format('Y-m-d'), 'stop' => $lastmonth->endOfMonth()->format('Y-m-d')]) }}">Last month <span class="text-muted float-right">{{ $lastmonth->format('M, Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'lastyear') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $lastyear->format('Y') . '-01-01', 'stop' => $lastyear->format('Y') . '-12-31']) }}">Last year <span class="text-muted float-right">{{ $lastyear->format('Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'lastweek') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $lastweek->startOfWeek()->format('Y-m-d'), 'stop' => $lastweek->endOfWeek()->format('Y-m-d')]) }}">Last week <span class="text-muted float-right float-end">{{ $lastweek->startOfWeek()->format('d M') }} - {{ $lastweek->endOfWeek()->format('d M') }}, {{ $lastweek->format('Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'lastmonth') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $lastmonth->startOfMonth()->format('Y-m-d'), 'stop' => $lastmonth->endOfMonth()->format('Y-m-d')]) }}">Last month <span class="text-muted float-right float-end">{{ $lastmonth->format('M, Y') }}</span></a>
<a class="dropdown-item<?php if ($active == 'lastyear') { echo ' active'; } ?>" href="{{ route('admin.contactreports.index', ['start' => $lastyear->format('Y') . '-01-01', 'stop' => $lastyear->format('Y') . '-12-31']) }}">Last year <span class="text-muted float-right float-end">{{ $lastyear->format('Y') }}</span></a>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">Custom range</h6>
<div class="px-4">
Expand Down Expand Up @@ -310,7 +310,7 @@
<input type="hidden" name="order" value="{{ $filters['order'] }}" />
<input type="hidden" name="order_dir" value="{{ $filters['order_dir'] }}" />

<button class="btn btn-secondary sr-only" type="submit">{{ trans('search.submit') }}</button>
<button class="btn btn-secondary sr-only visually-hidden" type="submit">{{ trans('search.submit') }}</button>
</fieldset>
</div>
<div class="col-md-9">
Expand Down Expand Up @@ -345,7 +345,7 @@
<?php
$uids = $row->users->pluck('userid')->toArray();
?>
<div class="flex-fill text-right">
<div class="flex-fill text-right text-end">
@if (auth()->user()->can('create contactreports'))
<a href="{{ route('admin.contactreports.create', ['groupid' => $row->groupid, 'contactreporttypeid' => $row->contactreporttypeid, 'people' => implode(',', $uids), 'resources' => implode(',', $row->resources->pluck('resourceid')->toArray())]) }}" class="bt bt-sm ml-3" title="Start new Contact Report with these details.">
<span class="fa fa-copy" aria-hidden="true"></span>
Expand Down Expand Up @@ -449,7 +449,7 @@
<span class="fa fa-folder" aria-hidden="true"></span>
{{ $row->type ? $row->type->name : trans('global.none') }}
</div>
<div class="flex-fill text-right">
<div class="flex-fill text-right text-end">
<span class="fa fa-comment" aria-hidden="true"></span>
@if (count($row->comments))
<a href="#comments_{{ $row->id }}" class="comments-show">{{ number_format(count($row->comments)) }}</a>
Expand Down Expand Up @@ -479,7 +479,7 @@
<!-- <textarea name="comment" id="comment_{{ $comment->id }}_comment" class="form-control" cols="45" rows="3">{{ $comment->comment }}</textarea> -->
{!! markdown_editor('comment', $comment->comment, ['rows' => 2, 'id' => 'comment_' . $comment->id . '_comment']) !!}
</div>
<div class="form-group text-right">
<div class="form-group text-right text-end">
<button class="btn btn-secondary comment-save" data-parent="#comment_{{ $comment->id }}">{{ trans('global.button.save') }}</button>
<a href="#comment_{{ $comment->id }}" class="btn btn-link comment-cancel">
{{ trans('global.button.cancel') }}
Expand All @@ -490,7 +490,7 @@
<div class="col-md-9 text-muted">
{{ trans('contactreports::contactreports.posted by', ['who' => ($comment->creator ? $comment->creator->name : trans('global.unknown')), 'when' => $comment->datetimecreated->format('M d, Y')]) }}
</div>
<div class="col-md-3 text-right">
<div class="col-md-3 text-right text-end">
<a href="#comment_{{ $comment->id }}_comment" class="comment-edit hide-when-editing ml-3">
<span class="fa fa-pencil" aria-hidden="true"></span>
<span class="s-only">{{ trans('global.button.edit') }}</span>
Expand All @@ -514,7 +514,7 @@
<label for="comment_<?php echo '{id}'; ?>_comment" class="sr-only visually-hidden">{{ trans('contactreports::contactreports.comment') }}</label>
<textarea name="comment" id="comment_<?php echo '{id}'; ?>_comment" class="form-control md" cols="45" rows="3"></textarea>
</div>
<div class="form-group text-right">
<div class="form-group text-right text-end">
<button class="btn btn-secondary comment-save" data-parent="#comment_<?php echo '{id}'; ?>">{{ trans('global.button.save') }}</button>
<a href="#comment_<?php echo '{id}'; ?>" class="btn btn-link comment-cancel">
{{ trans('global.button.cancel') }}
Expand All @@ -525,7 +525,7 @@
<div class="col-md-9 text-muted">
{{ trans('contactreports::contactreports.posted by', ['who' => '{who}', 'when' => '{when}']) }}
</div>
<div class="col-md-3 text-right">
<div class="col-md-3 text-right text-end">
<a href="#comment_<?php echo '{id}'; ?>_comment" class="comment-edit hide-when-editing ml-3">
<span class="fa fa-pencil" aria-hidden="true"></span>
<span class="s-only">{{ trans('global.button.edit') }}</span>
Expand All @@ -542,7 +542,7 @@
<label for="comment_new{{ $row->id }}_comment" class="sr-only visually-hidden">{{ trans('contactreports::contactreports.comment') }}</label>
{!! markdown_editor('comment', '', ['rows' => 2, 'id' => 'comment_new' . $row->id . '_comment']) !!}
</div>
<div class="form-group text-right">
<div class="form-group text-right text-end">
<button class="btn btn-secondary comment-add" data-parent="#comment_new{{ $row->id }}" data-id="{{ $row->id }}">{{ trans('contactreports::contactreports.add') }}</button>
</div>
</li>
Expand Down Expand Up @@ -572,7 +572,7 @@
{{ $comment->creator->name }}
@endif
</div>
<div class="flex-fill text-right">
<div class="flex-fill text-right text-end">
</div>
</div>
</li>
Expand Down
Loading

0 comments on commit c4c1481

Please sign in to comment.