Merge branch 'master' into add_roles_via_LTI
# Conflicts: # app/views/application/_breadcrumbs.html.slim # app/views/application/welcome.html.slim # app/views/exercise_collections/show.html.slim # app/views/external_users/index.html.slim # app/views/layouts/application.html.slim # app/views/proxy_exercises/index.html.slim # app/views/user_exercise_feedbacks/index.html.slim # app/views/user_mailer/send_thank_you_note.slim
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
- if current_user.try(:admin?) or current_user.try(:teacher?)
|
||||
ul.breadcrumb
|
||||
- if model = Kernel.const_get(controller_path.classify) rescue nil
|
||||
- object = model.find_by(id: params[:id])
|
||||
- if model.try(:nested_resource?)
|
||||
li.breadcrumb-item = model.model_name.human(count: 2)
|
||||
- if object
|
||||
li.breadcrumb-item = object
|
||||
- else
|
||||
li.breadcrumb-item = link_to_if(policy(model).show?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||
- if object
|
||||
li.breadcrumb-item = link_to_if(policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
|
||||
li.breadcrumb-item.active
|
||||
- if I18n.translation_present?("shared.#{params[:action]}")
|
||||
= t("shared.#{params[:action]}")
|
||||
.container
|
||||
ul.breadcrumb
|
||||
- if model = Kernel.const_get(controller_path.classify) rescue nil
|
||||
- object = model.find_by(id: params[:id])
|
||||
- if model.try(:nested_resource?)
|
||||
li.breadcrumb-item = model.model_name.human(count: 2)
|
||||
- if object
|
||||
li.breadcrumb-item = object
|
||||
- else
|
||||
= t("#{controller_name}.index.#{params[:action]}")
|
||||
- else
|
||||
li.breadcrumb-item.active = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
||||
li.breadcrumb-item = link_to_if(policy(model).show?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||
- if object
|
||||
li.breadcrumb-item = link_to_if(policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
|
||||
li.breadcrumb-item.active
|
||||
- if I18n.translation_present?("shared.#{params[:action]}")
|
||||
= t("shared.#{params[:action]}")
|
||||
- else
|
||||
= t("#{controller_name}.index.#{params[:action]}")
|
||||
- else
|
||||
li.breadcrumb-item.active = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#flash-container
|
||||
#flash-container.container
|
||||
#flash.container.fixed_error_messages data-message-failure=t('shared.message_failure')
|
||||
- %w[alert danger info notice success warning].each do |severity|
|
||||
div.alert.flash class="alert-#{{'alert' => 'warning', 'notice' => 'success'}.fetch(severity, severity)} alert-dismissible fade show"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
h1 = t('.title', application_name: application_name)
|
||||
|
||||
- if current_user.try(:admin?) or current_user.try(:teacher?)
|
||||
p = t('.text_signed_in_as_internal_user', user_name: current_user.name)
|
||||
p = t('.text_signed_in_as_internal_user', user_name: current_user.displayname)
|
||||
- elsif current_user.try(:external_user?)
|
||||
p = t('.text_signed_in_as_external_user', application_name: application_name)
|
||||
- else
|
||||
|
Reference in New Issue
Block a user