From e586c3e2b30698ea5a1c83c19ea446c4be89fd54 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 4 Mar 2014 18:57:50 -0500 Subject: Here's to messing everything up. --- app/views/tournaments/_selected.html.erb | 30 +++++------------------------- app/views/tournaments/index.html.erb | 27 +++++++++++++++++++++++++++ app/views/tournaments/new.html.erb | 12 ++++++++++-- 3 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 app/views/tournaments/index.html.erb (limited to 'app/views') diff --git a/app/views/tournaments/_selected.html.erb b/app/views/tournaments/_selected.html.erb index 302283d..3b14404 100644 --- a/app/views/tournaments/_selected.html.erb +++ b/app/views/tournaments/_selected.html.erb @@ -1,25 +1,5 @@ -
-

-
- -

-

-
- -

-

-
- -

-

-
- -

-

-
- -

-

- -

-
\ No newline at end of file + + <%= content_tag(:p, "Hello World") %> + + +<%= tag(:label, for: 'GameType') %> \ No newline at end of file diff --git a/app/views/tournaments/index.html.erb b/app/views/tournaments/index.html.erb new file mode 100644 index 0000000..26d0643 --- /dev/null +++ b/app/views/tournaments/index.html.erb @@ -0,0 +1,27 @@ +

Listing tournaments

+ + + + + + + + + + + + + <% @tournaments.each do |tournament| %> + + + + + + + <% end %> + +
Tournament IDShow TournamentEdit TournamentDelete Tournament
<%= tournament.id %><%= link_to 'Show', tournament %><%= link_to 'Edit', edit_tournament_path(tournament) %><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Tournament', new_tournament_path, :class => "btn btn-warning btn-lg" %> diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb index f1dec90..a6dfa4d 100644 --- a/app/views/tournaments/new.html.erb +++ b/app/views/tournaments/new.html.erb @@ -1,11 +1,19 @@ +<%= javascript_include_tag :defaults %> +

New tournament

-<%= select_tag 'tournament_id', options_for_select(["Select a Game Type"] + Game.all.collect {|game| game.name}), :onchange => 'populate()' %> +<%= select_tag 'tournament_id', options_for_select(["Select a Game Type"] + Game.all.collect {|game| game.name}), :onchange => 'populate()' %> <%= link_to 'Select', 'new?game=1', :class => "btn btn-warning btn-lg" %> + +
- <% render :partial => "selected" %> + <% if not @game.nil? %> + <%= render 'selected' %> + <% end %>


+<%= link_to 'Select', 'selected', :class => "btn btn-warning btn-lg" %> + <%= link_to 'Back', tournaments_path %> -- cgit v1.2.3-2-g168b