Update Bootstrap to v4.1, fix chosen.js and pagedown on multiple sites
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
- if model = Kernel.const_get(controller_path.classify) rescue nil
|
||||
- object = model.find_by(id: params[:id])
|
||||
- if model.try(:nested_resource?)
|
||||
li = model.model_name.human(count: 2)
|
||||
li.breadcrumb-item = model.model_name.human(count: 2)
|
||||
- if object
|
||||
li = object
|
||||
li.breadcrumb-item = object
|
||||
- else
|
||||
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||
li.breadcrumb-item = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||
- if object
|
||||
li = link_to(object, send(:"#{model.model_name.singular}_path", object))
|
||||
li.active
|
||||
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.active = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
||||
li.breadcrumb-item.active = t("breadcrumbs.#{controller_name}.#{params[:action]}")
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#flash-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)}"
|
||||
p id="flash-#{severity}" = flash[severity]
|
||||
span.fa.fa-times
|
||||
div.alert.flash class="alert-#{{'alert' => 'warning', 'notice' => 'success'}.fetch(severity, severity)} alert-dismissible fade show"
|
||||
p.mb-0 id="flash-#{severity}" = flash[severity]
|
||||
button type="button" class="close" data-dismiss="alert" aria-label="Close"
|
||||
span.text-white aria-hidden="true" ×
|
||||
|
@@ -1,7 +1,7 @@
|
||||
li.dropdown
|
||||
a.dropdown-toggle data-toggle='dropdown' href='#'
|
||||
li.nav-item.dropdown
|
||||
a.nav-link.dropdown-toggle.mx-3 data-toggle='dropdown' href='#'
|
||||
= t("locales.#{I18n.locale}")
|
||||
span.caret
|
||||
ul.dropdown-menu role='menu'
|
||||
ul.dropdown-menu.p-0.mt-1 role='menu'
|
||||
- I18n.available_locales.sort_by { |locale| t("locales.#{locale}") }.each do |locale|
|
||||
li = link_to(t("locales.#{locale}"), url_for(params.permit!.merge(locale: locale)))
|
||||
li = link_to(t("locales.#{locale}"), url_for(params.permit!.merge(locale: locale)), class: 'dropdown-item')
|
||||
|
@@ -1,14 +1,14 @@
|
||||
- if current_user.try(:internal_user?)
|
||||
ul.nav.navbar-nav
|
||||
li.dropdown
|
||||
a.dropdown-toggle data-toggle='dropdown' href='#'
|
||||
li.nav-item.dropdown
|
||||
a.nav-link.dropdown-toggle.mx-3 data-toggle='dropdown' href='#'
|
||||
= t('shared.administration')
|
||||
span.caret
|
||||
ul.dropdown-menu role='menu'
|
||||
ul.dropdown-menu.p-0.mt-1 role='menu'
|
||||
- if current_user.admin?
|
||||
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, 'data-turbolinks' => "false")
|
||||
li = link_to(t('breadcrumbs.statistics.show'), statistics_path)
|
||||
li.divider
|
||||
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path, class: 'dropdown-item', 'data-turbolinks' => "false")
|
||||
li = link_to(t('breadcrumbs.statistics.show'), statistics_path, class: 'dropdown-item')
|
||||
li.dropdown-divider role='separator'
|
||||
= render('navigation_submenu', title: t('activerecord.models.exercise.other'),
|
||||
models: [Exercise, ExerciseCollection, ProxyExercise, Tag, Submission], link: exercises_path, cached: true)
|
||||
= render('navigation_submenu', title: t('navigation.sections.users'), models: [InternalUser, ExternalUser],
|
||||
|
@@ -1,2 +1,2 @@
|
||||
- if policy(model).index?
|
||||
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"), class: 'dropdown-item')
|
||||
|
@@ -1,6 +1,6 @@
|
||||
li.dropdown.dropdown-submenu
|
||||
li.dropdown-submenu
|
||||
- link = link.nil? ? "#" : link
|
||||
a href=link class="dropdown-toggle" data-toggle="dropdown" = title
|
||||
ul class="dropdown-menu"
|
||||
a.dropdown-item.dropdown-toggle href=link data-toggle="dropdown" = title
|
||||
ul.dropdown-menu.p-0
|
||||
- models.each do |model|
|
||||
= render('navigation_collection_link', model: model, cached: true)
|
||||
|
@@ -1,19 +1,19 @@
|
||||
- if current_user
|
||||
li.dropdown
|
||||
a.dropdown-toggle data-toggle='dropdown' href='#'
|
||||
li.nav-item.dropdown
|
||||
a.nav-link.dropdown-toggle data-toggle='dropdown' href='#'
|
||||
i.fa.fa-user
|
||||
= current_user
|
||||
span.caret
|
||||
ul.dropdown-menu role='menu'
|
||||
ul.dropdown-menu.p-0.mt-1 role='menu'
|
||||
- if current_user.internal_user?
|
||||
li = link_to(t('consumers.show.link'), current_user.consumer) if current_user.consumer
|
||||
li = link_to(t('internal_users.show.link'), current_user)
|
||||
li = link_to(t('request_for_comments.index.all'), request_for_comments_path)
|
||||
li = link_to(t('request_for_comments.index.get_my_rfc_activity'), my_rfc_activity_path)
|
||||
li = link_to(t('request_for_comments.index.get_my_comment_requests'), my_request_for_comments_path)
|
||||
li = link_to(t('consumers.show.link'), current_user.consumer, class: 'dropdown-item') if current_user.consumer
|
||||
li = link_to(t('internal_users.show.link'), current_user, class: 'dropdown-item')
|
||||
li = link_to(t('request_for_comments.index.all'), request_for_comments_path, class: 'dropdown-item')
|
||||
li = link_to(t('request_for_comments.index.get_my_rfc_activity'), my_rfc_activity_path, class: 'dropdown-item')
|
||||
li = link_to(t('request_for_comments.index.get_my_comment_requests'), my_request_for_comments_path, class: 'dropdown-item')
|
||||
- if current_user.internal_user?
|
||||
li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete)
|
||||
li = link_to(t('sessions.destroy.link'), sign_out_path, method: :delete, class: 'dropdown-item')
|
||||
- else
|
||||
li = link_to(sign_in_path) do
|
||||
li.nav-item = link_to(sign_in_path, class: 'nav-link') do
|
||||
i.fa.fa-sign-in
|
||||
= t('sessions.new.link')
|
||||
|
Reference in New Issue
Block a user