Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2ac744e9
Commit
2ac744e9
authored
Jan 27, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show buttons based on current tab.
parent
7ecd30a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
+25
-25
app/assets/javascripts/milestone.js.coffee
app/assets/javascripts/milestone.js.coffee
+10
-0
app/assets/stylesheets/pages/milestone.scss
app/assets/stylesheets/pages/milestone.scss
+1
-1
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+14
-24
No files found.
app/assets/javascripts/milestone.js.coffee
View file @
2ac744e9
...
...
@@ -64,6 +64,7 @@ class @Milestone
constructor
:
->
@
bindIssuesSorting
()
@
bindMergeRequestSorting
()
@
bindTabsSwitching
bindIssuesSorting
:
->
$
(
"#issues-list-unassigned, #issues-list-ongoing, #issues-list-closed"
).
sortable
(
...
...
@@ -122,3 +123,12 @@ class @Milestone
Milestone
.
updateMergeRequest
(
ui
.
item
,
merge_request_url
,
data
)
).
disableSelection
()
bindMergeRequestSorting
:
->
$
(
'a[data-toggle="tab"]'
).
on
'show.bs.tab'
,
(
e
)
->
currentTabClass
=
$
(
e
.
target
).
data
(
'show'
)
previousTabClass
=
$
(
e
.
relatedTarget
).
data
(
'show'
)
$
(
previousTabClass
).
hide
()
$
(
currentTabClass
).
removeClass
(
'hidden'
)
$
(
currentTabClass
).
show
()
app/assets/stylesheets/pages/milestone.scss
View file @
2ac744e9
...
...
@@ -29,7 +29,7 @@ li.milestone {
}
.milestone-summary
{
margin-bottom
:
1
5px
;
margin-bottom
:
2
5px
;
}
.milestone-stat
{
...
...
app/views/projects/milestones/show.html.haml
View file @
2ac744e9
...
...
@@ -63,16 +63,26 @@
%span
.time-elapsed
%strong
==
#{
@milestone
.
percent_time_used
}
%
time elapsed
%span
.pull-right
=
@milestone
.
expires_at
%span
.pull-right.tab-issues-buttons.tab-labels-buttons
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-grouped"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
-
if
can?
(
current_user
,
:read_issue
,
@project
)
=
link_to
'Browse Issues'
,
namespace_project_issues_path
(
@milestone
.
project
.
namespace
,
@milestone
.
project
,
milestone_title:
@milestone
.
title
),
class:
"btn btn-grouped"
%span
.pull-right.tab-merge-requests-buttons.hidden
-
if
can?
(
current_user
,
:read_merge_request
,
@project
)
=
link_to
'Browse Merge Requests'
,
namespace_project_merge_requests_path
(
@milestone
.
project
.
namespace
,
@milestone
.
project
,
milestone_title:
@milestone
.
title
),
class:
"btn btn-grouped"
=
milestone_progress_bar
(
@milestone
)
%ul
.nav-links.no-top.no-bottom
%li
.active
=
link_to
'#tab-issues'
,
'data-toggle'
=>
'tab'
do
=
link_to
'#tab-issues'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-issues-buttons'
do
Issues
%span
.badge
=
@issues
.
count
%li
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
do
=
link_to
'#tab-merge-requests'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-merge-requests-buttons'
do
Merge Requests
%span
.badge
=
@merge_requests
.
count
%li
...
...
@@ -80,24 +90,12 @@
Participants
%span
.badge
=
@users
.
count
%li
=
link_to
'#tab-labels'
,
'data-toggle'
=>
'tab'
do
=
link_to
'#tab-labels'
,
'data-toggle'
=>
'tab'
,
'data-show'
=>
'.tab-issues-buttons'
do
Labels
%span
.badge
=
@labels
.
count
.tab-content
.tab-pane.active
#tab-issues
.content-block.oneline-block
.controls
-
if
can?
(
current_user
,
:create_issue
,
@project
)
=
link_to
new_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-grouped"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
-
if
can?
(
current_user
,
:read_issue
,
@project
)
=
link_to
'Browse Issues'
,
namespace_project_issues_path
(
@milestone
.
project
.
namespace
,
@milestone
.
project
,
milestone_title:
@milestone
.
title
),
class:
"btn btn-grouped"
.oneline
All issues in this milestone
.row.prepend-top-default
.col-md-4
=
render
(
'issues'
,
title:
'Unstarted Issues (open and unassigned)'
,
issues:
@issues
.
opened
.
unassigned
,
id:
'unassigned'
)
...
...
@@ -107,14 +105,6 @@
=
render
(
'issues'
,
title:
'Completed Issues (closed)'
,
issues:
@issues
.
closed
,
id:
'closed'
)
.tab-pane
#tab-merge-requests
.content-block.oneline-block
.controls
-
if
can?
(
current_user
,
:read_merge_request
,
@project
)
=
link_to
'Browse Merge Requests'
,
namespace_project_merge_requests_path
(
@milestone
.
project
.
namespace
,
@milestone
.
project
,
milestone_title:
@milestone
.
title
),
class:
"btn btn-grouped"
.oneline
All merge requests in this milestone
.row.prepend-top-default
.col-md-3
=
render
(
'merge_requests'
,
title:
'Work in progress (open and unassigned)'
,
merge_requests:
@merge_requests
.
opened
.
unassigned
,
id:
'unassigned'
)
...
...
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