Skip to content

Commit

Permalink
Fix event show view so it uses same formatting as blog posts and pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Errol Siegel committed Aug 28, 2009
1 parent ad627a6 commit 2b1d2c5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
19 changes: 8 additions & 11 deletions app/views/events/_event.html.haml
Expand Up @@ -2,20 +2,17 @@
= event.name
= "(#{event.metro_area.to_s})" unless event.metro_area.blank?
%p
%strong
%b= :when.l+":"
=h event.time_and_date
%b= :when.l+":"
=h event.time_and_date
- unless event.location.blank?
%br
%strong
%b= :where.l+":"
=h event.location
= link_to :map_it.l, "http://www.google.com/maps?q=#{URI::encode(event.location)}", :title=>:map_it.l, :target=>'_blank'
%b= :where.l+":"
=h event.location
= link_to :map_it.l, "http://www.google.com/maps?q=#{URI::encode(event.location)}", :title=>:map_it.l, :target=>'_blank'
%br
%strong
%b=:rsvps.l+':'
- attending = event.attendees_count == 1 ? :is_attending_this_event.l : :are_attending_this_event.l
= pluralize(event.attendees_count, 'person') + ' ' + attending
%b=:rsvps.l+':'
- attending = event.attendees_count == 1 ? :is_attending_this_event.l : :are_attending_this_event.l
= pluralize(event.attendees_count, 'person') + ' ' + attending
- if event.end_time > Time.now
- if rsvp = event.rsvped?(current_user)
= link_to :retract_rsvp.l, [event, rsvp], :confirm => :are_you_sure.l, :method=>:delete
Expand Down
21 changes: 11 additions & 10 deletions app/views/events/show.html.haml
Expand Up @@ -7,16 +7,17 @@
= link_to :see_all_events.l, events_path

#yui-main
-box :class => "yui-b" do
= render :partial=>'event', :locals=>{:event=>@event, :show_details_link=>false}
= @event.description
- unless @event.attendees.blank?
%p
%b=:attendees.l+':'
- @event.attendees.each do |user|
= link_to h(user.display_name), user_path(user)
- if (count = @event.attendees_for_user(user)) > 1
= "(+#{count-1})"
.yui-b
-box :class=>'entry-content event-content' do
= render :partial=>'event', :locals=>{:event=>@event, :show_details_link=>false}
= @event.description
- unless @event.attendees.blank?
%p
%b=:attendees.l+':'
- @event.attendees.each do |user|
= link_to h(user.display_name), user_path(user)
- if (count = @event.attendees_for_user(user)) > 1
= "(+#{count-1})"
-box :class => 'hfeed comments', :id => 'comments' do
%h3= :event_comments.l
%h2= :add_your_comment.l
Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/screen.css
Expand Up @@ -302,7 +302,7 @@ margin-left: 10.4769em; /* about 140px */
*margin-left: 10.5em; /* for IE */
}

.page-content{
.page-content, .event-content{
margin-left: 0px; /* Use formatting for blog post except for left margin */
}

Expand Down

0 comments on commit 2b1d2c5

Please sign in to comment.