]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4290 improve admin console
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 22 May 2013 13:00:41 +0000 (15:00 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 22 May 2013 13:00:41 +0000 (15:00 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_action_plans_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/issues_action_plans/index.html.erb

index 138a4e1676a091e8550e7df77525a4365ea612f9..6aee839865e29401b8479fd3275b96217fdae482 100644 (file)
@@ -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
 
 
 #------------------------------------------------------------------------------
index 6fda7363ac34ad975ee12131da5d08678d97dfe6..60ff6c00bf2f79776f785c7c05214f4c637a1b00 100644 (file)
@@ -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
index 5ee5c788a01034a167828f8e6816787a79b01eb4..573de3ec5a0401a5b025a9604bfdb5412f5bf594 100644 (file)
         <% 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/>
           <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') -%>
               <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>