Add hidden class when sign_up_overdue. #19

Merged
chiu merged 1 commits from 123/seminar:master into master 2024-04-15 15:36:05 +00:00
2 changed files with 4 additions and 2 deletions

View File

@ -360,6 +360,7 @@ class SeminarsController < ApplicationController
'sign_up' => sign_up, 'sign_up' => sign_up,
'contribute_action' => contribute_action, 'contribute_action' => contribute_action,
'time_now' => time_now, 'time_now' => time_now,
'sign_up_overdue' => sign_up_overdue,
'contribute_time_range' => SeminarMain.time_range(seminar.contribute_start_date, seminar.contribute_end_date), 'contribute_time_range' => SeminarMain.time_range(seminar.contribute_start_date, seminar.contribute_end_date),
'sign_up_time_range' => SeminarMain.time_range(seminar.signup_start_date, seminar.signup_end_date), 'sign_up_time_range' => SeminarMain.time_range(seminar.signup_start_date, seminar.signup_end_date),
'seminar_time_range' => SeminarMain.time_range(seminar.seminar_start_date, seminar.seminar_end_date) 'seminar_time_range' => SeminarMain.time_range(seminar.seminar_start_date, seminar.seminar_end_date)

View File

@ -10,6 +10,7 @@
@seminar_time_range = data["seminar_time_range"] @seminar_time_range = data["seminar_time_range"]
@contribute_time_range = data["contribute_time_range"] @contribute_time_range = data["contribute_time_range"]
@contribute_action = data["contribute_action"] @contribute_action = data["contribute_action"]
@sign_up_overdue = data["sign_up_overdue"]
%> %>
@ -49,7 +50,7 @@
<td class="seminarive-title-value"><%= @contribute_time_range %></td> <td class="seminarive-title-value"><%= @contribute_time_range %></td>
</tr> </tr>
<% end %> <% end %>
<tr> <tr <%= 'class="hidden"' if @sign_up_overdue %>>
<th class="seminarive-title-field"><%= t('seminar.signup') %></th> <th class="seminarive-title-field"><%= t('seminar.signup') %></th>
<td class="seminarive-title-value"><%= @sign_up %><br /><%= @contribute_action %></td> <td class="seminarive-title-value"><%= @sign_up %><br /><%= @contribute_action %></td>
</tr> </tr>