diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-04 19:37:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-04 19:37:23 +0000 |
commit | 80a60247f527825aa5e02e19bcaec4bd864fce2a (patch) | |
tree | f0697baa72564b88fbf535895d3e92cdb584bae9 | |
parent | a3dda6dc4a3dd898357b5aaab6acffdb03f4da5e (diff) | |
download | redmine-80a60247f527825aa5e02e19bcaec4bd864fce2a.tar.gz redmine-80a60247f527825aa5e02e19bcaec4bd864fce2a.zip |
Slight changes to the activity view.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1120 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/projects_helper.rb | 4 | ||||
-rw-r--r-- | app/views/projects/activity.rhtml | 23 | ||||
-rw-r--r-- | public/stylesheets/application.css | 6 |
3 files changed, 24 insertions, 9 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 883be0ead..c07bbd2c2 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -26,6 +26,10 @@ module ProjectsHelper }, options end + def format_activity_description(text) + h(truncate(text, 250)) + end + def project_settings_tabs tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural}, {:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural}, diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml index 41a8ae100..bde806554 100644 --- a/app/views/projects/activity.rhtml +++ b/app/views/projects/activity.rhtml @@ -1,17 +1,22 @@ <h2><%=l(:label_activity)%>: <%= "#{month_name(@month).downcase} #{@year}" %></h2> +<div id="activity"> <% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %> - <h3><%= day_name(day.cwday) %> <%= day.day %></h3> - <ul> - <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| %> - <li><p><%= format_time(e.event_datetime, false) %> <%= link_to truncate(e.event_title, 100), e.event_url %><br /> - <% unless e.event_description.blank? %><em><%= truncate(e.event_description, 500) %></em><br /><% end %> - <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></p></li> +<h3><%= day_name(day.cwday) %> <%= day.day %></h3> +<dl> +<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> + <dt class="<%= e.class.name.downcase %>"><span class="time"><%= format_time(e.event_datetime, false) %></span> + <%= link_to truncate(e.event_title, 100), e.event_url %></dt> + <dd><% unless e.event_description.blank? -%> + <span class="description"><%= format_activity_description(e.event_description) %></span><br /> <% end %> - </ul> -<% end %> + <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd> +<% end -%> +</dl> +<% end -%> +</div> -<% if @events_by_day.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %> +<%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> <div style="float:left;"> <% prev_params = params.clone.update :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1abd1f6fd..b3b8b341d 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -147,6 +147,12 @@ div#issue-changesets .changeset { padding: 4px;} div#issue-changesets .changeset { border-bottom: 1px solid #ddd; } div#issue-changesets p { margin-top: 0; margin-bottom: 1em;} +div#activity dl { margin-left: 2em; } +div#activity dd { margin-bottom: 1em; } +div#activity dt { margin-bottom: 1px; } +div#activity dt .time { color: #777; font-size: 80%; } +div#activity dd .description { font-style: italic; } + .autoscroll {overflow-x: auto; padding:1px; width:100%; margin-bottom: 1.2em;} #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; } |