Fix page title for students

This commit is contained in:
Sebastian Serth
2020-05-05 22:42:28 +02:00
parent 854d1dd032
commit 256d1033b2
2 changed files with 12 additions and 12 deletions

View File

@ -18,15 +18,14 @@
- title = "#{active_action} - #{application_name}"
- content_for :breadcrumbs do
- if current_user.try(:admin?) or current_user.try(:teacher?) && !@embed_options[:hide_navbar]
.container
ul.breadcrumb
- if root_element.present?
li.breadcrumb-item = root_element
- if current_element.present?
li.breadcrumb-item = current_element
- title = "#{object} - #{title}"
- else
- title = "#{model.model_name.human(count: 2)} - #{title}"
li.breadcrumb-item.active = active_action
.container
ul.breadcrumb
- if root_element.present?
li.breadcrumb-item = root_element
- if current_element.present?
li.breadcrumb-item = current_element
- title = "#{object} - #{title}"
- else
- title = "#{model.model_name.human(count: 2)} - #{title}"
li.breadcrumb-item.active = active_action
- content_for :title, title

View File

@ -51,7 +51,8 @@ html lang='en'
= render('session')
div data-controller=controller_name
= render('flash')
= yield(:breadcrumbs)
- if current_user.try(:admin?) or current_user.try(:teacher?) && !@embed_options[:hide_navbar]
= yield(:breadcrumbs)
- if (controller_name == "exercises" && action_name == "implement")
.container-fluid
= yield