This commit is contained in:
Jason Denney
2012-12-04 00:46:15 -05:00
commit aa3ed3d43b
97 changed files with 2398 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
%p
= link_to 'Create a Team', new_team_path, :class => 'btn btn-large btn-primary'
.teams
- teams.each do |team|
%h3.team= link_to team, team
= will_paginate teams
+21
View File
@@ -0,0 +1,21 @@
= form_for team, :html => { :class => 'form-horizontal' } do |f|
.control-group{:class => team.errors[:name].present? ? 'error' : ''}
= f.label :name, 'Name', :class => 'control-label'
.controls
= f.text_field :name
- if team.errors[:name].present?
.help-inline= team.errors[:name].join(', ')
.control-group{:class => team.errors[:max_members].present? ? 'error' : ''}
= f.label :max_members, 'Max members', :class => 'control-label'
.controls
= f.text_field :max_members
- if team.errors[:max_members].present?
.help-inline= team.errors[:max_members].join(', ')
.control-group{:class => team.errors[:private_team].present? ? 'error' : ''}
= f.label :private_team, 'Private team?', :class => 'control-label'
.controls
= f.check_box :private_team
- if team.errors[:private_team].present?
.help-inline= team.errors[:private_team].join(', ')
.form-actions
= f.submit 'Create Team', :class => 'btn btn-primary'
+11
View File
@@ -0,0 +1,11 @@
%h3= team
%ul.members
%li= team.captain
- team.members.each do |member|
%li= member
- unless current_user.is_a_member_of?(team)
= form_tag join_team_path(team) do
= submit_tag 'Join team', :class => 'btn'