Commit 68ac430a authored by Martin Wortschack's avatar Martin Wortschack

Rename helper method

parent cecb0fdd
...@@ -13,8 +13,8 @@ module ApplicationHelper ...@@ -13,8 +13,8 @@ module ApplicationHelper
lookup_context.exists?(partial, [], true) lookup_context.exists?(partial, [], true)
end end
def view_exists?(partial) def template_exists?(template)
lookup_context.exists?(partial, [], false) lookup_context.exists?(template, [], false)
end end
# Check if a particular controller is the current one # Check if a particular controller is the current one
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
= link_to repository_admin_application_settings_path, title: _('Repository') do = link_to repository_admin_application_settings_path, title: _('Repository') do
%span %span
= _('Repository') = _('Repository')
- if view_exists?('admin/application_settings/templates') - if template_exists?('admin/application_settings/templates')
= nav_link(path: 'application_settings#templates') do = nav_link(path: 'application_settings#templates') do
= link_to templates_admin_application_settings_path, title: _('Templates') do = link_to templates_admin_application_settings_path, title: _('Templates') do
%span %span
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
= link_to network_admin_application_settings_path, title: _('Network') do = link_to network_admin_application_settings_path, title: _('Network') do
%span %span
= _('Network') = _('Network')
- if view_exists?('admin/application_settings/geo') - if template_exists?('admin/application_settings/geo')
= nav_link(path: 'application_settings#geo') do = nav_link(path: 'application_settings#geo') do
= link_to geo_admin_application_settings_path, title: _('Geo') do = link_to geo_admin_application_settings_path, title: _('Geo') do
%span %span
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment