Commit 7057fbf4 authored by Jeff Stubler's avatar Jeff Stubler

Add updated time to project list

parent 568052b0
...@@ -610,6 +610,7 @@ pre.light-well { ...@@ -610,6 +610,7 @@ pre.light-well {
.controls { .controls {
margin-left: auto; margin-left: auto;
text-align: right;
} }
.ci-status-link { .ci-status-link {
......
...@@ -160,7 +160,7 @@ module ProjectsHelper ...@@ -160,7 +160,7 @@ module ProjectsHelper
end end
def project_list_cache_key(project) 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 << pipeline_status_cache_key(project.pipeline_status) if project.pipeline_status.has_status?
key key
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +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)
%li.project-row{ class: css_class } %li.project-row{ class: css_class }
= cache(cache_key) do = cache(cache_key) do
...@@ -36,18 +37,21 @@ ...@@ -36,18 +37,21 @@
= markdown_field(project, :description) = markdown_field(project, :description)
.controls .controls
- if project.archived .prepend-top-0
%span.prepend-left-10.label.label-warning archived - if project.archived
- if project.pipeline_status.has_status? %span.prepend-left-10.label.label-warning archived
%span.prepend-left-10 - if project.pipeline_status.has_status?
= render_project_pipeline_status(project.pipeline_status) %span.prepend-left-10
- if forks = render_project_pipeline_status(project.pipeline_status)
%span.prepend-left-10 - if forks
= icon('code-fork') %span.prepend-left-10
= number_with_delimiter(project.forks_count) = icon('code-fork')
- if stars = number_with_delimiter(project.forks_count)
%span.prepend-left-10 - if stars
= icon('star') %span.prepend-left-10
= number_with_delimiter(project.star_count) = icon('star')
%span.prepend-left-10.visibility-icon.has-tooltip{ data: { container: 'body', placement: 'left' }, title: visibility_icon_description(project) } = number_with_delimiter(project.star_count)
= visibility_level_icon(project.visibility_level, fw: true) %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}
---
title: Add update time to project lists.
merge_request: 8514
author: Jeff Stubler
...@@ -93,7 +93,7 @@ describe ProjectsHelper do ...@@ -93,7 +93,7 @@ describe ProjectsHelper do
end end
it "includes a version" do 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 end
it "includes the pipeline status when there is a status" do it "includes the pipeline status when there is a status" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment