lundi 28 novembre 2016

Providing options in view depending on conditions

I am trying to decide the best ways to deliver up partialViews inside a view based on different options.

I have a partial view inside of a view. I want to give the user a choice using mutually exclusive buttons (radio buttons). I'm not sure of the best way to handle this. I am thinking of using razor or Jquery.

Example: In competition page

3 buttons = [create new team] [join a team] [solo competition]

[create new team]'s view will allow the user to create a new team (the name will be checked to make sure it is unique) then the team will be associated with the competition being viewed.

[join team]'s view will allow the user to enter the name of a team, if the team exists and has room the user can join it. If not, other things will happen.

[solo competition]'s view will allow the user to join the competition without any team.

These options will only be viewable if 1) the user is not already associated with the competition 2) the event is not a single's only competition.

I'm trying to figure out the most efficient way to render this.




Aucun commentaire:

Enregistrer un commentaire