Add curated posts page.

Add a curated posts page at /explore/posts/curated. Curated posts are
the most favorited posts by contributor-level users (users with
unlimited upload permissions).

Also add an order:curated tag using for use in regular searches.
This commit is contained in:
evazion
2020-02-23 16:43:06 -06:00
parent e8590afa6d
commit 463b1b734e
12 changed files with 79 additions and 35 deletions

View File

@@ -20,4 +20,14 @@ module PopularPostsHelper
1.month.ago(date)
end
end
def date_range_description(date, scale, min_date, max_date)
if scale == "day"
date.strftime("%B %d, %Y")
elsif scale == "week"
"#{min_date.strftime("%B %d, %Y")} - #{max_date.strftime("%B %d, %Y")}"
elsif scale == "month"
date.strftime("%B %Y")
end
end
end