diff --git a/app/assets/stylesheets/admin/appstack.sass b/app/assets/stylesheets/admin/appstack.sass new file mode 100644 index 0000000000000000000000000000000000000000..27dbe490da6d53ea1db49d87ec5b4aebf64b15d0 --- /dev/null +++ b/app/assets/stylesheets/admin/appstack.sass @@ -0,0 +1,8 @@ +main.content + padding-bottom: 65px + +.footer.fixed + bottom: 0 + left: 260px + position: fixed + right: 0 diff --git a/app/assets/stylesheets/admin/styles.sass b/app/assets/stylesheets/admin/styles.sass index 16b3d9b0a4f1b1d8da4c6c1ec326df5e98fe7a55..8178a52174984b4940d2e979626a7654a75006b2 100644 --- a/app/assets/stylesheets/admin/styles.sass +++ b/app/assets/stylesheets/admin/styles.sass @@ -9,9 +9,9 @@ h1 .sidebar-content background-color: black background-image: asset-url('sun.svg') - background-repeat: no-repeat background-position-x: center background-position-y: -420px + background-repeat: no-repeat background-size: 400% .sidebar-brand padding: 90px 80px 120px diff --git a/app/views/admin/application/_footer.html.erb b/app/views/admin/application/_footer.html.erb index 34e022a16c6bffc6f677ac6f179a729cffc84f08..85dcc754f505f6d713c1f64cbc74ccf27736d1a2 100644 --- a/app/views/admin/application/_footer.html.erb +++ b/app/views/admin/application/_footer.html.erb @@ -1,29 +1,10 @@ -<footer class="footer"> - <div class="container-fluid"> - <div class="row text-muted"> - <div class="col-6 text-start"> - <ul class="list-inline"> - <li class="list-inline-item"> - <a class="text-muted" href="#">Support</a> - </li> - <li class="list-inline-item"> - <a class="text-muted" href="#">Help Center</a> - </li> - <li class="list-inline-item"> - <a class="text-muted" href="#">Privacy</a> - </li> - <li class="list-inline-item"> - <a class="text-muted" href="#">Terms of Service</a> - </li> - </ul> - </div> - <div class="col-6 text-end"> - <p class="mb-0"> - <a href="https://www.osuny.org" target="_blank" rel="noreferrer"> - <%= image_tag 'osuny-white.svg', width: 65 %> - </a> - </p> - </div> +<% if content_for?(:action_bar_left) or content_for?(:action_bar_right) %> + <footer class="footer fixed"> + <div class="float-start"> + <%= yield :action_bar_left %> </div> - </div> -</footer> + <div class="float-end"> + <%= yield :action_bar_right %> + </div> + </footer> +<% end %> diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index f9f48cfc05fb79764acdb5762afbff0ba3d37a09..8ccf236eeb2345673f96e6b4068f1148370a32b5 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -6,32 +6,33 @@ <%= f.input :reset_password_token, as: :hidden %> <%= f.full_error :reset_password_token %> - <div class="form-inputs"> - <%= f.input :password, - as: :password_with_hints, - label: t(".new_password"), - required: true, - autofocus: true, - allow_password_uncloaking: true, - validators: { - length: Devise.password_length.first, - uppercase_char: true, - lowercase_char: true, - numeric_char: true, - special_char: Rails.application.config.allowed_special_chars - }, - input_html: { autocomplete: "new-password" } %> - <%= f.input :password_confirmation, - as: :password_with_sync, - label: t(".confirm_new_password"), - required: true, - allow_password_uncloaking: true, - compare_with_field: :password, - input_html: { autocomplete: "new-password" } %> - </div> - - <div class="form-actions"> - <%= f.button :submit, t(".change_my_password"), class: 'btn btn-primary' %> - <%= render "devise/shared/links" %> + <div class="row"> + <div class="col-md-6"> + <%= f.input :password, + as: :password_with_hints, + label: t(".new_password"), + required: true, + autofocus: true, + allow_password_uncloaking: true, + validators: { + length: Devise.password_length.first, + uppercase_char: true, + lowercase_char: true, + numeric_char: true, + special_char: Rails.application.config.allowed_special_chars + }, + input_html: { autocomplete: "new-password" } %> + <%= f.button :submit, t(".change_my_password"), class: 'btn btn-primary' %> + <%= render "devise/shared/links" %> + </div> + <div class="col-md-6"> + <%= f.input :password_confirmation, + as: :password_with_sync, + label: t(".confirm_new_password"), + required: true, + allow_password_uncloaking: true, + compare_with_field: :password, + input_html: { autocomplete: "new-password" } %> + </div> </div> <% end %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index a708f5e6a11ee3e82a439aafe8bc67538db4f6ec..2cd101ea25b66e15c8dff2359073834ada83e3ae 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -9,11 +9,11 @@ required: true, autofocus: true, input_html: { autocomplete: "email" } %> + <%= render "devise/shared/links" %> </div> <div class="col-md-6"> <label class="form-label"> </label><br> <%= f.button :submit, t(".send_me_reset_password_instructions"), class: 'btn btn-primary' %> - <%= render "devise/shared/links" %> </div> </div> <% end %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 56b1081e0a1054dc6521326ab2e14c12c895eab7..4e94477c8a43c88939f1a024ade31c34d960b6c2 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -36,11 +36,11 @@ <% end %> </div> </div> - <%= f.button :submit, t(".update"), class: 'btn btn-primary' %> + <% content_for :action_bar_right do %> + <%= f.button :submit, t(".update"), class: 'btn btn-primary' %> + <% end %> <% end %> <h3 class="mt-5 mb-4"><%= t(".cancel_my_account") %></h3> <p><%= t(".unhappy") %> <%= link_to t(".cancel_my_account"), registration_path(resource_name), data: { confirm: t(".are_you_sure") }, method: :delete %></p> - -<%= link_to t("devise.shared.links.back"), :back %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 640627e49bab0ef2ba9e8a627aee87f27ac940bf..691715882917faff3e85378614de7146a79cae07 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -32,7 +32,17 @@ <div class="form-actions"> <%= f.button :submit, t(".sign_in"), class: 'btn btn-primary' %> - <%= render "devise/shared/links" %> + + <div class="mt-3"> + + <% if devise_mapping.confirmable? %> + <%= link_to t('devise.shared.links.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br /> + <% end %> + + <% if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) %> + <%= link_to t('devise.shared.links.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br /> + <% end %> + </div> </div> <% end %> </div> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index c92bd18bcb3049b9ee91522430cf27afb2727e65..4b75161780177a14080d94b33302a212fbbe7a3f 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -2,18 +2,4 @@ <%- if controller_name != 'sessions' %> <%= link_to t(".sign_in"), new_session_path(resource_name) %><br /> <% end %> - - <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> - <%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br /> - <% end %> - - <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> - <%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br /> - <% end %> - - <%- if devise_mapping.omniauthable? %> - <%- resource_class.omniauth_providers.each do |provider| %> - <%= link_to t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider), method: :post %><br /> - <% end %> - <% end %> </div> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8a22bcef3fa6762d7177ced7b9ecab32f3cb936a..6687df3c22e62930901a0ca66a4e0df2f1e16b18 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -37,6 +37,7 @@ en: failure: invalid: "Invalid email or password." not_found_in_database: "Invalid email or password." + unauthenticated: '' mailer: two_factor_authentication_code: subject: "Two-factor authentication code" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 8dbc00d51a45ba2f5da2ed0c3da2bfa51040e32e..6d9606c5dc7fa76fe5d8e71d0854e346a310cd26 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -37,6 +37,7 @@ fr: failure: invalid: "Email ou mot de passe incorrect." not_found_in_database: "Email ou mot de passe incorrect." + unauthenticated: '' mailer: two_factor_authentication_code: subject: "Code d'authentification à deux facteurs"