Andreas Pfohl 2 years ago
parent 283d09596a
commit 36e764a5d9
No known key found for this signature in database
GPG Key ID: FF58F3B771328EB4
  1. 1
      config/locales/en.yml
  2. 2
      modules/storages/app/controllers/storages/admin/oauth_clients_controller.rb
  3. 2
      modules/storages/app/controllers/storages/admin/storages_controller.rb
  4. 2
      modules/storages/app/services/storages/oauth_applications/create_service.rb
  5. 7
      modules/storages/app/views/storages/admin/storages/new_oauth_client.html.erb
  6. 12
      modules/storages/app/views/storages/admin/storages/show.html.erb
  7. 7
      modules/storages/app/views/storages/admin/storages/show_oauth_application.html.erb
  8. 3
      modules/storages/config/locales/en.yml

@ -2460,6 +2460,7 @@ en:
update_timeout: "Keep the last required disk space information for a repository for N minutes.\nAs counting the required disk space of a repository may be costly, increase this value to reduce performance impact."
oauth_application_details: "The client secret value will not be accessible again after you close this window. Please copy these values into the Nextcloud OpenProject Integration settings:"
oauth_application_details_link_text: "Go to settings page"
show_warning_details: "To use this file storage remember to activate the module and the specific storage in the project settings of each desired project."
subversion:
existing_title: "Existing Subversion repository"
existing_introduction: "If you have an existing Subversion repository, you can link it with OpenProject to access it from within the application."

@ -74,7 +74,7 @@ class Storages::Admin::OAuthClientsController < ApplicationController
# Breadcrumbs is something like OpenProject > Admin > Storages.
# This returns the name of the last part (Storages admin page)
def default_breadcrumb
ActionController::Base.helpers.link_to(t('storages.label_oauth_client_details'), admin_settings_storage_oauth_client_path)
ActionController::Base.helpers.link_to(t(:project_module_storages), admin_settings_storages_path)
end
# See: default_breadcrumb above

@ -152,7 +152,7 @@ class Storages::Admin::StoragesController < ApplicationController
# Breadcrumbs is something like OpenProject > Admin > Storages.
# This returns the name of the last part (Storages admin page)
def default_breadcrumb
if action_name == :index
if action_name == 'index'
t(:project_module_storages)
else
ActionController::Base.helpers.link_to(t(:project_module_storages), admin_settings_storages_path)

@ -46,7 +46,7 @@ module Storages::OAuthApplications
::OAuth::PersistApplicationService
.new(::Doorkeeper::Application.new, user:)
.call({
name: "#{storage.name} (#{I18n.t("storages.provider_types.#{storage.provider_type}")})",
name: "#{storage.name} (#{I18n.t("storages.provider_types.#{storage.provider_type}.name")})",
redirect_uri: File.join(storage.host, "apps/integration_openproject/oauth-redirect"),
scopes: 'api_v3',
confidential: true,

@ -1,6 +1,9 @@
<!-- 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.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %>
<% local_assigns[:additional_breadcrumb] = "#{t("storages.provider_types.#{@storage.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %>
<% local_assigns[:additional_breadcrumb] = [
link_to(@storage.name, admin_settings_storage_path(@storage)),
t("storages.label_oauth_breadcrumb.#{@storage.provider_type}")
] %>
<%= toolbar title: "#{t("storages.provider_types.#{@storage.provider_type}.name")} #{t("storages.label_oauth_client_details")}" %>
<%= labelled_tabular_form_for @oauth_client, url: admin_settings_storage_oauth_client_path do |f| -%>
@ -27,7 +30,7 @@
<%= "#{t("storages.instructions.copy_from")}: " %>
<%= link_to "#{t("storages.instructions.#{@storage.provider_type}.integration")}",
URI::join(@storage.host, "settings/admin/openproject").to_s,
target: "blank"%>
target: "blank" %>
</span>
</div>
<% if @storage.oauth_client %>

@ -30,7 +30,7 @@ See COPYRIGHT and LICENSE files for more details.
<% html_title t(:label_administration), t('project_module_storages'), t(@object.name) -%>
<% local_assigns[:additional_breadcrumb] = @object.name %>
<%= toolbar title: "#{t('project_module_storages')} - #{@object.name}",
<%= toolbar title: @object.name,
title_class: 'no-padding-bottom' do %>
<li class="toolbar-item">
<%= link_to edit_admin_settings_storage_path(@object),
@ -50,6 +50,14 @@ See COPYRIGHT and LICENSE files for more details.
</li>
<% end %>
<div class="op-toast -warning -with-bottom-spacing">
<div class="op-toast--content">
<p>
<%= t('repositories.storage.show_warning_details') %>
</p>
</div>
</div>
<div class="attributes-group">
<div class="attributes-group--header">
<div class="attributes-group--header-container">
@ -66,7 +74,7 @@ See COPYRIGHT and LICENSE files for more details.
<div class="attributes-key-value--key"><%= t(:'storages.label_provider_type') %></div>
<div class="attributes-key-value--value-container">
<div class="attributes-key-value--value -text">
<span><%= t(:"storages.provider_types.#{@object.provider_type}") %></span>
<span><%= t(:"storages.provider_types.#{@object.provider_type}.name") %></span>
</div>
</div>

@ -1,7 +1,10 @@
<!-- Standard Ruby view, please see the controller for comments -->
<% html_title t(:label_administration), t("project_module_storages"), @object.name, "#{t("storages.provider_types.#{@object.provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>
<% local_assigns[:additional_breadcrumb] = "#{t("storages.provider_types.#{@object.provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>
<%= toolbar title: "#{t("storages.provider_types.#{@object.provider_type}.name")} #{t("storages.label_oauth_application_details")}" %>
<% local_assigns[:additional_breadcrumb] = [
link_to(@object.name, admin_settings_storage_path(@object)),
t("storages.label_oauth_breadcrumb.openproject")
] %>
<%= toolbar title: "OpenProject #{t("storages.label_oauth_application_details")}" %>
<div class="op-toast -warning -with-bottom-spacing">
<div class="op-toast--content">

@ -73,6 +73,9 @@ en:
label_file_links: "File links"
label_name: "Name"
label_host: "Host"
label_oauth_breadcrumb:
openproject: "OpenProject OAuth"
nextcloud: "Nextcloud OAuth"
label_oauth_application_details: "OAuth application details"
label_oauth_client_details: "OAuth client details"
label_provider_type: "Provider type"

Loading…
Cancel
Save