Commit 1ee69714df3bdeea44ed9a572a922995beef958d

Authored by Dmitriy Zaporozhets
1 parent cbd78922

cleaning dashboard files

app/controllers/dashboard_controller.rb
1 1 class DashboardController < ApplicationController
2   - respond_to :js, :html
  2 + respond_to :html
3 3  
4 4 def index
5 5 @projects = current_user.projects.all
6 6 @active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse
7   -
8   - respond_to do |format|
9   - format.html
10   - format.js { no_cache_headers }
11   - end
12 7 end
13 8  
14 9 # Get authored or assigned open merge requests
15 10 def merge_requests
16 11 @projects = current_user.projects.all
17 12 @merge_requests = MergeRequest.where("author_id = :id or assignee_id = :id", :id => current_user.id).opened.order("created_at DESC").limit(40)
18   -
19   - respond_to do |format|
20   - format.html
21   - format.js { no_cache_headers }
22   - end
23 13 end
24 14  
25 15 # Get only assigned issues
... ... @@ -32,7 +22,6 @@ class DashboardController &lt; ApplicationController
32 22  
33 23 respond_to do |format|
34 24 format.html
35   - format.js { no_cache_headers }
36 25 format.atom { render :layout => false }
37 26 end
38 27 end
... ...
app/views/dashboard/index.js.haml
... ... @@ -1,7 +0,0 @@
1   -:plain
2   - $("#feeds_content_holder").hide("slide", { direction: "left" }, 150, function(){
3   - $("#news-feed").html("#{escape_javascript(render(:partial => "projects_feed"))}");
4   - $("#feeds_content_holder").show("slide", { direction: "right" }, 150);
5   - history.pushState({ path: this.path }, '', '#{dashboard_path}')
6   - });
7   -
app/views/dashboard/issues.js.haml
... ... @@ -1,7 +0,0 @@
1   -:plain
2   - $("#feeds_content_holder").hide("slide", { direction: "left" }, 150, function(){
3   - $("#news-feed").html("#{escape_javascript(render(:partial => "issues_feed"))}");
4   - $("#feeds_content_holder").show("slide", { direction: "right" }, 150);
5   - history.pushState({ path: this.path }, '', '#{dashboard_issues_path}')
6   - });
7   -
app/views/dashboard/merge_requests.js.haml
... ... @@ -1,7 +0,0 @@
1   -:plain
2   - $("#feeds_content_holder").hide("slide", { direction: "left" }, 150, function(){
3   - $("#news-feed").html("#{escape_javascript(render(:partial => "merge_requests_feed"))}");
4   - $("#feeds_content_holder").show("slide", { direction: "right" }, 150);
5   - history.pushState({ path: this.path }, '', '#{dashboard_merge_requests_path}')
6   - });
7   -