Skip to content

Commit

Permalink
Merge pull request #2095 from samvera/hyrax-5-upgrade-fix-identity-pr…
Browse files Browse the repository at this point in the history
…oviders

🐛 Handle missing labels
  • Loading branch information
jeremyf authored Dec 20, 2023
2 parents 875df7a + 55fa158 commit 00e3ce8
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 19 deletions.
1 change: 1 addition & 0 deletions app/controllers/identity_providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class IdentityProvidersController < ApplicationController
before_action :set_identity_provider, only: %i[edit update destroy]

def index
add_breadcrumbs
@identity_providers = IdentityProvider.all
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/dashboard/sidebar/_configuration.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<% end %>
<%= menu.nav_link(main_app.identity_providers_path, class: "nav-link") do %>
<span class="fa fa-key"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.identity_providers') %></span>
<span class="fa fa-key"></span> <span class="sidebar-action-text"><%= t('hyrax.admin.sidebar.identity_provider') %></span>
<% end %>
<%= menu.nav_link(main_app.edit_site_labels_path,
Expand Down
8 changes: 4 additions & 4 deletions app/views/identity_providers/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ul>
</div>
<% end %>
<%= f.input :name %>
<%= f.input :name, label: t('hyku.identity_provider.label.name'), required: true %>
<%= f.input :provider,
collection: Devise.omniauth_providers.map {|o| [o, o.upcase]},
label_method: :second,
Expand All @@ -38,12 +38,12 @@
<p>Metadata is available <%= link_to 'here', "/users/auth/saml/#{@identity_provider.id}/metadata", data: { turbolinks: false } %></p>
<% end %>
<%= f.input :options, input_html: {value: @identity_provider.options&.to_json } %>
<%= f.input :options, label: t('hyku.identity_provider.label.options'), input_html: {value: @identity_provider.options&.to_json } %>
<%# Upload Logo Image %>
<%= f.input :logo_image, as: :file, wrapper: :vertical_file_input, hint: t('hyrax.admin.appearances.show.forms.logo_image.hint') %>
<%= f.input :logo_image_text, as: :text %>
<%= f.input :logo_image, label: t('hyku.identity_provider.label.logo_image'), as: :file, wrapper: :vertical_file_input, hint: t('hyrax.admin.appearances.show.forms.logo_image.hint') %>
<%= f.input :logo_image_text, label: t('hyku.identity_provider.label.logo_image_alt_text'), as: :text %>
<%= image_tag f.object.logo_image.url(:medium), class: "img-responsive", alt: f.object.logo_image_text if f.object.logo_image? %>

</div>
Expand Down
14 changes: 7 additions & 7 deletions app/views/identity_providers/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% content_for :page_header do %>
<h1><span class="fa fa-user"></span> <%= t(:'hyrax.admin.sidebar.identity_providers_and_permissions') %></h1>
<h1><span class="fa fa-user"></span> <%= t('hyku.identity_provider.header') %></h1>
<% end %>

<div class="row">
Expand All @@ -9,10 +9,10 @@
<table class="table table-striped datatable">
<thead>
<tr>
<th>Name</th>
<th>Provider</th>
<th>Updated At</th>
<th>Logo</th>
<th><%= t('hyku.identity_provider.label.name') %></th>
<th><%= t('hyku.identity_provider.label.provider') %></th>
<th><%= t('hyku.identity_provider.label.updated_at') %></th>
<th><%= t('hyku.identity_provider.label.logo') %></th>
<th></th>
</tr>
</thead>
Expand All @@ -24,15 +24,15 @@
<td><%= u.updated_at %></td>
<td><%= image_tag u.logo_image.url(:thumb), class: "img-fluid", alt: u.logo_image_text if u.logo_image? %></td>
<td class="col-md-2">
<%= link_to t('.edit'), edit_identity_provider_path(u) %>&nbsp;|&nbsp;
<%= link_to t('hyku.identity_provider.label.edit'), edit_identity_provider_path(u) %>&nbsp;|&nbsp;
<%= link_to t('helpers.action.delete'), identity_provider_path(u), method: :delete, data: { confirm: t('.confirm_delete') } %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= link_to new_identity_provider_path, class: 'btn btn-primary' do %>
<span class="fa fa-edit"></span> <%= t('.create_new') %>
<span class="fa fa-edit"></span> <%= t('hyku.identity_provider.label.create_new') %>
<% end %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ de:
logo_image: Bild für die SSO-Seite
logo_image_alt_text: Alternativtext für Bild
name: Name oder Beschreibung
optoins: Optionen
options: Optionen
provider: Anbieter
proprietor:
accounts:
Expand Down
6 changes: 5 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ en:
label:
name: Name or Description
provider: Provider
optoins: Options
options: Options
logo: Logo
updated_at: Updated At
logo_image: Image for SSO Page
logo_image_alt_text: Alt Text for Image
create_new: New
edit: Edit
footer:
admin_login: Administrator login
proprietor:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ es:
logo_image: Imagen para la página SSO
logo_image_alt_text: Texto alternativo para imagen
name: Nombre o descripción
optoins: Opciones
options: Opciones
provider: Proveedor
proprietor:
accounts:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fr:
logo_image: Image de la page SSO
logo_image_alt_text: Texte alternatif pour l'image
name: Nom ou description
optoins: Possibilités
options: Possibilités
provider: Fournisseur
proprietor:
accounts:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ it:
logo_image: Immagine per la pagina SSO
logo_image_alt_text: Testo alternativo per l'immagine
name: Nome o descrizione
optoins: Opzioni
options: Opzioni
provider: Fornitore
proprietor:
accounts:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pt-BR:
logo_image: Imagem para página SSO
logo_image_alt_text: Texto alternativo para imagem
name: Nome ou Descrição
optoins: Opções
options: Opções
provider: Fornecedor
proprietor:
accounts:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ zh:
logo_image: SSO 页面的图像
logo_image_alt_text: 图像的替代文本
name: 名称或描述
optoins: 选项
options: 选项
provider: 提供者
proprietor:
accounts:
Expand Down

0 comments on commit 00e3ce8

Please sign in to comment.