# HG changeset patch # User Chris Cannam # Date 1301581435 -3600 # Node ID c46fbe5d58ce1df2458a0a0d440dd641127407aa # Parent 8d0e011332effa98c73a8aa65b071a703eaeb826# Parent 361602c5e6bb86ca86454c11b4ceb606bfbf05c2 Merge from branch "feature_122" diff -r 361602c5e6bb -r c46fbe5d58ce app/controllers/files_controller.rb --- a/app/controllers/files_controller.rb Thu Mar 31 15:21:24 2011 +0100 +++ b/app/controllers/files_controller.rb Thu Mar 31 15:23:55 2011 +0100 @@ -8,7 +8,7 @@ include SortHelper def index - sort_init 'active', 'asc' + sort_init 'active', 'desc' sort_update 'filename' => "#{Attachment.table_name}.filename", 'active' => "#{Attachment.table_name}.active", 'created_on' => "#{Attachment.table_name}.created_on", diff -r 361602c5e6bb -r c46fbe5d58ce app/controllers/my_controller.rb --- a/app/controllers/my_controller.rb Thu Mar 31 15:21:24 2011 +0100 +++ b/app/controllers/my_controller.rb Thu Mar 31 15:23:55 2011 +0100 @@ -24,14 +24,15 @@ BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues, 'issuesreportedbyme' => :label_reported_issues, 'issueswatched' => :label_watched_issues, + 'activitymyprojects' => :label_activity_my_recent, 'news' => :label_news_latest, 'calendar' => :label_calendar, 'documents' => :label_document_plural, 'timelog' => :label_spent_time }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze - DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'], - 'right' => ['issuesreportedbyme'] + DEFAULT_LAYOUT = { 'left' => ['activitymyprojects'], + 'right' => ['issueswatched','calendar'] }.freeze verify :xhr => true, diff -r 361602c5e6bb -r c46fbe5d58ce app/views/activities/_recent.rhtml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/activities/_recent.rhtml Thu Mar 31 15:23:55 2011 +0100 @@ -0,0 +1,51 @@ +<% events = @events_by_day %> +<% max = 5 %> +<% if (events.nil?) + activity = Redmine::Activity::Fetcher.new(User.current, :project => @project) + events = activity.events(Date.today - 28, Date.today + 1).first(max) + end +%> + +
<%= l(:label_activity_my_recent_none) %>
+ <% end %> + +<% else %> + + <% if !@project.nil? %> +<%= link_to l(:label_news_view_all), :controller => 'news', :action => 'index', :project_id => @project %>
<% end %> + + <%= render :partial => 'activities/recent' %> + <%= call_hook(:view_projects_show_right, :project => @project) %> diff -r 361602c5e6bb -r c46fbe5d58ce config/locales/en.yml --- a/config/locales/en.yml Thu Mar 31 15:21:24 2011 +0100 +++ b/config/locales/en.yml Thu Mar 31 15:23:55 2011 +0100 @@ -518,6 +518,9 @@ label_last_login: Last connection label_registered_on: Registered on label_activity: Activity + label_activity_recent: Recent activity + label_activity_my_recent: Recent activity in my projects + label_activity_my_recent_none: No recent activity label_overall_activity: Overall activity label_user_activity: "{{value}}'s activity" label_new: New diff -r 361602c5e6bb -r c46fbe5d58ce extra/soundsoftware/reposman-soundsoftware.rb --- a/extra/soundsoftware/reposman-soundsoftware.rb Thu Mar 31 15:21:24 2011 +0100 +++ b/extra/soundsoftware/reposman-soundsoftware.rb Thu Mar 31 15:23:55 2011 +0100 @@ -346,14 +346,5 @@ log("\trepository #{repos_path} created"); end - if project.respond_to?(:repository) and project.repository.is_external? - external_url = project.repository.external_url; - log("\tproject #{project.identifier} has external repository url #{external_url}"); - if !external_url.match(/^https?:/) - # wot about git, svn/svn+ssh, etc? should we just check for a scheme at all? - log("\tthis is not an http(s) url: ignoring"); - end - end - end diff -r 361602c5e6bb -r c46fbe5d58ce public/stylesheets/application.css --- a/public/stylesheets/application.css Thu Mar 31 15:21:24 2011 +0100 +++ b/public/stylesheets/application.css Thu Mar 31 15:23:55 2011 +0100 @@ -216,6 +216,7 @@ h3.version { background: url(../images/package.png) no-repeat 0% 50%; padding-left: 20px; } div.issues h3 { background: url(../images/ticket.png) no-repeat 0% 50%; padding-left: 20px; } +div.activity h3 { background: url(../images/ticket.png) no-repeat 0% 50%; padding-left: 20px; } div.members h3 { background: url(../images/group.png) no-repeat 0% 50%; padding-left: 20px; } div.news h3 { background: url(../images/news.png) no-repeat 0% 50%; padding-left: 20px; } div.projects h3 { background: url(../images/projects.png) no-repeat 0% 50%; padding-left: 20px; } @@ -294,6 +295,7 @@ div#issue-changesets p { margin-top: 0; margin-bottom: 1em;} div#activity 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; }