aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-05-15 12:20:11 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-05-15 12:20:11 +0200
commit6a19a67a23a39848c28ae3cf2d189bf926fadf9b (patch)
tree2bf91a0d6b3bbb804f3251f756ef3c0b5a7b88ed /server
parent2ef5c567c71de7dc24c220261b9184aaacf51b49 (diff)
downloadsonarqube-6a19a67a23a39848c28ae3cf2d189bf926fadf9b.tar.gz
sonarqube-6a19a67a23a39848c28ae3cf2d189bf926fadf9b.zip
update component settings links
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_properties.html.erb6
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb8
2 files changed, 12 insertions, 2 deletions
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 9b965ee07b7..c856dfa9488 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
@@ -16,7 +16,11 @@
<ul class="tabs">
<% subcategories.each do |subcategory| -%>
<li>
- <%= link_to subcategory_name(@category, subcategory), {:controller => @resource ? 'project' : 'settings', :action => @resource ? 'settings' : 'index', :category => @category.key, :subcategory => subcategory.key, :id => (@resource && @resource.id)}, :class => @subcategory==subcategory ? 'selected' : nil -%>
+ <% if @resource %>
+ <a <% if @subcategory==subcategory %>class="selected"<% end -%> href="<%= url_for(:controller => 'project', :action => 'settings', :id => nil) -%>?id=<%= url_encode(@resource.key) -%>&category=<%= url_encode(@category.key) -%>&subcategory=<%= url_encode(subcategory.key) -%>"><%= h subcategory_name(@category, subcategory) -%></a>
+ <% else %>
+ <%= link_to subcategory_name(@category, subcategory), {:controller => 'settings', :action =>'index', :category => @category.key, :subcategory => subcategory.key}, :class => @subcategory==subcategory ? 'selected' : nil -%>
+ <% end %>
</li>
<% end -%>
</ul>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb
index 44528177c57..422c00f9048 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb
@@ -16,7 +16,13 @@
<tbody>
<% @categories.each do |category| -%>
<tr id="select_<%= category.key -%>" class="select <%= cycle('even', 'odd', :name => 'category') -%> <%= 'selected' if @category.key==category.key -%>">
- <td class="category"><%= link_to category_name(category), :category => category.key -%></td>
+ <td class="category">
+ <% if @resource %>
+ <a href="<%= url_for(:controller => 'project', :action => 'settings') -%>?id=<%= url_encode(@resource.key) -%>&category=<%= url_encode(category.key) -%>"><%= h category_name(category) -%></a>
+ <% else %>
+ <%= link_to category_name(category), :category => category.key -%>
+ <% end %>
+ </td>
</tr>
<% end -%>
</tbody>