Permalink
Browse files

add fixture and quote reader forms

  • Loading branch information...
1 parent 62a6b30 commit 97182a4fb2bf67a29d916e758016a53ecf6179f8 @geraldb geraldb committed Dec 11, 2012
@@ -0,0 +1,14 @@
+# encoding: utf-8
+
+class Admin::FixturesController < Admin::BaseController
+
+ def index
+ end
+
+ def create
+ event = Event.find( params[:event_id] )
+ text = params[:text]
+ render :text => "hello fixtures for event #{event.key} >>#{text}<<"
+ end
+
+end
@@ -0,0 +1,14 @@
+# encoding: utf-8
+
+class Admin::QuotesController < Admin::BaseController
+
+ def index
+ end
+
+ def create
+ event = Event.find( params[:event_id] )
+ text = params[:text]
+ render :text => "hello quotes for event #{event.key} >>#{text}<<"
+ end
+
+end
@@ -0,0 +1,18 @@
+
+<h3>Load Fixtures (in Plain Text)</h3>
+
+<!-- post back -->
+<%= form_tag do %>
+
+<div>
+ <%= text_area_tag 'text', '', :rows => 16, :cols => 100 %>
+</div>
+<div>
+ Event:
+ <%= select_tag :event_id, options_from_collection_for_select(Event.all, :id, :full_title) %>
+
+ <%= submit_tag 'Load Fixtures (in Plain Text)', :class => 'btn-primary' %>
+</div>
+
+<% end %>
+
@@ -18,7 +18,7 @@
</tr>
<tr>
<td><%= f.label :event_id, 'Veranstaltung:' %></td>
- <td><%= f.select :event_id, options_from_collection_for_select(Event.all, :id, :title) %></td>
+ <td><%= f.select :event_id, options_from_collection_for_select(Event.all, :id, :full_title) %></td>
</tr>
<tr>
<td><%= f.label :public, 'Public Flag:' %></td>
@@ -0,0 +1,17 @@
+
+<h3>Load Quotes (in Plain Text)</h3>
+
+<!-- post back -->
+<%= form_tag do %>
+
+<div>
+ <%= text_area_tag 'text', '', :rows => 16, :cols => 100 %>
+</div>
+<div>
+ Event:
+ <%= select_tag :event_id, options_from_collection_for_select(Event.all, :id, :full_title) %>
+
+ <%= submit_tag 'Load Quotes (in Plain Text)', :class => 'btn-primary' %>
+</div>
+
+<% end %>
@@ -41,12 +41,17 @@
<div>
<%= link_to 'Update', update_path() %> &bull;
- <%= link_to 'Upcoming Games', admin_games_path() %> &bull;
<%= link_to 'Users', users_path() %> &bull;
<%= link_to 'Pools', admin_pools_path() %> &bull;
<%= link_to 'Bonus', admin_bonus_path() %> &bull;
<%= link_to 'Jobs', jobs_path() %>
+ | New (Upcoming, Not Yet Done):
+ <%= link_to 'Fixtures', admin_fixtures_path() %> &bull;
+ <%= link_to 'Quotes', admin_quotes_path() %>
<!-- todo: add some more links -->
+ | Old (Remove):
+ <%= link_to 'Upcoming Games', admin_games_path() %>
+
</div>
<div class='content' style='padding: 0px 20px 0px 20px;'>
View
@@ -37,6 +37,10 @@
resources :games do
put 'batch_update', :on => :collection # batch update
end
+
+ # add plain text import forms for fixtures n quotes
+ resources :fixtures
+ resources :quotes
match 'bonus', :to => 'bonus#index'
match 'bonus/update', :to => 'bonus#update'

0 comments on commit 97182a4

Please sign in to comment.