aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-05-22 15:00:41 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-05-22 15:00:41 +0200
commit7dc0d68a5a3cab41afd5dc1c814a6ed4d4900666 (patch)
treea8f445c7edff3ec824a01e20f31d06a21d2aff24
parent6eacc3d1eab02885c35667cd8abab13ad344b4ef (diff)
downloadsonarqube-7dc0d68a5a3cab41afd5dc1c814a6ed4d4900666.tar.gz
sonarqube-7dc0d68a5a3cab41afd5dc1c814a6ed4d4900666.zip
SONAR-4290 improve admin console
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_action_plans_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/issues_action_plans/index.html.erb19
3 files changed, 9 insertions, 14 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
index 138a4e1676a..6aee839865e 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
@@ -641,7 +641,7 @@ action_plans.resolved_reviews_x_percent=Resolved reviews - {0}% ({1} reviews)
action_plans.open_reviews_x_percent=Open reviews - {0}% ({1} reviews)
action_plans.reopen=Reopen
action_plans.close=Close
-action_plans.closed_action_plan=Closed action plans
+action_plans.closed_action_plan=Closed Action Plans
#------------------------------------------------------------------------------
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_action_plans_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_action_plans_controller.rb
index 6fda7363ac3..60ff6c00bf2 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_action_plans_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_action_plans_controller.rb
@@ -82,7 +82,7 @@ class IssuesActionPlansController < ApplicationController
def load_action_plans
action_plans = Internal.issues.findActionPlanStats(@resource.key)
@open_action_plans = action_plans.select {|plan| plan.isOpen()}
- @closed_action_plans = action_plans.select {|plan| !plan.isOpen()}
+ @closed_action_plans = action_plans.reject {|plan| plan.isOpen()}
users = Api.users.find('logins' => (@open_action_plans + @closed_action_plans).collect {|action_plan| action_plan.userLogin()}.join(","))
@users = Hash[users.collect { |user| [user.login(), user.name()] }]
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues_action_plans/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues_action_plans/index.html.erb
index 5ee5c788a01..573de3ec5a0 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues_action_plans/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues_action_plans/index.html.erb
@@ -22,12 +22,11 @@
<% end %>
<%
@open_action_plans.each do |plan|
- deadline = Api::Utils.java_to_ruby_datetime(plan.deadLine()) if plan.deadLine()
%>
- <tr>
+ <tr class="<%= cycle('even', 'odd', :name => 'open_plans') -%>">
<td class="thin nowrap center"><img src="<%= ApplicationController.root_context -%>/images/status/<%= plan.status() -%>.png" title="<%= message('issues_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" x="<%= deadline ? deadline.tv_sec : '' -%>"><%= format_date(plan.deadLine(), :time_if_today => true) -%></td>
+ <td class="thin nowrap <%= 'over-due' if plan.overDue() -%>" align="right"><%= format_date(plan.deadLine(), :time_if_today => true) -%></td>
<% if plan.totalIssues()==0 %>
<td class="noprogress thin nowrap">
<%= message('issues_action_plans.no_issues_linked_to_action_plan') -%>
@@ -57,7 +56,6 @@
<% end %>
</tbody>
</table>
- <script>TableKit.Sortable.init('openActionPlans');</script>
<% unless @closed_action_plans.empty? %>
<br/><br/>
@@ -79,14 +77,12 @@
<tbody>
<%
@closed_action_plans.each do |plan|
- deadline = Api::Utils.java_to_ruby_datetime(plan.deadLine()) if plan.deadLine()
- updated_at = Api::Utils.java_to_ruby_datetime(plan.updatedAt())
%>
- <tr>
+ <tr class="<%= cycle('even', 'odd', :name => 'closed_plans') -%>">
<td class="thin nowrap center"><img src="<%= ApplicationController.root_context -%>/images/status/<%= plan.status() -%>.png" title="<%= message(plan.status()) -%>"/></td>
<td class="thin nowrap"><%= h(plan.name) -%></td>
- <td class="thin nowrap <%= 'over-due' if plan.overDue() -%>" align="right" x="<%= deadline ? deadline.tv_sec : '' -%>"><%= format_date(plan.deadLine()) -%></td>
- <td class="thin nowrap" align="right" x="<%= updated_at.tv_sec -%>"><%= format_date(plan.updatedAt()) -%></td>
+ <td class="thin nowrap <%= 'over-due' if plan.overDue() -%>" align="right"><%= format_date(plan.deadLine()) -%></td>
+ <td class="thin nowrap" align="right"><%= format_date(plan.updatedAt()) -%></td>
<% if plan.totalIssues()==0 %>
<td class="noprogress thin nowrap">
<%= message('issues_action_plans.no_issues_linked_to_action_plan') -%>
@@ -100,15 +96,14 @@
<td id="desc"><%= h(@users[plan.userLogin()]) -%></td>
<td class="thin nowrap right">
<%= link_to message('issues_action_plans.reopen'),
- {:action => 'change_status', :id => @resource.id, :plan_key => plan.key}, {:method => 'POST', :class => 'action'} -%>
+ {:action => 'change_status', :id => @resource.id, :plan_key => plan.key}, {:method => 'POST', :class => 'link-action'} -%>
&nbsp;
- <%= link_to message('delete'), {:action => 'delete', :id => @resource.id, :plan_key => plan.key}, {:method => 'POST', :confirm => message('issues_action_plans.confirm_delete'), :class => 'action'} -%>
+ <%= link_to message('delete'), {:action => 'delete', :id => @resource.id, :plan_key => plan.key}, {:method => 'POST', :confirm => message('issues_action_plans.confirm_delete'), :class => 'link-action link-red'} -%>
</td>
</tr>
<% end %>
</tbody>
</table>
- <script>TableKit.Sortable.init('closedActionPlans');</script>
<% end %>
</td>