<%= content_for :headers do%> <%= javascript_include_tag 'jquery.fcbkcomplete' %> <%= stylesheet_link_tag "fcbkcomplete", :media => "screen, projection" %> <%end%> <%= content_for :javascript do%> $("#speakers_name").fcbkcomplete({ cache: true, filter_case: false, filter_hide: true, firstselected: true, filter_selected: true, maxshownitems: 4, newel: true }); $(".newAttachEvent").click(function () { var new_id = new Date().getTime(); $(this).before( eventAttachment.replace(/NEW_RECORD/g, new_id) ); $(".newAttach2").show(); // Applies tags to the attachment $("#agenda_entry_attachments_attributes_" + new_id + "__tags").fcbkcomplete({ cache: true, filter_case: false, filter_hide: true, firstselected: true, filter_selected: true, maxshownitems: 4, newel: true, complete_opts: true }); }); $('.agenda_edit_entry img[tooltip]').each(function() { $(this).qtip({ content: $(this).attr('tooltip'), // Use the tooltip attribute of the element for the content position: {adjust: { screen: true }}, show: 'mouseover', hide: { when: 'mouseout', fixed: true }, style: 'mystyle' // Give it a crea mstyle to make it stand out }); }); $('.vid_type_radio').change(function(){ update_video_type_status(); }); update_video_type_status = function(){ if($("#agenda_entry_video_type_0").is(':checked')) { $('#video_upload_div').hide(); $('#video_embed_div').hide(); } else if($("#agenda_entry_video_type_1").is(':checked')) { $('#video_upload_div').hide(); $('#video_embed_div').show(); } else if($("#agenda_entry_video_type_2").is(':checked')) { $('#video_embed_div').hide(); $('#video_upload_div').show(); } else if($("#agenda_entry_video_type_3").is(':checked')) { $('#video_upload_div').hide(); $('#video_embed_div').hide(); } }; //call update_video_type_status when loading update_video_type_status(); <%end%>

<%=t('agenda.entry.edit')%>

<%= form_for(prepare_for_form(@agenda_entry), :url=>space_event_agenda_agenda_entry_path(@space, @event, @agenda_entry), :html => {:method => :put, :multipart => true, :name => "agenda_entry_edit_form", :autocomplete=>"off"}) do |f| %> <%= content_for :agenda_attachments do%> <%= "eventAttachment='#{ generate_template(f,:attachments) }'" %> <% end %>
<%=image_tag('icons/help.png',:class=>'icon',:tooltip=>t('tooltip.divider'))%>
<%= f.text_field :divider %>

<%= f.text_field :title %> *<%= t('mandatory_field') %>


<%= f.text_area :description, :size => "85x7" %>
<%= fields_for(:attachments) do |at_form| %> <% unless at_form.object.new_record? %> <%=image_tag(logo_image_path(at_form.object, :size => at_form.object.thumbnail_size)) %> <%=at_form.object.filename %> <%= at_form.check_box '_delete' %> <%= at_form.label '_delete', t('delete.one') %> <% end %> <%end %>
<%=t('attachment.add') %> <%if !@event.is_in_person?%>
<%=f.check_box :cm_streaming,:class=>"icon", :checked => @agenda_entry.cm_streaming?, :disabled => @agenda_entry.past? ? true:false %> <%if @agenda_entry.past?%> <%=image_tag('icons/help.png',:class=>'icon',:tooltip=>t('tooltip.help4'))%> <%elsif @agenda_entry.is_happening_now?%> <%=image_tag('icons/help.png',:class=>'icon',:tooltip=>t('tooltip.help5'))%> <%end%>
<%end%> <%unless @event.recording_type == Event::RECORDING_TYPE.index(:none)%>

<% for vid_type in AgendaEntry::VIDEO_TYPE do %> <%if @event.is_in_person? && vid_type == :automatic %> <%next%> <%end%>
<%= f.radio_button :video_type, AgendaEntry::VIDEO_TYPE.index(vid_type), :class=>"vid_type_radio"%> <%=image_tag('icons/help.png',:class=>'icon',:tooltip=>t('tooltip.label_' + vid_type.to_s)) %>
<% end%>
<%end%> <% end %>

<%= content_for :javascript do%> <%= yield :agenda_attachments%> <%end%>