Cache rendered templates
This commit is contained in:
@ -9,9 +9,14 @@
|
||||
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
|
||||
li = link_to(t('breadcrumbs.statistics.show'), statistics_path)
|
||||
li.divider
|
||||
= render('navigation_submenu', title: t('activerecord.models.exercise.other'), models: [Exercise, ExerciseCollection, ProxyExercise, Tag], link: exercises_path)
|
||||
= render('navigation_submenu', title: t('navigation.sections.users'), models: [InternalUser, ExternalUser])
|
||||
= render('navigation_collection_link', model: ExecutionEnvironment)
|
||||
= render('navigation_submenu', title: t('navigation.sections.errors'), models: [ErrorTemplate, ErrorTemplateAttribute])
|
||||
= render('navigation_submenu', title: t('navigation.sections.files'), models: [FileType, FileTemplate])
|
||||
= render('navigation_submenu', title: t('navigation.sections.integrations'), models: [Consumer, CodeHarborLink])
|
||||
= render('navigation_submenu', title: t('activerecord.models.exercise.other'),
|
||||
models: [Exercise, ExerciseCollection, ProxyExercise, Tag], link: exercises_path, cached: true)
|
||||
= render('navigation_submenu', title: t('navigation.sections.users'), models: [InternalUser, ExternalUser],
|
||||
cached: true)
|
||||
= render('navigation_collection_link', model: ExecutionEnvironment, cached: true)
|
||||
= render('navigation_submenu', title: t('navigation.sections.errors'),
|
||||
models: [ErrorTemplate, ErrorTemplateAttribute], cached: true)
|
||||
= render('navigation_submenu', title: t('navigation.sections.files'), models: [FileType, FileTemplate],
|
||||
cached: true)
|
||||
= render('navigation_submenu', title: t('navigation.sections.integrations'), models: [Consumer, CodeHarborLink],
|
||||
cached: true)
|
||||
|
@ -3,4 +3,4 @@ li.dropdown.dropdown-submenu
|
||||
a href=link class="dropdown-toggle" data-toggle="dropdown" = title
|
||||
ul class="dropdown-menu"
|
||||
- models.each do |model|
|
||||
= render('navigation_collection_link', model: model)
|
||||
= render('navigation_collection_link', model: model, cached: true)
|
||||
|
@ -26,9 +26,9 @@ html lang='en'
|
||||
i.fa.fa-code
|
||||
= application_name
|
||||
#navbar-collapse.collapse.navbar-collapse
|
||||
= render('navigation')
|
||||
= render('navigation', cached: true)
|
||||
ul.nav.navbar-nav.navbar-right
|
||||
= render('locale_selector')
|
||||
= render('locale_selector', cached: true)
|
||||
li = link_to(t('shared.help.link'), '#modal-help', data: {toggle: 'modal'})
|
||||
= render('session')
|
||||
.container data-controller=controller_name
|
||||
|
Reference in New Issue
Block a user