BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1a2e11c8
Unverified
Commit
1a2e11c8
authored
Dec 25, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix per-project counters for Dashboard filters
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f6a4e563
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
14 deletions
+8
-14
dashboard_helper.rb
app/helpers/dashboard_helper.rb
+5
-11
_filter.html.haml
app/views/shared/_filter.html.haml
+1
-1
dashboard_issues.rb
features/steps/dashboard/dashboard_issues.rb
+1
-1
dashboard_merge_requests.rb
features/steps/dashboard/dashboard_merge_requests.rb
+1
-1
No files found.
app/helpers/dashboard_helper.rb
View file @
1a2e11c8
...
...
@@ -14,17 +14,11 @@ module DashboardHelper
end
def
entities_per_project
(
project
,
entity
)
items
=
project
.
items_for
(
entity
)
items
=
case
params
[
:status
]
when
'closed'
items
.
closed
when
'all'
items
case
entity
.
to_sym
when
:issue
then
@issues
.
where
(
project_id:
project
.
id
)
when
:merge_request
then
@merge_requests
.
where
(
target_project_id:
project
.
id
)
else
items
.
opened
end
items
.
cared
(
current_user
).
count
[]
end
.
count
end
end
app/views/shared/_filter.html.haml
View file @
1a2e11c8
...
...
@@ -6,7 +6,7 @@
Assigned to me
%li
{
class:
(
"active"
if
params
[
:scope
]
==
'authored'
)}
=
link_to
filter_path
(
entity
,
scope:
'authored'
)
do
Author
ed by me
Creat
ed by me
%li
{
class:
(
"active"
if
params
[
:scope
]
==
'all'
)}
=
link_to
filter_path
(
entity
,
scope:
'all'
)
do
All
...
...
features/steps/dashboard/dashboard_issues.rb
View file @
1a2e11c8
...
...
@@ -34,7 +34,7 @@ class DashboardIssues < Spinach::FeatureSteps
step
'I click "Authored by me" link'
do
within
".scope-filter"
do
click_link
'
Author
ed by me'
click_link
'
Creat
ed by me'
end
end
...
...
features/steps/dashboard/dashboard_merge_requests.rb
View file @
1a2e11c8
...
...
@@ -34,7 +34,7 @@ class DashboardMergeRequests < Spinach::FeatureSteps
step
'I click "Authored by me" link'
do
within
".scope-filter"
do
click_link
'
Author
ed by me'
click_link
'
Creat
ed by me'
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment