- if defined? TinyMceFilter - include_javascript "tiny_mce/tiny_mce" - include_javascript "tiny_mce/tiny_mce_settings" - include_javascript "tiny_mce/application" - @venues = EventVenue.find(:all) - @event.event_venue ||= EventVenue.new - @event.recurrence_rules.build unless @event.recurrence_rules.any? - imported = @event.status == Status[:imported] - if imported %p This event comes from a calendar subscription, but you can add keywords here and give more information about its location. Please note that changes to the location will affect any other events linked to the same place. = render_region :form_top #event_form.form-area .main - render_region :form do |form| - form.edit_event do %p.title = f.label :title, t('event_admin.form.title') = f.text_field :title, :class => 'textbox', :disabled => imported - form.edit_date do %p.start_date = f.label :start_date, t('event_admin.form.start') = f.text_field :start_date, :value => f.object.start_date.to_s, :class => 'textbox date time', :disabled => imported = f.check_box :all_day, :disabled => imported = f.label :all_day, t('event_admin.form.all_day'), :class => 'minor' %p.end_date = f.label :end_date, t('event_admin.form.end') = f.text_field :end_date, :value => f.object.end_date.to_s, :class => 'textbox date time', :disabled => imported .recurrence - f.fields_for :recurrence_rules do |rf| %p.recurrence = rf.check_box 'active', :class => 'toggle', :rel => "toggle[recurrence_detail]", :disabled => imported = rf.label :active, t('event_admin.form.repeats'), :class => 'minor' %span.note = t('event_admin.form.repeat_note') %p#recurrence_detail %span#recurrence_interval = rf.label :interval, t('event_admin.form.repeats_every') = rf.text_field :interval, :class => 'textbox short' %span#recurrence_period = rf.label :period, " " = rf.select :period, [[t('defaults.day'), 'daily'], [t('defaults.week'), 'weekly'], [t('defaults.month'), 'monthly'], [t('defaults.year'), 'yearly']], {}, :class => 'textbox' %span#recurrence_basis = rf.label :basis, " " = rf.select :basis, [[t('defaults.forever'), 'unbounded'],[t('defaults.until'), 'limit'], [t('defaults.for'), 'count']], {}, :class => 'textbox basis' %span#recurrence_unbounded %span#recurrence_limit = rf.label :limiting_date, " " = rf.text_field :limiting_date, :value => rf.object.limiting_date.to_s, :class => 'textbox date' %span#recurrence_count = rf.label :limiting_count, t('event_admin.form.many_times'), :class => 'inline' = rf.text_field :limiting_count, :class => 'textbox short' - form.edit_description do %p.description - if !imported && defined? TinyMceFilter = link_to image('mce', :alt=> 'toolbar icon'), '#', :class => 'toggleMCE', :rel => 'toggle[event_description]' = f.label :description, t('event_admin.form.description') = f.text_area :description, :class => 'textarea', :style => "width: 100%; height: 8em;", :disabled => imported - render_region :form_bottom do |form_bottom| - form_bottom.edit_metadata do .metadata %p.keywords = f.label :keywords, t('event_admin.form.keywords') = f.text_field :keywords, :class => "textbox" %p.calendar = f.label :calendar_id, t('event_admin.form.calendar') = f.select :calendar_id, Calendar.all.map {|c| [c.name, c.id]}, {:include_blank => true}, :class => 'textbox', :disabled => imported %br %span.note = t('event_admin.form.calendar_note') %p.url = f.label :url, t('event_admin.form.event_url') = f.text_field :url, :class => 'textbox', :disabled => imported - form_bottom.edit_venue do - toggle_precedence = %w{venue new_venue} - toggle_precedence.reverse! if @venues.empty? - if imported - f.fields_for :event_venue, @event.event_venue do |ef| = render :partial => 'admin/event_venues/form', :locals => {:event_venue => @event.event_venue, :f => ef, :or_choose => false, :compact => true} - else -if @venues.any? #venue.main %p#existing_venue = f.label :event_venue_id, t('event_admin.form.choose_location') = f.select :event_venue_id, @venues.map {|v| [v.title, v.id]}, {:include_blank => true}, :class => 'textbox', :disabled => imported - if imported = link_to t('event_admin.form.edit_location'), admin_event_venue_url(@event.event_venue) to add title, description and directions - else = link_to t('event_admin.form.new_location'), new_admin_event_venue_url, :class => 'swapper', :rel => "toggle[#{toggle_precedence.join(',')}]" #new_venue - @event.build_event_venue unless @event.event_venue - f.fields_for :event_venue, @event.event_venue do |ef| = render :partial => 'admin/event_venues/form', :locals => {:event_venue => @event.event_venue, :f => ef, :or_choose => @venues.any?, :compact => true} - form_bottom.edit_timestamp do = updated_stamp @event - form_bottom.edit_buttons do %p.buttons = save_model_button(@event) = save_model_and_continue_editing_button(@event) = t('defaults.or') = link_to t('defaults.cancel'), admin_events_url