From 68ac430af9989fe4f93075e5bc426f8e2c55cf3d Mon Sep 17 00:00:00 2001 From: Martin Wortschack Date: Tue, 18 Sep 2018 10:43:19 +0200 Subject: Rename helper method --- app/helpers/application_helper.rb | 4 ++-- app/views/layouts/nav/sidebar/_admin.html.haml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7846de9f481..604ddd55ff5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -13,8 +13,8 @@ module ApplicationHelper lookup_context.exists?(partial, [], true) end - def view_exists?(partial) - lookup_context.exists?(partial, [], false) + def template_exists?(template) + lookup_context.exists?(template, [], false) end # Check if a particular controller is the current one diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index e4945f46d42..a2636f8179a 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -218,7 +218,7 @@ = link_to repository_admin_application_settings_path, title: _('Repository') do %span = _('Repository') - - if view_exists?('admin/application_settings/templates') + - if template_exists?('admin/application_settings/templates') = nav_link(path: 'application_settings#templates') do = link_to templates_admin_application_settings_path, title: _('Templates') do %span @@ -239,7 +239,7 @@ = link_to network_admin_application_settings_path, title: _('Network') do %span = _('Network') - - if view_exists?('admin/application_settings/geo') + - if template_exists?('admin/application_settings/geo') = nav_link(path: 'application_settings#geo') do = link_to geo_admin_application_settings_path, title: _('Geo') do %span -- cgit v1.2.1