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
f2bf9443
Commit
f2bf9443
authored
Dec 09, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add table styling to commits tables
parent
b3e2fe69
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
41 deletions
+68
-41
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+38
-0
app/assets/stylesheets/pages/commits.scss
app/assets/stylesheets/pages/commits.scss
+2
-12
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+26
-27
app/views/projects/commits/_commit_list.html.haml
app/views/projects/commits/_commit_list.html.haml
+1
-1
app/views/projects/commits/_commits.html.haml
app/views/projects/commits/_commits.html.haml
+1
-1
No files found.
app/assets/stylesheets/framework/lists.scss
View file @
f2bf9443
...
@@ -234,6 +234,44 @@ ul.content-list {
...
@@ -234,6 +234,44 @@ ul.content-list {
}
}
}
}
// Table list
.table-list
{
display
:
table
;
width
:
100%
;
.table-list-row
{
display
:
table-row
;
}
.table-list-cell
{
display
:
table-cell
;
vertical-align
:
top
;
padding
:
10px
16px
;
border-bottom
:
1px
solid
$gray-darker
;
&
.avatar-cell
{
width
:
36px
;
padding-right
:
0
;
img
{
margin-right
:
0
;
}
}
}
&
.table-wide
{
.table-list-cell
{
&
:last-of-type
{
padding-right
:
0
;
}
&
:first-of-type
{
padding-left
:
0
;
}
}
}
}
.panel
>
.content-list
>
li
{
.panel
>
.content-list
>
li
{
padding
:
$gl-padding-top
$gl-padding
;
padding
:
$gl-padding-top
$gl-padding
;
}
}
...
...
app/assets/stylesheets/pages/commits.scss
View file @
f2bf9443
...
@@ -142,7 +142,6 @@
...
@@ -142,7 +142,6 @@
.commit-header
{
.commit-header
{
padding
:
5px
10px
;
padding
:
5px
10px
;
background-color
:
$gray-light
;
background-color
:
$gray-light
;
border-top
:
1px
solid
$gray-darker
;
border-bottom
:
1px
solid
$gray-darker
;
border-bottom
:
1px
solid
$gray-darker
;
font-size
:
14px
;
font-size
:
14px
;
...
@@ -187,9 +186,8 @@
...
@@ -187,9 +186,8 @@
.commit-actions
{
.commit-actions
{
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
float
:
right
;
width
:
300px
;
margin-left
:
$gl-padding
;
text-align
:
right
;
margin-top
:
2px
;
font-size
:
0
;
font-size
:
0
;
}
}
...
@@ -232,14 +230,6 @@
...
@@ -232,14 +230,6 @@
vertical-align
:
baseline
;
vertical-align
:
baseline
;
}
}
.commit-content
{
display
:
inline-block
;
@media
(
min-width
:
$screen-sm-min
)
{
max-width
:
70%
;
}
}
.commit-row-description
{
.commit-row-description
{
font-size
:
14px
;
font-size
:
14px
;
border-left
:
1px
solid
$white-normal
;
border-left
:
1px
solid
$white-normal
;
...
...
app/views/projects/commits/_commit.html.haml
View file @
f2bf9443
...
@@ -9,13 +9,12 @@
...
@@ -9,13 +9,12 @@
-
cache_key
.
push
(
commit
.
status
(
ref
))
if
commit
.
status
(
ref
)
-
cache_key
.
push
(
commit
.
status
(
ref
))
if
commit
.
status
(
ref
)
=
cache
(
cache_key
,
expires_in:
1
.
day
)
do
=
cache
(
cache_key
,
expires_in:
1
.
day
)
do
%li
.commit.js-toggle-container
{
id:
"commit-#{commit.short_id}"
}
%li
.commit.
table-list-row.
js-toggle-container
{
id:
"commit-#{commit.short_id}"
}
.commit-row-title
.table-list-cell.avatar-cell.hidden-xs
.image-container
=
author_avatar
(
commit
,
size:
36
)
=
author_avatar
(
commit
,
size:
36
)
.commit-content
.table-list-cell
.commit-content
=
link_to_gfm
commit
.
title
,
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
id
),
class:
"commit-row-message item-title"
=
link_to_gfm
commit
.
title
,
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
id
),
class:
"commit-row-message item-title"
%span
.commit-row-message.visible-xs-inline
%span
.commit-row-message.visible-xs-inline
·
·
...
@@ -34,7 +33,7 @@
...
@@ -34,7 +33,7 @@
committed
committed
#{
time_ago_with_tooltip
(
commit
.
committed_date
)
}
#{
time_ago_with_tooltip
(
commit
.
committed_date
)
}
.commit-actions.hidden-xs
.table-list-cell
.commit-actions.hidden-xs
-
if
commit
.
status
(
ref
)
-
if
commit
.
status
(
ref
)
=
render_commit_status
(
commit
,
ref:
ref
)
=
render_commit_status
(
commit
,
ref:
ref
)
=
clipboard_button
(
clipboard_text:
commit
.
id
)
=
clipboard_button
(
clipboard_text:
commit
.
id
)
...
...
app/views/projects/commits/_commit_list.html.haml
View file @
f2bf9443
...
@@ -11,4 +11,4 @@
...
@@ -11,4 +11,4 @@
%li
.warning-row.unstyled
%li
.warning-row.unstyled
#{
number_with_delimiter
(
hidden
)
}
additional commits have been omitted to prevent performance issues.
#{
number_with_delimiter
(
hidden
)
}
additional commits have been omitted to prevent performance issues.
-
else
-
else
%ul
.content-list
=
render
commits
,
project:
@project
,
ref:
@ref
%ul
.content-list
.table-list
=
render
commits
,
project:
@project
,
ref:
@ref
app/views/projects/commits/_commits.html.haml
View file @
f2bf9443
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
-
commits
.
chunk
{
|
c
|
c
.
committed_date
.
in_time_zone
.
to_date
}.
each
do
|
day
,
commits
|
-
commits
.
chunk
{
|
c
|
c
.
committed_date
.
in_time_zone
.
to_date
}.
each
do
|
day
,
commits
|
%li
.commit-header
=
"
#{
day
.
strftime
(
'%d %b, %Y'
)
}
#{
pluralize
(
commits
.
count
,
'commit'
)
}
"
%li
.commit-header
=
"
#{
day
.
strftime
(
'%d %b, %Y'
)
}
#{
pluralize
(
commits
.
count
,
'commit'
)
}
"
%li
.commits-row
%li
.commits-row
%ul
.content-list.commit-list
%ul
.content-list.commit-list
.table-list.table-wide
=
render
commits
,
project:
project
,
ref:
ref
=
render
commits
,
project:
project
,
ref:
ref
-
if
hidden
>
0
-
if
hidden
>
0
...
...
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