Closed cboulay closed 12 years ago
Viewing a team now shows a list of all its players or all its games. There are two buttons above the list to toggle between players/games. I haven't hooked those buttons up yet so for now it shows everything.
I wonder if instead of two buttons, I should have one button that toggles.
I also have yet to add a "+" button to add players or games to a team.
Closing in favour of issue #20, adding/creating a game for a team. I'm sure whatever method is developed for adding a game for a team will also work for adding/creating a player for a team, and adding/creating a game for a tournament.
I am thinking about how to add a player to a team. This is very easy if we assume that each player is a child of a team and the same human on another team counts as a different player entry. However, this is not the case. So we need to be able to add players to a team by choosing from among already created players. Eventually there will be too many players to make simply listing them a useful way to do this.
One idea I have is to use a text edit box at the top of the view. The player list will be empty initially. Once the user starts typing letters into the text edit box then we will start querying the server for lists of players that match the entered text. We will have to use a debounce here to limit the API queries to 1/s or so.
This view should also have a button to create a new player in case the desired player is not in the list. This create player view should be the same view as used elsewhere but the difference here is that the temporary player model will be given the team model after it is instantiated but before it is passed to the view.