Slight design improvements
This commit is contained in:
parent
f5f6e4960b
commit
986b42145e
3 changed files with 69 additions and 30 deletions
|
|
@ -23,6 +23,17 @@ module PackagesHelper
|
|||
screenshot.uploaderhash == session.id.to_s
|
||||
end
|
||||
|
||||
# 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(' / ')
|
||||
end
|
||||
|
||||
|
||||
|
||||
# Show filled/empty star icons from FontAwesome
|
||||
# depending on the rating (1-5)
|
||||
# def star_rating(rating)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue