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
Jérome Perrin
gitlab-ce
Commits
7057fbf4
Commit
7057fbf4
authored
Jan 02, 2017
by
Jeff Stubler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add updated time to project list
parent
568052b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
17 deletions
+26
-17
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+1
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+19
-15
changelogs/unreleased/26509-show-update-time.yml
changelogs/unreleased/26509-show-update-time.yml
+4
-0
spec/helpers/projects_helper_spec.rb
spec/helpers/projects_helper_spec.rb
+1
-1
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
7057fbf4
...
...
@@ -610,6 +610,7 @@ pre.light-well {
.controls
{
margin-left
:
auto
;
text-align
:
right
;
}
.ci-status-link
{
...
...
app/helpers/projects_helper.rb
View file @
7057fbf4
...
...
@@ -160,7 +160,7 @@ module ProjectsHelper
end
def
project_list_cache_key
(
project
)
key
=
[
project
.
namespace
.
cache_key
,
project
.
cache_key
,
controller
.
controller_name
,
controller
.
action_name
,
current_application_settings
.
cache_key
,
'v2.
3
'
]
key
=
[
project
.
namespace
.
cache_key
,
project
.
cache_key
,
controller
.
controller_name
,
controller
.
action_name
,
current_application_settings
.
cache_key
,
'v2.
4
'
]
key
<<
pipeline_status_cache_key
(
project
.
pipeline_status
)
if
project
.
pipeline_status
.
has_status?
key
...
...
app/views/shared/projects/_project.html.haml
View file @
7057fbf4
...
...
@@ -7,6 +7,7 @@
-
show_last_commit_as_description
=
false
unless
local_assigns
[
:show_last_commit_as_description
]
==
true
&&
project
.
commit
-
css_class
+=
" no-description"
if
project
.
description
.
blank?
&&
!
show_last_commit_as_description
-
cache_key
=
project_list_cache_key
(
project
)
-
updated_tooltip
=
time_ago_with_tooltip
(
project
.
updated_at
)
%li
.project-row
{
class:
css_class
}
=
cache
(
cache_key
)
do
...
...
@@ -36,18 +37,21 @@
=
markdown_field
(
project
,
:description
)
.controls
-
if
project
.
archived
%span
.prepend-left-10.label.label-warning
archived
-
if
project
.
pipeline_status
.
has_status?
%span
.prepend-left-10
=
render_project_pipeline_status
(
project
.
pipeline_status
)
-
if
forks
%span
.prepend-left-10
=
icon
(
'code-fork'
)
=
number_with_delimiter
(
project
.
forks_count
)
-
if
stars
%span
.prepend-left-10
=
icon
(
'star'
)
=
number_with_delimiter
(
project
.
star_count
)
%span
.prepend-left-10.visibility-icon.has-tooltip
{
data:
{
container:
'body'
,
placement:
'left'
},
title:
visibility_icon_description
(
project
)
}
=
visibility_level_icon
(
project
.
visibility_level
,
fw:
true
)
.prepend-top-0
-
if
project
.
archived
%span
.prepend-left-10.label.label-warning
archived
-
if
project
.
pipeline_status
.
has_status?
%span
.prepend-left-10
=
render_project_pipeline_status
(
project
.
pipeline_status
)
-
if
forks
%span
.prepend-left-10
=
icon
(
'code-fork'
)
=
number_with_delimiter
(
project
.
forks_count
)
-
if
stars
%span
.prepend-left-10
=
icon
(
'star'
)
=
number_with_delimiter
(
project
.
star_count
)
%span
.prepend-left-10.visibility-icon.has-tooltip
{
data:
{
container:
'body'
,
placement:
'left'
},
title:
visibility_icon_description
(
project
)
}
=
visibility_level_icon
(
project
.
visibility_level
,
fw:
true
)
.prepend-top-5
updated
#{
updated_tooltip
}
changelogs/unreleased/26509-show-update-time.yml
0 → 100644
View file @
7057fbf4
---
title
:
Add update time to project lists.
merge_request
:
8514
author
:
Jeff Stubler
spec/helpers/projects_helper_spec.rb
View file @
7057fbf4
...
...
@@ -93,7 +93,7 @@ describe ProjectsHelper do
end
it
"includes a version"
do
expect
(
helper
.
project_list_cache_key
(
project
)
).
to
include
(
"v2.3"
)
expect
(
helper
.
project_list_cache_key
(
project
)
.
last
).
to
start_with
(
'v'
)
end
it
"includes the pipeline status when there is a status"
do
...
...
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