|
|
|
@ -3120,12 +3120,12 @@ end
|
|
|
|
|
def update_notice
|
|
|
|
|
@menu_type = 12
|
|
|
|
|
@sub_type = 8
|
|
|
|
|
@notice = SystemUpdateNotice.first
|
|
|
|
|
@notice = SystemUpdateNotice.last
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def edit_update_notice
|
|
|
|
|
notice = SystemUpdateNotice.first
|
|
|
|
|
if notice.present?
|
|
|
|
|
notice = SystemUpdateNotice.last
|
|
|
|
|
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])
|
|
|
|
|
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
|
|
|
|
|