Skip to content

Commit

Permalink
Changed project details in dashboard to be capitalized and removed 'a…
Browse files Browse the repository at this point in the history
…pproximate' time language (#1251)

* Changed project details in dashboard to be capitalized and removed 'approximate' time language

* Rubocop fixes
kelynch authored Jan 28, 2025
1 parent fbdd755 commit cfbd335
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/assets/stylesheets/_projects.scss
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@
@import "typography";
@import "bootstrap";

.project-details {
.summary {
text-transform: capitalize;
}
}

#project-details-heading {
margin-bottom: 1.5em;

7 changes: 6 additions & 1 deletion app/presenters/project_dashboard_presenter.rb
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ def last_activity
if project_metadata.updated_on.nil?
"Not yet active"
else
"#{time_ago_in_words(project_metadata.updated_on)} ago"
"#{remove_about time_ago_in_words(project_metadata.updated_on)} ago"
end
end

@@ -42,4 +42,9 @@ def role(user)
"Data User"
end
end

# Removes "about" (as in "about 1 month ago") from time_ago_in_words
def remove_about(time_ago)
time_ago.gsub("about ", "")
end
end

0 comments on commit cfbd335

Please sign in to comment.