學年度 | <% yearnow = Time.now.strftime("%Y").to_i - 1 total = yearnow - 1911 min = total - 10 %> <%= f.select :year, (0..10).collect{|i|[(total - i),(total - i)]} %> <% if current_counselor_user.user_type == 0 %> 此為學年度非年度,例如103年上半年為102學年度,103年下半年為103學年度,請注意填選 <% end %> |
---|---|
檔案來源 |
<%= f.file_field :file %>
<% if !@hpsfile.file.url.nil? %>
<%= File.basename(@hpsfile.file.url) %> <% end %> |
計畫書名稱 |
<% if @hpsfile.new_record? %>
<% case current_counselor_user.user_type %>
<% when 0 %>
<% title = HpsCity.find(current_counselor_user.hps_city_id).name + " " + HpsCounty.find(current_counselor_user.hps_county_id).name + " " + HpsSchool.find(current_counselor_user.hps_school_id).name %>
<%= title %> 105推動計劃書
<% when 1 %>
105健康促進縣市推動計劃書
<% when 2 %>
<% end %>
<% else %>
<% year = @hpsfile.title.scan(/\d/).join() %>
<%= @hpsfile.title.gsub(year, "#{year}").html_safe %>
<% end %>
|
<%= f.submit "Submit", :class => "btn btn-primary" %> Back |