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
Tatuya Kamada
gitlab-ce
Commits
087abdf7
Commit
087abdf7
authored
Jan 27, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New right side gutter design.
[WIP]
parent
48b6b0a4
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
155 additions
and
97 deletions
+155
-97
app/assets/javascripts/issuable_context.js.coffee
app/assets/javascripts/issuable_context.js.coffee
+0
-12
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+12
-1
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+2
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+13
-0
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+30
-0
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+6
-0
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+1
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+3
-5
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+3
-3
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+85
-75
No files found.
app/assets/javascripts/issuable_context.js.coffee
View file @
087abdf7
...
...
@@ -10,18 +10,6 @@ class @IssuableContext
$
(
".issuable-sidebar .inline-update"
).
on
"change"
,
".js-assignee"
,
->
$
(
this
).
submit
()
$
(
'.issuable-details'
).
waitForImages
->
$
(
'.issuable-affix'
).
on
'affix.bs.affix'
,
->
$
(
@
).
width
(
$
(
@
).
outerWidth
())
.
on
'affixed-top.bs.affix affixed-bottom.bs.affix'
,
->
$
(
@
).
width
(
''
)
$
(
'.issuable-affix'
).
affix
offset
:
top
:
->
@
top
=
(
$
(
'.issuable-affix'
).
offset
().
top
-
70
)
bottom
:
->
@
bottom
=
$
(
'.footer'
).
outerHeight
(
true
)
$
(
".edit-link"
).
click
(
e
)
->
block
=
$
(
@
).
parents
(
'.block'
)
block
.
find
(
'.selectbox'
).
show
()
...
...
app/assets/stylesheets/framework/sidebar.scss
View file @
087abdf7
...
...
@@ -200,6 +200,10 @@
}
}
@mixin
expanded-gutter
{
padding-right
:
$gutter_width
;
}
@mixin
collapsed-sidebar
{
padding-left
:
$sidebar_collapsed_width
;
...
...
@@ -266,6 +270,7 @@
background
:
#f2f6f7
;
}
// page is small enough
@media
(
max-width
:
$screen-md-max
)
{
.page-sidebar-collapsed
{
@include
collapsed-sidebar
;
...
...
@@ -280,7 +285,13 @@
}
}
// page is large enough
@media
(
min-width
:
$screen-md-max
)
{
.page-gutter
{
@include
expanded-gutter
;
}
.page-sidebar-collapsed
{
@include
collapsed-sidebar
;
}
...
...
app/assets/stylesheets/framework/variables.scss
View file @
087abdf7
...
...
@@ -12,6 +12,8 @@ $gl-font-size: 15px;
$list-font-size
:
15px
;
$sidebar_collapsed_width
:
62px
;
$sidebar_width
:
230px
;
$gutter_collapsed_width
:
62px
;
$gutter_width
:
320px
;
$avatar_radius
:
50%
;
$code_font_size
:
13px
;
$code_line_height
:
1
.5
;
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
087abdf7
...
...
@@ -133,3 +133,16 @@
margin-right
:
2px
;
}
}
.right-sidebar
{
position
:
fixed
;
top
:
58px
;
right
:
0
;
height
:
100%
;
transition-duration
:
.3s
;
background
:
$gray-light
;
overflow
:
scroll
;
width
:
$gutter_width
;
padding
:
10px
20px
;
}
\ No newline at end of file
app/helpers/application_helper.rb
View file @
087abdf7
...
...
@@ -293,6 +293,36 @@ module ApplicationHelper
end
end
def
issuable_count
(
entity
,
project
)
if
project
.
nil?
0
elsif
current_controller?
(
:issues
)
project
.
issues
.
send
(
entity
).
count
elsif
current_controller?
(
:merge_requests
)
project
.
merge_requests
.
send
(
entity
).
count
end
end
def
next_issuable_for
(
project
)
if
project
.
nil?
nil
elsif
current_controller?
(
:issues
)
project
.
issues
.
where
(
"id > ?"
,
id
).
first
elsif
current_controller?
(
:merge_requests
)
project
.
merge_requests
.
where
(
"id > ?"
,
id
).
first
end
end
def
prev_issuable_for
(
project
)
if
project
.
nil?
nil
elsif
current_controller?
(
:issues
)
project
.
issues
.
where
(
"id < ?"
,
id
).
last
elsif
current_controller?
(
:merge_requests
)
project
.
merge_requests
.
where
(
"id > ?"
,
id
).
last
end
end
def
state_filters_text_for
(
entity
,
project
)
titles
=
{
opened:
"Open"
...
...
app/helpers/nav_helper.rb
View file @
087abdf7
...
...
@@ -19,6 +19,12 @@ module NavHelper
end
end
def
page_gutter_class
if
current_path?
(
'merge_requests#show'
)
||
current_path?
(
'issues#show'
)
"page-gutter"
end
end
def
nav_header_class
if
nav_menu_collapsed?
"header-collapsed"
...
...
app/views/layouts/_page.html.haml
View file @
087abdf7
.page-with-sidebar
{
class:
page_sidebar_class
}
.page-with-sidebar
{
class:
"#{page_sidebar_class} #{page_gutter_class}"
}
=
render
"layouts/broadcast"
.sidebar-wrapper.nicescroll
{
class:
nav_sidebar_class
}
.header-logo
...
...
app/views/projects/issues/show.html.haml
View file @
087abdf7
...
...
@@ -54,11 +54,9 @@
=
render
'votes/votes_block'
,
votable:
@issue
.row
%section
.col-md-
9
%section
.col-md-
12
.issuable-discussion
=
render
'projects/issues/discussion'
%aside
.col-md-3
=
render
'shared/issuable/sidebar'
,
issuable:
@issue
=
render
'shared/show_aside'
=
render
'shared/issuable/sidebar'
,
issuable:
@issue
\ No newline at end of file
app/views/projects/merge_requests/_show.html.haml
View file @
087abdf7
...
...
@@ -70,11 +70,9 @@
=
render
'votes/votes_block'
,
votable:
@merge_request
.row
%section
.col-md-
9
%section
.col-md-
12
.issuable-discussion
=
render
"projects/merge_requests/discussion"
%aside
.col-md-3
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
=
render
'shared/show_aside'
#commits
.commits.tab-pane
...
...
@@ -87,6 +85,8 @@
.mr-loading-status
=
spinner
=
render
'shared/issuable/sidebar'
,
issuable:
@merge_request
:javascript
var
merge_request
;
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
087abdf7
.issuable-sidebar.issuable-affix
%aside
.right-sidebar
.issuable-sidebar
.block
=
issuable
.
iid
of
=
issuable_count
(
:all
,
@project
)
.issuable-nav.pull-right.btn-group
{
role:
'group'
,
"aria-label"
=>
'...'
}
%a
.btn.btn-default
{
href:
'#'
}
Prev
%a
.btn.btn-default
{
href:
'#'
}
Next
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
.block.assignee
.title
...
...
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