]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3104 Improve the usability of the project 'History'
authorFabrice Bellingard <bellingard@gmail.com>
Mon, 30 Jan 2012 10:57:47 +0000 (11:57 +0100)
committerFabrice Bellingard <bellingard@gmail.com>
Mon, 30 Jan 2012 14:44:44 +0000 (15:44 +0100)
- Add row highlighting
- Reorder columns
- Remove date duplication

plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/project/_edit_event.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb

index 2bf9ab17650d40e9a16a5a78bdef4c8d928b30d7..4053171992c66c984426e27df4b53df74f33739d 100644 (file)
@@ -850,6 +850,7 @@ manual_measures.pending_message=Pending measures are marked with orange box. The
 project_history.page_title=Handle events and delete quality snapshots from project history
 project_history.col.year=Year
 project_history.col.month=Month
+project_history.col.day=Day
 project_history.col.time=Time
 project_history.col.events=Events
 project_history.col.action=Action
index e2da29e7f3c96db63871d738c53f830cca74cd6b..8cdffc2dd0c36dd4422b4ee42b42721cc5ad3f35 100644 (file)
@@ -12,7 +12,7 @@
                 <%= f.text_field :name, :onkeyup => "if (this.value=='') $('event_#{@event.id}_submit').disabled='true'; else $('event_#{@event.id}_submit').disabled='';" -%>
             </td>
             <td class="left" nowrap="nowrap" valign="top">
-                <span class="comments"><%= message('category') -%> (<%= link_to message('configure').downcase, {:controller=> 'event_categories', :action => 'index'}, :class => 'action' %>)</span><br>
+                <span class="comments"><%= message('category') -%></span><br>
                 <%= f.select(:category, @categories.collect {|c| [ message('event.category.' + c.name, :default => c.name), c.name ] }) %>
             </td>
         </tr>
index fb110c974ba9965113dd8ac347979ece35e1278e..10bbcc637728c910587337eb7cf7ee6eb24595cb 100644 (file)
@@ -7,12 +7,13 @@
     <tr>
       <th class="thin nowrap"><%= message('project_history.col.year') -%></th>
       <th class="thin nowrap"><%= message('project_history.col.month') -%></th>
-      <th class="thin nowrap"></th>
-      <th class="thin nowrap"></th>
+      <th class="thin nowrap"><%= message('project_history.col.day') -%></th>
       <th class="thin nowrap"><%= message('project_history.col.time') -%></th>
-      <th class="thin nowrap" style="padding-left: 20px;"><%= message('project_history.col.action') -%></th>
       <th class="nowrap" style="padding-left: 20px; min-width: 100px;"><%= message('project_history.col.version') -%></th>
       <th class="nowrap" style="padding-left: 20px; min-width: 100px;"><%= message('project_history.col.events') -%></th>
+      <th class="thin nowrap"></th>
+      <th class="thin nowrap"></th>
+      <th class="thin nowrap" style="padding-left: 20px;"><%= message('project_history.col.action') -%></th>
     </tr>
   </thead>
   <tbody>
         profile_event = snapshot.event(EventCategory::KEY_PROFILE)
         other_events = snapshot.events.select{|e| e.category!=EventCategory::KEY_VERSION && e.category!=EventCategory::KEY_ALERT && e.category!=EventCategory::KEY_PROFILE}
     %>
-    <tr class="<%= cycle 'even','odd' -%>">
+    <tr class="<%= cycle 'even','odd' -%> hoverable">
     
       <td class="thin nowrap"><b><%= time.year unless time.year == current_year -%></b></td>
     
       <td class="thin nowrap"><b><%= l(time, :format => '%B').capitalize unless time.month == current_month -%></b></td>
 
-      <td class="thin nowrap">
-        <%= image_tag "event_alert.png", :alt => (message('project_history.col.alert') + ": " + alert_event.name + ". " + alert_event.description) if alert_event -%>
-      </td>
-
-      <td class="thin nowrap">
-        <%= image_tag "event_profile.png", :alt => message('project_history.col.profile') + ": " + profile_event.description if profile_event -%>
-      </td>
-
-      <td class="thin nowrap"><%= l time, :format => :long -%></td>
-
-      <td class="thin nowrap center" style="padding-left:10px; padding-right:10px">
-        <%
-          cell_content = nil;
-          if snapshot.islast?
-            cell_content = "<b>" + message('project_history.last_snapshot') + "</b>"
-          else
-            cell_content = button_to( message('project_history.delete_snapshot'), 
-                                        { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => snapshot.id }, 
-                                        :class => 'action red-button', 
-                                        :confirm => message('project_history.are_you_sure_delete_snapshot_x', :params => l(time, :format => :long)) )  
-          end
-        %>
-        <%= cell_content -%>
-      </td>
+      <td class="thin nowrap"><%= l(time, :format => '%d') -%></td>
+      
+      <td class="thin nowrap"><%= l(time, :format => '%H:%M') -%></td>
       
       <td class="thin nowrap" style="padding-left: 20px;">
           <table class="max-width">
         </table>
         <div id="event_<%= snapshot.id -%>_form"></div>
       </td>
+
+      <td class="thin nowrap">
+        <%= image_tag "event_alert.png", :alt => (message('project_history.col.alert') + ": " + alert_event.name + ". " + alert_event.description) if alert_event -%>
+      </td>
+
+      <td class="thin nowrap">
+        <%= image_tag "event_profile.png", :alt => message('project_history.col.profile') + ": " + profile_event.description if profile_event -%>
+      </td>
+
+      <td class="thin nowrap center" style="padding-left:10px; padding-right:10px">
+        <%
+          cell_content = nil;
+          if snapshot.islast?
+            cell_content = "<b>" + message('project_history.last_snapshot') + "</b>"
+          else
+            cell_content = button_to( message('project_history.delete_snapshot'), 
+                                        { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => snapshot.id }, 
+                                        :class => 'action red-button', 
+                                        :confirm => message('project_history.are_you_sure_delete_snapshot_x', :params => l(time, :format => :long)) )  
+          end
+        %>
+        <%= cell_content -%>
+      </td>
     </tr>
     <%
         current_year = time.year