Skip to content

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

set paddings from figma

as-ope3eb6d99ba2f
diff --git a/app/components/work_packages/exports/modal_dialog_component.html.erb b/app/components/work_packages/exports/modal_dialog_component.html.erb
index 564b3bda15e..a450f961a1b 100644
--- a/app/components/work_packages/exports/modal_dialog_component.html.erb
+++ b/app/components/work_packages/exports/modal_dialog_component.html.erb
@@ -12,7 +12,7 @@
<% flex_layout do |modal_body| %>
<% modal_body.with_row do |_format| %>
<%= render(Primer::Beta::Text.new(tag: "legend", font_size: :normal, mb: 2, font_weight: :bold)) { I18n.t('export.dialog.format.label') } %>
- <%= render(Primer::Alpha::SegmentedControl.new(ml: 0, mb: 2, "aria-label": I18n.t('export.dialog.format.label'), size: :medium)) do |component|
+ <%= render(Primer::Alpha::SegmentedControl.new(ml: 0, "aria-label": I18n.t('export.dialog.format.label'), size: :medium)) do |component|
export_formats_settings.each do |format|
component.with_item(
label: format[:label], icon: format[:icon], selected: format[:selected],
@@ -22,7 +22,7 @@
})
end
end %>
- <hr/>
+ <hr class="mt-4 mb-4" />
<% end %>
<% export_formats_settings.each do |format| %>
<% modal_body.with_row(
diff --git a/app/components/work_packages/exports/pdf/export_settings_component.html.erb b/app/components/work_packages/exports/pdf/export_settings_component.html.erb
index afead92c7d7..75751b0bfa4 100644
--- a/app/components/work_packages/exports/pdf/export_settings_component.html.erb
+++ b/app/components/work_packages/exports/pdf/export_settings_component.html.erb
@@ -22,11 +22,10 @@
caption: entry[:caption])
end
end %>
- <hr/>
+ <hr class="mt-4 mb-4"/>
<% end %>
<% container.with_row(
- mt: 2,
classes: %w[table report].include?(current_pdf_export_type) ? nil : "d-none",
data: {
table: true,
@@ -54,7 +53,7 @@
report: true,
"work-packages--export--pdf--settings-target": "fields"
}) do |_pdf_report_images| %>
- <hr/>
+ <hr class="mt-2 mb-4"/>
<%= render(Primer::Alpha::CheckBox.new(name: 'show_images',
checked: true,
value: "true",
@@ -71,19 +70,24 @@
"work-packages--export--pdf--settings-target": "fields"
}) do |_pdf_gantt_paper_size| %>
- <% gantt_selects.each do |entry| %>
- <%= render(Primer::Alpha::Select.new(
- name: entry[:name],
- label: entry[:label],
- caption: entry[:caption],
- size: :medium,
- disabled: current_pdf_export_type != "gantt",
- value: entry[:options].find { |e| e[:default] }[:value])
- ) do |component|
- entry[:options].each do |entry|
- component.option(label: entry[:label], value: entry[:value])
- end
- end %>
+ <% flex_layout do |flex| %>
+ <% gantt_selects.each_with_index do |entry, index| %>
+ <% flex.with_row(mt: index == 0 ? 0 : 3) do %>
+ <%= render(Primer::Alpha::Select.new(
+ name: entry[:name],
+ label: entry[:label],
+ caption: entry[:caption],
+ size: :medium,
+ input_width: :small,
+ disabled: current_pdf_export_type != "gantt",
+ value: entry[:options].find { |e| e[:default] }[:value])
+ ) do |component|
+ entry[:options].each do |entry|
+ component.option(label: entry[:label], value: entry[:value])
+ end
+ end %>
+ <% end %>
+ <% end %>
<% end %>
<% end %>
<% end %>
diff --git a/app/components/work_packages/exports/xls/export_settings_component.html.erb b/app/components/work_packages/exports/xls/export_settings_component.html.erb
index 8ee10ec781c..6e0470b7ddb 100644
--- a/app/components/work_packages/exports/xls/export_settings_component.html.erb
+++ b/app/components/work_packages/exports/xls/export_settings_component.html.erb
@@ -1,27 +1,26 @@
-<%=
- flex_layout do |container|
- container.with_row(mb: 2) do |_columns|
- helpers.angular_component_tag "opce-draggable-autocompleter",
- inputs: {
- options: work_packages_columns_options,
- selected: selected_columns,
- protected: protected_work_packages_columns_options,
- name: 'columns',
- id: 'columns-select-export-xls',
- inputLabel: I18n.t(:"queries.configure_view.columns.input_label"),
- inputPlaceholder: I18n.t(:"queries.configure_view.columns.input_placeholder"),
- dragAreaName: 'columns-select-export-xls',
- dragAreaLabel: I18n.t(:"queries.configure_view.columns.drag_area_label"),
- appendToComponent: true
- }
- end
- container.with_row do |_xls_include_relations|
- render(Primer::Alpha::CheckBox.new(name: 'show_relations',
- value: "true",
- unchecked_value: "false",
- label: I18n.t("export.dialog.xls.show_relations.label"),
- caption: I18n.t("export.dialog.xls.show_relations.caption"),
- visually_hide_label: false))
- end
- end
-%>
+<%= flex_layout do |container| %>
+ <%= container.with_row do |_columns| %>
+ <% helpers.angular_component_tag "opce-draggable-autocompleter",
+ inputs: {
+ options: work_packages_columns_options,
+ selected: selected_columns,
+ protected: protected_work_packages_columns_options,
+ name: 'columns',
+ id: 'columns-select-export-xls',
+ inputLabel: I18n.t(:"queries.configure_view.columns.input_label"),
+ inputPlaceholder: I18n.t(:"queries.configure_view.columns.input_placeholder"),
+ dragAreaName: 'columns-select-export-xls',
+ dragAreaLabel: I18n.t(:"queries.configure_view.columns.drag_area_label"),
+ appendToComponent: true
+ } %>
+ <% end %>
+ <%= container.with_row do |_xls_include_relations| %>
+ <hr class="mt-2 mb-4"/>
+ <%= render(Primer::Alpha::CheckBox.new(name: 'show_relations',
+ value: "true",
+ unchecked_value: "false",
+ label: I18n.t("export.dialog.xls.include_relations.label"),
+ caption: I18n.t("export.dialog.xls.include_relations.caption"),
+ visually_hide_label: false)) %>
+ <% end %>
+<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 8d58272d203..1ed81d2445a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1796,8 +1796,8 @@ en:
caption: "Depending on the chart size more than one page might be exported."
xls:
- show_relations:
- label: "Show relations"
+ include_relations:
+ label: "Include relations"
caption: "This option will create a duplicate of each work package for every relation this has with another work package."
your_work_packages_export: "Your work packages export"
succeeded: "The export has completed successfully."
diff --git a/spec/features/work_packages/export_spec.rb b/spec/features/work_packages/export_spec.rb
index 074949e3d81..995697096db 100644
--- a/spec/features/work_packages/export_spec.rb
+++ b/spec/features/work_packages/export_spec.rb
@@ -158,14 +158,14 @@ RSpec.describe "work package export" do
context "with relations" do
it "exports a xls" do
- check I18n.t("export.dialog.xls.show_relations.label")
+ check I18n.t("export.dialog.xls.include_relations.label")
export!
end
end
context "without relations" do
it "exports a xls" do
- uncheck I18n.t("export.dialog.xls.show_relations.label")
+ uncheck I18n.t("export.dialog.xls.include_relations.label")
export!
end
end