lib/orange-more/events/views/events/create.haml in orange-0.2.6 vs lib/orange-more/events/views/events/create.haml in orange-0.2.7
- old
+ new
@@ -1,7 +1,39 @@
+- packet.add_js('events.js', :module => '_events_')
%form{:action => "#{packet.route_to(model_name, 'new')}", :method => 'post'}
- - for prop in props
+ - for prop in props.reject{|v| v[:name].to_s =~ /location_/ || v[:name].to_s =~ /eventbrite/}
%p= view_attribute(prop, model_name, :label => true)
+ %fieldset
+ %legend Venue
+ %p
+ %select{:id => "#{model_name}-venue", :name => "#{model_name}[orange_venue_id]"}
+ %option(disabled) Choose a venue
+ - for venue in eventbrite_venues
+ %option{:value => venue.id}= venue.name
+ %option{:value => "new"} New...
+ %a.show-venue-details{:href=>"#"} (Details)
+ .new-venue
+ :javascript
+ var venues = #{venues_json};
+ - for prop in props.select{|v| v[:name].to_s =~ /location_/}
+ %p= view_attribute(prop, model_name, :label => true)
+ %fieldset
+ %legend EventBrite
+ %p
+ %label Link to EventBrite?
+ %input(type="hidden" value="0" name="events[link_to_eventbrite]")
+ %input(type="checkbox" value="1" name="events[link_to_eventbrite]")
+ %p.eventbrite-link(style="display:none;")
+ :javascript
+ var events = #{events_json};
+ %label Which EventBrite Event?
+ %br
+ %select{:id => "#{model_name}-eventbrite-id", :name => "#{model_name}[eventbrite_id]"}
+ %optgroup(label="Create a new event")
+ %option{:value => "new"} New...
+ %optgroup(label="Existing event")
+ - for event in eventbrite_events
+ %option{:value => event.id}= event.title
%p
%label{:for => "#{model_name}-calendar"} Calendar
%br
%select{:id => "#{model_name}-calendar", :name => "#{model_name}[orange_calendar_id]"}
- for calendar in calendars
\ No newline at end of file