Skip to content

Commit

Permalink
added helpers for currency in event details and conditionals for paid…
Browse files Browse the repository at this point in the history
… events.
  • Loading branch information
Kevin Solorio committed Jun 18, 2010
1 parent 3c02469 commit 46e7687
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
35 changes: 15 additions & 20 deletions app/views/events/detail.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="columnsContainer">
<div class="event">
<a href="#" class="date">
<span class="day">08</span>
<span class="month">AUG</span>
<span class="day"><%= @event.start_datetime.strftime("%d") %></span>
<span class="month"><%= @event.start_datetime.strftime("%b") %></span>
</a>
<ul>
<li class="">
Expand All @@ -25,32 +25,27 @@
</dl>
</li>
</ul>
</div>
</div>
<% if @event.member_price || @event.non_member_price %>
<div class="miniColumn right">
<h3 class="tiny">Ccost</h3>
<h3 class="tiny">Cost</h3>
<dl>
<% if @event.member_price %>
<dt>Members:</dt>
<dd>$20</dd>
<dd><%= number_to_currency(@event.member_price) %></dd>
<% end %>
<% if @event.non_member_price %>
<dt>Non-Members:</dt>
<dd>$50</dd>
<dd><%= number_to_currency(@event.non_member_price) %></dd>
<% end %>
</dl>
</div>
<% end %>
<aside class="sponsor-logo">
<%= image_tag(@event.sponsor_logo.url(:sponsored_event)) %>
</aside><!-- /sponsored-logo -->
</div>
<%= @event.description%>
<!--<div class="section">
<h4>EVENT DESCRIPTION</h4>
</div>
<div class="section">
<h4>MAP &amp; DIRECTIONS</h4>
<div class="map">
<img src="../../../../public/images/google_map.jpg" style="width:417px;height:272px;">
</div>
<h4>DIRECTIONS</h4>
<p>
<b>From I-71:</b> <br>
Exit at West 25th St. and follow Zoo signs.
</p>
</div>-->
</div>
</div>
<div class="twoColumns-1">
Expand Down
Empty file modified script/console
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions spec/factories/event_factory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
f.url_friendly 'value-for-name'
f.summary "value for summary"
f.description "value for description"
f.start_datetime '4/1/2010'
f.end_datetime '4/1/2010'
f.start_datetime Time.now.advance(:days => 14)
f.end_datetime Time.now.advance(:days => 14, :minutes => 30)
f.registration_start_datetime
f.registration_end_datetime
f.attendee_target_count 1
Expand Down

0 comments on commit 46e7687

Please sign in to comment.