added category to links
This commit is contained in:
parent
b3db1829e3
commit
5b2b182dd4
|
@ -19,6 +19,7 @@ class WebResourcesController < ApplicationController
|
||||||
"title" => link.title,
|
"title" => link.title,
|
||||||
"context" => link.context,
|
"context" => link.context,
|
||||||
"statuses" => statuses,
|
"statuses" => statuses,
|
||||||
|
"category" => link.category.title,
|
||||||
"link_to_show" => link.url,
|
"link_to_show" => link.url,
|
||||||
"target" => target
|
"target" => target
|
||||||
}
|
}
|
||||||
|
@ -41,11 +42,17 @@ class WebResourcesController < ApplicationController
|
||||||
"status-class" => "status-#{status['classname']}"
|
"status-class" => "status-#{status['classname']}"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
if link.link_open == "new_window"
|
||||||
|
target = "_blank"
|
||||||
|
elsif link.link_open == "local"
|
||||||
|
target = "_self"
|
||||||
|
end
|
||||||
{
|
{
|
||||||
"title" => link.title,
|
"title" => link.title,
|
||||||
"context" => link.context,
|
"context" => link.context,
|
||||||
"statuses" => statuses,
|
"statuses" => statuses,
|
||||||
"link_to_show" => link.url
|
"link_to_show" => link.url,
|
||||||
|
"target" => target
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue