32 lines
677 B
Ruby
32 lines
677 B
Ruby
class WebResourcesController < ApplicationController
|
|
|
|
def index
|
|
links = WebLink.order_by(:created_at=>'desc')
|
|
web_link = links.collect do |link|
|
|
{
|
|
"title" => link.title,
|
|
"link_to_show" => link.url
|
|
}
|
|
end
|
|
{
|
|
"web_link" => web_link,
|
|
"extras" => {"widget-title"=>t(:web_resource)}
|
|
}
|
|
end
|
|
|
|
def widget
|
|
links = WebLink.order_by(:created_at=>'desc')
|
|
web_link = links.collect do |link|
|
|
{
|
|
"title" => link.title,
|
|
"link_to_show" => link.url
|
|
}
|
|
end
|
|
{
|
|
"web_link" => web_link,
|
|
"extras" => {"widget-title"=>t(:web_resource),"more_url" => OrbitHelper.widget_more_url}
|
|
}
|
|
end
|
|
|
|
end
|