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
44affff3
Commit
44affff3
authored
Jun 03, 2017
by
Ruben Davila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use last_activity_at attr when showing the update date in project listing
parent
39340e42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+1
-1
spec/features/dashboard/projects_spec.rb
spec/features/dashboard/projects_spec.rb
+9
-0
No files found.
app/views/shared/projects/_project.html.haml
View file @
44affff3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
-
show_last_commit_as_description
=
false
unless
local_assigns
[
:show_last_commit_as_description
]
==
true
&&
project
.
commit
-
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
-
css_class
+=
" no-description"
if
project
.
description
.
blank?
&&
!
show_last_commit_as_description
-
cache_key
=
project_list_cache_key
(
project
)
-
cache_key
=
project_list_cache_key
(
project
)
-
updated_tooltip
=
time_ago_with_tooltip
(
project
.
updated
_at
)
-
updated_tooltip
=
time_ago_with_tooltip
(
project
.
last_activity
_at
)
%li
.project-row
{
class:
css_class
}
%li
.project-row
{
class:
css_class
}
=
cache
(
cache_key
)
do
=
cache
(
cache_key
)
do
...
...
spec/features/dashboard/projects_spec.rb
View file @
44affff3
...
@@ -15,6 +15,15 @@ RSpec.describe 'Dashboard Projects', feature: true do
...
@@ -15,6 +15,15 @@ RSpec.describe 'Dashboard Projects', feature: true do
expect
(
page
).
to
have_content
(
'awesome stuff'
)
expect
(
page
).
to
have_content
(
'awesome stuff'
)
end
end
it
'shows the last_activity_at attribute as the update date'
do
now
=
Time
.
now
project
.
update_column
(
:last_activity_at
,
now
)
visit
dashboard_projects_path
expect
(
page
).
to
have_xpath
(
"//time[@datetime='
#{
now
.
getutc
.
iso8601
}
']"
)
end
context
'when on Starred projects tab'
do
context
'when on Starred projects tab'
do
it
'shows only starred projects'
do
it
'shows only starred projects'
do
user
.
toggle_star
(
project2
)
user
.
toggle_star
(
project2
)
...
...
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