-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-use the participant editing form for the mobile view, also disable…
… editing when the meeting is not editable
- Loading branch information
Showing
7 changed files
with
61 additions
and
43 deletions.
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
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
11 changes: 11 additions & 0 deletions
11
modules/meeting/app/components/meetings/sidebar/details_component.sass
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,11 @@ | ||
.meeting-detail-participants | ||
visibility: collapse | ||
// The modal is rendered inside the mobile participant list element and it can be | ||
// triggered from both mobile and desktop views. The mobile participant list is hidden | ||
// when the desktop view is active, but the modal inside it should still be visible. | ||
.Overlay-backdrop--center | ||
visibility: visible | ||
|
||
@media screen and (max-width: $breakpoint-sm) | ||
.meeting-detail-participants | ||
visibility: visible |
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
8 changes: 0 additions & 8 deletions
8
modules/meeting/app/components/meetings/sidebar/participants_component.sass
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 |
---|---|---|
@@ -1,14 +1,6 @@ | ||
@import 'helpers' | ||
|
||
.meeting-detail-participants | ||
visibility: collapse | ||
|
||
@media screen and (max-width: $breakpoint-sm) | ||
#meetings-sidebar-component | ||
.BorderGrid-row:nth-child(3) | ||
visibility: collapse | ||
#participants-component | ||
.Overlay-backdrop--center | ||
visibility: visible | ||
.meeting-detail-participants | ||
visibility: visible |
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 |
---|---|---|
|
@@ -42,8 +42,11 @@ | |
)) | ||
end | ||
existing_participant.with_column(style: "width: 90px;", text_align: :center) do | ||
styled_check_box_tag "meeting[participants_attributes][][invited]", 1, participant.invited?, | ||
id: "checkbox_invited_#{participant.user.id}" | ||
styled_check_box_tag "meeting[participants_attributes][][invited]", | ||
value = 1, | ||
checked = participant.invited?, | ||
id: "checkbox_invited_#{participant.user.id}", | ||
disabled: [email protected]? | ||
# Primer checkboxes currently not working in this context as they render an additional hidden input tag | ||
# messing up the nested attributes mapping when posting the data to the server | ||
# | ||
|
@@ -58,8 +61,11 @@ | |
# )) | ||
end | ||
existing_participant.with_column(style: "width: 90px;", text_align: :center) do | ||
styled_check_box_tag "meeting[participants_attributes][][attended]", 1, participant.attended?, | ||
id: "checkbox_attended_#{participant.user.id}" | ||
styled_check_box_tag "meeting[participants_attributes][][attended]", | ||
value = 1, | ||
checked = participant.attended?, | ||
id: "checkbox_attended_#{participant.user.id}", | ||
disabled: [email protected]? | ||
end | ||
end | ||
end | ||
|
@@ -74,13 +80,19 @@ | |
end | ||
|
||
new_participant.with_column(style: "width: 90px;", text_align: :center) do | ||
styled_check_box_tag "meeting[participants_attributes][][invited]", value = "1", checked = false, | ||
id: "checkbox_invited_#{user.id}" | ||
styled_check_box_tag "meeting[participants_attributes][][invited]", | ||
value = "1", | ||
checked = false, | ||
id: "checkbox_invited_#{user.id}", | ||
disabled: [email protected]? | ||
end | ||
|
||
new_participant.with_column(style: "width: 90px;", text_align: :center) do | ||
styled_check_box_tag "meeting[participants_attributes][][attended]", value = "1", checked = false, | ||
id: "checkbox_attended_#{user.id}" | ||
styled_check_box_tag "meeting[participants_attributes][][attended]", | ||
value = "1", | ||
checked = false, | ||
id: "checkbox_attended_#{user.id}", | ||
disabled: [email protected]? | ||
end | ||
end | ||
end | ||
|
@@ -91,14 +103,15 @@ | |
end | ||
end | ||
|
||
collection.with_component(Primer::Alpha::Dialog::Footer.new(show_divider: true)) do | ||
component_collection do |footer| | ||
footer.with_component(Primer::ButtonComponent.new(data: { 'close-dialog-id': "edit-participants-dialog" })) do | ||
t("button_cancel") | ||
end | ||
|
||
footer.with_component(Primer::ButtonComponent.new(scheme: :primary, type: :submit)) do | ||
t("button_save") | ||
if @meeting.editable? | ||
collection.with_component(Primer::Alpha::Dialog::Footer.new(show_divider: true)) do | ||
component_collection do |footer| | ||
footer.with_component(Primer::ButtonComponent.new(data: { 'close-dialog-id': "edit-participants-dialog" })) do | ||
t("button_cancel") | ||
end | ||
footer.with_component(Primer::ButtonComponent.new(scheme: :primary, type: :submit)) do | ||
t("button_save") | ||
end | ||
end | ||
end | ||
end | ||
|
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