Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions app/views/showcase/websites/index.json.jbuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
json.array @websites do |website|
json.id website.id
json.name website.original_localization.name
json.url website.url
json.highlighted website.highlighted_in_showcase
json.screenshots do
json.desktop website.screenshot.url
json.full_page website.screenshot_full_page.url
end
json.instance do
university = website.university
json.id university.id
json.name university.name
end
json.localizations website.languages do |language|
l10n = website.localization_for(language)
json.iso_code language.iso_code
json.name l10n.name
end
json.tags website.showcase_tags do |tag|
json.id tag.id
json.name tag.name
end
end
11 changes: 1 addition & 10 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
Rails.application.routes.draw do
constraints host: ENV['OSUNY_SHOWCASE'] do
get ':feature' => 'showcase/websites#feature',
as: :showcase_feature,
constraints: {
feature: /actualites|agenda|portfolio|jobboard/
}
get ':tag' => 'showcase/websites#tag', as: :showcase_tag
get '/' => 'showcase/websites#index'
get 'websites/:id' => 'showcase/websites#show', as: :showcase_website
end
draw 'showcase'
constraints host: ENV['OSUNY_TRANSPARENCY'] do
get '/' => 'transparency/home#index'
end
Expand Down
11 changes: 11 additions & 0 deletions config/routes/showcase.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
constraints host: ENV['OSUNY_SHOWCASE'] do
get '/index' => 'showcase/websites#index'
get ':feature' => 'showcase/websites#feature',
as: :showcase_feature,
constraints: {
feature: /actualites|agenda|portfolio|jobboard/
}
get ':tag' => 'showcase/websites#tag', as: :showcase_tag
get '/' => 'showcase/websites#index'
get 'websites/:id' => 'showcase/websites#show', as: :showcase_website
end
Loading