OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
<%=
component_wrapper do
primer_form_with(
scope: :meeting,
model: @meeting,
method: form_method,
data: {
turbo: true,
controller: [
"show-when-value-selected",
"show-when-checked",
@meeting.is_a?(RecurringMeeting) ? "recurring-meetings--form" : nil
].compact.join(" "),
"recurring-meetings--form-persisted-value": @meeting.persisted?
},
html: {
id: "meeting-form"
},
url: {
controller: form_controller,
action: form_action,
project_id: @project
}
) do |f|
flex_layout(mb: 3) do |modal_body|
if @meeting.errors[:base].present?
modal_body.with_row do
render(Primer::Alpha::Banner.new(mb: 3, icon: :stop, scheme: :danger)) { @meeting.errors[:base].join("\n") }
end
end
if @project.nil?
modal_body.with_row(mb: 3) do
render(Meeting::ProjectAutocompleter.new(f))
end
end
modal_body.with_row do
render(Meeting::Title.new(f))
end
modal_body.with_row(mt: 3) do
render(Meeting::Location.new(f, meeting: @meeting))
end
modal_body.with_row(mt: 3) do
render(Meeting::TimeGroup.new(f, meeting: @meeting))
end
if @meeting.is_a?(RecurringMeeting)
modal_body.with_row(mt: 3) do
flex_layout(classes: "FormControl-horizontalGroup") do |frequency_row|
frequency_row.with_column(flex: 1) do
render(RecurringMeeting::Frequency.new(f))
end
frequency_row.with_column(
flex: 1,
style: "visibility: #{@meeting.frequency_working_days? ? 'hidden' : 'visible'}",
data: {
target_name: "frequency",
not_value: "working_days",
set_visibility: "true",
"show-when-value-selected-target": "effect"
}
) do
render(RecurringMeeting::Interval.new(f))
end
end
end
modal_body.with_row(mt: 1) do
render(
Primer::Beta::Text.new(
id: "recurring-meeting-frequency-schedule",
font_size: :small,
color: :subtle
)
) { @meeting.human_frequency_schedule }
end
modal_body.with_row(mt: 3) do
flex_layout(classes: "FormControl-horizontalGroup") do |frequency_row|
frequency_row.with_column(flex: 1) do
render(RecurringMeeting::EndAfter.new(f))
end
frequency_row.with_column(
flex: 1,
hidden: @meeting.frequency_working_days?
) do
flex_layout do |end_after|
end_after.with_row(
hidden: !@meeting.end_after_specific_date?,
data: {
value: "specific_date",
target_name: "end_after",
"show-when-value-selected-target": "effect"
}
) do
render(RecurringMeeting::SpecificDate.new(f, meeting: @meeting))
end
end_after.with_row(
hidden: !@meeting.end_after_iterations?,
data: {
value: "iterations",
target_name: "end_after",
"show-when-value-selected-target": "effect"
}
) do
render(RecurringMeeting::Iterations.new(f))
end
end
end
end
end
end
if @copy_from
modal_body.with_row do
render(Meeting::CopiedFrom.new(f, id: @copy_from.id))
end
modal_body.with_row(mt: 3) do
render(Meeting::CopyItems.new(f))
end
modal_body.with_row(mt: 3) do
render(Meeting::CopyParticipants.new(f))
end
modal_body.with_row(mt: 3) do
render(Meeting::CopyAttachments.new(f))
end
end
if @meeting.is_a?(RecurringMeeting) && @meeting.persisted?
modal_body.with_row(mt: 3) do
render(Meetings::EmailUpdatesBannerComponent.new(@meeting))
end
end
if (@meeting.is_a?(RecurringMeeting) && !@meeting.persisted?) || @meeting.is_a?(Meeting)
modal_body.with_row(mt: 3) do
render(Meeting::SendEmailUpdates.new(f, meeting: @meeting, copy_from: @copy_from))
end
modal_body.with_row(
mt: 3,
data: {
"show-when-checked-target-name": "notification-banner",
"show-when-checked-target": "effect",
"show-when": "checked",
visibility_class: "d-none"
}
) do
render(Meetings::EmailUpdatesBannerComponent.new(@meeting, override: :enabled))
end
modal_body.with_row(
mt: 3,
classes: "d-none",
data: {
"show-when-checked-target-name": "notification-banner",
"show-when-checked-target": "effect",
"show-when": "unchecked",
visibility_class: "d-none"
}
) do
render(Meetings::EmailUpdatesBannerComponent.new(@meeting, override: :disabled))
end
end
end
end
end
%>