Skip to content
Snippets Groups Projects
Unverified Commit ada35b2a authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

extranet

parent 3401648f
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,7 @@ class Admin::Communication::ExtranetsController < Admin::Communication::Applicat
params.require(:communication_extranet)
.permit(:name, :host, :about_type, :about_id,
:registration_contact, :logo, :logo_delete,
:terms, :privacy_policy, :cookies_policy, :color,
:has_sso, :sso_target_url, :sso_cert, :sso_name_identifier_format, :sso_mapping
)
end
......
......@@ -4,15 +4,19 @@
#
# id :uuid not null, primary key
# about_type :string indexed => [about_id]
# color :string
# cookies_policy :text
# has_sso :boolean default(FALSE)
# host :string
# name :string
# privacy_policy :text
# registration_contact :string
# sso_cert :text
# sso_mapping :jsonb
# sso_name_identifier_format :string
# sso_provider :integer default("saml")
# sso_target_url :string
# terms :text
# created_at :datetime not null
# updated_at :datetime not null
# about_id :uuid indexed => [about_type]
......
......@@ -3,7 +3,7 @@
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<div class="row">
<div class="col-md-4">
<div class="col-md-6">
<div class="card flex-fill w-100">
<div class="card-header">
<h5 class="card-title mb-0"><%= t('metadata') %></h5>
......@@ -15,11 +15,9 @@
<%= f.input :registration_contact %>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card flex-fill w-100">
<div class="card-header">
<h5 class="card-title mb-0"><%= t('logo') %></h5>
<h5 class="card-title mb-0"><%= t('look_feel') %></h5>
</div>
<div class="card-body">
<%= f.input :logo,
......@@ -27,26 +25,41 @@
input_html: { accept: '.jpg,.jpeg,.png,.svg' },
preview: 200,
direct_upload: true %>
<%= f.input :color, as: :color %>
</div>
</div>
</div>
<h3 class="mt-5"><%= t('university.sso') %></h3>
<div class="row">
<div class="col-md-6">
<%= f.input :has_sso %>
<div class="sso-inputs">
<%= f.input :sso_target_url, required: true %>
<%= f.input :sso_cert, required: true %>
<%= f.input :sso_name_identifier_format, required: true %>
<div class="col-md-6">
<div class="card flex-fill w-100">
<div class="card-header">
<h5 class="card-title mb-0"><%= t('legal') %></h5>
</div>
<div class="card-body">
<%= f.input :terms, as: :summernote %>
<%= f.input :privacy_policy, as: :summernote %>
<%= f.input :cookies_policy, as: :summernote %>
</div>
</div>
<div class="col-md-6 sso-inputs">
<h4 class="mb-4"><%= University.human_attribute_name('sso_mapping') %></h4>
<%= f.error_notification message: f.object.errors[:sso_mapping].to_sentence if f.object.errors[:sso_mapping].present? %>
<%= render 'server/universities/sso_mapping', object: extranet %>
</div>
</div>
<h3 class="mt-5"><%= t('university.sso') %></h3>
<div class="row">
<div class="col-md-6">
<%= f.input :has_sso %>
<div class="sso-inputs">
<%= f.input :sso_target_url, required: true %>
<%= f.input :sso_cert, required: true %>
<%= f.input :sso_name_identifier_format, required: true %>
</div>
</div>
<div class="col-md-6 sso-inputs">
<h4 class="mb-4"><%= University.human_attribute_name('sso_mapping') %></h4>
<%= f.error_notification message: f.object.errors[:sso_mapping].to_sentence if f.object.errors[:sso_mapping].present? %>
<%= render 'server/universities/sso_mapping', object: extranet %>
</div>
</div>
<% content_for :action_bar_right do %>
<%= submit f %>
<% end %>
......
......@@ -48,6 +48,10 @@ en:
about_Research::Journal: Journal extranet
about_Research::Laboratory: Laboratory extranet
about_type: About
color: Couleur
cookies_policy: Cookies policy
privacy_policy: Privacy policy
terms: Terms of service
has_sso: Has SSO?
host: Domain
name: Name
......
......@@ -48,15 +48,19 @@ fr:
about_Research::Journal: Extranet d'une revue scientifique
about_Research::Laboratory: Extranet d'un laboratoire
about_type: Type d'extranet
color: Couleur
cookies_policy: Politique de cookies
has_sso: A un SSO ?
host: Domaine
name: Nom
privacy_policy: Politique de confidentialité
registration_contact: Mail de contact pour les problèmes d'inscription
sso_cert: Certificat
sso_inherit_from_university: SSO hérité de l'Université
sso_mapping: Mapping
sso_name_identifier_format: Name Identifier Format
sso_target_url: URL cible
terms: Conditions d'utilisation
communication/website:
about: Sujet du site
about_: Site indépendant
......
......@@ -205,6 +205,7 @@ en:
languages:
en: English
fr: French
legal: Legal
loading: Loading...
login:
already_registered: Already registered?
......@@ -214,6 +215,7 @@ en:
sign_in_with_credentials: Sign in with credentials
sign_in_with_sso: Sign in through SSO
subtitle: Sign in to your account to continue
look_feel: Look & feel
mailers:
notifications:
import:
......
......@@ -205,6 +205,7 @@ fr:
languages:
en: Anglais
fr: Français
legal: Légal
loading: Chargement...
login:
already_registered: Déjà inscrit ?
......@@ -214,6 +215,7 @@ fr:
sign_in_with_credentials: Se connecter avec ses identifiants
sign_in_with_sso: Se connecter en SSO
subtitle: Vous devez être authentifié pour continuer
look_feel: Look & feel
mailers:
notifications:
import:
......
class AddLegalTextsToCommunicationExtranets < ActiveRecord::Migration[6.1]
def change
add_column :communication_extranets, :terms, :text
add_column :communication_extranets, :privacy_policy, :text
add_column :communication_extranets, :cookies_policy, :text
end
end
class AddColorToCommunicationExtranets < ActiveRecord::Migration[6.1]
def change
add_column :communication_extranets, :color, :string
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_10_20_141837) do
ActiveRecord::Schema.define(version: 2022_10_24_145426) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
......@@ -109,6 +109,10 @@ ActiveRecord::Schema.define(version: 2022_10_20_141837) do
t.string "sso_name_identifier_format"
t.integer "sso_provider", default: 0
t.string "sso_target_url"
t.text "terms"
t.text "privacy_policy"
t.text "cookies_policy"
t.string "color"
t.index ["about_type", "about_id"], name: "index_communication_extranets_on_about"
t.index ["university_id"], name: "index_communication_extranets_on_university_id"
end
......
......@@ -4,15 +4,19 @@
#
# id :uuid not null, primary key
# about_type :string indexed => [about_id]
# color :string
# cookies_policy :text
# has_sso :boolean default(FALSE)
# host :string
# name :string
# privacy_policy :text
# registration_contact :string
# sso_cert :text
# sso_mapping :jsonb
# sso_name_identifier_format :string
# sso_provider :integer default("saml")
# sso_target_url :string
# terms :text
# created_at :datetime not null
# updated_at :datetime not null
# about_id :uuid indexed => [about_type]
......
......@@ -4,15 +4,19 @@
#
# id :uuid not null, primary key
# about_type :string indexed => [about_id]
# color :string
# cookies_policy :text
# has_sso :boolean default(FALSE)
# host :string
# name :string
# privacy_policy :text
# registration_contact :string
# sso_cert :text
# sso_mapping :jsonb
# sso_name_identifier_format :string
# sso_provider :integer default("saml")
# sso_target_url :string
# terms :text
# created_at :datetime not null
# updated_at :datetime not null
# about_id :uuid indexed => [about_type]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment