diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index c0ead28ee49ddb9fc6798a025de19576ce6fe809..6b3455c594c8b89f0474e8a1c497daa2483c9fed 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -925,7 +925,7 @@ p.time { } a:last-child h4 { border:none; } - a.active { + a:hover { h4 { color:#111; border-right:4px solid $styled_border_color; diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index e098f571913542cf4734b37644d142b7118b86d7..f6b09e2343051ca948ab95d19c056a13887b414f 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -34,9 +34,4 @@ class DashboardController < ApplicationController format.atom { render :layout => false } end end - - def activities - @projects = current_user.projects.all - @events = Event.where(:project_id => @projects.map(&:id)).recent.limit(40) - end end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 90372cf5c8b4b9639571c27ae68da2557d59558f..459beec9a7328890537302f5d9c8be2b2c5cb514 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -13,6 +13,7 @@ class ProjectsController < ApplicationController def index @projects = current_user.projects @projects = @projects.select(&:last_activity_date).sort_by(&:last_activity_date).reverse + @events = Event.where(:project_id => @projects.map(&:id)).recent.limit(40) end def new @@ -78,7 +79,6 @@ class ProjectsController < ApplicationController render "projects/empty" end end - format.js end end diff --git a/app/views/dashboard/activities.html.haml b/app/views/dashboard/activities.html.haml deleted file mode 100644 index 2b96acc60ec7fa0d6e81a7af3eafc71779da031a..0000000000000000000000000000000000000000 --- a/app/views/dashboard/activities.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- if @events.any? - %div.dashboard_category - %h3 - %span.ico.activities - = link_to "Activities" , "#activities", :id => "activities" - - %hr - = render @events -- else - %h3 Nothing here diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index 895c47124f0418743745696a4077ae3603bae210..b20fafca75c6991eba8de8a43d476c556b6eb4f2 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -62,9 +62,6 @@ %h3 %span.ico.activities = link_to "Activities" , "#activities", :id => "activities" - %strong.right - = link_to dashboard_activities_path do - Visit activities page → %hr .row diff --git a/app/views/layouts/_app_menu.html.haml b/app/views/layouts/_app_menu.html.haml index b96bdacc38563267af5cd15fc5c33dccba4d0206..b9249b525b0a5bc047174a0927c61a63d0189c73 100644 --- a/app/views/layouts/_app_menu.html.haml +++ b/app/views/layouts/_app_menu.html.haml @@ -1,7 +1,6 @@ %nav.main_menu = render "layouts/const_menu_links" = link_to "Projects", projects_path, :class => "#{"current" if current_page?(projects_path)}" - = link_to "Activities", dashboard_activities_path, :class => "#{"current" if current_page?(dashboard_activities_path)}" = link_to dashboard_issues_path, :class => "#{"current" if current_page?(dashboard_issues_path)}", :id => "issues_slide" do Issues %span.count= current_user.assigned_issues.opened.count diff --git a/app/views/projects/index.html.haml b/app/views/projects/index.html.haml index e163851fd4677c14d23824050c540e4a087e61af..fee6363de097cb7562debc5de5b63a0423991328 100644 --- a/app/views/projects/index.html.haml +++ b/app/views/projects/index.html.haml @@ -1,22 +1,25 @@ - if @projects.any? .row - .span4 + .span11 + = render @events + .span5.right %div.leftbar.ui-box %h5 Projects + %small + (#{@projects.count}) - if current_user.can_create_project? %span.right = link_to new_project_path, :class => "btn very_small info" do New Project .content_list - @projects.each do |project| - = link_to project_path(project), :remote => true, :class => dom_class(project) do + = link_to project_path(project), :class => dom_class(project) do %h4 %span.ico.project - = truncate(project.name, :length => 22) - .span12.right - .show_holder.ui-box.padded - .loading + = truncate(project.name, :length => 25) + %span.right + → - else %h3 Nothing here @@ -31,20 +34,3 @@ New Project ยป - else If you will be added to project - it will be displayed here - - -:javascript - $(function(){ - $("a.project").live("ajax:before", function() { - $(".show_holder").html("
"); - $('a.project').removeClass("active"); - $(this).addClass("active"); - }); - $('a.project:first-child').trigger("click"); - }); - -- if @projects.count == @limit - :javascript - $(function(){ - Pager.init(#{@limit}); - }); diff --git a/app/views/projects/show.js.haml b/app/views/projects/show.js.haml deleted file mode 100644 index 132ebebf23fcd4d51b1e21b2a90ac82e093ef17d..0000000000000000000000000000000000000000 --- a/app/views/projects/show.js.haml +++ /dev/null @@ -1,7 +0,0 @@ -- if @project.repo_exists? && @project.has_commits? - :plain - $(".show_holder").html("#{escape_javascript(render(:partial => 'projects/show'))}"); -- else - :plain - $(".show_holder").html("#{escape_javascript(render(:template => 'projects/empty'))}"); - diff --git a/spec/requests/dashboard_spec.rb b/spec/requests/dashboard_spec.rb index 1ca256f93caca6c96c1f9829878cdfac7d6f9947..cfdbb8d47293ce7cf8485892e4a0222426be40cc 100644 --- a/spec/requests/dashboard_spec.rb +++ b/spec/requests/dashboard_spec.rb @@ -23,18 +23,4 @@ describe "Dashboard" do page.should have_content(@project.name) end end - - describe "GET /dashboard/activities" do - before do - visit dashboard_activities_path - end - - it "should be on dashboard page" do - current_path.should == dashboard_activities_path - end - - it "should have projects panel" do - page.should have_content(@project.name) - end - end end