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
b6170d2d
Commit
b6170d2d
authored
Jan 12, 2016
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show last commit as description. #2406
parent
e4d26966
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
app/views/projects/forks/index.html.haml
app/views/projects/forks/index.html.haml
+1
-1
app/views/shared/projects/_list.html.haml
app/views/shared/projects/_list.html.haml
+2
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+7
-2
No files found.
app/views/projects/forks/index.html.haml
View file @
b6170d2d
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
.projects-list-holder
.projects-list-holder
=
render
'shared/projects/list'
,
projects:
@public_forks
,
use_creator_avatar:
true
,
=
render
'shared/projects/list'
,
projects:
@public_forks
,
use_creator_avatar:
true
,
forks:
true
forks:
true
,
show_last_commit_as_description:
true
-
if
protected_count
>
0
-
if
protected_count
>
0
%ul
.projects-list
%ul
.projects-list
...
...
app/views/shared/projects/_list.html.haml
View file @
b6170d2d
...
@@ -5,13 +5,14 @@
...
@@ -5,13 +5,14 @@
-
forks
=
false
unless
local_assigns
[
:forks
]
==
true
-
forks
=
false
unless
local_assigns
[
:forks
]
==
true
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
-
show_last_commit_as_description
=
false
unless
local_assigns
[
:show_last_commit_as_description
]
==
true
%ul
.projects-list
%ul
.projects-list
-
projects
.
each_with_index
do
|
project
,
i
|
-
projects
.
each_with_index
do
|
project
,
i
|
-
css_class
=
(
i
>=
projects_limit
)
?
'hide'
:
nil
-
css_class
=
(
i
>=
projects_limit
)
?
'hide'
:
nil
=
render
"shared/projects/project"
,
project:
project
,
skip_namespace:
skip_namespace
,
=
render
"shared/projects/project"
,
project:
project
,
skip_namespace:
skip_namespace
,
avatar:
avatar
,
stars:
stars
,
css_class:
css_class
,
ci:
ci
,
use_creator_avatar:
use_creator_avatar
,
avatar:
avatar
,
stars:
stars
,
css_class:
css_class
,
ci:
ci
,
use_creator_avatar:
use_creator_avatar
,
forks:
forks
forks:
forks
,
show_last_commit_as_description:
show_last_commit_as_description
-
if
projects
.
size
>
projects_limit
-
if
projects
.
size
>
projects_limit
%li
.bottom.center
%li
.bottom.center
...
...
app/views/shared/projects/_project.html.haml
View file @
b6170d2d
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
ci
=
false
unless
local_assigns
[
:ci
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
-
skip_namespace
=
false
unless
local_assigns
[
:skip_namespace
]
==
true
-
css_class
=
''
unless
local_assigns
[
:css_class
]
-
css_class
=
''
unless
local_assigns
[
:css_class
]
-
css_class
+=
" no-description"
unless
project
.
description
.
present?
-
show_last_commit_as_description
=
false
unless
local_assigns
[
:show_last_commit_as_description
]
==
true
-
css_class
+=
" no-description"
if
project
.
description
.
blank?
&&
!
show_last_commit_as_description
-
ci_commit
=
project
.
ci_commit
(
project
.
commit
.
sha
)
if
ci
&&
!
project
.
empty_repo?
&&
project
.
commit
-
ci_commit
=
project
.
ci_commit
(
project
.
commit
.
sha
)
if
ci
&&
!
project
.
empty_repo?
&&
project
.
commit
-
cache_key
=
[
project
.
namespace
,
project
,
controller
.
controller_name
,
controller
.
action_name
,
current_application_settings
,
'v2.2'
]
-
cache_key
=
[
project
.
namespace
,
project
,
controller
.
controller_name
,
controller
.
action_name
,
current_application_settings
,
'v2.2'
]
-
cache_key
.
push
(
ci_commit
.
status
)
if
ci_commit
-
cache_key
.
push
(
ci_commit
.
status
)
if
ci_commit
...
@@ -38,6 +39,10 @@
...
@@ -38,6 +39,10 @@
%span
%span
%i
.fa.fa-star
%i
.fa.fa-star
=
project
.
star_count
=
project
.
star_count
-
if
project
.
description
.
present?
-
if
show_last_commit_as_description
.project-description
=
link_to_gfm
project
.
commit
.
title
,
namespace_project_commit_path
(
project
.
namespace
,
project
,
project
.
commit
),
class:
"commit-row-message"
-
elsif
project
.
description
.
present?
.project-description
.project-description
=
markdown
(
project
.
description
,
pipeline: :description
)
=
markdown
(
project
.
description
,
pipeline: :description
)
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