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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
84785896
Commit
84785896
authored
Jul 14, 2016
by
yury-n
Committed by
Luke "Jared" Bennett
Nov 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the milestone page more responsive
parent
5368b9f2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
143 additions
and
36 deletions
+143
-36
app/assets/stylesheets/pages/milestone.scss
app/assets/stylesheets/pages/milestone.scss
+101
-1
app/views/projects/milestones/show.html.haml
app/views/projects/milestones/show.html.haml
+9
-8
app/views/shared/milestones/_summary.html.haml
app/views/shared/milestones/_summary.html.haml
+33
-27
No files found.
app/assets/stylesheets/pages/milestone.scss
View file @
84785896
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
}
}
.progress
{
.progress
{
width
:
100%
;
height
:
6px
;
height
:
6px
;
}
}
}
}
...
@@ -39,15 +40,69 @@
...
@@ -39,15 +40,69 @@
}
}
.milestone-summary
{
.milestone-summary
{
margin-bottom
:
25px
;
h4
{
margin-bottom
:
0
;
}
.milestone-stat
{
.milestone-stat
{
white-space
:
nowrap
;
margin-right
:
10px
;
margin-right
:
10px
;
&
.with-drilldown
{
margin-right
:
2px
;
// the drill down element should sit closer to its parent
}
}
}
.remaining-days
{
.remaining-days
{
color
:
$orange-light
;
color
:
$orange-light
;
}
}
$width_to_show_stats_and_buttons_on_one_line
:
$screen-xs-min
;
.milestone-stats-and-buttons
{
display
:
flex
;
justify-content
:
flex-start
;
flex-wrap
:
wrap
;
@media
(
min-width
:
$width_to_show_stats_and_buttons_on_one_line
)
{
justify-content
:
space-between
;
flex-wrap
:
nowrap
;
}
}
.milestone-progress-buttons
{
// for small devices buttons go first
order
:
1
;
// buttons go on its own line below the header and need some margin
margin-top
:
10px
;
@media
(
min-width
:
$width_to_show_stats_and_buttons_on_one_line
)
{
// when displayed on one line stats go first, buttons second
order
:
2
;
margin-top
:
0
;
flex-shrink
:
0
;
}
.btn
{
float
:
left
;
margin-right
:
$btn-side-margin
;
}
}
.milestone-stats
{
order
:
2
;
width
:
100%
;
padding
:
7px
0
;
flex-shrink
:
1
;
@media
(
min-width
:
$width_to_show_stats_and_buttons_on_one_line
)
{
// when displayed on one line stats go first, buttons second
order
:
1
;
}
}
.progress
{
width
:
100%
;
margin
:
15px
0
;
}
}
}
.issues-sortable-list
,
.issues-sortable-list
,
...
@@ -82,3 +137,48 @@
...
@@ -82,3 +137,48 @@
}
}
}
}
}
}
.milestone-page-header
{
display
:
flex
;
flex-flow
:
row
;
align-content
:
center
;
flex-wrap
:
wrap
;
.status-box
{
margin-top
:
0
;
// reset what's inherited from the framework css. elements here are v-aligned by flexbox
}
.milestone-buttons
{
// flex flow is row (left to right)
// but buttons should stick to the right side
margin-left
:
auto
;
}
.status-box
{
order
:
1
;
}
.milestone-buttons
{
order
:
2
;
}
.header-text-content
{
order
:
3
;
width
:
100%
;
}
.milestone-buttons
.verbose
{
display
:
none
;
}
@media
(
min-width
:
$screen-xs-min
)
{
.milestone-buttons
.verbose
{
display
:
inline
;
}
.header-text-content
{
order
:
2
;
width
:
auto
;
}
.milestone-buttons
{
order
:
3
;
}
}
}
app/views/projects/milestones/show.html.haml
View file @
84785896
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
=
render
"projects/issues/head"
=
render
"projects/issues/head"
%div
{
class:
container_class
}
%div
{
class:
container_class
}
.detail-page-header
.detail-page-header
.milestone-page-header
.status-box
{
class:
status_box_class
(
@milestone
)
}
.status-box
{
class:
status_box_class
(
@milestone
)
}
-
if
@milestone
.
closed?
-
if
@milestone
.
closed?
Closed
Closed
...
@@ -12,13 +12,14 @@
...
@@ -12,13 +12,14 @@
Past due
Past due
-
else
-
else
Open
Open
.header-text-content
%span
.identifier
%span
.identifier
Milestone ##{@milestone.iid}
Milestone ##{@milestone.iid}
-
if
@milestone
.
expires_at
-
if
@milestone
.
expires_at
%span
.creator
%span
.creator
·
·
=
@milestone
.
expires_at
=
@milestone
.
expires_at
.
pull-right
.
milestone-buttons
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
-
if
can?
(
current_user
,
:admin_milestone
,
@project
)
-
if
@milestone
.
active?
-
if
@milestone
.
active?
=
link_to
'Close Milestone'
,
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-nr btn-grouped"
=
link_to
'Close Milestone'
,
namespace_project_milestone_path
(
@project
.
namespace
,
@project
,
@milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
class:
"btn btn-close btn-nr btn-grouped"
...
...
app/views/shared/milestones/_summary.html.haml
View file @
84785896
...
@@ -3,6 +3,10 @@
...
@@ -3,6 +3,10 @@
.context.prepend-top-default
.context.prepend-top-default
.milestone-summary
.milestone-summary
%h4
Progress
%h4
Progress
.milestone-stats-and-buttons
.milestone-stats
%span
.milestone-stat.with-drilldown
%strong
=
milestone
.
issues_visible_to_user
(
current_user
).
size
%strong
=
milestone
.
issues_visible_to_user
(
current_user
).
size
issues:
issues:
%span
.milestone-stat
%span
.milestone-stat
...
@@ -10,6 +14,7 @@
...
@@ -10,6 +14,7 @@
open and
open and
%strong
=
milestone
.
issues_visible_to_user
(
current_user
).
closed
.
size
%strong
=
milestone
.
issues_visible_to_user
(
current_user
).
closed
.
size
closed
closed
%span
.milestone-stat.with-drilldown
%strong
=
milestone
.
merge_requests
.
size
%strong
=
milestone
.
merge_requests
.
size
merge requests:
merge requests:
%span
.milestone-stat
%span
.milestone-stat
...
@@ -20,15 +25,16 @@
...
@@ -20,15 +25,16 @@
%span
.milestone-stat
%span
.milestone-stat
%strong
==
#{
milestone
.
percent_complete
(
current_user
)
}
%
%strong
==
#{
milestone
.
percent_complete
(
current_user
)
}
%
complete
complete
%span
.milestone-stat
%span
.milestone-stat
%span
.remaining-days
=
milestone_remaining_days
(
milestone
)
%span
.remaining-days
=
milestone_remaining_days
(
milestone
)
%span
.pull-right.tab-issues-buttons
.milestone-progress-buttons
%span
.tab-issues-buttons
-
if
project
&&
can?
(
current_user
,
:create_issue
,
project
)
-
if
project
&&
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
=
link_to
new_namespace_project_issue_path
(
project
.
namespace
,
project
,
issue:
{
milestone_id:
milestone
.
id
}),
class:
"btn
"
,
title:
"New Issue"
do
New Issue
New Issue
=
link_to
'Browse Issues'
,
milestones_browse_issuables_path
(
milestone
,
type: :issues
),
class:
"btn btn-grouped
"
=
link_to
'Browse Issues'
,
milestones_browse_issuables_path
(
milestone
,
type: :issues
),
class:
"btn
"
%span
.pull-right
.tab-merge-requests-buttons.hidden
%span
.tab-merge-requests-buttons.hidden
=
link_to
'Browse Merge Requests'
,
milestones_browse_issuables_path
(
milestone
,
type: :merge_requests
),
class:
"btn btn-grouped
"
=
link_to
'Browse Merge Requests'
,
milestones_browse_issuables_path
(
milestone
,
type: :merge_requests
),
class:
"btn
"
=
milestone_progress_bar
(
milestone
)
=
milestone_progress_bar
(
milestone
)
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