seminar/app/views/seminars/add_file.html.erb

38 lines
966 B
Plaintext

<% # encoding: utf-8 %>
<%= stylesheet_link_tag "lib/jquery-ui-1.12.1/jquery-ui.min.css" %>
<%= stylesheet_link_tag "seminar" %>
<%= javascript_include_tag 'basic.js' %>
<% @@session = session %>
<%= yield %>
<%
data = action_data
@con = data["con"]
@seminar = data["seminar"]
@seminar_signup = data["seminar_signup"]
@form_index = 0
%>
<% if !session[:seminar_signup_id].blank? %>
<% if ( @seminar.contribute_file_count.blank? or @seminar_signup.seminar_signup_contributes.count < @seminar.contribute_file_count.to_i ) %>
<%= form_for @con, url: add_file_proc_seminars_path, html: {class: "content form-horizontal" , :id=>"new-seminar-signup-contribute"} do |f| %>
<% begin %>
<%= render :partial => 'seminars/contribute_form',:locals=>{:f=>f} %>
<%rescue => e%>
<%= e %>
<% end %>
<% end %>
<% else %>
上傳檔案數已滿
<% end %>
<% else %>
請先登入
<br />
<a href="<%= page_for_seminar_url %>">回列表頁</a>
<% end %>