PageRenderTime 66ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/app/views/meetups/show.html.erb

https://github.com/haifeng/Meetr
Ruby HTML | 92 lines | 88 code | 4 blank | 0 comment | 2 complexity | 5bf5b062434972cf8980189efdc4c9cf MD5 | raw file
  1. <% title "#{@meetup.name}"%>
  2. <div class="event_details">
  3. <h2><%=t "details"%></h2>
  4. <ul class="details">
  5. <li>
  6. <%=label :location, t("location")%>
  7. <span id="location" class="v">
  8. <%=@meetup.location%>
  9. <small>
  10. (<%=link_to t("Map"), "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=#{@meetup.location}&ie=UTF8&hq=&ht=h&z=16&iwloc=A", :target => :blank %>)</small>
  11. </span>
  12. </li>
  13. <li>
  14. <%=label :description, t("description")%>
  15. <span id="description" class="v"><%=@meetup.description%></span>
  16. </li>
  17. <li>
  18. <%=label :happend_at, t("talk.date")%>
  19. <span id="happening_at" class="v">
  20. <%=@meetup.human_date%> at <%=@meetup.happening_at.strftime("%H:%M")%>
  21. (<%=t('time.in')%> <%=distance_of_time_in_words(Time.now, @meetup.happening_at)%>)
  22. </span>
  23. </li>
  24. </ul>
  25. <br/>
  26. <iframe src="http://www.facebook.com/plugins/like.php?href=<%=url_for(:only_path => false, :overwrite_params=> { })%>&amp;send=true&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font=trebuchet+ms&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
  27. <h2><%=t("meetup.presentations")%></h2>
  28. <ul class="presentations">
  29. <%@meetup.presentations.each do |presentation|%>
  30. <li>
  31. <%=image_tag presentation.user.account.gravatar, :size => "32x32"%>
  32. <strong><%=link_to presentation.name, presentation_path(presentation.id)%></strong>
  33. <br/>
  34. <%=link_to presentation.user.account.name, presentation.user.account.url%>
  35. &lt;<%=presentation.user.email%>&gt;
  36. <%=link_to image_tag("vote_like.gif"), { :controller => :presentations, :action => :vote,
  37. :id => presentation.id} if user_signed_in?%>
  38. <small>(<%=presentation.votes.count%> <%=t "votes"%>)</small>
  39. </li>
  40. <%end%>
  41. </ul>
  42. </div>
  43. <div class="attendees_list">
  44. <h2>
  45. <%=t("meetup.attendees")%>
  46. <%if user_signed_in? and not @meetup.user_attends?(current_user)%>
  47. <%=link_to t("meetup.attend")+'!', url_for(:controller => :meetups, :action => :attend, :id => @meetup.id, :class => :green)%>
  48. <%end%>
  49. </h2>
  50. <ul class="attendees">
  51. <%@meetup.attendees.each do |user|%>
  52. <li>
  53. <%=image_tag user.account.gravatar, :size => "32x32"%>
  54. <%=link_to user.account.name, user.account.url%> &lt;<%=user.email%>&gt;
  55. <br/>
  56. <%=raw t("meetup.attendance", :status => "<u>"+(@meetup.user_attends?(user) ? t("meetup.attend_small") : t("meetup.not_attend"))+"</u>")%>
  57. </li>
  58. <%end%>
  59. </ul>
  60. <p style="text-align:right">
  61. <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="BrnoRuby">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
  62. </p>
  63. <br/>
  64. <h2><%=t "timeline.name"%></h2>
  65. <div class="wall">
  66. <%=form_for @meetup.timelines.new do |f|%>
  67. <%=f.hidden_field :meetup_id, :value => @meetup.id%>
  68. <%=f.text_area :message%>
  69. <span class="a">
  70. <button class="cupid-green">
  71. <%=link_to t("talk.submit"), { :controller => :presentations, :action => :new,
  72. :"presentation[meetup_id]" => @meetup.id}%>
  73. </button>
  74. </span>
  75. <button class="cupid-green" type="submit"><%=t("timeline.post")%></button>
  76. <%end if user_signed_in?%>
  77. <ul class="presentations" id="timeline">
  78. <%@meetup.timelines.each do |msg|%>
  79. <li>
  80. <%=image_tag msg.user.account.gravatar, :size => "32x32"%>
  81. <%=link_to msg.user.account.name, msg.user.account.url%>
  82. <%=msg.message%> <small>(<%=distance_of_time_in_words(Time.now, msg.created_at)%> ago)</small>
  83. </li>
  84. <%end%>
  85. </ul>
  86. </div>
  87. </div>
  88. <hr/>