Fix bug.
This commit is contained in:
parent
eaf954ae37
commit
5ae447e04f
|
@ -94,7 +94,7 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
def import_from_xml
|
def import_from_xml
|
||||||
download_tmp_xml params["import_xml"]
|
download_tmp_xml params["import_xml"]
|
||||||
import_from_tmp_xml File.read(File.join(Rails.root, "tmp", "ann_cc_ntu.xml"))
|
import_from_tmp_xml File.read(File.join(Rails.root, "tmp", "ann_cc_ntu.xml"))
|
||||||
redirect_to admin_event_news_path
|
redirect_to admin_event_news_index_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def import
|
def import
|
||||||
|
@ -103,7 +103,7 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
|
|
||||||
def import_from_wp
|
def import_from_wp
|
||||||
import_from_wordpress params["import_xml"].tempfile
|
import_from_wordpress params["import_xml"].tempfile
|
||||||
redirect_to admin_event_news_path
|
redirect_to admin_event_news_index_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def importanns
|
def importanns
|
||||||
|
@ -118,9 +118,9 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
next if v == "" || v.nil?
|
next if v == "" || v.nil?
|
||||||
import_this_event_news(row, categories, tags)
|
import_this_event_news(row, categories, tags)
|
||||||
end
|
end
|
||||||
redirect_to admin_event_news_path
|
redirect_to admin_event_news_index_path
|
||||||
else
|
else
|
||||||
redirect_to admin_event_news_path(:error => "1")
|
redirect_to admin_event_news_index_path(:error => "1")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
send_rejection_email(event_news,I18n.locale)
|
send_rejection_email(event_news,I18n.locale)
|
||||||
end
|
end
|
||||||
event_news.save
|
event_news.save
|
||||||
redirect_to admin_event_news_path
|
redirect_to admin_event_news_index_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
|
@ -36,7 +36,7 @@ class EventNewsController < ApplicationController
|
||||||
"subtitle" => a.subtitle,
|
"subtitle" => a.subtitle,
|
||||||
"statuses" => statuses,
|
"statuses" => statuses,
|
||||||
"category" => a.category.title,
|
"category" => a.category.title,
|
||||||
"postdate" => a.postdate,
|
"postdate" => a.event_date,
|
||||||
"author" => author,
|
"author" => author,
|
||||||
"is_top" => (a.is_top? ? 1 : 0),
|
"is_top" => (a.is_top? ? 1 : 0),
|
||||||
"link_to_show" => link_to_show+"\" title=\"#{title}\"",
|
"link_to_show" => link_to_show+"\" title=\"#{title}\"",
|
||||||
|
|
Loading…
Reference in New Issue