Design overhaul of details page

This commit is contained in:
Christoph Haas 2020-10-20 00:22:41 +02:00
parent 986b42145e
commit adb76650da
4 changed files with 90 additions and 107 deletions

View file

@ -26,14 +26,13 @@ module PackagesHelper
# Return the description and/or the version of the package
def screenshot_caption(screenshot)
str = []
str << screenshot.description if screenshot.description
str << "Version #{screenshot.version}" if screenshot.version
str << "from #{time_ago_in_words(screenshot.created_at)} ago"
str.join(' / ')
str << screenshot.description if screenshot.description.present?
str << "#{screenshot.package.name} version #{screenshot.version}" if screenshot.version.present?
str << "uploaded #{time_ago_in_words(screenshot.created_at)} ago"
str.join(' ')
end
# Show filled/empty star icons from FontAwesome
# depending on the rating (1-5)
# def star_rating(rating)