Skip to content

Commit

Permalink
feat: Add Bootstrap 5 classes
Browse files Browse the repository at this point in the history
  • Loading branch information
zooley committed May 2, 2024
1 parent c4c1481 commit 71ab279
Show file tree
Hide file tree
Showing 41 changed files with 356 additions and 343 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</span>
</div>

<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>
</div>
</div>

Expand All @@ -79,7 +79,7 @@
<th scope="col">
{!! Html::grid('sort', trans('groups::groups.name'), 'name', $filters['order_dir'], $filters['order']) !!}
</th>
<th scope="col" class="text-right">
<th scope="col" class="text-right text-end">
{{ trans('groups::groups.groups') }}
</th>
</tr>
Expand Down Expand Up @@ -113,7 +113,7 @@
</a>
@endif
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="{{ route('admin.groups.index', ['department' => $row->id]) }}">
{{ number_format($row->groups_count) }}
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</span>
</div>

<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>
</div>
</div>

Expand All @@ -79,7 +79,7 @@
<th scope="col">
{!! Html::grid('sort', trans('groups::groups.name'), 'name', $filters['order_dir'], $filters['order']) !!}
</th>
<th scope="col" class="text-right">
<th scope="col" class="text-right text-end">
{{ trans('groups::groups.groups') }}
</th>
</tr>
Expand Down Expand Up @@ -113,7 +113,7 @@
</a>
@endif
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="{{ route('admin.groups.index', ['fieldofscience' => $row->id]) }}">
{{ number_format($row->groups_count) }}
</a>
Expand Down
26 changes: 13 additions & 13 deletions app/Modules/Groups/Resources/views/admin/groups/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
<th scope="col">{{ trans('groups::groups.id') }}</th>
<th scope="col">{{ trans('groups::groups.unix group') }}</th>
<th scope="col">{{ trans('groups::groups.short name') }}</th>
<th scope="col" class="text-right">{{ trans('groups::groups.members') }}</th>
<th scope="col" class="text-right"></th>
<th scope="col" class="text-right text-end">{{ trans('groups::groups.members') }}</th>
<th scope="col" class="text-right text-end"></th>
</tr>
</thead>
<tbody>
Expand All @@ -123,8 +123,8 @@
<td>{{ $u->id }}</td>
<td>{{ $u->longname }}</td>
<td>{{ $u->shortname }}</td>
<td class="text-right">{{ $u->members()->count() }}</td>
<td class="text-right">
<td class="text-right text-end">{{ $u->members()->count() }}</td>
<td class="text-right text-end">
<a href="#unixgroup-{{ $u->id }}" class="btn text-danger remove-unixgroup"
data-api="{{ route('api.unixgroups.delete', ['id' => $u->id]) }}"
data-confirm="{{ trans('groups::groups.confirm delete') }}">
Expand All @@ -137,8 +137,8 @@
<td>{id}</td>
<td>{longname}</td>
<td>{shortname}</td>
<td class="text-right">0</td>
<td class="text-right">
<td class="text-right text-end">0</td>
<td class="text-right text-end">
<a href="#unixgroup-{id}" class="btn text-danger remove-unixgroup"
data-api="{{ route('api.unixgroups.create') }}/{id}"
data-confirm="{{ trans('groups::groups.confirm delete') }}">
Expand All @@ -160,7 +160,7 @@
<input type="text" name="longname" id="longname" class="form-control input-unixgroup" maxlength="48" pattern="[a-z0-9-]+" placeholder="{{ strtolower(trans('groups::groups.name')) }}" value="{{ $row->unixgroup }}-" />
@endif
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#longname" class="btn text-success add-unixgroup"
data-group="{{ $row->id }}"
data-api="{{ route('api.unixgroups.create') }}">
Expand Down Expand Up @@ -210,7 +210,7 @@
endforeach;
?>{{ $prf . $dept->department->name }}
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#department-{{ $dept->id }}" class="btn text-danger remove-category"
data-api="{{ route('api.groups.groupdepartments.delete', ['group' => $row->id, 'id' => $dept->id]) }}"
data-confirm="{{ trans('groups::groups.confirm delete') }}">
Expand All @@ -221,7 +221,7 @@
@endforeach
<tr class="hidden" id="department-{id}" data-id="{id}">
<td>{name}</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#department-{id}" class="btn text-danger remove-category"
data-api="{{ route('api.groups.groupdepartments.create', ['group' => $row->id]) }}/{id}"
data-confirm="{{ trans('groups::groups.confirm delete') }}">
Expand Down Expand Up @@ -254,7 +254,7 @@
@endforeach
</select>
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#department"
class="btn text-success add-category"
data-group="{{ $row->id }}"
Expand Down Expand Up @@ -287,7 +287,7 @@ class="btn text-success add-category"
endforeach;
?>{{ $prf . $field->field->name }}
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#fieldofscience-{{ $field->id }}" class="btn text-danger remove-category"
data-api="{{ route('api.groups.groupfieldsofscience.delete', ['group' => $row->id, 'id' => $field->id]) }}"
data-confirm="{{ trans('groups::groups.confirm delete') }}">
Expand All @@ -298,7 +298,7 @@ class="btn text-success add-category"
@endforeach
<tr class="hidden" id="fieldofscience-{id}" data-id="{id}">
<td>{name}</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#fieldofscience-{id}" class="btn text-danger remove-category"
data-api="{{ route('api.groups.groupfieldsofscience.create', ['group' => $row->id]) }}/{id}"
data-confirm="{{ trans('groups::groups.confirm delete') }}">
Expand Down Expand Up @@ -331,7 +331,7 @@ class="btn text-success add-category"
@endforeach
</select>
</td>
<td class="text-right">
<td class="text-right text-end">
<a href="#fieldofscience"
class="btn text-success add-category"
data-group="{{ $row->id }}"
Expand Down
14 changes: 8 additions & 6 deletions app/Modules/Groups/Resources/views/admin/groups/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
if (btnnew) {
btnnew.setAttribute('data-toggle', 'modal');
btnnew.setAttribute('data-target', '#new-group');
btnnew.setAttribute('data-bs-toggle', 'modal');
btnnew.setAttribute('data-bs-target', '#new-group');
btnnew.addEventListener('click', function (e) {
e.preventDefault();
Expand Down Expand Up @@ -124,7 +126,7 @@
</span>
</div>
</div>
<div class="col col-md-9 text-right">
<div class="col col-md-9 text-right text-end">
<label class="sr-only visually-hidden" for="filter-state">{{ trans('groups::groups.state') }}</label>
<select name="state" id="filter-state" class="form-control filter filter-submit">
<option value="*">{{ trans('groups::groups.all states') }}</option>
Expand Down Expand Up @@ -164,7 +166,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>

@if (count($rows))
Expand All @@ -188,7 +190,7 @@
<th scope="col">
{!! Html::grid('sort', trans('groups::groups.unix group'), 'unixgroup', $filters['order_dir'], $filters['order']) !!}
</th>
<th scope="col" class="priority-4 text-right">
<th scope="col" class="priority-4 text-right text-end">
{!! Html::grid('sort', trans('groups::groups.members'), 'members_count', $filters['order_dir'], $filters['order']) !!}
</th>
<th scope="col" class="priority-6">
Expand Down Expand Up @@ -227,7 +229,7 @@
@endif
@endif
</td>
<td class="priority-4 text-right">
<td class="priority-4 text-right text-end">
{{ number_format($row->members_count) }}
</td>
<td class="priority-6">
Expand Down Expand Up @@ -268,8 +270,8 @@
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="new-group-title">{{ trans('groups::groups.create group') }}</h3>
<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">
Expand Down
42 changes: 21 additions & 21 deletions app/Modules/Groups/Resources/views/admin/groups/members.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@
<span class="fa fa-download" ara-hidden="true"></span> Export to CSV
</button>
</div>
<div class="col-md-6 text-right">
<a href="#add_member_dialog" data-toggle="modal" class="add_member btn btn-info btn-sm" data-membertype="1">
<div class="col-md-6 text-right text-end">
<a href="#add_member_dialog" data-toggle="modal" data-bs-toggle="modal" class="add_member btn btn-info btn-sm" data-membertype="1">
<span class="fa fa-plus-circle" ara-hidden="true"></span> Add Member
</a>
</div>
Expand Down Expand Up @@ -319,7 +319,7 @@
<div class="card-header">
<h4 class="m-0 p-0">
Managers
<a href="#help_managers_span_{{ $group->id }}" data-toggle="modal" class="btn text-info" data-tip="Help">
<a href="#help_managers_span_{{ $group->id }}" data-toggle="modal" data-bs-toggle="modal" class="btn text-info" data-tip="Help">
<span class="fa fa-question-circle" aria-hidden="true"></span><span class="sr-only visually-hidden">Help</span>
</a>
</h4>
Expand All @@ -328,8 +328,8 @@
<div class="modal-content shadow-sm">
<div class="modal-header">
<div class="modal-title" id="help_managers_span_{{ $group->id }}-title">Managers</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-toggle="modal" aria-label="Close">
<span class="visually-hidden" aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body dialog-body">
Expand Down Expand Up @@ -399,7 +399,7 @@
<td class="text-center">
@if (auth()->user()->can('manage groups'))
<div class="dropdown dropright">
<button class="btn btn-options fa fa-ellipsis-h" type="button" id="dropdownMenuButton{{ $member->id }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-options fa fa-ellipsis-h" type="button" id="dropdownMenuButton{{ $member->id }}" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only visually-hidden">Options</span>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ $member->id }}">
Expand Down Expand Up @@ -513,7 +513,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
<div class="card-header">
<h4 class="m-0 p-0">
Members
<a href="#help_members_span_{{ $group->id }}" data-toggle="modal" class="btn text-info" data-tip="Help">
<a href="#help_members_span_{{ $group->id }}" data-toggle="modal" data-bs-toggle="modal" class="btn text-info" data-tip="Help">
<span class="fa fa-question-circle" aria-hidden="true"></span><span class="sr-only visually-hidden">Help</span>
</a>
</h4>
Expand All @@ -522,8 +522,8 @@ class="membership-toggle unixgroup-toggle form-check-input"
<div class="modal-content shadow-sm">
<div class="modal-header">
<div class="modal-title" id="help_members_span_{{ $group->id }}-title">Members</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-toggle="modal" aria-label="Close">
<span class="visually-hidden" aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body dialog-body">
Expand Down Expand Up @@ -578,7 +578,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
</td>
<td class="text-center">
<div class="dropdown dropleft">
<button class="btn btn-options fa fa-ellipsis-h" type="button" id="dropdownMenuButton{{ $member->id }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-options fa fa-ellipsis-h" type="button" id="dropdownMenuButton{{ $member->id }}" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only visually-hidden">Options</span>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ $member->id }}">
Expand Down Expand Up @@ -701,7 +701,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
<div class="card-header">
<h4 class="m-0 p-0">
Usage Reporting Viewers
<a href="#help_viewers_span_{{ $group->id }}" data-toggle="modal" class="btn text-info" data-tip="Help">
<a href="#help_viewers_span_{{ $group->id }}" data-toggle="modal" data-bs-toggle="modal" class="btn text-info" data-tip="Help">
<span class="fa fa-question-circle" aria-hidden="true"></span><span class="sr-only visually-hidden">Help</span>
</a>
</h4>
Expand All @@ -710,8 +710,8 @@ class="membership-toggle unixgroup-toggle form-check-input"
<div class="modal-content shadow-sm">
<div class="modal-header">
<div class="modal-title" id="help_viewers_span_{{ $group->id }}-title">Usage Reporting Viewers</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-toggle="modal" aria-label="Close">
<span class="visually-hidden" aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body dialog-body">
Expand Down Expand Up @@ -763,7 +763,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
</td>
<td class="text-right text-nowrap">
<div class="dropdown dropright">
<button class="btn btn-options fa fa-ellipsis-h" type="button" id="dropdownMenuButton{{ $member->id }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-options fa fa-ellipsis-h" type="button" id="dropdownMenuButton{{ $member->id }}" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only visually-hidden">Options</span>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton{{ $member->id }}">
Expand Down Expand Up @@ -869,7 +869,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
<div class="card-header">
<h4 class="m-0 p-0">
Disabled Members
<a href="#help_disabledmembers_span_{{ $group->id }}" data-toggle="modal" class="btn text-info" data-tip="Help">
<a href="#help_disabledmembers_span_{{ $group->id }}" data-toggle="modal" data-bs-toggle="modal" class="btn text-info" data-tip="Help">
<span class="fa fa-question-circle" aria-hidden="true"></span><span class="sr-only visually-hidden">Help</span>
</a>
</h4>
Expand All @@ -878,8 +878,8 @@ class="membership-toggle unixgroup-toggle form-check-input"
<div class="modal-content shadow-sm">
<div class="modal-header">
<div class="modal-title" id="help_disabledmembers_span_{{ $group->id }}-title">Disabled Members</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-toggle="modal" aria-label="Close">
<span class="visually-hidden" aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body dialog-body">
Expand Down Expand Up @@ -914,7 +914,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
@foreach ($unixgroups as $unix)
<th scope="col" class="text-nowrap text-center">{{ $unix->longname }}</th>
@endforeach
<th scope="col" class="text-right">Options</th>
<th scope="col" class="text-right text-end">Options</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -1022,8 +1022,8 @@ class="membership-toggle unixgroup-toggle form-check-input"
<form id="form_{{ $group->id }}" method="post" class="modal-content shadow-sm">
<div class="modal-header">
<div class="modal-title" id="add_member_dialog-title">Add users to {{ $group->name }}</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>

Expand Down Expand Up @@ -1102,7 +1102,7 @@ class="membership-toggle unixgroup-toggle form-check-input"
</div>
<div class="modal-footer">
<div class="row">
<div class="col-md-12 text-right">
<div class="col-md-12 text-right text-end">
<input type="button" disabled="disabled" id="add_member_save" class="btn btn-success"
data-group="{{ $group->id }}"
data-api="{{ route('api.groups.members.create') }}"
Expand Down
Loading

0 comments on commit 71ab279

Please sign in to comment.