mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 16:31:38 -04:00
git init
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user