cleaning dashboard files
This commit is contained in:
parent
cbd78922ee
commit
1ee69714df
4 changed files with 1 additions and 33 deletions
|
@ -1,25 +1,15 @@
|
||||||
class DashboardController < ApplicationController
|
class DashboardController < ApplicationController
|
||||||
respond_to :js, :html
|
respond_to :html
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@projects = current_user.projects.all
|
@projects = current_user.projects.all
|
||||||
@active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse
|
@active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html
|
|
||||||
format.js { no_cache_headers }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get authored or assigned open merge requests
|
# Get authored or assigned open merge requests
|
||||||
def merge_requests
|
def merge_requests
|
||||||
@projects = current_user.projects.all
|
@projects = current_user.projects.all
|
||||||
@merge_requests = MergeRequest.where("author_id = :id or assignee_id = :id", :id => current_user.id).opened.order("created_at DESC").limit(40)
|
@merge_requests = MergeRequest.where("author_id = :id or assignee_id = :id", :id => current_user.id).opened.order("created_at DESC").limit(40)
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html
|
|
||||||
format.js { no_cache_headers }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Get only assigned issues
|
# Get only assigned issues
|
||||||
|
@ -32,7 +22,6 @@ class DashboardController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.js { no_cache_headers }
|
|
||||||
format.atom { render :layout => false }
|
format.atom { render :layout => false }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
:plain
|
|
||||||
$("#feeds_content_holder").hide("slide", { direction: "left" }, 150, function(){
|
|
||||||
$("#news-feed").html("#{escape_javascript(render(:partial => "projects_feed"))}");
|
|
||||||
$("#feeds_content_holder").show("slide", { direction: "right" }, 150);
|
|
||||||
history.pushState({ path: this.path }, '', '#{dashboard_path}')
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
:plain
|
|
||||||
$("#feeds_content_holder").hide("slide", { direction: "left" }, 150, function(){
|
|
||||||
$("#news-feed").html("#{escape_javascript(render(:partial => "issues_feed"))}");
|
|
||||||
$("#feeds_content_holder").show("slide", { direction: "right" }, 150);
|
|
||||||
history.pushState({ path: this.path }, '', '#{dashboard_issues_path}')
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
:plain
|
|
||||||
$("#feeds_content_holder").hide("slide", { direction: "left" }, 150, function(){
|
|
||||||
$("#news-feed").html("#{escape_javascript(render(:partial => "merge_requests_feed"))}");
|
|
||||||
$("#feeds_content_holder").show("slide", { direction: "right" }, 150);
|
|
||||||
history.pushState({ path: this.path }, '', '#{dashboard_merge_requests_path}')
|
|
||||||
});
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue