fix week
This commit is contained in:
		
							parent
							
								
									6993ed3dac
								
							
						
					
					
						commit
						d87846c5c7
					
				| 
						 | 
					@ -93,7 +93,7 @@
 | 
				
			||||||
      <div class="control-group">
 | 
					      <div class="control-group">
 | 
				
			||||||
        <label class="control-label muted"><%= t('nccu_com_vnccu_program.week') %></label>
 | 
					        <label class="control-label muted"><%= t('nccu_com_vnccu_program.week') %></label>
 | 
				
			||||||
        <div class="controls">
 | 
					        <div class="controls">
 | 
				
			||||||
          <%= 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]} %>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,14 +10,14 @@
 | 
				
			||||||
	<tbody>
 | 
						<tbody>
 | 
				
			||||||
		<tr>
 | 
							<tr>
 | 
				
			||||||
			<td>	</td>
 | 
								<td>	</td>
 | 
				
			||||||
			<% (1..7).each do |a| %>
 | 
								<% (1..5).each do |a| %>
 | 
				
			||||||
			<th><%= t("program_weeks.week#{a}") %><br /><%= t("program_weeks_en.week#{a}") %></td>
 | 
								<th><%= t("program_weeks.week#{a}") %><br /><%= t("program_weeks_en.week#{a}") %></td>
 | 
				
			||||||
			<% end %>
 | 
								<% end %>
 | 
				
			||||||
		</tr>
 | 
							</tr>
 | 
				
			||||||
		<% @program_categorys.each do |program_category| %>
 | 
							<% @program_categorys.each do |program_category| %>
 | 
				
			||||||
		<tr>
 | 
							<tr>
 | 
				
			||||||
			<td class="program_category"><%= program_category.title.gsub('  ', '<br />').html_safe %></td>
 | 
								<td class="program_category"><%= program_category.title.gsub('  ', '<br />').html_safe %></td>
 | 
				
			||||||
			<% (1..7).each do |a| %>
 | 
								<% (1..5).each do |a| %>
 | 
				
			||||||
			<td align="center">
 | 
								<td align="center">
 | 
				
			||||||
				<%
 | 
									<%
 | 
				
			||||||
				  ComVnccuProgram.where(:is_hidden=>false, :week=>"#{a}", :category_id=>program_category.id).collect do |t|
 | 
									  ComVnccuProgram.where(:is_hidden=>false, :week=>"#{a}", :category_id=>program_category.id).collect do |t|
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,14 +23,18 @@
 | 
				
			||||||
      <th class="nccu_com_vnccu_program-title-field"><%= t('nccu_com_vnccu_program.hour') %></th>
 | 
					      <th class="nccu_com_vnccu_program-title-field"><%= t('nccu_com_vnccu_program.hour') %></th>
 | 
				
			||||||
      <td class="nccu_com_vnccu_program-title-value"><%= @program.hour %></td>
 | 
					      <td class="nccu_com_vnccu_program-title-value"><%= @program.hour %></td>
 | 
				
			||||||
    </tr>
 | 
					    </tr>
 | 
				
			||||||
 | 
					    <% if !@program.host.blank? %>
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
      <th class="nccu_com_vnccu_program-title-field"><%= t('nccu_com_vnccu_program.host') %></th>
 | 
					      <th class="nccu_com_vnccu_program-title-field"><%= t('nccu_com_vnccu_program.host') %></th>
 | 
				
			||||||
      <td class="nccu_com_vnccu_program-title-value"><%= @program.get_hosts_name(@program.host) %></td>
 | 
					      <td class="nccu_com_vnccu_program-title-value"><%= @program.get_hosts_name(@program.host) %></td>
 | 
				
			||||||
    </tr>
 | 
					    </tr>
 | 
				
			||||||
 | 
					    <% end %>
 | 
				
			||||||
 | 
					    <% if !@program.description.blank? %>
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
      <th class="nccu_com_vnccu_program-title-field"><%= t('nccu_com_vnccu_program.description') %></th>
 | 
					      <th class="nccu_com_vnccu_program-title-field"><%= t('nccu_com_vnccu_program.description') %></th>
 | 
				
			||||||
      <td class="nccu_com_vnccu_program-title-value"><%= nl2br(@program.description) %></td>
 | 
					      <td class="nccu_com_vnccu_program-title-value"><%= nl2br(@program.description) %></td>
 | 
				
			||||||
    </tr>
 | 
					    </tr>
 | 
				
			||||||
 | 
					    <% end %>
 | 
				
			||||||
    <% if !@program.com_vnccu_program_links.blank? %>
 | 
					    <% if !@program.com_vnccu_program_links.blank? %>
 | 
				
			||||||
    <tr>
 | 
					    <tr>
 | 
				
			||||||
      <th class="active-title-field"><%= t('nccu_com_vnccu_program.link') %></th>
 | 
					      <th class="active-title-field"><%= t('nccu_com_vnccu_program.link') %></th>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue