Commit ab42370af01a52c0ba3cfd97d365c735ecb4c468
1 parent
23734a71
Exists in
master
and in
4 other branches
Fix sattellites
Showing
3 changed files
with
11 additions
and
6 deletions
Show diff stats
app/helpers/dashboard_helper.rb
@@ -7,4 +7,8 @@ module DashboardHelper | @@ -7,4 +7,8 @@ module DashboardHelper | ||
7 | dashboard_merge_requests_path(options) | 7 | dashboard_merge_requests_path(options) |
8 | end | 8 | end |
9 | end | 9 | end |
10 | + | ||
11 | + def entities_per_project project, entity | ||
12 | + project.items_for(entity).where(assignee_id: current_user.id).count | ||
13 | + end | ||
10 | end | 14 | end |
app/views/dashboard/_filter.html.haml
@@ -21,10 +21,11 @@ | @@ -21,10 +21,11 @@ | ||
21 | %legend Projects: | 21 | %legend Projects: |
22 | %ul.nav.nav-pills.nav-stacked | 22 | %ul.nav.nav-pills.nav-stacked |
23 | - @projects.each do |project| | 23 | - @projects.each do |project| |
24 | - %li{class: ("active" if params[:project_id] == project.id.to_s)} | ||
25 | - = link_to dashboard_filter_path(entity, project_id: project.id) do | ||
26 | - = project.name_with_namespace | ||
27 | - %small.right= project.items_for(entity).where(assignee_id: current_user.id).count | 24 | + - unless entities_per_project(project, entity).zero? |
25 | + %li{class: ("active" if params[:project_id] == project.id.to_s)} | ||
26 | + = link_to dashboard_filter_path(entity, project_id: project.id) do | ||
27 | + = project.name_with_namespace | ||
28 | + %small.right= entities_per_project(project, entity) | ||
28 | 29 | ||
29 | %fieldset | 30 | %fieldset |
30 | %hr | 31 | %hr |
lib/gitlab/satellite/satellite.rb
@@ -41,11 +41,11 @@ module Gitlab | @@ -41,11 +41,11 @@ module Gitlab | ||
41 | end | 41 | end |
42 | 42 | ||
43 | def lock_file | 43 | def lock_file |
44 | - Rails.root.join("tmp", "#{project.path}.lock") | 44 | + Rails.root.join("tmp", "satellite_#{project.id}.lock") |
45 | end | 45 | end |
46 | 46 | ||
47 | def path | 47 | def path |
48 | - Rails.root.join("tmp", "repo_satellites", project.path) | 48 | + Rails.root.join("tmp", "repo_satellites", project.path_with_namespace) |
49 | end | 49 | end |
50 | 50 | ||
51 | def repo | 51 | def repo |