-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draggable Teams to add to Tournament.
git-svn-id: http://svn2.assembla.com/svn/fs/trunk/fpt@13 d4c3aac1-5b85-48de-b3bb-3a454bd87b0a
- Loading branch information
lmarcucci
committed
Apr 5, 2008
1 parent
1dd45ef
commit 76bae4a
Showing
31 changed files
with
968 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
module TeamsHelper | ||
|
||
def name(team) | ||
if team == nil | ||
"--" | ||
else | ||
team.short_name.capitalize | ||
end | ||
end | ||
|
||
def played(match) | ||
if match.played_date == nil | ||
"--" | ||
else | ||
match.played_date.to_formatted_s(:rfc822) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,8 @@ def get_tournament_type(tournament) | |
end | ||
end | ||
|
||
def get_team(id) | ||
Team.find(id) | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<h3>Matches </h3> | ||
<ul style="list-style-type:none;padding-left:0px"> | ||
<li> | ||
<div style="float:left;width:130px;">Jugado</div> | ||
<div style="float:left;width:150px;">Local</div> | ||
<div style="float:left;width:60px;">Goles</div> | ||
<div style="float:left;width:60px;">Goles</div> | ||
<div style="float:left;width:150px;">Visitante</div> | ||
</li><br /> | ||
<li> | ||
<%= @teams %> | ||
</li><br /> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
<h3>Teams:</h3> | ||
|
||
<% i=1 %> | ||
<% for team in @teams %> | ||
<p> | ||
<div style="min-width:150px;float:left;"> | ||
<%= check_box_tag "tournament[team_ids][]", | ||
team.id, | ||
@tournament.teams.include?(team) %> | ||
<%= team.short_name.titleize %> | ||
</p> | ||
</div> | ||
<% if i.modulo(4) == 0 %> | ||
<br /> | ||
<% end %> | ||
<% i = i+1 %> | ||
<% end %> | ||
|
||
<br /><br /> | ||
<%= submit_tag "Just Do It", :class => 'submit' %><br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h3>excluded teams</h3> | ||
<% for team in @excluded %> | ||
<div id="team_<%= team.id %>" class="excluded_teams"><%= team.short_name.capitalize %></div> | ||
<%= draggable_element "team_#{team.id}", :revert => true, :success => "Element.hide" %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<h3>included teams</h3> | ||
<% for team in @included %> | ||
<div id="team_<%= team.id %>" class="competitors"><%= team.short_name.capitalize %></div> | ||
<%= draggable_element "team_#{team.id}", :revert => true, :success => "Element.hide" %> | ||
<% end %> | ||
<%= "Drop teams here." if @included.empty? %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.