-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate group show from configuration to Bootstrap
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/api/app/views/webui2/webui/groups/_breadcrumb_items.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
= render partial: 'webui/main/breadcrumb_items' | ||
%li.breadcrumb-item | ||
= link_to 'Groups', groups_path | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
= @group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
- @pagetitle = "Group #{@group.title}" | ||
|
||
.card | ||
%div | ||
%ul.nav.nav-tabs.pt-2.px-3.flex-nowrap.collapsible{ 'role': 'tablist' } | ||
%li.nav-item | ||
%a.active.nav-link.text-nowrap{ aria: { controls: 'reviews-in', selected: 'true' }, | ||
data: { toggle: 'tab' }, href: '#reviews-in', role: 'tab' } | ||
Incoming Reviews | ||
%li.nav-item | ||
%a.nav-link.text-nowrap{ aria: { controls: 'requests-in' }, data: { toggle: 'tab' }, href: '#requests-in', role: 'tab' } | ||
Incoming Requests | ||
%li.nav-item | ||
%a.nav-link.text-nowrap{ aria: { controls: 'all-requests' }, data: { toggle: 'tab' }, href: '#all-requests', role: 'tab' } | ||
All Requests | ||
%li.nav-item | ||
%a.nav-link.text-nowrap{ aria: { controls: 'group-members' }, data: { toggle: 'tab' }, href: '#group-members', role: 'tab' } | ||
Group Members | ||
|
||
.card-body.tab-content | ||
.tab-pane.show.active#reviews-in{ aria: { controls: 'reviews-in' }, role: 'tabpanel' } | ||
%h3 Incoming Reviews | ||
= render(partial: 'webui2/shared/requests_table', locals: { id: 'reviews_in_table', source_url: group_requests_path(@group) }) | ||
|
||
.tab-pane#requests-in{ aria: { controls: 'requests-in' }, role: 'tabpanel' } | ||
%h3 Incoming Requests | ||
= render(partial: 'webui2/shared/requests_table', locals: { id: 'requests_in_table', source_url: group_requests_path(@group) }) | ||
|
||
.tab-pane#all-requests{ aria: { controls: 'all-requests' }, role: 'tabpanel' } | ||
%h3 All Requests | ||
= render(partial: 'webui2/shared/requests_table', locals: { id: 'all_requests_table', source_url: group_requests_path(@group) }) | ||
|
||
.tab-pane#group-members{ aria: { controls: 'group-members' }, role: 'tabpanel' } | ||
%h3 Group Members | ||
%table.responsive.table.table-striped.table-bordered#group-members-table{ width: '100%' } | ||
%thead | ||
%tr | ||
%th Login Name | ||
%tbody | ||
- if @group.users.any? | ||
- @group.users.each do |user| | ||
%tr | ||
%td= link_to(user.login, user_show_path(user)) | ||
- else | ||
%tr | ||
%td This group does not contain users. | ||
- if User.current.is_admin? || @group.group_maintainers.where(user: User.current).exists? | ||
= link_to group_edit_title_path(title: @group) do | ||
%i.fas.fa-edit | ||
Edit group members | ||
|
||
= content_for :ready_function do | ||
:plain | ||
$('#group-members-table').DataTable({ | ||
responsive: true | ||
}); |