From b8009697f24b3cf75cf90021f09c8161388ed0a6 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 10 Feb 2012 15:06:24 +0100 Subject: [PATCH] SONAR-1492 Apply the "bleu" color on actions links in admin section For more consistency. This "link-action" style is used in places where the text is dense (like rule descriptions in profile or tables) and where links must be clearly visible. --- .../app/views/admin_dashboards/index.html.erb | 6 ++--- .../app/views/admin_filters/index.html.erb | 4 ++-- .../WEB-INF/app/views/groups/index.html.erb | 10 ++++---- .../app/views/manual_rules/index.html.erb | 4 ++-- .../WEB-INF/app/views/metrics/index.html.erb | 4 ++-- .../WEB-INF/app/views/roles/global.html.erb | 4 ++-- .../WEB-INF/app/views/roles/projects.html.erb | 24 +++++++++---------- .../WEB-INF/app/views/users/index.html.erb | 10 ++++---- .../src/main/webapp/stylesheets/style.css | 3 ++- 9 files changed, 37 insertions(+), 32 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/index.html.erb index 3ac4e156952..9590cd4ef35 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/admin_dashboards/index.html.erb @@ -35,7 +35,7 @@ <% end %> - <%= link_to 'Remove from defaults', {:action => 'remove', :id => active.id}, :confirm => 'Are you sure to remove it from default dashboards ?', :method => :post, :id => "remove-#{u active.name}" %> + <%= link_to 'Remove from defaults', {:action => 'remove', :id => active.id}, {:confirm => 'Are you sure to remove it from default dashboards ?', :method => :post, :id => "remove-#{u active.name}", :class => 'link-action'} %> <% end %> @@ -70,11 +70,11 @@ <%= h(dashboard.user.name) if dashboard.user %> - <%= link_to 'Add to defaults', {:action => 'add', :id => dashboard.id}, :method => :post, :id => "add-#{u dashboard.name}" %> + <%= link_to 'Add to defaults', {:action => 'add', :id => dashboard.id}, {:method => :post, :id => "add-#{u dashboard.name}", :class => 'link-action'} %> <% if dashboard.provided_programmatically? %> - <%= link_to 'Delete', {:action => 'delete', :id => dashboard.id}, :confirm => "Do you want to delete the dashboard #{dashboard.name(true)}?", :method => :post, :id => "delete-#{u dashboard.name}" %> + <%= link_to 'Delete', {:action => 'delete', :id => dashboard.id}, {:confirm => "Do you want to delete the dashboard #{dashboard.name(true)}?", :method => :post, :id => "delete-#{u dashboard.name}", :class => 'link-action'} %> <% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/admin_filters/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/admin_filters/index.html.erb index 9569c700555..22002452b2c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/admin_filters/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/admin_filters/index.html.erb @@ -31,7 +31,7 @@ <% end %> - <%= link_to 'Remove', {:action => 'remove', :id => active.id}, :confirm => 'Are you sure to remove it from default filters ?', :method => :post, :id => "remove-#{u active.name}" %> + <%= link_to 'Remove', {:action => 'remove', :id => active.id}, {:confirm => 'Are you sure to remove it from default filters ?', :method => :post, :id => "remove-#{u active.name}", :class => 'link-action'} %> <% end %> @@ -62,7 +62,7 @@ <%= h(filter.name) -%> <%= h(filter.user.name) if filter.user -%> - <%= link_to 'Add to defaults', {:action => 'add', :id => filter.id}, :method => :post, :id => "add-#{u filter.name}" %> + <%= link_to 'Add to defaults', {:action => 'add', :id => filter.id}, {:method => :post, :id => "add-#{u filter.name}", :class => 'link-action'} %> <% end %> <% end %> 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 9515cb7471c..bfa438fdc15 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 @@ -19,12 +19,14 @@ <%= group.name %> <%=group.description%> - <%= group.users.count %> (<%= link_to "select", { :action => 'select_user', :id => group.id}, :id => "select-#{u group.name}" %>) + <%= group.users.count %> (<%= link_to "select", { :action => 'select_user', :id => group.id}, {:id => "select-#{u group.name}", :class => 'link-action'} %>) - <%= link_to "edit", { :action => 'index', :id => group.id}, :class => 'action', - :method => :get, :id => "edit-#{u group.name}" %> | - <%= link_to "delete", { :action => 'destroy', :id => group.id}, {:confirm => "Are you sure to delete this group ? Members will not be deleted.", :class => 'action', :method => 'get', :id => "delete-#{u group.name}"} %> + <%= link_to "edit", { :action => 'index', :id => group.id}, + { :method => :get, :id => "edit-#{u group.name}", :class => 'link-action'} %> + + <%= link_to "delete", { :action => 'destroy', :id => group.id}, + {:confirm => "Are you sure to delete this group ? Members will not be deleted.", :class => 'link-action', :method => 'get', :id => "delete-#{u group.name}"} %> <% 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 79b2e2fe174..21bfa98df6c 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 @@ -22,8 +22,8 @@ <%= h rule.description -%> - <%= link_to 'Edit', {:action => 'edit', :id => rule.id}, {:id => "edit_#{u(rule.key)}"} %> - <%= link_to 'Delete', {:action => 'delete', :id => rule.id}, {:confirm => message('are_you_sure'), :id => "delete_#{u(rule.key)}", :method => 'delete'} %> + <%= 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'} %> <% 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 9de32a8aa63..0484469e3b2 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 @@ -22,10 +22,10 @@ <%= metric.value_type_name -%> <% if is_admin? && metric.updatable_online? %> - <%= link_to 'Edit', {:action => 'index', :id => metric.id}, {:class => 'action', :id => "edit_#{h(metric.short_name)}", :method => 'get'} %> + <%= 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.", :id => "delete_#{h(metric.short_name)}"} %> + <%= 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)}"} %> <% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/global.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/global.html.erb index 06498d1c12a..08c25d5b4cb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/global.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/global.html.erb @@ -13,11 +13,11 @@ Administrators
Ability to perform all administration functions for the instance: global configuration, personalization of Time Machine and homepage. <%= users('admin').map(&:login).join(', ') %> - (<%= link_to "select", {:action => 'edit_users', :role => 'admin', :redirect => 'global'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_users', :role => 'admin', :redirect => 'global'}, :class => 'link-action' %>) <%= groups('admin').map{|g| group_name(g)}.join(', ') %> - (<%= link_to "select", {:action => 'edit_groups', :role => 'admin', :redirect => 'global'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_groups', :role => 'admin', :redirect => 'global'}, :class => 'link-action' %>) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb index 05066f0b443..3331b8dadca 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/roles/projects.html.erb @@ -14,34 +14,34 @@
<%= users('default-admin').map(&:login).join(', ') %> - (<%= link_to "select", {:action => 'edit_users', :role => 'default-admin', :redirect => 'projects'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_users', :role => 'default-admin', :redirect => 'projects'}, :class => 'link-action' %>)
<%= groups('default-admin').map{|g| group_name(g)}.join(', ') %> - (<%= link_to "select", {:action => 'edit_groups', :role => 'default-admin', :redirect => 'projects'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_groups', :role => 'default-admin', :redirect => 'projects'}, :class => 'link-action' %>) Users
Ability to navigate through every service of a project, except viewing source code and settings. <%= users('default-user').map(&:login).join(', ') %> - (<%= link_to "select", {:action => 'edit_users', :role => 'default-user', :redirect => 'projects'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_users', :role => 'default-user', :redirect => 'projects'}, :class => 'link-action' %>) <%= groups('default-user').map{|g| group_name(g)}.join(', ') %> - (<%= link_to "select", {:action => 'edit_groups', :role => 'default-user', :redirect => 'projects'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_groups', :role => 'default-user', :redirect => 'projects'}, :class => 'link-action' %>) Code viewers
Ability to view source code of a project. <%= users('default-codeviewer').map(&:login).join(', ') %> - (<%= link_to "select", {:action => 'edit_users', :role => 'default-codeviewer', :redirect => 'projects'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_users', :role => 'default-codeviewer', :redirect => 'projects'}, :class => 'link-action' %>) <%= groups('default-codeviewer').map{|g| group_name(g)}.join(', ') %> - (<%= link_to "select", {:action => 'edit_groups', :role => 'default-codeviewer', :redirect => 'projects'}, :class => 'action' %>) + (<%= link_to "select", {:action => 'edit_groups', :role => 'default-codeviewer', :redirect => 'projects'}, :class => 'link-action' %>) @@ -73,24 +73,24 @@ users=project.user_roles.select{|ur| ur.role=='admin'}.map{|ur| ur.user.login} groups=project.group_roles.select{|gr| gr.role=='admin'}.map{|gr| group_name(gr.group) } %> - <%= users.join(', ') %> (<%= link_to "select users", {:action => 'edit_users', :role => 'admin', :resource => project.id, :redirect => 'projects'}, :class => 'action' %>)
- <%= groups.join(', ') %> (<%= link_to "select groups", {:action => 'edit_groups', :role => 'admin', :resource => project.id, :redirect => 'projects'}, :class => 'action' %>) + <%= users.join(', ') %> (<%= link_to "select users", {:action => 'edit_users', :role => 'admin', :resource => project.id, :redirect => 'projects'}, :class => 'link-action' %>)
+ <%= groups.join(', ') %> (<%= link_to "select groups", {:action => 'edit_groups', :role => 'admin', :resource => project.id, :redirect => 'projects'}, :class => 'link-action' %>) <% users=project.user_roles.select{|ur| ur.role=='user'}.map{|ur| ur.user.login} groups=project.group_roles.select{|gr| gr.role=='user'}.map{|gr| group_name(gr.group) } %> - <%= users.join(', ') %> (<%= link_to "select users", {:action => 'edit_users', :role => 'user', :resource => project.id, :redirect => 'projects'}, :class => 'action' %>)
- <%= groups.join(', ') %> (<%= link_to "select groups", {:action => 'edit_groups', :role => 'user', :resource => project.id, :redirect => 'projects'}, :class => 'action' %>) + <%= users.join(', ') %> (<%= link_to "select users", {:action => 'edit_users', :role => 'user', :resource => project.id, :redirect => 'projects'}, :class => 'link-action' %>)
+ <%= groups.join(', ') %> (<%= link_to "select groups", {:action => 'edit_groups', :role => 'user', :resource => project.id, :redirect => 'projects'}, :class => 'link-action' %>) <% users=project.user_roles.select{|ur| ur.role=='codeviewer'}.map{|ur| ur.user.login} groups=project.group_roles.select{|gr| gr.role=='codeviewer'}.map{|gr| group_name(gr.group) } %> - <%= users.join(', ') %> (<%= link_to "select users", {:action => 'edit_users', :role => 'codeviewer', :resource => project.id, :redirect => 'projects'}, :class => 'action' %>)
- <%= groups.join(', ') %> (<%= link_to "select groups", {:action => 'edit_groups', :role => 'codeviewer', :resource => project.id, :redirect => 'projects'}, :class => 'action' %>) + <%= users.join(', ') %> (<%= link_to "select users", {:action => 'edit_users', :role => 'codeviewer', :resource => project.id, :redirect => 'projects'}, :class => 'link-action' %>)
+ <%= groups.join(', ') %> (<%= link_to "select groups", {:action => 'edit_groups', :role => 'codeviewer', :resource => project.id, :redirect => 'projects'}, :class => 'link-action' %>) <% end 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 18f32f36365..81eb2de4f90 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 @@ -20,12 +20,14 @@ <%=user.name %> <%=user.email %> - <%= user.groups.sort.map(&:name).join(', ') %> (<%= link_to "select", {:action => 'select_group', :id => user.id}, :id => "select-#{u user.login}" %>) + <%= user.groups.sort.map(&:name).join(', ') %> (<%= link_to "select", {:action => 'select_group', :id => user.id}, {:id => "select-#{u user.login}", :class => 'link-action'} %>) - <%= link_to "edit", { :id => user.id, :action => 'edit'}, :id => "edit-#{u user.login}" %> | - <%= link_to "change password", { :id => user.id, :action => 'change_password'}, :id => "change-password-#{u user.login}" %> | - <%= link_to "delete", {:action => 'destroy', :id => user.id}, {:confirm => "Warning : are you sure to delete this user ?", :method => 'delete', :id => "delete-#{u user.login}"} %> + <%= link_to "edit", { :id => user.id, :action => 'edit'}, {:id => "edit-#{u user.login}", :class => 'link-action'} %> + + <%= link_to "change password", { :id => user.id, :action => 'change_password'}, {:id => "change-password-#{u user.login}", :class => 'link-action'} %> + + <%= 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'} %> <% end %> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 24104be5c8e..bbcf71f9c09 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -2363,7 +2363,8 @@ table.nowrap td, td.nowrap, th.nowrap { - +/* Used on links which are located inside a dense text place or in tables */ +/* in order to rapidly identify them */ .link-action { text-decoration: underline; color: #4183C4; -- 2.39.5