Merge pull request #244 from openHPI/specify_embed_options

Implement support for some basic embed options for work sheets via LTI
This commit is contained in:
rteusner
2018-12-13 16:21:55 +01:00
committed by GitHub
29 changed files with 197 additions and 101 deletions

View File

@@ -1,19 +1,20 @@
- if current_user.try(:internal_user?)
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(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
- if object
li.breadcrumb-item = link_to(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(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
- if object
li.breadcrumb-item = link_to(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]}")

View File

@@ -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"