Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup setup views

  • Loading branch information...
commit df908ffe9143cd9b7990217f1902a3a5b2d60ac8 1 parent 780e7bc
@geraldb geraldb authored
View
73 app/views/setup/calc_games/_form.html.erb
@@ -1,73 +0,0 @@
-
-<%= form_for(@game) do |f| %>
- <% if @game.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@game.errors.count, "error") %> prohibited this game from being saved:</h2>
-
- <ul>
- <% @game.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <table>
- <tr>
- <td><%= f.label :round_id, 'Runde:' %></td>
- <td>(<%= f.object.round_id %>)</td>
- <td><%= f.select :round_id, ([[ '- Runde wählen -', nil ]] + Round.all.map { |rec| [ "#{rec.event.title} / #{rec.title}", rec.id ] }) %></td>
- </tr>
- <tr>
- <td><%= f.label :pos, 'Lfd#:' %></td>
- <td></td>
- <td><%= f.text_field :pos, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :team1_id, 'Team 1:' %></td>
- <td>(<%= f.object.team1_id %>)</td>
- <td><%= f.select :team1_id, options_from_collection_for_select( Team.all, :id, :title, f.object.team1_id) %></td>
- </tr>
- <tr>
- <td><%= f.label :score1, 'Tore 1:' %></td>
- <td></td>
- <td><%= f.text_field :score1, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :score2, 'Tore 2:' %></td>
- <td></td>
- <td><%= f.text_field :score2, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :team2_id, 'Team 2:' %></td>
- <td>(<%= f.object.team2_id %>)</td>
- <td><%= f.select :team2_id, options_from_collection_for_select( Team.all, :id, :title, f.object.team2_id) %></td>
- </tr>
- <tr>
- <td><%= f.label :locked, 'Locked Flag:' %></td>
- <td></td>
- <td>
- <%= f.radio_button :locked, 'true' %><%= f.label :locked_true, 'Ja' %>
- <%= f.radio_button :locked, 'false' %><%= f.label :locked_false, 'Nein' %>
- </td>
- </tr>
- <tr>
- <td><%= f.label :knockout, 'Knockout Flag:' %></td>
- <td></td>
- <td>
- <%= f.radio_button :knockout, 'true' %><%= f.label :knockout_true, 'Ja' %>
- <%= f.radio_button :knockout, 'false' %><%= f.label :knockout_false, 'Nein' %>
- </td>
- </tr>
- <tr>
- <td><%= f.label :play_at, 'Datum:' %></td>
- <td></td>
- <td><%= f.text_field :play_at %></td>
- </tr>
- </table>
-
- <div class="actions">
- <%= f.submit 'Speichern', :class => 'btn-primary' %>
- <%= link_to 'Zurück', games_path(), :class => 'btn' %>
- </div>
-<% end %>
View
3  app/views/setup/calc_games/edit.html.erb
@@ -1,3 +0,0 @@
-<h1>Spiel (Calc) Bearbeiten</h1>
-
-<%= render 'form' %>
View
3  app/views/setup/calc_games/new.html.erb
@@ -1,3 +0,0 @@
-<h1>Neues Spiel (Calc)</h1>
-
-<%= render 'form' %>
View
37 app/views/setup/events/_form.html.erb
@@ -1,37 +0,0 @@
-<%= form_for(@event, :url => events_path()) do |f| %>
-
-<table>
- <tr>
- <td><%= f.label :title, 'Titel' %></td>
- <td><%= f.text_field :title %></td>
- </tr>
-
- <tr>
- <td><%= f.label :key, 'Key' %></td>
- <td><%= f.text_field :key %></td>
- </tr>
-
- <tr>
- <td><%= f.label :start_at, 'Start (Datum)' %></td>
- <td><%= f.text_field :start_at %></td>
- </tr>
-
- <tr>
- <td><%= f.label :team3, '3. Platz Flag' %></td>
- <td>
- <%= f.radio_button :team3, 'true' %><%= f.label :team3_true, 'Ja' %>
- <%= f.radio_button :team3, 'false' %><%= f.label :team3_false, 'Nein' %>
- </td>
- </tr>
-
-
-
-
-</table>
-
-<div class="actions">
- <%= f.submit 'Speichern', :class => 'btn-primary' %>
- <%= link_to 'Zurück', events_path(), :class => 'btn' %>
- </div>
-
-<% end %><!-- form_for event -->
View
29 app/views/setup/events/edit.html.erb
@@ -1,29 +0,0 @@
-<h1>Veranstaltung Bearbeiten</h1>
-
-<%= render 'form' %>
-
-<h3>Teams</h3>
-
-<%= form_for :event, :url => add_team_to_event_path(@event) do |f| %>
-
- <!-- todo/fix: remove teams already added to event -->
- <%= select_tag 'team_id', options_from_collection_for_select( Team.where( :calc => false ).all, :id, :title) %>
- <%= f.submit 'Hinzufügen', :class => 'btn-primary' %>
-
-<% end %><!-- form_for event_team -->
-
-<table>
- <% @event.teams.each do |team| %>
- <tr>
- <td>(<%= team.id %>)</td>
- <td>
- <% if team.img.present? %>
- <%= image_tag( team.img ) %>
- <% end %>
- </td>
- <td><%= team.title %></td>
- </tr>
- <% end %><!-- teams.each -->
-</table>
-
-<!-- todo/fix: add loeschen button -->
View
20 app/views/setup/events/index.html.erb
@@ -1,24 +1,10 @@
-<h1><%= Event.count %> Veranstaltungen</h1>
-
-<%= link_to 'Neue Veranstaltung', new_event_path(), :class => 'btn-primary' %>
+<h1><%= Event.count %> Events</h1>
<table>
<% @events.each do |event| %>
- <tr style='background-color: black; color: white; font-weight: bold; font-size: 120%;'>
+ <tr>
<td>(<%= event.id %>)</td>
- <td colspan='2'><%= event.title %> (<%= event.key %>)</td>
- <td><%= link_to 'Bearbeiten', edit_event_path(event), :class => 'btn' %></td>
+ <td><%= event.title %> (<%= event.key %>)</td>
</tr>
- <% event.teams.each do |team| %>
- <tr>
- <td>(<%= team.id %>)</td>
- <td>
- <%= image_tag( team.img ) if team.img.present? %>
- </td>
- <td><%= team.title %> (<%= team.key %>)</td>
- </tr>
- <% end %><!-- teams.each -->
<% end %><!-- events.each -->
</table>
-
-<%= link_to 'Neue Veranstaltung', new_event_path(), :class => 'btn-primary' %>
View
3  app/views/setup/events/new.html.erb
@@ -1,3 +0,0 @@
-<h1>Neue Veranstaltung</h1>
-
-<%= render 'form' %>
View
73 app/views/setup/games/_form.html.erb
@@ -1,73 +0,0 @@
-
-<%= form_for(@game) do |f| %>
- <% if @game.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@game.errors.count, "error") %> prohibited this game from being saved:</h2>
-
- <ul>
- <% @game.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <table>
- <tr>
- <td><%= f.label :round_id, 'Runde:' %></td>
- <td>(<%= f.object.round_id %>)</td>
- <td><%= f.select :round_id, ([[ '- Runde wählen -', nil ]] + Round.all.map { |rec| [ "#{rec.event.title} / #{rec.title}", rec.id ] }) %></td>
- </tr>
- <tr>
- <td><%= f.label :pos, 'Lfd#:' %></td>
- <td></td>
- <td><%= f.text_field :pos, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :team1_id, 'Team 1:' %></td>
- <td>(<%= f.object.team1_id %>)</td>
- <td><%= f.select :team1_id, options_from_collection_for_select( Team.all, :id, :title, f.object.team1_id) %></td>
- </tr>
- <tr>
- <td><%= f.label :score1, 'Tore 1:' %></td>
- <td></td>
- <td><%= f.text_field :score1, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :score2, 'Tore 2:' %></td>
- <td></td>
- <td><%= f.text_field :score2, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :team2_id, 'Team 2:' %></td>
- <td>(<%= f.object.team2_id %>)</td>
- <td><%= f.select :team2_id, options_from_collection_for_select( Team.all, :id, :title, f.object.team2_id) %></td>
- </tr>
- <tr>
- <td><%= f.label :locked, 'Locked Flag:' %></td>
- <td></td>
- <td>
- <%= f.radio_button :locked, 'true' %><%= f.label :locked_true, 'Ja' %>
- <%= f.radio_button :locked, 'false' %><%= f.label :locked_false, 'Nein' %>
- </td>
- </tr>
- <tr>
- <td><%= f.label :knockout, 'Knockout Flag:' %></td>
- <td></td>
- <td>
- <%= f.radio_button :knockout, 'true' %><%= f.label :knockout_true, 'Ja' %>
- <%= f.radio_button :knockout, 'false' %><%= f.label :knockout_false, 'Nein' %>
- </td>
- </tr>
- <tr>
- <td><%= f.label :play_at, 'Datum:' %></td>
- <td></td>
- <td><%= f.text_field :play_at %></td>
- </tr>
- </table>
-
- <div class="actions">
- <%= f.submit 'Speichern', :class => 'btn-primary' %>
- <%= link_to 'Zurück', games_path, :class => 'btn' %>
- </div>
-<% end %>
View
3  app/views/setup/games/edit.html.erb
@@ -1,3 +0,0 @@
-<h1>Spiel Bearbeiten</h1>
-
-<%= render 'form' %>
View
13 app/views/setup/games/index.html.erb
@@ -1,6 +1,4 @@
-<h1><%= Game.count %> Spiele</h1>
-
-<%= link_to 'Neues Spiel', new_game_path(), :class => 'btn-primary' %>
+<h1><%= Game.count %> Games</h1>
<table>
<% @events.each do |event| %>
@@ -33,17 +31,10 @@
</td>
<td><%= game.play_at %></td>
<td><%= game.play_at.utc %></td>
- <td><%= link_to 'Bearbeiten', game.calc? ? edit_calc_game_path(game) : edit_game_path( game ), :class => 'btn' %></td>
</tr>
<% end %><!-- games.each -->
<% end %><!-- rounds.each -->
<% end %><!-- events.each -->
-
-</table>
-
-<p></p>
-
-<%= link_to 'Neues Spiel', new_game_path(), :class => 'btn-primary' %>
-
+</table>
View
3  app/views/setup/games/new.html.erb
@@ -1,3 +0,0 @@
-<h1>Neues Spiel</h1>
-
-<%= render 'form' %>
View
44 app/views/setup/rounds/_form.html.erb
@@ -1,44 +0,0 @@
-<%= form_for(@round) do |f| %>
- <% if @round.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@round.errors.count, "error") %> prohibited this round from being saved:</h2>
-
- <ul>
- <% @round.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <table>
- <tr>
- <td><%= f.label :event_id, 'Veranstaltung:' %></td>
- <td>(<%= f.object.event_id %>)</td>
- <td><%= f.select :event_id, options_from_collection_for_select( Event.all, :id, :title, f.object.event_id ) %></td>
- </tr>
- <tr>
- <td><%= f.label :pos, 'Lfd#:' %></td>
- <td></td>
- <td><%= f.text_field :pos, size: '3' %></td>
- </tr>
- <tr>
- <td><%= f.label :title, 'Titel:' %></td>
- <td></td>
- <td><%= f.text_field :title %></td>
- </tr>
- <tr>
- <td><%= f.label :calc, 'Calc Flag:' %></td>
- <td></td>
- <td>
- <%= f.radio_button :calc, 'true' %><%= f.label :calc_true, 'Ja' %>
- <%= f.radio_button :calc, 'false' %><%= f.label :calc_false, 'Nein' %>
- </td>
- </tr>
- </table>
-
- <div class="actions">
- <%= f.submit 'Speichern', :class => 'btn-primary' %>
- <%= link_to 'Zurück', rounds_path(), :class => 'btn' %>
- </div>
-<% end %>
View
3  app/views/setup/rounds/edit.html.erb
@@ -1,3 +0,0 @@
-<h1>Runde Bearbeiten</h1>
-
-<%= render 'form' %>
View
9 app/views/setup/rounds/index.html.erb
@@ -1,6 +1,4 @@
-<h1><%= Round.count %> Runden</h1>
-
-<%= link_to 'Neue Runde', new_round_path(), :class => 'btn-primary' %>
+<h1><%= Round.count %> Rounds</h1>
<table>
<% @events.each do |event| %>
@@ -14,12 +12,7 @@
<td><%= round.pos %></td>
<td><%= round.title %></td>
<td><%= '(Calc Flag)' if round.calc == true %></td>
- <td><%= link_to 'Bearbeiten', edit_round_path( round ), :class => 'btn' %></td>
</tr>
<% end %><!-- rounds.each -->
<% end %><!-- events.each -->
</table>
-
-<p></p>
-
-<%= link_to 'Neue Runde', new_round_path(), :class => 'btn-primary' %>
View
3  app/views/setup/rounds/new.html.erb
@@ -1,3 +0,0 @@
-<h1>Neue Runde</h1>
-
-<%= render 'form' %>
View
42 app/views/setup/teams/_form.html.erb
@@ -1,42 +0,0 @@
-
-<%= form_for(@team, :url => teams_path()) do |f| %>
- <% if @team.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@team.errors.count, "error") %> prohibited this team from being saved:</h2>
-
- <ul>
- <% @team.errors.full_messages.each do |msg| %>
- <li><%= msg %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
-
- <table>
- <tr>
- <td><%= f.label :title, 'Titel' %></td>
- <td><%= f.text_field :title %></td>
- </tr>
- <tr>
- <td><%= f.label :img, 'Bild' %></td>
- <td><%= f.text_field :img %></td>
- </tr>
- <tr>
- <td><%= f.label :key, 'Key' %></td>
- <td><%= f.text_field :key %></td>
- </tr>
-
- <tr>
- <td><%= f.label :calc, 'Calc Flag' %></td>
- <td>
- <%= f.radio_button :calc, 'true' %><%= f.label :calc_true, 'Ja' %>
- <%= f.radio_button :calc, 'false' %><%= f.label :calc_false, 'Nein' %>
- </td>
- </tr>
- </table>
-
- <div class="actions">
- <%= f.submit 'Speichern', :class => 'btn-primary' %>
- <%= link_to 'Zurück', teams_path(), :class => 'btn' %>
- </div>
-<% end %>
View
3  app/views/setup/teams/edit.html.erb
@@ -1,3 +0,0 @@
-<h1>Team Bearbeiten</h1>
-
-<%= render 'form' %>
View
6 app/views/setup/teams/index.html.erb
@@ -1,7 +1,5 @@
<h1><%= Team.count %> Teams</h1>
-<%= link_to 'Neues Team', new_team_path(), :class => 'btn-primary' %>
-
<table>
<% @teams.each do |team| %>
<tr>
@@ -10,10 +8,6 @@
<%= image_tag( team.img ) if team.img.present? %>
</td>
<td><%= team.title %> (<%= team.key %>)</td>
- <td><%= link_to 'Bearbeiten', edit_team_path( team.id ), :class => 'btn' %></td>
</tr>
<% end %><!-- teams.each -->
</table>
-
-
-<%= link_to 'Neues Team', new_team_path(), :class => 'btn-primary' %>
View
3  app/views/setup/teams/new.html.erb
@@ -1,3 +0,0 @@
-<h1>Neues Team</h1>
-
-<%= render 'form' %>
Please sign in to comment.
Something went wrong with that request. Please try again.