diff --git a/app/controllers/public/volunteer_teams_controller.rb b/app/controllers/public/volunteer_teams_controller.rb new file mode 100644 index 0000000..62dd648 --- /dev/null +++ b/app/controllers/public/volunteer_teams_controller.rb @@ -0,0 +1,7 @@ +module Public + class VolunteerTeamsController < Public::ApplicationController + def index + @volunteer_teams = current_conference.volunteer_teams + end + end +end diff --git a/config/routes.rb b/config/routes.rb index 2464b72..0d9b598 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,10 +10,7 @@ Rails.application.routes.draw do end end resources :volunteers - resources :volunteerships, only: [:index, :destroy] - resources :volunteer_teams, only: [] do - resource :volunteership, only: :create - end + resources :volunteer_teams, only: [:index] end namespace :api do diff --git a/lib/initfest/views/public/volunteer_teams/_volunteer_team.slim b/lib/initfest/views/public/volunteer_teams/_volunteer_team.slim new file mode 100644 index 0000000..e3c9dfb --- /dev/null +++ b/lib/initfest/views/public/volunteer_teams/_volunteer_team.slim @@ -0,0 +1,6 @@ +- if volunteer_team_counter % 3 == 0 + .clearfix.visible-lg-block +.col-lg-3 + h2 = volunteer_team.name + .description + = simple_format volunteer_team.description diff --git a/lib/initfest/views/public/volunteer_teams/index.slim b/lib/initfest/views/public/volunteer_teams/index.slim new file mode 100644 index 0000000..957d8c2 --- /dev/null +++ b/lib/initfest/views/public/volunteer_teams/index.slim @@ -0,0 +1,6 @@ +- content_for(:title) { VolunteerTeam.model_name.human(count: 2).mb_chars.capitalize.to_s } + +h1 = VolunteerTeam.model_name.human(count: 2).mb_chars.capitalize + +.container.volunteer_teams + = render partial: 'volunteer_team', collection: @volunteer_teams