diff options
author | nfoy <nfoy@purdue.edu> | 2014-04-23 20:41:03 -0400 |
---|---|---|
committer | nfoy <nfoy@purdue.edu> | 2014-04-23 20:41:03 -0400 |
commit | 9afd5a4f7a86eeaab3fa8a0c25609ac7977e0489 (patch) | |
tree | 8d47adc08a58a8936e2026f30852f877ee47cf64 /app/views | |
parent | 422a7b39a06e2fe54415f2be08548021a981e8a8 (diff) | |
parent | 7ff82b901705475f97e277a9f3f31756bd3ce948 (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/common/_show_tournament.html.erb | 4 | ||||
-rw-r--r-- | app/views/common/_show_user.html.erb | 4 | ||||
-rw-r--r-- | app/views/search/go.html.erb | 16 | ||||
-rw-r--r-- | app/views/tournaments/_selected.html.erb | 9 | ||||
-rw-r--r-- | app/views/tournaments/new.html.erb | 4 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 8 |
6 files changed, 33 insertions, 12 deletions
diff --git a/app/views/common/_show_tournament.html.erb b/app/views/common/_show_tournament.html.erb index 89d8f53..0f60fad 100644 --- a/app/views/common/_show_tournament.html.erb +++ b/app/views/common/_show_tournament.html.erb @@ -1,5 +1,7 @@ <div class="row tournament-listing"> - <div class="col-md-2 col-sm-3 col-xs-6"><%= image_tag ('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=100&d=mm') %></div> + <div class="col-md-2 col-sm-3 col-xs-6"><%= image_tag('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.hosts.first.email) + '?s=100&d=mm', class: "t-image") %> + <p class="t-game"> <%= Game.find(target.game_id).name %></p> + </div> <div class="col-md-8 col-sm-7 col-xs-6"> <%# "header" %> <%= link_to(target) do %><h3><%= target.name %></h3><% end %> diff --git a/app/views/common/_show_user.html.erb b/app/views/common/_show_user.html.erb index 70f1ca4..dd136a0 100644 --- a/app/views/common/_show_user.html.erb +++ b/app/views/common/_show_user.html.erb @@ -1,8 +1,8 @@ <div class="row user-listing"> - <div class="col-md-3 col-sm-3 col-xs-6"><%= image_tag ('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.email) + '?s=100&d=mm') %></div> + <div class="col-md-3 col-sm-4 col-xs-4"><%= image_tag ('http://www.gravatar.com/avatar/' + Digest::MD5.hexdigest(target.email) + '?s=100&d=mm') %></div> - <div class="col-md-9 col-sm-9 col-xs-6"> + <div class="col-md-9 col-sm-8 col-xs-8"> <%# "header" %> <%= link_to(target) do %><h3><%= target.user_name %></h3><% end %> diff --git a/app/views/search/go.html.erb b/app/views/search/go.html.erb index d2bf8f3..ea2dabf 100644 --- a/app/views/search/go.html.erb +++ b/app/views/search/go.html.erb @@ -4,12 +4,24 @@ </div> <div class="expanded"> <h5><a href="#collapse">Advanced Search [hide]</a></h5> - <p>This is where the advancedsearch will go.</p> + <%= form_tag("/search", method: "get") do %> + <div class="form-group"> + <%= label_tag :query, 'Find:' %> + <%= text_field_tag(:query, params[:query]) %> + </div> + <div class="form-group"> + <%= label_tag :game_type, 'Game Type:' %> + <%= select_tag(:game_type, options_from_collection_for_select(@games, 'id', 'name'), :prompt => 'All Games') %> + </div> + <div> + <%= submit_tag("Search", :name=>nil) %> + </div> + <% end %> </div> </div> <%# Show search results if a query was not nill %> -<% if !@query.empty? %> +<% if !@query.nil? and !@query.empty? %> <% if @tournaments.empty? and @players.empty? %> <h3> No results found for "<%= @query %>" </h3> diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index 4efd17a..9240c49 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -2,18 +2,17 @@ <%= render "common/error_messages", :target => @tournament %> <%= f.hidden_field(:game_id) %> - <% @game = Game.find(params[:game]) %> <% @tournament.attributes.each do |name, value| %> <% if (name == "id") or (name =~ /.*_at$/) or (name == "game_id") or (name == "status") or (name == "set_rounds") %> <% next %> <% end %> <p> <%= f.label name %><br> - <% unless @game.attributes[name].nil? %> + <% unless @tournament.game.attributes[name].nil? %> <% if name == "sampling_method" %> - <%= f.select( name, @game.sampling_method.split(',') ) %> + <%= f.select( name, @tournament.game.sampling_method.split(',') ) %> <% else %> - <%= f.text_field(name, :value => @game.attributes[name] ) %> + <%= f.text_field(name, :value => @tournament.game.attributes[name] ) %> <% end %> <% else %> <%= f.text_field name %> @@ -22,7 +21,7 @@ <% end %> <%= fields_for "tournament[settings]", @tournament.settings do |setting_fields| %> - <% @game.settings.each do |setting| %> + <% @tournament.game.settings.each do |setting| %> <p> <%= setting_fields.label setting.name %> <br> diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb index 8c74068..2837708 100644 --- a/app/views/tournaments/new.html.erb +++ b/app/views/tournaments/new.html.erb @@ -1,10 +1,10 @@ <h1>New Tournament</h1> <%= form_tag(new_tournament_path, method: "get") do %> - <%= select_tag('game', + <%= select_tag('tournament[game_id]', options_from_collection_for_select(@games, 'id', 'name', @tournament.game.nil? || @tournament.game.id), :prompt => "Select a Game Type") %> - <%= submit_tag("Select", :class => "btn btn-success btn-xs") %> + <%= submit_tag("Select", :class => "btn") %> <% end %> <div id='ajax-form'> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index b85cbda..81eee6f 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -20,6 +20,14 @@ too single </p> +<p> + <%= label :username %><br> + <%= text_field %> + + <br><input type="submit" value="Submit"><br> + +</p> + <div class="row"> <div class="col-md-6"> <h3> Recent Tournaments Played </h3> |