# HG changeset patch # User Chris Cannam # Date 1358777849 0 # Node ID 6a10e5fbf8b2dd0abf13cdb065040d29d1db17da # Parent 3b7e11eaf1ca24da8dd5d4a1afc4d9ee3292b8b5# Parent a943f341c99d796c7c75ad1d16969ebe5aa2ef7d Merge from branch "feature_550" diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 app/controllers/my_controller.rb --- a/app/controllers/my_controller.rb Fri Nov 23 13:34:20 2012 +0000 +++ b/app/controllers/my_controller.rb Mon Jan 21 14:17:29 2013 +0000 @@ -21,6 +21,7 @@ helper :issues helper :users helper :custom_fields + helper :projects BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues, 'issuesreportedbyme' => :label_reported_issues, @@ -30,11 +31,12 @@ 'tipoftheday' => :label_tipoftheday, 'calendar' => :label_calendar, 'documents' => :label_document_plural, - 'timelog' => :label_spent_time + 'timelog' => :label_spent_time, + 'myprojects' => :label_my_projects }.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze - DEFAULT_LAYOUT = { 'left' => ['tipoftheday', 'activitymyprojects'], - 'right' => ['issueswatched'] + DEFAULT_LAYOUT = { 'left' => ['myprojects', 'activitymyprojects'], + 'right' => ['tipoftheday', 'issueswatched'] }.freeze verify :xhr => true, diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 app/views/activities/_busy.html.erb --- a/app/views/activities/_busy.html.erb Fri Nov 23 13:34:20 2012 +0000 +++ b/app/views/activities/_busy.html.erb Mon Jan 21 14:17:29 2013 +0000 @@ -1,7 +1,7 @@ <% events = @events_by_day %> <% if (events.nil?) activity = Redmine::Activity::Fetcher.new(User.anonymous) - events = activity.events(Date.today - 14, Date.today + 1) + events = activity.events(Date.today - 140, Date.today + 1) end %> diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 app/views/my/blocks/_myprojects.html.erb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/my/blocks/_myprojects.html.erb Mon Jan 21 14:17:29 2013 +0000 @@ -0,0 +1,16 @@ +<% @user_projects = User.current.projects.all(:order => :name) %> + +<% if @user_projects.empty? %> +

<%=l(:label_my_projects)%>

+
+

<%= l(:label_have_no_projects)%> <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}) if User.current.allowed_to?(:add_project, nil, :global => true) %>

+
+<% else %> +

<%=l(:label_my_projects)%> (<%= @user_projects.count %>)

+
+<%= + render :partial => 'projects/my', :locals => { :user => User.current } + %> +
+<% end %> + diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 app/views/projects/_my.html.erb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/views/projects/_my.html.erb Mon Jan 21 14:17:29 2013 +0000 @@ -0,0 +1,1 @@ +<%= render_my_project_hierarchy(@user_projects) %> diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 config/locales/en.yml --- a/config/locales/en.yml Fri Nov 23 13:34:20 2012 +0000 +++ b/config/locales/en.yml Mon Jan 21 14:17:29 2013 +0000 @@ -485,6 +485,7 @@ label_project_plural: Projects label_my_project_plural: My Projects label_other_project_plural: Other Projects + label_have_no_projects: Not a member of any projects. label_x_projects: zero: no projects one: 1 project diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 public/stylesheets/application.css --- a/public/stylesheets/application.css Fri Nov 23 13:34:20 2012 +0000 +++ b/public/stylesheets/application.css Mon Jan 21 14:17:29 2013 +0000 @@ -414,10 +414,10 @@ ul.projects { margin: 0; padding-left: 1em; } ul.projects.root { margin: 0; padding: 0; } -ul.projects ul.projects { border-left: 3px solid #e0e0e0; } +/*ul.projects ul.projects { border-left: 3px solid #e0e0e0; } */ ul.projects li.root { list-style-type:none; margin-bottom: 1em; } -ul.projects li.child { list-style-type:none; margin-top: 1em;} -ul.projects div.root a.project { font-weight: bold; font-size: 16px; margin: 0 0 10px 0; } +ul.projects li.child { list-style-type:none; } +ul.projects div.root a.project { font-weight: bold; } li.latest { margin-bottom: 0.5em; } diff -r 3b7e11eaf1ca -r 6a10e5fbf8b2 public/themes/soundsoftware/stylesheets/application.css --- a/public/themes/soundsoftware/stylesheets/application.css Fri Nov 23 13:34:20 2012 +0000 +++ b/public/themes/soundsoftware/stylesheets/application.css Mon Jan 21 14:17:29 2013 +0000 @@ -96,7 +96,7 @@ table.projects .level2 .firstcol { padding-left: 2em; } table.projects .level3 .firstcol { padding-left: 3em; } -ul.projects .public, ul.projects .private { padding-left: 0.5em; color: #3e442c; font-size: 0.95em } +ul.projects .public, ul.projects .private { padding-left: 0.5em; color: #3e442c; font-size: 0.9em } table.files tr.active td { padding-top: 0.5em; padding-bottom: 0.5em; } table.files .file .active { font-weight: bold; }