diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-01-30 11:57:47 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-01-30 15:44:44 +0100 |
commit | 6ddac77971fe906af9738f53e485b554064e45ce (patch) | |
tree | c31844681958cb853b0a7d6c6da58dc569e3f1e1 | |
parent | d9350849080811c8f53abb062a21d9a07d3a309d (diff) | |
download | sonarqube-6ddac77971fe906af9738f53e485b554064e45ce.tar.gz sonarqube-6ddac77971fe906af9738f53e485b554064e45ce.zip |
SONAR-3104 Improve the usability of the project 'History'
- Add row highlighting
- Reorder columns
- Remove date duplication
3 files changed, 33 insertions, 29 deletions
diff --git a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties index 2bf9ab17650..4053171992c 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-l10n-en-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -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 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 |