Restyled workshop previews and added interest buttons to home page

This commit is contained in:
Godwin
2016-07-17 13:20:41 -07:00
parent 9a4c39b207
commit c474d0be1a
8 changed files with 630 additions and 588 deletions
+8
View File
@@ -916,6 +916,14 @@ module ApplicationHelper
(button_tag interested, :value => :toggle_interest, :class => (workshop.interested?(current_user) ? :delete : :add), aria: { labelledby: id })
end
def interest_text(workshop)
if workshop.interested?(current_user)
return _'articles.workshops.info.you_are_interested_count', :vars => {:count => (workshop.interested_count - 1)}
end
return _'articles.workshops.info.interested_count', :vars => {:count => workshop.interested_count}
end
def host_guests_widget(registration)
html = ''
classes = ['host']