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
Merge branch 'dev' into implementation/50212-convert-the-edit-page-to-primer-design
Kabiru Mwenja5f2d9506af9e
diff --cc modules/storages/app/components/storages/admin/storage_view_component.html.erbindex 05e4c852f20,00000000000..0f2e6c2bb86mode 100644,000000..100644--- a/modules/storages/app/components/storages/admin/storage_view_component.html.erb+++ b/modules/storages/app/components/storages/admin/storage_view_component.html.erb@@@ -1,122 -1,0 +1,122 @@@+<%=+ render(Primer::Beta::BorderBox.new) do |component|+ component.with_header(color: :default) do+ grid_layout('op-storage-view--header', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div) do+ render(Primer::Beta::Text.new(font_weight: :semibold)) { I18n.t('storages.file_storage_view.general_information') }+ end+ end+ end++ component.with_row(scheme: :default) do- render(OpTurbo::FrameWrapperComponent.new(storage, context: :storage_view_general_info)) do++ render(OpTurbo::FrameComponent.new(storage, context: :storage_view_general_info)) do+ grid_layout('op-storage-view--row', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div, mr: 3) do+ concat(render(Primer::Beta::Text.new(font_weight: :semibold, mr: 1)) { I18n.t('storages.file_storage_view.storage_provider') })+ concat(configuration_check_label_for(:host_name_configured))+ end++ grid.with_area(:description, tag: :div, color: :subtle, test_selector: 'storage-description') do+ render(Primer::Beta::Truncate.new(font_weight: :light)) { storage_description }+ end++ grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end) do+ render(+ Primer::Beta::IconButton.new(+ icon: :pencil,+ tag: :a,+ scheme: :invisible,+ href: edit_host_admin_settings_storage_path(storage),+ aria: { label: I18n.t('storages.label_edit_storage') } ,+ test_selector: 'storage-edit-button'+ )+ )+ end+ end+ end+ end++ component.with_row(scheme: :neutral) do+ grid_layout('op-storage-view--row', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div, mr: 3) do+ render(Primer::Beta::Text.new(font_weight: :semibold, mr: 1)) { I18n.t('storages.file_storage_view.oauth_applications') }+ end+ end+ end++ component.with_row(scheme: :default) do- render(OpTurbo::FrameWrapperComponent.new(storage, context: :openproject_oauth)) do++ render(OpTurbo::FrameComponent.new(storage, context: :openproject_oauth)) do+ grid_layout('op-storage-view--row', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div, mr: 3) do+ concat(render(Primer::Beta::Text.new(font_weight: :semibold, mr: 1)) { I18n.t('storages.file_storage_view.openproject_oauth') })+ concat(configuration_check_label_for(:openproject_oauth_application_configured))+ end++ grid.with_area(:description, tag: :div, color: :subtle, test_selector: 'storage-openproject-oauth-client-description') do+ render(Primer::Beta::Truncate.new(font_weight: :light)) { openproject_oauth_client_description }+ end++ grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end, test_selector: 'storage-replace-openproject-oauth-application') do+ primer_form_with(+ model: storage,+ url: replace_oauth_application_admin_settings_storage_path(storage),+ method: :delete+ ) do |_form|+ render(+ Primer::Beta::IconButton.new(+ icon: :sync,+ scheme: :invisible,+ type: :submit,+ aria: { label: I18n.t("storages.buttons.replace_provider_type_oauth", provider_type: I18n.t("storages.provider_types.#{storage.short_provider_type}.name")) },+ data: { turbo_confirm: I18n.t("storages.confirm_replace_oauth_client") }+ )+ )+ end+ end+ end+ end+ end++ component.with_row(scheme: :default) do+ grid_layout('op-storage-view--row', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div, mr: 3) do+ concat(render(Primer::Beta::Text.new(font_weight: :semibold, mr: 1)) { I18n.t('storages.file_storage_view.nextcloud_oauth') })+ concat(configuration_check_label_for(:storage_oauth_client_configured))+ end++ grid.with_area(:description, tag: :div, color: :subtle, test_selector: 'storage-oauth-client-id-description') do+ render(Primer::Beta::Truncate.new(font_weight: :light)) { provider_oauth_client_description }+ end++ grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end) do+ render(Primer::Beta::IconButton.new(icon: :sync, scheme: :invisible, aria: { label: I18n.t('storages.label_edit_storage') } , test_selector: 'storage-edit-button'))+ end+ end+ end++ component.with_row(scheme: :neutral) do+ grid_layout('op-storage-view--row', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div) do+ render(Primer::Beta::Text.new(font_weight: :semibold, mr: 1)) { I18n.t('storages.file_storage_view.project_folders') }+ end+ end+ end++ component.with_row(scheme: :default) do+ grid_layout('op-storage-view--row', tag: :div, align_items: :center) do |grid|+ grid.with_area(:item, tag: :div, mr: 3) do+ concat(render(Primer::Beta::Text.new(font_weight: :semibold, mr: 1)) { I18n.t('storages.file_storage_view.automatically_managed_folders') })+ concat(automatically_managed_project_folders_status_label)+ end++ grid.with_area(:description, tag: :div, color: :subtle, test_selector: 'storage-oauth-client-id-description') do+ render(Primer::Beta::Truncate.new(font_weight: :light)) { I18n.t('storages.page_titles.managed_project_folders.subtitle_short') }+ end++ grid.with_area(:"icon-button", tag: :div, color: :subtle, mr: 3, justify_self: :end) do+ render(Primer::Beta::IconButton.new(icon: :pencil, scheme: :invisible, aria: { label: I18n.t('storages.label_edit_storage') } , test_selector: 'storage-edit-button'))+ end+ end+ end+ end+%>diff --cc modules/storages/app/views/storages/admin/storages/edit_host.html.erbindex 3db53af64e3,00000000000..6c566f6fdb9mode 100644,000000..100644--- a/modules/storages/app/views/storages/admin/storages/edit_host.html.erb+++ b/modules/storages/app/views/storages/admin/storages/edit_host.html.erb@@@ -1,5 -1,0 +1,5 @@@+<%=- render(OpTurbo::FrameWrapperComponent.new(@storage, context: :storage_view_general_info)) do++ render(OpTurbo::FrameComponent.new(@storage, context: :storage_view_general_info)) do+ render(Storages::Admin::Forms::GeneralInfoFormComponent.new(@storage))+ end+%>diff --cc modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erbindex 4a3e324901b,144fe75626e..3d546019ee1--- a/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb+++ b/modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb@@@ -1,90 -1,91 +1,90 @@@-<!-- Standard Ruby view, please see the controller for comments -->-<% html_title t(:label_administration), t("project_module_storages"), @storage.name, "#{t("storages.provider_types.#{@storage.short_provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>-<% local_assigns[:additional_breadcrumb] = [- link_to(@storage.name, edit_admin_settings_storage_path(@storage)),- t("storages.label_oauth_breadcrumb.openproject")-] %>-<%= toolbar title: "OpenProject #{t("storages.label_oauth_application_details")}" %>--<div class="op-toast -warning">- <div class="op-toast--content">- <p class="-with-inline-links">- <%= t('repositories.storage.oauth_application_details') %>- <a- href="<%= File.join(@oauth_application.integration.host, 'settings/admin/openproject') %>"- target="_blank"- class="spot-link"- >- <span class="spot-icon spot-icon_arrow-right3"></span>- <span><%= t('repositories.storage.oauth_application_details_link_text') %></span>- </a>- </p>+<% if OpenProject::FeatureDecisions.storage_primer_design_active? %>- <%= render(OpTurbo::FrameWrapperComponent.new(@storage, context: :openproject_oauth)) do %>++ <%= render(OpTurbo::FrameComponent.new(@storage, context: :openproject_oauth)) do %>+ <%= render(Storages::Admin::OAuthApplicationCredentialsCopyComponent.new(oauth_application: @oauth_application, storage: @storage)) %>+ <% end %>+<% else %>+ <% html_title t(:label_administration), t("project_module_storages"), @storage.name, "#{t("storages.provider_types.#{@storage.short_provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>+ <% local_assigns[:additional_breadcrumb] = [+ link_to(@storage.name, edit_admin_settings_storage_path(@storage)),+ t("storages.label_oauth_breadcrumb.openproject")+ ] %>+ <%= toolbar title: "OpenProject #{t("storages.label_oauth_application_details")}" %>+ <div class="op-toast -warning">+ <div class="op-toast--content">+ <p class="-with-inline-links">+ <%= t('repositories.storage.oauth_application_details') %>+ <a+ href="<%= File.join(@oauth_application.integration.host, 'settings/admin/openproject') %>"+ target="_blank"+ class="spot-link"+ >+ <span class="spot-icon spot-icon_arrow-right3"></span>+ <span><%= t('repositories.storage.oauth_application_details_link_text') %></span>+ </a>+ </p>+ </div></div>-</div>--<%= labelled_tabular_form_for @oauth_application, url: '/' do |f| -%>- <fieldset class="form--fieldset">- <div class="form--field">- <label class="form--label"><%= Storages::Admin::LABEL_OAUTH_CLIENT_ID %></label>-- <div class="form--field-container">- <div class="form--text-field-container -wide">- <%= text_field_tag(- :uid,- @oauth_application.uid,- {- size: 40,- readonly: true,- id: 'client_id'- }- ) %>- </div>- <div class="form--field-affix">- <% csp_onclick('this.focus(); this.select();', '#client_id') %>- <copy-to-clipboard click-target=".client-id-copy-button"- clipboard-target="#client_id">- </copy-to-clipboard>- <button class="client-id-copy-button button -without-button-styling"- title="<%= t(:button_copy_to_clipboard) %>">- <%= op_icon('icon-copy') %>- <span class="hidden-for-sighted"><%= t(:button_copy_to_clipboard) %></span>- </button>+ <%= labelled_tabular_form_for @oauth_application, url: '/' do |f| -%>+ <fieldset class="form--fieldset">+ <div class="form--field">+ <label class="form--label"><%= Storages::Admin::LABEL_OAUTH_CLIENT_ID %></label>+ <div class="form--field-container">+ <div class="form--text-field-container -wide">+ <%= text_field_tag(+ :uid,+ @oauth_application.uid,+ {+ size: 40,+ readonly: true,+ id: 'client_id'+ }+ ) %>+ </div>+ <div class="form--field-affix">+ <% csp_onclick('this.focus(); this.select();', '#client_id') %>+ <copy-to-clipboard click-target=".client-id-copy-button"+ clipboard-target="#client_id">+ </copy-to-clipboard>+ <button class="client-id-copy-button button -without-button-styling"+ title="<%= t(:button_copy_to_clipboard) %>">+ <%= op_icon('icon-copy') %>+ <span class="hidden-for-sighted"><%= t(:button_copy_to_clipboard) %></span>+ </button>+ </div></div></div>- </div>-- <div class="form--field">- <label class="form--label"><%= Storages::Admin::LABEL_OAUTH_CLIENT_SECRET %></label>-- <div class="form--field-container">- <div class="form--text-field-container -wide">- <%= text_field_tag(- :plaintext_secret,- @oauth_application.plaintext_secret,- {- size: 40,- readonly: true,- id: 'secret'- }- ) %>- </div>- <div class="form--field-affix">- <% csp_onclick('this.focus(); this.select();', '#secret') %>- <copy-to-clipboard click-target=".secret-copy-button"- clipboard-target="#secret">- </copy-to-clipboard>- <button class="secret-copy-button button -without-button-styling"- title="<%= t(:button_copy_to_clipboard) %>">- <%= op_icon('icon-copy') %>- <span class="hidden-for-sighted"><%= t(:button_copy_to_clipboard) %></span>- </button>+ <div class="form--field">+ <label class="form--label"><%= Storages::Admin::LABEL_OAUTH_CLIENT_SECRET %></label>+ <div class="form--field-container">+ <div class="form--text-field-container -wide">+ <%= text_field_tag(+ :plaintext_secret,+ @oauth_application.plaintext_secret,+ {+ size: 40,+ readonly: true,+ id: 'secret'+ }+ ) %>+ </div>+ <div class="form--field-affix">+ <% csp_onclick('this.focus(); this.select();', '#secret') %>+ <copy-to-clipboard click-target=".secret-copy-button"+ clipboard-target="#secret">+ </copy-to-clipboard>+ <button class="secret-copy-button button -without-button-styling"+ title="<%= t(:button_copy_to_clipboard) %>">+ <%= op_icon('icon-copy') %>+ <span class="hidden-for-sighted"><%= t(:button_copy_to_clipboard) %></span>+ </button>+ </div></div></div>- </div>- </fieldset>-- <% if @storage.oauth_client %>- <%= link_to t("storages.buttons.done_continue_setup"), edit_admin_settings_storage_path(@storage), class: "-highlight -with-icon icon-checkmark button" %>- <% else %>- <%= link_to t("storages.buttons.done_continue_setup"), new_admin_settings_storage_oauth_client_path(@storage), class: "-highlight -with-icon icon-checkmark button" %>+ </fieldset>+ <% if @storage.oauth_client %>+ <%= link_to t("storages.buttons.done_continue_setup"), edit_admin_settings_storage_path(@storage), class: "-highlight -with-icon icon-checkmark button" %>+ <% else %>+ <%= link_to t("storages.buttons.done_continue_setup"), new_admin_settings_storage_oauth_client_path(@storage), class: "-highlight -with-icon icon-checkmark button" %>+ <% end %><% end %><% end %>