aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-02-01 20:35:30 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-02-02 16:15:33 +0100
commit8f7a9ad479a219fc22ac729a23f220e450c572b7 (patch)
treefc702b589ac386098987cf09ef4da01f53375fd8 /server/sonar-web/src
parentec20fce8d932bd19c3f3ed2ed007fe5367f6c2f4 (diff)
downloadsonarqube-8f7a9ad479a219fc22ac729a23f220e450c572b7.tar.gz
sonarqube-8f7a9ad479a219fc22ac729a23f220e450c572b7.zip
SONAR-7122 Drop the ability to customize the web app context
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb28
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_change_password_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/account/notifications.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb10
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb10
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/index.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_copy_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_edit_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_save_as_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/manage.html.erb16
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb8
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb8
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_copy_form.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_edit_form.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_favourites.html.erb6
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_save_as_form.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/manage.html.erb12
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/overview/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_delete_form.html.erb4
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb23
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/users/_edit_form.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/widget/index.html.erb6
73 files changed, 146 insertions, 129 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb
index 508c5ac7ae1..99d3093545d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/account_controller.rb
@@ -80,7 +80,7 @@ class AccountController < ApplicationController
end
end
- redirect_to "#{ApplicationController.root_context}/account/notifications"
+ redirect_to "/account/notifications"
end
private
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
index d1c1682b30e..55959e331d1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/application_controller.rb
@@ -43,7 +43,7 @@ class ApplicationController < ActionController::Base
rescue_from Errors::AccessDenied, :with => :render_access_denied # See lib/authenticated_system.rb#access_denied()
def self.root_context
- ActionController::Base.relative_url_root || ''
+ ''
end
def java_facade
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index 982956acd76..262665471b9 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -167,9 +167,9 @@ module ApplicationHelper
# url_for_static(:plugin => 'myplugin', :path => 'image.png')
def url_for_static(options={})
if options[:plugin]
- "#{ApplicationController.root_context}/static/#{options[:plugin]}/#{options[:path]}"
+ "/static/#{options[:plugin]}/#{options[:path]}"
else
- "#{ApplicationController.root_context}/#{options[:path]}"
+ "/#{options[:path]}"
end
end
@@ -329,10 +329,10 @@ module ApplicationHelper
period_index=nil if period_index && period_index<=0
if resource.display_dashboard?
if options[:dashboard]
- root = "#{ApplicationController.root_context}/dashboard/index?"
+ root = "/dashboard/index?"
else
# stay on the same page (for example components)
- root = "#{ApplicationController.root_context}/#{u params[:controller]}/#{u params[:action]}?"
+ root = "/#{u params[:controller]}/#{u params[:action]}?"
end
path = ''
query = request.query_parameters
@@ -345,7 +345,7 @@ module ApplicationHelper
end
"<a class='#{options[:class]}' title='#{options[:title]}' href='#{root + path}'>#{name || resource.name}</a>"
else
- url = "#{ApplicationController.root_context}/dashboard/index?id=#{u resource.key}"
+ url = "/dashboard/index?id=#{u resource.key}"
url += "&period=#{u period_index}" if period_index
url += "&metric=#{u options[:metric]}" if options[:metric]
"<a class='#{options[:class]}' title='#{options[:title]}' " +
@@ -413,7 +413,7 @@ module ApplicationHelper
end
def chart(parameters, options={})
- image_tag("#{ApplicationController.root_context}/chart?#{parameters}", options)
+ image_tag("/chart?#{parameters}", options)
end
def link_to_favourite(resource, deprecated_options=nil)
@@ -645,7 +645,7 @@ module ApplicationHelper
# see limitation in /api/resources/search
options[:min_length]=2
- ws_url="#{ApplicationController::root_context}/api/resources/search?f=s2&"
+ ws_url="/api/resources/search?f=s2&"
if options[:qualifiers]
ws_url+="q=#{options[:qualifiers].join(',')}"
elsif options[:resource_type_property]
@@ -679,7 +679,7 @@ module ApplicationHelper
# see limitation in /api/resources/search
options[:min_length]=2
- ws_url="#{ApplicationController::root_context}/api/resources/search?f=s2&"
+ ws_url="/api/resources/search?f=s2&"
if options[:qualifiers]
ws_url+="q=#{options[:qualifiers].join(',')}"
elsif options[:resource_type_property]
@@ -711,7 +711,7 @@ module ApplicationHelper
# * <tt>:select2_options</tt> - hash of select2 options
#
def user_select_tag(name, options={})
- ws_url="#{ApplicationController::root_context}/api/users/search"
+ ws_url="/api/users/search"
options[:min_length]=2
options[:select2_ajax_options]={
'data' => 'function (term, page) { return { q: term, p: page } }',
@@ -851,7 +851,7 @@ module ApplicationHelper
message_params = options[:confirm_msg_params]
width = options[:confirm_width]||500
- url = "#{ApplicationController.root_context}/confirm?url=#{u post_url}"
+ url = "/confirm?url=#{u post_url}"
url += "&tk=#{u title_key}" if title_key
if message_key
url += "&mk=#{u message_key}&"
@@ -877,7 +877,7 @@ module ApplicationHelper
html += " colspan='#{options[:colspan]}'" if options[:colspan]
html += '>'
if options[:include_loading_icon] && options[:id]
- html += "<img src='#{ApplicationController.root_context}/images/loading-small.gif' style='display: none' id='#{options[:id]}_loading'>"
+ html += "<img src='/images/loading-small.gif' style='display: none' id='#{options[:id]}_loading'>"
end
html += '<div'
html += " id='#{options[:id]}_pages'" if options[:id]
@@ -944,7 +944,7 @@ module ApplicationHelper
html += " colspan='#{options[:colspan]}'" if options[:colspan]
html += '>'
if options[:include_loading_icon] && options[:id]
- html += "<img src='#{ApplicationController.root_context}/images/loading-small.gif' style='display: none' id='#{options[:id]}_loading'>"
+ html += "<img src='/images/loading-small.gif' style='display: none' id='#{options[:id]}_loading'>"
end
html += '<div'
html += " id='#{options[:id]}_pages'" if options[:id]
@@ -992,7 +992,7 @@ module ApplicationHelper
end
def url_for_issues(params)
- url = ApplicationController.root_context + '/issues/search#'
+ url = '/issues/search#'
params.each_with_index do |(key, value), index|
if key == 'filter'
key = 'id'
@@ -1009,7 +1009,7 @@ module ApplicationHelper
if component.blank?
url_for_issues(params)
else
- url = ApplicationController.root_context + '/component_issues/index?id=' + url_encode(component.key) + '#'
+ url = '/component_issues/index?id=' + url_encode(component.key) + '#'
params.each_with_index do |(key, value), index|
if key != 'componentUuids'
url += key.to_s + '=' + value.to_s
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_change_password_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_change_password_form.html.erb
index c62a514c98e..63b2f0b9cfd 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_change_password_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_change_password_form.html.erb
@@ -1,4 +1,4 @@
-<form id="pass_form_tag" name="pass_form_tag" method="post" action="<%= ApplicationController.root_context -%>/account/change_password">
+<form id="pass_form_tag" name="pass_form_tag" method="post" action="/account/change_password">
<div class="modal-head">
<h2><%= message('my_profile.password.title') -%></h2>
</div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb
index e0f6c2f658f..434c160613a 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/_favorites.html.erb
@@ -7,7 +7,7 @@
<td class="thin"><%= link_to_favourite f -%></td>
<td>
<%
- url = ApplicationController.root_context + '/dashboard?id=' + url_encode(f.key)
+ url = '/dashboard?id=' + url_encode(f.key)
%>
<a href="<%= url -%>" class="link-with-icon">
<%= qualifier_icon f %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb
index 5cb4f630c87..edab056abc5 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/index.html.erb
@@ -93,5 +93,5 @@
]
};
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/account.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/account.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/notifications.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/notifications.html.erb
index 29ac2b1ce1d..728550b5a3e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/notifications.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/account/notifications.html.erb
@@ -48,7 +48,7 @@
</section>
<% end %>
- <form id="notif_form" method="post" action="<%= ApplicationController.root_context -%>/account/update_notifications">
+ <form id="notif_form" method="post" action="/account/update_notifications">
<% unless @global_dispatchers.empty? -%>
<section class="big-spacer-bottom">
<%= render "account/global_notifications" -%>
@@ -71,5 +71,5 @@
</div>
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/account.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/account.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb
index e7be4603928..6c384f37d06 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb
@@ -4,7 +4,7 @@
<% if is_admin?(@resource.id) %>
<div class="page-actions">
<a id="create-link-action_plans"
- href="<%=ApplicationController.root_context-%>/action_plans/create_form/<%= h(@resource.id) -%>"
+ href="/action_plans/create_form/<%= h(@resource.id) -%>"
class="open-modal button"><%= message('action_plans.add_new_action_plan') -%></a>
</div>
<% end %>
@@ -35,7 +35,7 @@
%>
<tr class="<%= cycle('even', 'odd', :name => 'open_plans') -%>">
<td class="thin nowrap text-center">
- <img src="<%= ApplicationController.root_context -%>/images/status/<%= plan.status() -%>.png" title="<%= message("action_plans.status.#{plan.status}") -%>"/></td>
+ <img src="/images/status/<%= plan.status() -%>.png" title="<%= message("action_plans.status.#{plan.status}") -%>"/></td>
<td class="thin nowrap"><%= h(plan.name()) -%></td>
<td class="thin nowrap <%= 'over-due' if plan.overDue() -%>" align="right"><%= format_date(plan.deadLine()) -%></td>
<% if plan.totalIssues()==0 %>
@@ -61,7 +61,7 @@
<%= link_to message('close'),
{:action => 'change_status', :id => @resource.id, :plan_key => plan.key()}, {:method => 'POST', :class => 'link-action'}.merge(close_confirmation_message) -%>
&nbsp;
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/action_plans/delete/#{h(@resource.id)}?plan_key=#{h(plan.key)}",
+ <%= link_to_action message('delete'), "/action_plans/delete/#{h(@resource.id)}?plan_key=#{h(plan.key)}",
:class => 'link-action link-red',
:id => "delete_#{h(plan.key)}",
:confirm_button => message('delete'),
@@ -98,7 +98,7 @@
@closed_action_plans.each do |plan|
%>
<tr class="<%= cycle('even', 'odd', :name => 'closed_plans') -%>">
- <td class="thin nowrap text-center"><img src="<%= ApplicationController.root_context -%>/images/status/<%= plan.status() -%>.png" title="<%= message("action_plans.status.#{plan.status}") -%>"/>
+ <td class="thin nowrap text-center"><img src="/images/status/<%= plan.status() -%>.png" title="<%= message("action_plans.status.#{plan.status}") -%>"/>
</td>
<td class="thin nowrap"><%= h(plan.name) -%></td>
<td class="thin nowrap <%= 'over-due' if plan.overDue() -%>" align="right"><%= format_date(plan.deadLine()) -%></td>
@@ -118,7 +118,7 @@
<%= link_to message('action_plans.reopen'),
{:action => 'change_status', :id => @resource.id, :plan_key => plan.key}, {:method => 'POST', :class => 'link-action'} -%>
&nbsp;
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/action_plans/delete/#{h(@resource.id)}?plan_key=#{h(plan.key)}",
+ <%= link_to_action message('delete'), "/action_plans/delete/#{h(@resource.id)}?plan_key=#{h(plan.key)}",
:class => 'link-action link-red',
:id => "delete_#{h(plan.key)}",
:confirm_button => message('delete'),
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb
index 62aedd51b29..4d8d2500e2d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/api_documentation/index.html.erb
@@ -2,5 +2,5 @@
<script>
window.sonarqube.urlRoot = window.baseUrl + '/api_documentation';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/api-documentation.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/api-documentation.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb
index 18cce998a6f..8b7563b9081 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/background_tasks/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/background-tasks.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/background-tasks.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb
index f5600f6ca03..a805ff002fd 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/code/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/code.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/code.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb
index 7d421c9d66d..21b70621c4e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/coding_rules/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/coding-rules.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/coding-rules.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb
index c0058d15a58..b94f313faca 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb
@@ -69,7 +69,7 @@
<header class="page-header">
<h1 class="page-title"><%= h message('comparison.page') -%></h1>
</header>
- <form method="GET" id="compare-form" action="<%= ApplicationController.root_context -%>/comparison/index">
+ <form method="GET" id="compare-form" action="/comparison/index">
<input type="hidden" name="sids" id="sids" value="<%= @snapshots.map { |s| s.id.to_s }.join(',') -%>">
<input type="hidden" name="metrics" id="metrics" value="<%= @metrics.map { |m| m.key }.join(',') -%>">
@@ -112,7 +112,7 @@
$j('#version_loading').show();
$j.ajax({
type:'GET',
- url:'<%= ApplicationController.root_context -%>/comparison/versions?resource='
+ url:'/comparison/versions?resource='
+ id + '&sids='
+ $j('#sids').val(),
success:function (data) {
@@ -169,7 +169,7 @@
<% if index > 0 %>
<a class="icon-move-left" href="#" onclick="moveLeft(<%= index -%>)" id="left-<%= index -%>"></a>
<% else %>
- <img src="<%= ApplicationController.root_context -%>/images/transparent_16.gif"/>
+ <img src="/images/transparent_16.gif"/>
<% end %>
</td>
<td style="text-align: center; min-width: 100px">
@@ -181,7 +181,7 @@
<% if index < last_index %>
<a class="icon-move-right" href="#" onclick="moveRight(<%= index -%>)" id="right-<%= index -%>"></a>
<% else %>
- <img src="<%= ApplicationController.root_context -%>/images/transparent_16.gif"/>
+ <img src="/images/transparent_16.gif"/>
<% end %>
</td>
</tr>
@@ -199,7 +199,7 @@
%>
<th style="text-align: center; vertical-align: top; line-height: 1.5;">
<span class="no-transform">
- <a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= s.resource.key -%>"><%= h s.resource.name(true) -%></a>
+ <a href="/dashboard/index/<%= s.resource.key -%>"><%= h s.resource.name(true) -%></a>
<br/>
<span class="note"><b><%= event ? event.name : message('comparison.version.latest') -%></b></span>
<br/>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb
index 27fe285b3d7..39ca697ed6e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component/index.html.erb
@@ -9,7 +9,7 @@
};
})();
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/source-viewer.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/source-viewer.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb
index b2b853e610b..53629f56020 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/component_issues/index.html.erb
@@ -9,5 +9,5 @@
};
})();
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/component-issues.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/component-issues.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb
index 64f47c4f522..bfecce9911e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/confirm/_confirm.html.erb
@@ -11,7 +11,7 @@
</div>
<div class="modal-body">
<div class="info">
- <img src="<%= ApplicationController.root_context -%>/images/information.png" style="vertical-align: text-bottom"/>
+ <img src="/images/information.png" style="vertical-align: text-bottom"/>
<%= h message(message_key, :params => message_params) -%>
</div>
</div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb
index 8a7e139e257..cff02fb111d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/custom_measures/index.html.erb
@@ -2,5 +2,5 @@
<script>
window.sonarqube.projectId = '<%= @resource.uuid -%>';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/custom-measures.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/custom-measures.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
index a7492f091c9..319694faee3 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
@@ -1,4 +1,4 @@
-<form id="configure-widget-<%= widget.id -%>" method="post" action="<%= ApplicationController.root_context -%>/dashboard/save_widget?wid=<%= widget.id -%>">
+<form id="configure-widget-<%= widget.id -%>" method="post" action="/dashboard/save_widget?wid=<%= widget.id -%>">
<div id="error<%= widget.id -%>" class="error" style="display: none"></div>
<table class="table width100">
<tbody>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb
index 48b2288e5fa..296fe1e3e00 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb
@@ -1,6 +1,6 @@
<% content_for :script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/dashboard.js?v=<%= sonar_version -%>"></script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/widgets.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/dashboard.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/widgets.js?v=<%= sonar_version -%>"></script>
<% end %>
<div class="page" id="dashboard">
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/index.html.erb
index 132fe9ded98..6603843b870 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/index.html.erb
@@ -1,6 +1,6 @@
<% content_for :script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/dashboard.js?v=<%= sonar_version -%>"></script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/widgets.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/dashboard.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/widgets.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb
index 72416ed82eb..05f0f5bfb27 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/no_dashboard.html.erb
@@ -14,7 +14,7 @@
};
})();
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/source-viewer.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/source-viewer.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb
index 669f955d295..298a8073f34 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_create_form.html.erb
@@ -1,4 +1,4 @@
-<form id="create-dashboard-form" method="post" action="<%= ApplicationController.root_context -%>/dashboards/create">
+<form id="create-dashboard-form" method="post" action="/dashboards/create">
<% if @global %>
<input type="hidden" name="global" value="true" />
<% else %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb
index 2f369216ac8..9b44f6643a1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_delete_form.html.erb
@@ -1,4 +1,4 @@
-<form id="delete-dashboard-form" method="post" action="<%= ApplicationController.root_context -%>/dashboards/delete">
+<form id="delete-dashboard-form" method="post" action="/dashboards/delete">
<input type="hidden" name="id" value="<%= @dashboard.id -%>">
<% if @dashboard.global %>
<input type="hidden" name="global" value="true" />
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb
index c96cb3feb0c..9309a22c5ff 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboards/_edit_form.html.erb
@@ -1,4 +1,4 @@
-<form id="edit-dashboard-form" method="post" action="<%= ApplicationController.root_context -%>/dashboards/update">
+<form id="edit-dashboard-form" method="post" action="/dashboards/update">
<input type="hidden" name="id" value="<%= @dashboard.id -%>">
<% if @dashboard.global %>
<input type="hidden" name="global" value="true" />
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
index 3e1a68f269f..56d086e1fa9 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
@@ -2,7 +2,7 @@
<% if params[:period] && @snapshot.project_snapshot.periods? %>
<div id="snapshot_title" class="spacer-bottom">
<h4>
- <form method="GET" action="<%= ApplicationController.root_context -%>/drilldown/measures" style="display: inline">
+ <form method="GET" action="/drilldown/measures" style="display: inline">
<input type="hidden" name="id" value="<%= h @snapshot.project.key -%>"/>
<input type="hidden" name="metric" value="<%= h params[:metric] -%>"/>
<% if params[:highlight] %>
@@ -141,5 +141,5 @@
<script>
window.sonarqube.el = '#source-viewer';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/drilldown.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/drilldown.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb
index 76265ab1097..0de15fd9ff5 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb
@@ -1,4 +1,4 @@
-<form method="post" action="<%= ApplicationController.root_context -%>/email_configuration/save" class="marginbottom10">
+<form method="post" action="/email_configuration/save" class="marginbottom10">
<table class="marginbottom10">
<tbody>
<tr class="property">
@@ -62,7 +62,7 @@
</table>
</form>
-<form method="post" action="<%= ApplicationController.root_context -%>/email_configuration/send_test_email">
+<form method="post" action="/email_configuration/send_test_email">
<table class="data marginbottom10">
<thead>
<tr>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb
index e2624527d17..572d1ea6ea5 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb
@@ -17,7 +17,7 @@
type="button"
value="Generate secret key"
onclick="$j.ajax({
- url:'<%=ApplicationController.root_context-%>/encryption_configuration/generate_secret',
+ url:'/encryption_configuration/generate_secret',
type:'post',
success:function(response){$j('#secret_content').html(response);},
error:function(response){$j('#secret_error').html(response.responseText); $j('#secret_error').show();}
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb
index 4b0cb7c2d47..a2126b5bfcb 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb
@@ -13,7 +13,7 @@
<form class="spacer-bottom"
onsubmit=
"$j.ajax({
- url:'<%=ApplicationController.root_context-%>/encryption_configuration/encrypt',
+ url:'/encryption_configuration/encrypt',
type:'post',
success:function(response)
{
@@ -31,7 +31,7 @@
});
return false;"
method="post"
- action="<%=ApplicationController.root_context-%>/encryption_configuration/encrypt" >
+ action="/encryption_configuration/encrypt" >
<input type="text" name="text" id="clear_text"/>
<input type="submit" value="Encrypt" id="submit_encrypt"/>
</form>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb
index e3bee63260c..747f7383293 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/groups/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/groups.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/groups.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb
index e047918ee81..1685b1e3f8a 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb
@@ -25,7 +25,7 @@
all_issues_are_assigned_to_current_user &&= issue.assignee() == current_user.login
end
%>
-<form id="bulk-change-form" method="post" action="<%= ApplicationController.root_context -%>/issues/bulk_change">
+<form id="bulk-change-form" method="post" action="/issues/bulk_change">
<input type="hidden" name="issues" value="<%= @issues.map { |issue| issue.key() }.join(',') -%>">
<input type="hidden" name="actions[]" id="bulk-change-transition-action">
<fieldset>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_copy_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_copy_form.html.erb
index ad34992b288..51551254393 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_copy_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_copy_form.html.erb
@@ -1,4 +1,4 @@
-<form id="copy-filter-form" method="post" action="<%= ApplicationController.root_context -%>/issues/copy">
+<form id="copy-filter-form" method="post" action="/issues/copy">
<input type="hidden" name="id" value="<%= @filter.id -%>">
<fieldset>
<div class="modal-head">
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_edit_form.html.erb
index 650e7e19993..c30a633e202 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_edit_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_edit_form.html.erb
@@ -1,4 +1,4 @@
-<form id="edit-filter-form" method="post" action="<%= ApplicationController.root_context -%>/issues/edit">
+<form id="edit-filter-form" method="post" action="/issues/edit">
<input type="hidden" name="id" value="<%= @filter.id -%>">
<fieldset>
<div class="modal-head">
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_save_as_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_save_as_form.html.erb
index a771f24bd01..339e6cde5b7 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_save_as_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_save_as_form.html.erb
@@ -1,4 +1,4 @@
-<form id="save-as-filter-form" method="post" action="<%= ApplicationController.root_context -%>/issues/save_as">
+<form id="save-as-filter-form" method="post" action="/issues/save_as">
<input type="hidden" name="data" value="<%= u(@filter_query_serialized) -%>">
<fieldset>
<div class="modal-head">
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/manage.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/manage.html.erb
index 737b7e00f53..d3019835eb5 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/manage.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/manage.html.erb
@@ -59,7 +59,7 @@
<%= issue_filter_star(filter, @favourite_filter_ids.include?(filter.id)) -%>
</td>
<td>
- <a href="<%= ApplicationController.root_context -%>/issues/search#id=<%= h filter.id -%>"><%= h filter.name -%></a>
+ <a href="/issues/search#id=<%= h filter.id -%>"><%= h filter.name -%></a>
<% if filter.description %>
<div class="note"><%= h filter.description -%></div>
<% end %>
@@ -72,13 +72,13 @@
<% end %>
</td>
<td class="thin nowrap text-right">
- <a id="copy-<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/copy_form/<%= filter.id -%>"
+ <a id="copy-<%= filter.name.parameterize -%>" href="/issues/copy_form/<%= filter.id -%>"
class="link-action open-modal"><%= message('copy') -%></a>
&nbsp;
- <a id="edit_<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/edit_form/<%= filter.id -%>"
+ <a id="edit_<%= filter.name.parameterize -%>" href="/issues/edit_form/<%= filter.id -%>"
class="link-action open-modal"><%= message('edit') -%></a>
&nbsp;
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/issues/delete/#{filter.id}",
+ <%= link_to_action message('delete'), "/issues/delete/#{filter.id}",
:class => 'link-action link-red',
:id => "delete_#{filter.name.parameterize}",
:confirm_button => message('delete'),
@@ -116,7 +116,7 @@
<%= issue_filter_star(filter, @favourite_filter_ids.include?(filter.id)) -%>
</td>
<td>
- <a href="<%= ApplicationController.root_context -%>/issues/search#id=<%= h filter.id -%>|<%= h filter.data -%>"><%= h filter.name -%></a>
+ <a href="/issues/search#id=<%= h filter.id -%>|<%= h filter.data -%>"><%= h filter.name -%></a>
<% if filter.description %>
<div class="note"><%= h filter.description -%></div>
<% end %>
@@ -125,12 +125,12 @@
<%= filter.userLogin ? h(Api.users.findByLogin(filter.userLogin).name) : '[SonarQube]' -%>
</td>
<td class="thin nowrap text-right">
- <a id="copy-<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
+ <a id="copy-<%= filter.name.parameterize -%>" href="/issues/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
<% if has_role?(:admin) %>
&nbsp;
- <a id="edit_shared_<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
+ <a id="edit_shared_<%= filter.name.parameterize -%>" href="/issues/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
&nbsp;
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/issues/delete/#{filter.id}",
+ <%= link_to_action message('delete'), "/issues/delete/#{filter.id}",
:class => 'link-action link-red',
:id => "delete_system_#{filter.name.parameterize}",
:confirm_button => message('delete'),
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
index b1baf27f96c..48b7b4b268d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/search.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/issues.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/issues.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb
index c5dbab53411..409489b0094 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_footer.html.erb
@@ -16,7 +16,7 @@
</script>
<% end %>
-<script src="<%= ApplicationController.root_context -%>/js/bundles/main.js?v=<%= sonar_version -%>"></script>
+<script src="/js/bundles/main.js?v=<%= sonar_version -%>"></script>
<%= yield :extra_script -%>
</body>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
index 66c5645c688..ec1b9db64c7 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_head.html.erb
@@ -18,7 +18,7 @@
%>
<title><%= title -%></title>
- <link href="<%= ApplicationController.root_context -%>/css/sonar.css?v=<%= sonar_version -%>" rel="stylesheet" media="all">
+ <link href="/css/sonar.css?v=<%= sonar_version -%>" rel="stylesheet" media="all">
<%= yield :style -%>
<script>
@@ -36,10 +36,10 @@
updateCenterActive: <%= configuration('sonar.updatecenter.activate', true) %>
};
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/vendor.js?v=<%= sonar_version -%>"></script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/sonar.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/vendor.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/sonar.js?v=<%= sonar_version -%>"></script>
<script>
- window.baseUrl = '<%= ApplicationController.root_context -%>';
+ window.baseUrl = '';
</script>
<%= yield :script -%>
</head>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
index b793d31198e..94e2eb4f7eb 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_layout.html.erb
@@ -56,7 +56,7 @@
<a href="http://www.sonarqube.org/documentation" target="sonar_doc">Documentation</a> -
<a href="http://www.sonarqube.org/support" target="support">Get Support</a> -
<a href="http://redirect.sonarsource.com/doc/plugin-library.html" target="plugins">Plugins</a> -
- <a href="<%= ApplicationController.root_context -%>/api_documentation">Web Service API</a>
+ <a href="/api_documentation">Web Service API</a>
</div>
<!--[if lte IE 8 ]><p class="spacer-top alert alert-danger">IE 8 is not supported. Some widgets may not be properly displayed. Please switch to a <a target="_blank" href="http://redirect.sonarsource.com/doc/requirements.html">supported version or another supported browser</a>.</p><!--<![endif]-->
</div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb
index 6ff414fd657..52ddb591760 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/nonav.html.erb
@@ -2,8 +2,8 @@
<nav class="navbar navbar-global page-container" id="global-navigation">
<div class="navbar-header">
- <a class="navbar-brand" href="<%= ApplicationController.root_context -%>/">
- <img src="<%= ApplicationController.root_context -%>/images/logo.svg" height="30"
+ <a class="navbar-brand" href="/">
+ <img src="/images/logo.svg" height="30"
alt="<%= h message('layout.sonar.slogan') -%>"
title="<%= h message('layout.sonar.slogan') -%>">
</a>
@@ -24,7 +24,7 @@
<a href="http://www.sonarqube.org/documentation" target="sonar_doc">Documentation</a> -
<a href="http://www.sonarqube.org/support" target="support">Get Support</a> -
<a href="http://redirect.sonarsource.com/doc/plugin-library.html" target="plugins">Plugins</a> -
- <a href="<%= ApplicationController.root_context -%>/api_documentation">Web Service API</a>
+ <a href="/api_documentation">Web Service API</a>
</div>
<%= render 'branding/footer' -%>
</div>
@@ -36,7 +36,7 @@
})(window.jQuery);
</script>
-<script src="<%= ApplicationController.root_context -%>/js/bundles/main.js?v=<%= sonar_version -%>"></script>
+<script src="/js/bundles/main.js?v=<%= sonar_version -%>"></script>
<%= yield :extra_script -%>
</body></html>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb
index 346aa13f860..106956d89d9 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/maintenance/index.html.erb
@@ -2,6 +2,6 @@
<script>
window.sonarqube.setup = false;
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/maintenance.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/maintenance.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb
index 6f667bc45cd..84057db8521 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/markdown/help.html.erb
@@ -4,5 +4,5 @@
<script>
window.sonarqube.el = '#markdown-full-help';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/markdown.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/markdown.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_copy_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_copy_form.html.erb
index 4aac628b14c..7fa6351ed3d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_copy_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_copy_form.html.erb
@@ -1,4 +1,4 @@
-<form id="copy-filter-form" method="post" action="<%= ApplicationController.root_context -%>/measures/copy">
+<form id="copy-filter-form" method="post" action="/measures/copy">
<input type="hidden" name="id" value="<%= @filter.id -%>">
<fieldset>
<div class="modal-head">
@@ -17,4 +17,4 @@
$j("#copy-filter-form").modalForm({success: function (data) {
window.location = baseUrl + '/measures/filter/' + data;
}});
-</script> \ No newline at end of file
+</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_edit_form.html.erb
index 9a26c12a220..dff381e9e19 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_edit_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_edit_form.html.erb
@@ -1,4 +1,4 @@
-<form id="edit-filter-form" method="post" action="<%= ApplicationController.root_context -%>/measures/edit">
+<form id="edit-filter-form" method="post" action="/measures/edit">
<input type="hidden" name="id" value="<%= @filter.id -%>">
<fieldset>
<div class="modal-head">
@@ -17,4 +17,4 @@
$j("#edit-filter-form").modalForm({success: function (data) {
window.location = baseUrl + '/measures/filter/' + data;
}});
-</script> \ No newline at end of file
+</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_favourites.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_favourites.html.erb
index 77124eb9e98..d12704e559d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_favourites.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_favourites.html.erb
@@ -3,10 +3,10 @@
<li class="sidebar-title"><%= message('measure_filter.favourite_filters') -%></li>
<% current_user.favourited_measure_filters.each do |filter| %>
<li <%= "class='active'" if @filter && filter.id==@filter.id -%>>
- <a href="<%= ApplicationController.root_context -%>/measures/filter/<%= filter.id -%>"><%= h filter.name -%></a>
+ <a href="/measures/filter/<%= filter.id -%>"><%= h filter.name -%></a>
</li>
<% end %>
- <li><a href="<%= ApplicationController.root_context -%>/measures/manage" class="link-action"><%= message('manage') %></a></li>
+ <li><a href="/measures/manage" class="link-action"><%= message('manage') %></a></li>
<li class="spacer"></li>
<% end %>
-</div> \ No newline at end of file
+</div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_save_as_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_save_as_form.html.erb
index 6bfdc3ae1c1..b43563c5e80 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_save_as_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_save_as_form.html.erb
@@ -1,4 +1,4 @@
-<form id="save-as-filter-form" method="post" action="<%= ApplicationController.root_context -%>/measures/save_as">
+<form id="save-as-filter-form" method="post" action="/measures/save_as">
<input type="hidden" name="id" value="<%= @filter.id -%>">
<input type="hidden" name="data" value="<%= u(@filter.data) -%>">
<fieldset>
@@ -18,4 +18,4 @@
$j("#save-as-filter-form").modalForm({success:function (data) {
window.location = baseUrl + '/measures/filter/' + data;
}});
-</script> \ No newline at end of file
+</script>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb
index fa098e97750..6c4c3581a50 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/_search_header.html.erb
@@ -24,7 +24,7 @@
<div class="page-actions">
<div class="button-group">
- <button onclick="window.location='<%= ApplicationController.root_context -%>/measures/search?qualifiers[]=TRK';"><%= message 'measure_filter.new_search' -%></button>
+ <button onclick="window.location='/measures/search?qualifiers[]=TRK';"><%= message 'measure_filter.new_search' -%></button>
<% unless edit_mode %>
<% if logged_in? %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/manage.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/manage.html.erb
index 70516106f19..802605fe3e1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/manage.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/manage.html.erb
@@ -60,11 +60,11 @@
<% end %>
</td>
<td class="text-thin nowrap text-right">
- <a id="copy-<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/measures/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
+ <a id="copy-<%= filter.name.parameterize -%>" href="/measures/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
&nbsp;
- <a id="edit_<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/measures/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
+ <a id="edit_<%= filter.name.parameterize -%>" href="/measures/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
&nbsp;
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/measures/delete/#{filter.id}",
+ <%= link_to_action message('delete'), "/measures/delete/#{filter.id}",
:class => 'link-action link-red',
:id => "delete_#{filter.name.parameterize}",
:confirm_button => message('delete'),
@@ -111,12 +111,12 @@
<%= filter.user ? h(filter.user.name) : '[SonarQube]' -%>
</td>
<td class="thin nowrap text-right">
- <a id="copy-<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/measures/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
+ <a id="copy-<%= filter.name.parameterize -%>" href="/measures/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
<% if has_role?(:admin) %>
&nbsp;
- <a id="edit_system_<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/measures/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
+ <a id="edit_system_<%= filter.name.parameterize -%>" href="/measures/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
&nbsp;
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/measures/delete/#{filter.id}",
+ <%= link_to_action message('delete'), "/measures/delete/#{filter.id}",
:class => 'link-action link-red',
:id => "delete_system_#{filter.name.parameterize}",
:confirm_button => message('delete'),
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb
index fff811989ea..5d0bd1c595b 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/measures/search.html.erb
@@ -16,7 +16,7 @@
<script id="filter-bar-template" type="text/x-handlebars-template">
- <form method="get" action="<%= ApplicationController.root_context -%>/measures/search">
+ <form method="get" action="/measures/search">
<% if @filter.id %>
<input type="hidden" name="id" value="<%= h @filter.id -%>">
<% end %>
@@ -93,5 +93,5 @@
];
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/measures.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/measures.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb
index 5a8e0641d97..e8879ceb432 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/metrics.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/metrics.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/overview/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/overview/index.html.erb
index 43d4cedebee..b3823ee05e0 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/overview/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/overview/index.html.erb
@@ -130,5 +130,5 @@
};
})();
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/overview.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/overview.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb
index fb97f387c59..7597579ae76 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/permission_templates/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/permission-templates.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/permission-templates.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
index 3c52faf87d9..898ed10342f 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
@@ -2,5 +2,5 @@
<script>
window.sonarqube.urlRoot = baseUrl + '/profiles';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/quality-profiles.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/quality-profiles.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_delete_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_delete_form.html.erb
index 79c73cd6f82..f4fddfc4391 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_delete_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/_delete_form.html.erb
@@ -1,5 +1,5 @@
<% resource_qualifier = message('qualifier.' + @project.qualifier) %>
-<form id="delete-project-form" method="post" action="<%= ApplicationController.root_context -%>/project/delete">
+<form id="delete-project-form" method="post" action="/project/delete">
<fieldset>
<div class="modal-head">
<h2><%= message('project_deletion.page', :params => resource_qualifier) -%></h2>
@@ -18,7 +18,7 @@
$j("#delete-project-form").modalForm({
success: function () {
$j.ajax({
- url: "<%= ApplicationController.root_context-%>/project/delete/<%= h(@project.id) -%>",
+ url: "/project/delete/<%= h(@project.id) -%>",
success: function (request) {
window.location = '<%= url_for(:action => 'pending_deletion',:id => @project.id)-%>';
},
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb
index ba6d27a4da6..096a2eb2f8b 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/background_tasks.html.erb
@@ -2,5 +2,5 @@
<script>
window.sonarqube.componentId = '<%= @project.uuid -%>';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/background-tasks.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/background-tasks.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb
index 73bdb62f6be..8f9f509b939 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/deletion.html.erb
@@ -12,7 +12,7 @@
<div class="yui-g widget" id="widget_delete_project">
<div class="alert alert-warning spacer-bottom"><%= message('project_deletion.operation_cannot_be_undone') -%></div>
<a id="delete_resource" class="open-modal button button-red"
- href="<%= ApplicationController.root_context -%>/project/delete_form/<%= h(@project.id) -%>"><%= delete_resource_message -%></a>
+ href="/project/delete_form/<%= h(@project.id) -%>"><%= delete_resource_message -%></a>
</div>
<% end %>
</div>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
index d24f845572e..399e50a65c2 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/profile.html.erb
@@ -19,7 +19,7 @@
<tr class="<%= cycle 'even', 'odd' -%>">
<td class="thin" nowrap><%= h language.getName() -%></td>
<td>
- <form id="form-<%= language.getKey().parameterize -%>" method="POST" action="<%= ApplicationController.root_context -%>/project/set_profile">
+ <form id="form-<%= language.getKey().parameterize -%>" method="POST" action="/project/set_profile">
<input type="hidden" name="id" value="<%= @project_id -%>"/>
<input type="hidden" name="language" value="<%= language.getKey() -%>"/>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb
index cd6e5a57567..d14507675a0 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/qualitygate.html.erb
@@ -4,7 +4,7 @@
<p class="page-description"><%= message('project_quality_gate.page.description') -%></p>
</header>
- <form id="select-quality-gate" method="POST" action="<%= ApplicationController.root_context -%>/project/set_qualitygate">
+ <form id="select-quality-gate" method="POST" action="/project/set_qualitygate">
<input type="hidden" name="id" value="<%= @project_id -%>"/>
<input type="hidden" name="previous_qgate_id" value="<%= @selected_qgate -%>"/>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb
index 02610e495e4..70938e7cad1 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb
@@ -56,7 +56,7 @@
<%= h truncate(issue.message, :length => 100) -%></a>
<% if last_comment && last_comment.userLogin() %>
<div class="comment-excerpt">
- <img src="<%= ApplicationController.root_context -%>/images/reviews/comment.png"/>
+ <img src="/images/reviews/comment.png"/>
<% commentAuthor = users_by_login[last_comment.userLogin()] %>
&nbsp;<b><%= h( commentAuthor.nil? ? last_comment.userLogin() : commentAuthor.name() ) -%> :</b>
<%= Internal.text.markdownToHtml(last_comment.markdownText) -%>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb
index 2ffe436320a..57b2c1ab069 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/project_roles/index.html.erb
@@ -2,5 +2,5 @@
<script>
window.sonarqube.componentId = '<%= @project.uuid -%>';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/project-permissions.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/project-permissions.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb
index e9c8ffd9ad8..290a9ac5f9f 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/projects/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/projects.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/projects.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb
index 54b071e6e5a..ed03db047c0 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/quality_gates/index.html.erb
@@ -2,5 +2,5 @@
<script>
window.sonarqube.urlRoot = baseUrl + '/quality_gates';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/quality-gates.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/quality-gates.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb
index 3c79bb2feca..1b84a1069de 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/global.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/global-permissions.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/global-permissions.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb
index df0126ffd09..b37e4b37e92 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/project-permissions.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/project-permissions.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb
index 6e7bb79fa36..feede78b06e 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb
@@ -1,4 +1,4 @@
-<form method="post" action="<%= ApplicationController.root_context -%>/server_id_configuration/generate">
+<form method="post" action="/server_id_configuration/generate">
<table class="marginbottom10">
<thead>
<tr>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb
index adeb267fbf4..556822c9e87 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/sessions/_form.html.erb
@@ -49,9 +49,26 @@
<label for="remember_me"><%= message('sessions.remember_me') -%></label>
</p>
- <div class="text-right overflow-hidden">
- <button name="commit"><%= message('sessions.log_in') -%></button>
- <a class="spacer-left" href="<%= home_path -%>"><%= message('cancel') -%></a>
+ <div>
+ <div class="pull-left">
+ <% auth_providers = Api::Utils.java_facade.getIdentityProviders().to_a %>
+ <ul class="list-inline">
+ <% auth_providers.each do |provider| %>
+ <li>
+ <a class="oauth-link"
+ href="/sessions/init/<%= provider.getKey().to_s %>"
+ title="Login with <%= provider.getName().to_s -%>">
+ <img alt="<%= provider.getName().to_s -%>" width="24" height="24"
+ src="<%= provider.getIconPath().to_s -%>">
+ </a>
+ </li>
+ <% end %>
+ </ul>
+ </div>
+ <div class="text-right overflow-hidden">
+ <button name="commit"><%= message('sessions.log_in') -%></button>
+ <a class="spacer-left" href="<%= home_path -%>"><%= message('cancel') -%></a>
+ </div>
</div>
</form>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb
index 9ef0f8ba55d..7d87eabaa49 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb
@@ -85,7 +85,7 @@
<div class="marginbottom10" style="padding-left: 5px;">
<%= hidden_field_tag('page_version', (params[:page_version] || 0).to_i + 1) -%>
<%= submit_tag(message('settings.save_category', :params => [subcategory_name(@category, @subcategory)]), :id => 'submit_settings') -%>
- <img src="<%= ApplicationController.root_context -%>/images/loading.gif" id="loading_settings" style="display:none;">
+ <img src="/images/loading.gif" id="loading_settings" style="display:none;">
</div>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb
index a06263ce445..2d20d38d06f 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/setup/index.html.erb
@@ -2,6 +2,6 @@
<script>
window.sonarqube.setup = true;
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/maintenance.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/maintenance.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb
index 1cb19867388..cd47108111d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/system/index.html.erb
@@ -1,4 +1,4 @@
<% content_for :extra_script do %>
-<script src="<%= ApplicationController.root_context -%>/js/bundles/system.js?v=<%= sonar_version -%>"></script>
+<script src="/js/bundles/system.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
index 21e4db24e3a..d98e537dcfb 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/updatecenter/index.html.erb
@@ -2,6 +2,6 @@
<script>
window.sonarqube.urlRoot = baseUrl + '/updatecenter';
</script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/update-center.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/update-center.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/_edit_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/_edit_form.html.erb
index 17fc622e600..8e36411a411 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/_edit_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/_edit_form.html.erb
@@ -1,4 +1,4 @@
-<form id="user_edit_form" method="post" action="<%= ApplicationController.root_context -%>/users/update">
+<form id="user_edit_form" method="post" action="/users/update">
<fieldset>
<div class="modal-head">
<h2>Edit user: <%= h @user.login() -%></h2>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb
index 56d012090af..12257ae3f4d 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/users/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/users.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/users.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb
index f5600f6ca03..a805ff002fd 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/view_projects/index.html.erb
@@ -1,3 +1,3 @@
<% content_for :extra_script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/code.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/code.js?v=<%= sonar_version -%>"></script>
<% end %>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/widget/index.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/widget/index.html.erb
index 3d718d0a954..d2ca0b0b9c3 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/widget/index.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/widget/index.html.erb
@@ -1,6 +1,6 @@
<% content_for :script do %>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/dashboard.js?v=<%= sonar_version -%>"></script>
- <script src="<%= ApplicationController.root_context -%>/js/bundles/widgets.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/dashboard.js?v=<%= sonar_version -%>"></script>
+ <script src="/js/bundles/widgets.js?v=<%= sonar_version -%>"></script>
<% end %>
<div id="block_1" class="block" style="width: <%= @widget_width -%>">
@@ -41,4 +41,4 @@
<div style="clear: both;"></div>
</div>
-</div> \ No newline at end of file
+</div>