aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2012-01-30 11:57:47 +0100
committerFabrice Bellingard <bellingard@gmail.com>2012-01-30 15:44:44 +0100
commit6ddac77971fe906af9738f53e485b554064e45ce (patch)
treec31844681958cb853b0a7d6c6da58dc569e3f1e1 /sonar-server
parentd9350849080811c8f53abb062a21d9a07d3a309d (diff)
downloadsonarqube-6ddac77971fe906af9738f53e485b554064e45ce.tar.gz
sonarqube-6ddac77971fe906af9738f53e485b554064e45ce.zip
SONAR-3104 Improve the usability of the project 'History'
- Add row highlighting - Reorder columns - Remove date duplication
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/_edit_event.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb59
2 files changed, 32 insertions, 29 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/_edit_event.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/_edit_event.html.erb
index e2da29e7f3c..8cdffc2dd0c 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/_edit_event.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/_edit_event.html.erb
@@ -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>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb
index fb110c974ba..10bbcc63772 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb
@@ -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>
@@ -26,36 +27,15 @@
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">
@@ -110,6 +90,29 @@
</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