Fix sattellites
This commit is contained in:
parent
23734a715e
commit
ab42370af0
3 changed files with 11 additions and 6 deletions
|
@ -7,4 +7,8 @@ module DashboardHelper
|
||||||
dashboard_merge_requests_path(options)
|
dashboard_merge_requests_path(options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def entities_per_project project, entity
|
||||||
|
project.items_for(entity).where(assignee_id: current_user.id).count
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,10 +21,11 @@
|
||||||
%legend Projects:
|
%legend Projects:
|
||||||
%ul.nav.nav-pills.nav-stacked
|
%ul.nav.nav-pills.nav-stacked
|
||||||
- @projects.each do |project|
|
- @projects.each do |project|
|
||||||
%li{class: ("active" if params[:project_id] == project.id.to_s)}
|
- unless entities_per_project(project, entity).zero?
|
||||||
= link_to dashboard_filter_path(entity, project_id: project.id) do
|
%li{class: ("active" if params[:project_id] == project.id.to_s)}
|
||||||
= project.name_with_namespace
|
= link_to dashboard_filter_path(entity, project_id: project.id) do
|
||||||
%small.right= project.items_for(entity).where(assignee_id: current_user.id).count
|
= project.name_with_namespace
|
||||||
|
%small.right= entities_per_project(project, entity)
|
||||||
|
|
||||||
%fieldset
|
%fieldset
|
||||||
%hr
|
%hr
|
||||||
|
|
|
@ -41,11 +41,11 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def lock_file
|
def lock_file
|
||||||
Rails.root.join("tmp", "#{project.path}.lock")
|
Rails.root.join("tmp", "satellite_#{project.id}.lock")
|
||||||
end
|
end
|
||||||
|
|
||||||
def path
|
def path
|
||||||
Rails.root.join("tmp", "repo_satellites", project.path)
|
Rails.root.join("tmp", "repo_satellites", project.path_with_namespace)
|
||||||
end
|
end
|
||||||
|
|
||||||
def repo
|
def repo
|
||||||
|
|
Loading…
Add table
Reference in a new issue