|
|
@ -3120,12 +3120,12 @@ end
|
|
|
|
def update_notice
|
|
|
|
def update_notice
|
|
|
|
@menu_type = 12
|
|
|
|
@menu_type = 12
|
|
|
|
@sub_type = 8
|
|
|
|
@sub_type = 8
|
|
|
|
@notice = SystemUpdateNotice.first
|
|
|
|
@notice = SystemUpdateNotice.last
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def edit_update_notice
|
|
|
|
def edit_update_notice
|
|
|
|
notice = SystemUpdateNotice.first
|
|
|
|
notice = SystemUpdateNotice.last
|
|
|
|
if notice.present?
|
|
|
|
if notice.present? && notice.end_time > Time.now
|
|
|
|
notice.update_attributes(:end_time => params[:end_time], :start_time => params[:start_time], :subject => params[:subject], :notes => params[:notes])
|
|
|
|
notice.update_attributes(:end_time => params[:end_time], :start_time => params[:start_time], :subject => params[:subject], :notes => params[:notes])
|
|
|
|
else
|
|
|
|
else
|
|
|
|
notice_type = UserSystemNotice.find_by_sql("select max(notice_type) as max_notice_type from user_system_notices").first.try(:max_notice_type).to_i + 1
|
|
|
|
notice_type = UserSystemNotice.find_by_sql("select max(notice_type) as max_notice_type from user_system_notices").first.try(:max_notice_type).to_i + 1
|
|
|
|