# HG changeset patch
# User Chris Cannam
# Date 1301656421 -3600
# Node ID f3d8335d4e716d719425dcfe61586b3d945b1b28
# Parent efa1e508bdefe6cdd573ed90a0b67f185f166cee# Parent 30f68ecfdde48d9b3f239efab97160d56adf162b
Merge from branch "bug_127"
diff -r efa1e508bdef -r f3d8335d4e71 app/views/activities/_recent.rhtml
--- a/app/views/activities/_recent.rhtml Fri Apr 01 10:00:14 2011 +0100
+++ b/app/views/activities/_recent.rhtml Fri Apr 01 12:13:41 2011 +0100
@@ -2,6 +2,12 @@
<% max = 5 %>
<% if (events.nil?)
activity = Redmine::Activity::Fetcher.new(User.current, :project => @project)
+ if @project
+ # Don't show news (duplicated with News box) or wiki edits (too
+ # tedious) in project front page
+ activity.scope = [ "changesets", "files", "issues", "documents" ]
+ end
+
events = activity.events(Date.today - 28, Date.today + 1).first(max)
end
%>
diff -r efa1e508bdef -r f3d8335d4e71 app/views/news/_news.rhtml
--- a/app/views/news/_news.rhtml Fri Apr 01 10:00:14 2011 +0100
+++ b/app/views/news/_news.rhtml Fri Apr 01 12:13:41 2011 +0100
@@ -1,6 +1,12 @@
-
<%= link_to_project(news.project) + ': ' unless @project %>
-<%= link_to h(news.title), news_path(news) %>
-<%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %>
-
+
+
+<%= format_time(news.created_on) %>
+<% if !@project %>
+<%= link_to_project(news.project) %>
+<% end %>
+<%= link_to h(news.title), news_path(news) %>
+
+
<% unless news.summary.blank? %><%=h news.summary %>
<% end %>
-<%= authoring news.created_on, news.author %>
+
+
diff -r efa1e508bdef -r f3d8335d4e71 app/views/welcome/index.rhtml
--- a/app/views/welcome/index.rhtml Fri Apr 01 10:00:14 2011 +0100
+++ b/app/views/welcome/index.rhtml Fri Apr 01 12:13:41 2011 +0100
@@ -34,7 +34,8 @@
<% for project in @projects %>
<% @project = project %>
- <%= link_to_project project %> (<%= format_time(project.created_on) %>)
+ <%= link_to_project project %>
+ <%= format_time(project.created_on)%>
<%= render_project_short_description project %>
<% end %>
diff -r efa1e508bdef -r f3d8335d4e71 config/locales/en.yml
--- a/config/locales/en.yml Fri Apr 01 10:00:14 2011 +0100
+++ b/config/locales/en.yml Fri Apr 01 12:13:41 2011 +0100
@@ -753,6 +753,7 @@
label_added_time_by: "Added by {{author}} {{age}} ago"
label_updated_time_by: "Updated by {{author}} {{age}} ago"
label_updated_time: "Updated {{value}} ago"
+ label_time_ago: "{{age}} ago"
label_jump_to_a_project: Jump to a project...
label_file_plural: Downloads
label_changeset_plural: Changesets
diff -r efa1e508bdef -r f3d8335d4e71 lib/redmine.rb
--- a/lib/redmine.rb Fri Apr 01 10:00:14 2011 +0100
+++ b/lib/redmine.rb Fri Apr 01 12:13:41 2011 +0100
@@ -185,6 +185,7 @@
Redmine::MenuManager.map :project_menu do |menu|
menu.push :overview, { :controller => 'projects', :action => 'show' }
+ menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
menu.push :activity, { :controller => 'activities', :action => 'index' }
menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
:if => Proc.new { |p| p.shared_versions.any? }
@@ -193,7 +194,6 @@
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
- menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
menu.push :wiki, { :controller => 'wiki', :action => 'show', :id => nil }, :param => :project_id,
:if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
diff -r efa1e508bdef -r f3d8335d4e71 public/stylesheets/application.css
--- a/public/stylesheets/application.css Fri Apr 01 10:00:14 2011 +0100
+++ b/public/stylesheets/application.css Fri Apr 01 12:13:41 2011 +0100
@@ -294,16 +294,18 @@
div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; }
div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
-div#activity dl, #search-results { margin-left: 2em; }
+div#activity dl, div#news dl, #search-results { margin-left: 2em; }
div#activity .box dl { margin-left: 0; }
-div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
-div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
-div#activity dt.me .time { border-bottom: 1px solid #999; }
-div#activity dt .time { color: #777; font-size: 80%; }
+div#activity dd, div#news dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
+div#activity dt, div#news dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
+div#activity dt.me .time, div#news dt.me .time { border-bottom: 1px solid #999; }
+div#activity dt .time, div#news dt .time, .projects .latest .time { color: #777; font-size: 80%; }
div#activity dd .description, #search-results dd .description { font-style: italic; }
-div#activity span.project:after, #search-results span.project:after { content: " -"; }
+div#activity span.project:after, div#news span.project:after, #search-results span.project:after { content: " -"; }
div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; }
+.projects .latest .title { margin-right: 0.5em; }
+
#search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }
div#search-results-counts { display: block; padding-left: 0; margin-left: 0; }