summaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-09-30 19:04:28 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-09-30 19:05:20 +0200
commit7e7dccc3e5c8dbc11ccc0ca7defa9b26f2316246 (patch)
tree15680f1ccac392756d7bb831163e43f2da9fae9b /sonar-server
parent3556204753a304596f98b345cf3482574a10fe7f (diff)
downloadsonarqube-7e7dccc3e5c8dbc11ccc0ca7defa9b26f2316246.tar.gz
sonarqube-7e7dccc3e5c8dbc11ccc0ca7defa9b26f2316246.zip
Homogeneous pattern for displaying action links (to POST requests)
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/filters/manage.html.erb5
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/groups/index.html.erb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/manual_rules/index.html.erb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb3
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb49
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/users/index.html.erb6
-rw-r--r--sonar-server/src/main/webapp/stylesheets/style.css5
9 files changed, 47 insertions, 38 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb
index 6e42be66294..59c3607b87f 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/action_plans/index.html.erb
@@ -40,7 +40,7 @@
<td id="desc"><%= h(plan.user.name) -%></td>
<td class="thin nowrap right">
<%= link_to message('edit'), {:action => 'edit', :id => @resource.id, :plan_id => plan.id}, :class => 'link-action' -%>
- |
+ &nbsp;
<%
close_confirmation_message = {}
if plan.open? && plan.has_open_reviews?
@@ -49,8 +49,8 @@
%>
<%= link_to message('action_plans.close'),
{:action => 'change_status', :id => @resource.id, :plan_id => plan.id}, {:method => 'POST', :class => 'link-action'}.merge(close_confirmation_message) -%>
- |
- <%= link_to message('delete'), {:action => 'delete', :id => @resource.id, :plan_id => plan.id}, {:method => 'POST', :confirm => message('action_plans.confirm_delete'), :class => 'link-action'} -%>
+ &nbsp;
+ <%= link_to message('delete'), {:action => 'delete', :id => @resource.id, :plan_id => plan.id}, {:method => 'POST', :confirm => message('action_plans.confirm_delete'), :class => 'link-action link-red'} -%>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/manage.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/manage.html.erb
index 001c37a0af6..c306fe557c4 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/manage.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/manage.html.erb
@@ -34,8 +34,9 @@
</td>
<td class="thin nowrap right">
<% if filter.authorized_to_edit?(self) %>
- <%= link_to message('edit'), {:action => :edit, :id => filter.id}, :id => "edit-#{u filter.name}", :class => 'link-action' %> |
- <%= link_to message('delete'), {:action => :delete, :id => filter.id}, :method => :post, :confirm => message('filters.do_you_want_to_delete'), :id => "delete-#{u filter.name}", :class => 'link-action' %>
+ <%= link_to message('edit'), {:action => :edit, :id => filter.id}, :id => "edit-#{u filter.name}", :class => 'link-action' %>
+ &nbsp;
+ <%= link_to message('delete'), {:action => :delete, :id => filter.id}, :method => :post, :confirm => message('filters.do_you_want_to_delete'), :id => "delete-#{u filter.name}", :class => 'link-action link-red' %>
<% end %>
</td>
</tr>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/groups/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/groups/index.html.erb
index b281d3fd66e..a54f1e969ae 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/groups/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/groups/index.html.erb
@@ -23,9 +23,9 @@
<td class="left">
<%= link_to "Edit", { :action => 'index', :id => group.id},
{ :method => :get, :id => "edit-#{u group.name}", :class => 'link-action'} %>
- |
+ &nbsp;
<%= link_to "Delete", { :action => 'destroy', :id => group.id},
- {:confirm => "Are you sure that you want to delete this group? Members will not be deleted.", :class => 'link-action', :method => 'get', :id => "delete-#{u group.name}"} %>
+ {:confirm => "Are you sure that you want to delete this group? Members will not be deleted.", :class => 'link-action link-red', :method => 'get', :id => "delete-#{u group.name}"} %>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb
index a1d0b4604bc..9d8e8a2b52e 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb
@@ -62,10 +62,10 @@
<td class="thin nowrap">
<a href="<%= url_for :controller => 'manual_measures', :action => 'new', :metric => measure.metric.key, :id => @resource.id -%>" class="link-action"><%= message('edit')
-%></a>
- |
+ &nbsp;
<%= link_to message('delete'), {:action => 'delete', :metric => measure.metric.key, :id => @resource.id}, {:method => 'POST',
:confirm => "This measure will be deleted during next project
- analysis", :class => 'link-action'} -%>
+ analysis", :class => 'link-action link-red'} -%>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_rules/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_rules/index.html.erb
index ce284dad24e..34085710002 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_rules/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_rules/index.html.erb
@@ -24,7 +24,8 @@
</td>
<td class="right thin nowrap">
<%= link_to 'Edit', {:action => 'edit', :id => rule.id}, {:id => "edit_#{u(rule.key)}", :class => 'link-action'} %>
- <%= link_to 'Delete', {:action => 'delete', :id => rule.id}, {:confirm => message('are_you_sure'), :id => "delete_#{u(rule.key)}", :class => 'link-action', :method => 'delete'} %>
+ &nbsp;
+ <%= link_to 'Delete', {:action => 'delete', :id => rule.id}, {:confirm => message('are_you_sure'), :id => "delete_#{u(rule.key)}", :class => 'link-action link-red', :method => 'delete'} %>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb
index e2957f65070..411bd851ab6 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/metrics/index.html.erb
@@ -26,7 +26,8 @@
<%= link_to 'Edit', {:action => 'index', :id => metric.id}, {:class => 'link-action', :id => "edit_#{h(metric.short_name)}", :method => 'get'} %>
<% end %>
<% if is_admin? && metric.updatable_online? %>
- <%= link_to 'Delete', {:action => 'delete_from_web', :id => metric.id}, {:confirm => "Warning : all the measures will be deleted.", :class => 'link-action', :id => "delete_#{h(metric.short_name)}"} %>
+ &nbsp;
+ <%= link_to 'Delete', {:action => 'delete_from_web', :id => metric.id}, {:confirm => "Warning : all the measures will be deleted.", :class => 'link-action link-red', :id => "delete_#{h(metric.short_name)}"} %>
<% end %>
</td>
</tr>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
index 8a308747afa..cba2a1f0be9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
@@ -21,8 +21,8 @@
<% if administrator? %>
<ul style="float: right" class="horizontal">
<li class="marginleft10 add">
- <a id="create-link-<%= language.getKey() -%>" href="profiles/create_form?language=<%= language.getKey() -%>" class="open-modal"><%= message('create') -%></a>
- </li>
+ <a id="create-link-<%= language.getKey() -%>" href="profiles/create_form?language=<%= language.getKey() -%>" class="open-modal link-action"><%= message('create') -%></a>
+ </li>
</ul>
<% end %>
<h2><%= message('quality_profiles.x_language_profiles', :params => language.getName()) -%></h2>
@@ -44,30 +44,31 @@
<tbody>
<% @profiles.select { |p| p.language==language.getKey() }.each do |profile| %>
<tr class="<%= cycle 'even', 'odd', :name => language.getKey() -%>" id="<%= u profile.key %>">
- <td>
+ <td width="40%">
<a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => profile.id -%>" id="rules-<%= language.getKey() -%>-<%= u(profile.name) -%>"><%= h profile.name %></a>
</td>
- <td align="right">
+ <td align="right" width="10%">
<span id="activated_rules_<%= u profile.key -%>"><%= profile.active_rules.count -%></span>
</td>
- <td align="right"><span id="alerts_<%= u profile.key -%>"><%= profile.alerts.size -%></span></td>
+ <td align="right" width="10%"><span id="alerts_<%= u profile.key -%>"><%= profile.alerts.size -%></span></td>
- <td align="right">
+ <td align="right" width="10%" nowrap>
<% unless profile.default_profile? %>
<span id="projects_<%= u profile.key -%>"><%= profile.projects.size -%></span>
<% end %>
</td>
- <td align="right">
+ <td align="right" width="10%" nowrap>
<% if !profile.default_profile? && administrator? %>
<%= link_to_action message('set_as_default'), "profiles/set_as_default?id=#{profile.id}",
- :id => "activate_#{profile.key.parameterize}",
- :class => 'button',
- :confirm_title => 'set_as_default',
- :confirm_msg => 'quality_profiles.are_you_sure_want_x_profile_as_default',
- :confirm_msg_params => [profile.name] -%>
+ :id => "activate_#{profile.key.parameterize}",
+ :class => 'link-action',
+ :confirm_title => message('set_as_default'),
+ :confirm_msg => message('quality_profiles.are_you_sure_want_x_profile_as_default', :params => [profile.name]),
+ :confirm_button => message('set_as_default')
+ -%>
<% end %>
<% if profile.default_profile? %>
<%= image_tag 'tick.png', :id => "is_active_#{u profile.key}" %>
@@ -79,31 +80,31 @@
<td align="right">
<% if !profile.provided? %>
- <% form_tag(:action => 'backup', :id => profile.id) do -%>
- <input type="submit" name="button_backup" id="backup_<%= u profile.key %>" value="<%= message('backup_verb') -%>"/>
- <% end
- end %>
+ <form method="post" action="/dev/profiles/backup/<%= profile.id -%>" id="backup-<%= profile.key.parameterize -%>-form">
+ <a href="#" class="link-action" name="button_backup" id="backup_<%= u profile.key %>" onclick="$j('#backup-<%= profile.key.parameterize -%>-form').submit();return false;"><%= message('backup_verb') -%></a>
+ </form>
+ <% end %>
</td>
<td align="right">
<% if !profile.provided? %>
- <a id="rename-<%= profile.key.parameterize -%>" href="profiles/rename_form/<%= profile.id -%>" class="button open-modal"><%= message('rename') -%></a>
+ <a id="rename-<%= profile.key.parameterize -%>" href="profiles/rename_form/<%= profile.id -%>" class="link-action open-modal"><%= message('rename') -%></a>
<% end %>
</td>
<td align="right">
- <a id="copy-<%= profile.key.parameterize -%>" href="profiles/copy_form/<%= profile.id -%>" class="button open-modal"><%= message('copy') -%></a>
+ <a id="copy-<%= profile.key.parameterize -%>" href="profiles/copy_form/<%= profile.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
</td>
<td>
<% if profile.deletable? %>
<%= link_to_action message('delete'), "profiles/delete/#{profile.id}",
- :class => 'button red-button',
- :id => "delete_#{profile.key.parameterize}",
- :confirm_button => 'delete',
- :confirm_title => 'quality_profiles.delete_confirm_title',
- :confirm_msg => 'quality_profiles.are_you_sure_want_delete_profile_x',
- :confirm_msg_params => [profile.name]
+ :class => 'link-action link-red',
+ :id => "delete_#{profile.key.parameterize}",
+ :confirm_button => message('delete'),
+ :confirm_title => 'quality_profiles.delete_confirm_title',
+ :confirm_msg => 'quality_profiles.are_you_sure_want_delete_profile_x',
+ :confirm_msg_params => [profile.name]
-%>
<% end %>
</td>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/users/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/users/index.html.erb
index 9df129cb061..bddf12e12ed 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/users/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/users/index.html.erb
@@ -23,11 +23,11 @@
</td>
<td class="left" valign="top">
<%= link_to "Edit", { :id => user.id, :action => 'edit'}, {:id => "edit-#{u user.login}", :class => 'link-action'} %>
- |
+ &nbsp;
<%= link_to "Change password", { :id => user.id, :action => 'change_password'}, {:id => "change-password-#{u user.login}", :class => 'link-action'} %>
- |
+ &nbsp;
<%= link_to "Delete", {:action => 'destroy', :id => user.id}, {:confirm => "Warning : are you sure to delete this user ?", :method => 'delete',
- :id => "delete-#{u user.login}", :class => 'link-action'} %>
+ :id => "delete-#{u user.login}", :class => 'link-action link-red'} %>
</td>
</tr>
<% end %>
diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css
index 313d6ca1d6b..d899710cd5c 100644
--- a/sonar-server/src/main/webapp/stylesheets/style.css
+++ b/sonar-server/src/main/webapp/stylesheets/style.css
@@ -2120,6 +2120,11 @@ table.nowrap td, td.nowrap, th.nowrap {
color: #4183C4 !important;
}
+.link-red {
+ color: #990000 !important;
+}
+
+
.link-more {
background-image: url('../images/bullet_arrow_down.png');
background-repeat: no-repeat;