From d87846c5c7bd39583ad296425172ab51fad08c14 Mon Sep 17 00:00:00 2001 From: spen Date: Thu, 12 Feb 2015 16:44:38 +0800 Subject: [PATCH] fix week --- app/views/admin/nccu_com_vnccu_programs/_form.html.erb | 2 +- app/views/nccu_com_vnccu_programs/index.html.erb | 4 ++-- app/views/nccu_com_vnccu_programs/show_data.html.erb | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/admin/nccu_com_vnccu_programs/_form.html.erb b/app/views/admin/nccu_com_vnccu_programs/_form.html.erb index b4ca43b..423672b 100644 --- a/app/views/admin/nccu_com_vnccu_programs/_form.html.erb +++ b/app/views/admin/nccu_com_vnccu_programs/_form.html.erb @@ -93,7 +93,7 @@
- <%= f.select :week, (1..7).collect{|a|[t("program_weeks.week#{a}"),a]} %> + <%= f.select :week, (1..5).collect{|a|[t("program_weeks.week#{a}"),a]} %>
diff --git a/app/views/nccu_com_vnccu_programs/index.html.erb b/app/views/nccu_com_vnccu_programs/index.html.erb index 0a6effa..e371f7b 100644 --- a/app/views/nccu_com_vnccu_programs/index.html.erb +++ b/app/views/nccu_com_vnccu_programs/index.html.erb @@ -10,14 +10,14 @@ - <% (1..7).each do |a| %> + <% (1..5).each do |a| %> <%= t("program_weeks.week#{a}") %>
<%= t("program_weeks_en.week#{a}") %> <% end %> <% @program_categorys.each do |program_category| %> <%= program_category.title.gsub(' ', '
').html_safe %> - <% (1..7).each do |a| %> + <% (1..5).each do |a| %> <% ComVnccuProgram.where(:is_hidden=>false, :week=>"#{a}", :category_id=>program_category.id).collect do |t| diff --git a/app/views/nccu_com_vnccu_programs/show_data.html.erb b/app/views/nccu_com_vnccu_programs/show_data.html.erb index e993a8a..0e5c5a5 100644 --- a/app/views/nccu_com_vnccu_programs/show_data.html.erb +++ b/app/views/nccu_com_vnccu_programs/show_data.html.erb @@ -23,14 +23,18 @@ <%= t('nccu_com_vnccu_program.hour') %> <%= @program.hour %> + <% if !@program.host.blank? %> <%= t('nccu_com_vnccu_program.host') %> <%= @program.get_hosts_name(@program.host) %> + <% end %> + <% if !@program.description.blank? %> <%= t('nccu_com_vnccu_program.description') %> <%= nl2br(@program.description) %> + <% end %> <% if !@program.com_vnccu_program_links.blank? %> <%= t('nccu_com_vnccu_program.link') %>