Commit db503e7d authored by Eulyeon Ko's avatar Eulyeon Ko

Use appropriate link helpers

Use page_path helpers and remove usage of expose_url.
parent 6c3cd5fa
...@@ -20,15 +20,15 @@ module Projects::Issues::ServiceDeskHelper ...@@ -20,15 +20,15 @@ module Projects::Issues::ServiceDeskHelper
def supported_meta(project) def supported_meta(project)
{ {
service_desk_address: project.service_desk_address, service_desk_address: project.service_desk_address,
service_desk_help_page: expose_url('help/user/project/service_desk'), service_desk_help_page: help_page_path('user/project/service_desk'),
edit_project_page: expose_url(edit_project_path(project)), edit_project_page: edit_project_path(project),
svg_path: image_path('illustrations/service_desk_empty.svg') svg_path: image_path('illustrations/service_desk_empty.svg')
} }
end end
def unsupported_meta(project) def unsupported_meta(project)
{ {
incoming_email_help_page: "#{expose_url('/help/administration/incoming_email')}\#set-it-up", incoming_email_help_page: help_page_path('administration/incoming_email', anchor: 'set-it-up'),
svg_path: image_path('illustrations/service-desk-setup.svg') svg_path: image_path('illustrations/service-desk-setup.svg')
} }
end end
......
...@@ -24,8 +24,8 @@ RSpec.describe Projects::Issues::ServiceDeskHelper do ...@@ -24,8 +24,8 @@ RSpec.describe Projects::Issues::ServiceDeskHelper do
is_service_desk_enabled: true, is_service_desk_enabled: true,
can_edit_project_settings: true, can_edit_project_settings: true,
service_desk_address: project.service_desk_address, service_desk_address: project.service_desk_address,
service_desk_help_page: expose_url('help/user/project/service_desk'), service_desk_help_page: help_page_path('user/project/service_desk'),
edit_project_page: expose_url(edit_project_path(project)), edit_project_page: edit_project_path(project),
svg_path: ActionController::Base.helpers.image_path('illustrations/service_desk_empty.svg') svg_path: ActionController::Base.helpers.image_path('illustrations/service_desk_empty.svg')
}) })
} }
...@@ -44,7 +44,7 @@ RSpec.describe Projects::Issues::ServiceDeskHelper do ...@@ -44,7 +44,7 @@ RSpec.describe Projects::Issues::ServiceDeskHelper do
is_service_desk_supported: false, is_service_desk_supported: false,
is_service_desk_enabled: false, is_service_desk_enabled: false,
can_edit_project_settings: false, can_edit_project_settings: false,
incoming_email_help_page: "#{expose_url('/help/administration/incoming_email')}\#set-it-up", incoming_email_help_page: help_page_path('administration/incoming_email', anchor: 'set-it-up'),
svg_path: ActionController::Base.helpers.image_path('illustrations/service-desk-setup.svg') svg_path: ActionController::Base.helpers.image_path('illustrations/service-desk-setup.svg')
}) })
} }
......
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