From fa239c41c04964afa2a84c051e66625ab6f57249 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 24 Sep 2012 13:55:44 +0200 Subject: [PATCH] SONAR-3675 Refactor the Events widget to prevent using AJAX --- .../resources/org/sonar/l10n/core.properties | 4 + .../plugins/core/widgets/events.html.erb | 110 +++++++++++++++++- 2 files changed, 110 insertions(+), 4 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 1fa003ce918..4b7af1791e7 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 @@ -763,6 +763,10 @@ widget.description.links=Links widget.events.name=Events widget.events.description=Reports events on the project life cycle such as versions and alerts. +widget.events.title=Events +widget.events.all=All +widget.events.no_event=No event +widget.events.show_more=Show more widget.rules.name=Rules Compliance widget.rules.description=Reports violations and compliance index on coding standards. diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb index c9fb693c91f..a60adbb151d 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb @@ -1,6 +1,108 @@ -<% if @project.scope=='PRJ' %> -
- + + +

<%= message('widget.events.title') -%>    + + + +

+ + + + + + + + + +<% + events.each do |event| + categ = event.category +%> + + + + + + +<% + end +%> + +
<%= l(event.event_date.to_date) %><%= h message('event.category.' + categ, :default => categ) %><%= event.name %> + <% unless event.description.blank? %> + + + + <% end %> +
+ +
+ <%= message('widget.events.no_event') -%> +
+ +<%= message('widget.events.show_more') -%> + + + <% end %> \ No newline at end of file -- 2.39.5