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
c8bb1716
Commit
c8bb1716
authored
Dec 27, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-ui-milestone' into 'master'
Improve UI for milestone pages See merge request !1356
parents
80597d59
b8bffc0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
76 deletions
+71
-76
app/views/groups/milestones/show.html.haml
app/views/groups/milestones/show.html.haml
+35
-35
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+36
-40
features/steps/groups.rb
features/steps/groups.rb
+0
-1
No files found.
app/views/groups/milestones/show.html.haml
View file @
c8bb1716
%h3
.page-title
%h4
.page-title
.issue-box
{
class:
"issue-box-#{@group_milestone.closed? ? 'closed' : 'open'}"
}
-
if
@group_milestone
.
closed?
Closed
-
else
Open
Milestone
#{
@group_milestone
.
title
}
Milestone
#{
@group_milestone
.
title
}
.pull-right
.pull-right
-
if
can?
(
current_user
,
:manage_group
,
@group
)
-
if
can?
(
current_user
,
:manage_group
,
@group
)
...
@@ -7,46 +12,41 @@
...
@@ -7,46 +12,41 @@
-
else
-
else
=
link_to
'Reopen Milestone'
,
group_milestone_path
(
@group
,
@group_milestone
.
safe_title
,
title:
@group_milestone
.
title
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-small btn-grouped btn-reopen"
=
link_to
'Reopen Milestone'
,
group_milestone_path
(
@group
,
@group_milestone
.
safe_title
,
title:
@group_milestone
.
title
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-small btn-grouped btn-reopen"
%hr
-
if
(
@group_milestone
.
total_items_count
==
@group_milestone
.
closed_items_count
)
&&
@group_milestone
.
active?
-
if
(
@group_milestone
.
total_items_count
==
@group_milestone
.
closed_items_count
)
&&
@group_milestone
.
active?
.alert.alert-success
.alert.alert-success
%span
All issues for this milestone are closed. You may close the milestone now.
%span
All issues for this milestone are closed. You may close the milestone now.
.back-link
.description
=
link_to
group_milestones_path
(
@group
)
do
%table
.table
←
To milestones list
%thead
%tr
.issue-box
{
class:
"issue-box-#{@group_milestone.closed? ? 'closed' : 'open'}"
}
%th
Project
.state.clearfix
%th
Open issues
.state-label
%th
State
-
if
@group_milestone
.
closed?
%th
Due date
Closed
-
@group_milestone
.
milestones
.
each
do
|
milestone
|
-
else
%tr
Open
%td
=
link_to
"
#{
milestone
.
project
.
name
}
"
,
project_milestone_path
(
milestone
.
project
,
milestone
)
%h4
.title
%td
=
gfm
escape_once
(
@group_milestone
.
title
)
=
milestone
.
issues
.
opened
.
count
%td
.description
-
@group_milestone
.
milestones
.
each
do
|
milestone
|
%hr
%h4
=
link_to
"
#{
milestone
.
project
.
name
}
-
#{
milestone
.
title
}
"
,
project_milestone_path
(
milestone
.
project
,
milestone
)
%span
.pull-right
=
milestone
.
expires_at
-
if
milestone
.
closed?
-
if
milestone
.
closed?
%span
.label.label-danger
#{
milestone
.
state
}
Closed
=
preserve
do
-
else
-
if
milestone
.
description
.
present?
Open
=
milestone
.
description
%td
=
milestone
.
expires_at
.context
%p
Progress:
#{
@group_milestone
.
closed_items_count
}
closed
–
#{
@group_milestone
.
open_items_count
}
open
.progress.progress-info
.context
.progress-bar
{
style:
"width: #{@group_milestone.percent_complete}%;"
}
%p
.lead
Progress:
#{
@group_milestone
.
closed_items_count
}
closed
–
#{
@group_milestone
.
open_items_count
}
open
.progress.progress-info
.progress-bar
{
style:
"width: #{@group_milestone.percent_complete}%;"
}
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
%li
.active
%li
.active
...
...
app/views/projects/milestones/show.html.haml
View file @
c8bb1716
=
render
"projects/issues_nav"
=
render
"projects/issues_nav"
%h
3
.page-title
%h
4
.page-title
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
.issue-box
{
class:
issue_box_class
(
@milestone
)
}
-
if
@milestone
.
closed?
-
if
@milestone
.
closed?
Closed
Closed
...
@@ -8,52 +8,44 @@
...
@@ -8,52 +8,44 @@
-
else
-
else
Open
Open
Milestone ##{@milestone.iid}
Milestone ##{@milestone.iid}
.pull-right.creator
%small
.creator
%small
=
@milestone
.
expires_at
=
@milestone
.
expires_at
.pull-right
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
=
link_to
edit_project_milestone_path
(
@project
,
@milestone
),
class:
"btn btn-grouped"
do
%i
.fa.fa-pencil-square-o
Edit
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-grouped"
-
else
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-grouped"
%hr
%hr
-
if
@milestone
.
issues
.
any?
&&
@milestone
.
can_be_closed?
-
if
@milestone
.
issues
.
any?
&&
@milestone
.
can_be_closed?
.alert.alert-success
.alert.alert-success
%span
All issues for this milestone are closed. You may close milestone now.
%span
All issues for this milestone are closed. You may close milestone now.
.row
.col-sm-9
%h3
.issue-title
=
gfm
escape_once
(
@milestone
.
title
)
%div
-
if
@milestone
.
description
.
present?
.description
.wiki
=
preserve
do
=
markdown
@milestone
.
description
%hr
.context
%p
.lead
Progress:
#{
@milestone
.
closed_items_count
}
closed
–
#{
@milestone
.
open_items_count
}
open
%span
.light
#{
@milestone
.
percent_complete
}
% complete
%span
.pull-right
=
@milestone
.
expires_at
.progress.progress-info
.progress-bar
{
style:
"width: #{@milestone.percent_complete}%;"
}
.col-sm-3
%h3
.issue-title
%div
=
gfm
escape_once
(
@milestone
.
title
)
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
%div
=
link_to
edit_project_milestone_path
(
@project
,
@milestone
),
class:
"btn btn-block"
do
-
if
@milestone
.
description
.
present?
%i
.fa.fa-pencil-square-o
.description
Edit
.wiki
-
if
@milestone
.
active?
=
preserve
do
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-block"
=
markdown
@milestone
.
description
-
else
=
link_to
'Reopen Milestone'
,
project_milestone_path
(
@project
,
@milestone
,
milestone:
{
state_event: :activate
}),
method: :put
,
class:
"btn btn-reopen btn-block"
=
link_to
new_project_issue_path
(
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-block"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
=
link_to
'Browse Issues'
,
project_issues_path
(
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-block"
%hr
.context
%p
.lead
Progress:
#{
@milestone
.
closed_items_count
}
closed
–
#{
@milestone
.
open_items_count
}
open
%span
.light
#{
@milestone
.
percent_complete
}
% complete
%span
.pull-right
=
@milestone
.
expires_at
.progress.progress-info
.progress-bar
{
style:
"width: #{@milestone.percent_complete}%;"
}
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
...
@@ -71,6 +63,10 @@
...
@@ -71,6 +63,10 @@
%span
.badge
=
@users
.
count
%span
.badge
=
@users
.
count
.pull-right
.pull-right
=
link_to
new_project_issue_path
(
@project
,
issue:
{
milestone_id:
@milestone
.
id
}),
class:
"btn btn-grouped"
,
title:
"New Issue"
do
%i
.fa.fa-plus
New Issue
=
link_to
'Browse Issues'
,
project_issues_path
(
@milestone
.
project
,
milestone_id:
@milestone
.
id
),
class:
"btn edit-milestone-link btn-grouped"
.tab-content
.tab-content
.tab-pane.active
#tab-issues
.tab-pane.active
#tab-issues
...
...
features/steps/groups.rb
View file @
c8bb1716
...
@@ -188,7 +188,6 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
...
@@ -188,7 +188,6 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
end
end
step
'I should see group milestone with descriptions and expiry date'
do
step
'I should see group milestone with descriptions and expiry date'
do
page
.
should
have_content
(
'Lorem Ipsum is simply dummy text of the printing and typesetting industry'
)
page
.
should
have_content
(
'expires at Aug 20, 2114'
)
page
.
should
have_content
(
'expires at Aug 20, 2114'
)
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