2014-11-04 07:48:24 +00:00
|
|
|
require 'json'
|
2014-10-31 05:36:38 +00:00
|
|
|
class AnnouncementLinkWidgetsController < ApplicationController
|
|
|
|
def widget
|
2014-11-04 07:48:24 +00:00
|
|
|
data = {
|
|
|
|
"tags" => [{
|
|
|
|
"tag-name" => "",
|
|
|
|
"tag-id" => "",
|
2014-10-31 05:36:38 +00:00
|
|
|
"announcements" => [],
|
|
|
|
"links" => []
|
2014-11-04 07:48:24 +00:00
|
|
|
}],
|
2014-10-31 05:36:38 +00:00
|
|
|
"extras" => {
|
|
|
|
"heading-announcements" => "Announcements",
|
|
|
|
"heading-links" => "Links"
|
|
|
|
}
|
|
|
|
}
|
2014-11-04 07:48:24 +00:00
|
|
|
f = File.join(Rails.root, "public" , "announcement_link_widget.json")
|
|
|
|
if File.exists?(f)
|
|
|
|
contents = File.read('public/announcement_link_widget.json')
|
|
|
|
data = JSON.parse(contents)
|
|
|
|
end
|
|
|
|
data
|
2014-10-31 05:36:38 +00:00
|
|
|
end
|
|
|
|
end
|