Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added paper judge forms and finished rails app
- Loading branch information
1 parent
e20a40f
commit 6531055
Showing
33 changed files
with
14,287 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,83 @@ | |||
class AwardsController < ApplicationController | |||
# GET /awards | |||
# GET /awards.xml | |||
def index | |||
@awards = Award.all | |||
|
|||
respond_to do |format| | |||
format.html # index.html.erb | |||
format.xml { render :xml => @awards } | |||
end | |||
end | |||
|
|||
# GET /awards/1 | |||
# GET /awards/1.xml | |||
def show | |||
@award = Award.find(params[:id]) | |||
|
|||
respond_to do |format| | |||
format.html # show.html.erb | |||
format.xml { render :xml => @award } | |||
end | |||
end | |||
|
|||
# GET /awards/new | |||
# GET /awards/new.xml | |||
def new | |||
@award = Award.new | |||
|
|||
respond_to do |format| | |||
format.html # new.html.erb | |||
format.xml { render :xml => @award } | |||
end | |||
end | |||
|
|||
# GET /awards/1/edit | |||
def edit | |||
@award = Award.find(params[:id]) | |||
end | |||
|
|||
# POST /awards | |||
# POST /awards.xml | |||
def create | |||
@award = Award.new(params[:award]) | |||
|
|||
respond_to do |format| | |||
if @award.save | |||
format.html { redirect_to(@award, :notice => 'Award was successfully created.') } | |||
format.xml { render :xml => @award, :status => :created, :location => @award } | |||
else | |||
format.html { render :action => "new" } | |||
format.xml { render :xml => @award.errors, :status => :unprocessable_entity } | |||
end | |||
end | |||
end | |||
|
|||
# PUT /awards/1 | |||
# PUT /awards/1.xml | |||
def update | |||
@award = Award.find(params[:id]) | |||
|
|||
respond_to do |format| | |||
if @award.update_attributes(params[:award]) | |||
format.html { redirect_to(@award, :notice => 'Award was successfully updated.') } | |||
format.xml { head :ok } | |||
else | |||
format.html { render :action => "edit" } | |||
format.xml { render :xml => @award.errors, :status => :unprocessable_entity } | |||
end | |||
end | |||
end | |||
|
|||
# DELETE /awards/1 | |||
# DELETE /awards/1.xml | |||
def destroy | |||
@award = Award.find(params[:id]) | |||
@award.destroy | |||
|
|||
respond_to do |format| | |||
format.html { redirect_to(awards_url) } | |||
format.xml { head :ok } | |||
end | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
module AwardsHelper | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
class Award < ActiveRecord::Base | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,26 @@ | |||
|
|||
<div class="group"> | |||
<%= f.label :teams_id, t("activerecord.attributes.award.teams_id", :default => "Teams"), :class => :label %> | |||
<%= f.text_field :teams_id, :class => 'text_field' %> | |||
<span class="description">Ex: a simple text</span> | |||
</div> | |||
|
|||
<div class="group"> | |||
<%= f.label :award, t("activerecord.attributes.award.award", :default => "Award"), :class => :label %> | |||
<%= f.text_field :award, :class => 'text_field' %> | |||
<span class="description">Ex: a simple text</span> | |||
</div> | |||
|
|||
<div class="group"> | |||
<%= f.label :judge, t("activerecord.attributes.award.judge", :default => "Judge"), :class => :label %> | |||
<%= f.text_field :judge, :class => 'text_field' %> | |||
<span class="description">Ex: a simple text</span> | |||
</div> | |||
|
|||
<div class="group navform wat-cf"> | |||
<button class="button" type="submit"> | |||
<%= image_tag("web-app-theme/icons/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}") %> <%= t("web-app-theme.save", :default => "Save") %> | |||
</button> | |||
<span class="text_button_padding"><%= t("web-app-theme.or", :default => "or") %></span> | |||
<%= link_to t("web-app-theme.cancel", :default => "Cancel"), awards_path, :class => "text_button_padding link_button" %> | |||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,13 @@ | |||
<div class="block"> | |||
<h3>Links</h3> | |||
<ul class="navigation"> | |||
<li><a href="/awards">Awards</a></li> | |||
<li><a href="/bots">Bots</a></li> | |||
<li><a href="/bot_types">Bot Types</a></li> | |||
<li><a href="/heats">Heats</a></li> | |||
<li><a href="/laps">Laps</a></li> | |||
<li><a href="/teams">Teams</a></li> | |||
<li><a href="/team_members">Team Members</a></li> | |||
<li><a href="/views">Views</a></li> | |||
</ul> | |||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
<div class="block"> | |||
<div class="secondary-navigation"> | |||
<ul class="wat-cf"> | |||
<li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", awards_path %></li> | |||
<li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_award_path %></li> | |||
<li class="active"><%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_award_path %></li> | |||
</ul> | |||
</div> | |||
<div class="content"> | |||
<h2 class="title"><%= t("web-app-theme.edit", :default => "Edit") %> Award</h2> | |||
<div class="inner"> | |||
<%= form_for @award, :url => award_path(@award), :html => { :class => :form } do |f| -%> | |||
<%= render :partial => "form", :locals => {:f => f} %> | |||
<% end -%> | |||
</div> | |||
</div> | |||
</div> | |||
|
|||
<% content_for :sidebar, render(:partial => 'sidebar') -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,48 @@ | |||
<div class="block"> | |||
<div class="secondary-navigation"> | |||
<ul class="wat-cf"> | |||
<li class="first active"><%= link_to "#{t("web-app-theme.list", :default => "List")}", awards_path %></li> | |||
<li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_award_path %></li> | |||
</ul> | |||
</div> | |||
<div class="content"> | |||
<h2 class="title"><%= t("web-app-theme.all", :default => "All") %> Awards</h2> | |||
<div class="inner"> | |||
<table class="table"> | |||
<tr> | |||
<th class="first">ID</th> | |||
<th> | |||
<%= t("activerecord.attributes.award.teams_id", :default => t("activerecord.labels.teams_id", :default => "Teams_id")) %> | |||
</th> | |||
<th><%= t("web-app-theme.created_at", :default => "Created at") %></th> | |||
<th class="last"> </th> | |||
</tr> | |||
<% @awards.each do |award| -%> | |||
<tr class="<%= cycle("odd", "even") %>"> | |||
<td> | |||
<%= award.id %> | |||
</td> | |||
<td> | |||
<%= link_to award.teams_id, award_path(award) %> | |||
</td> | |||
<td> | |||
<%= award.created_at %> | |||
</td> | |||
<td class="last"> | |||
<%= link_to "#{t("web-app-theme.show", :default => "Show")}", award_path(award) %> | | |||
<%= link_to "#{t("web-app-theme.edit", :default => "Edit")}", edit_award_path(award) %> | | |||
<%= link_to "#{t("web-app-theme.delete", :default => "Delete")}", award_path(award), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %> | |||
</td> | |||
</tr> | |||
<% end -%> | |||
</table> | |||
<div class="actions-bar wat-cf"> | |||
<div class="actions"> | |||
</div> | |||
|
|||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
|
|||
<% content_for :sidebar, render(:partial => 'sidebar') -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
<div class="block"> | |||
<div class="secondary-navigation"> | |||
<ul class="wat-cf"> | |||
<li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", awards_path %></li> | |||
<li class="active"><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_award_path %></li> | |||
</ul> | |||
</div> | |||
<div class="content"> | |||
<h2 class="title"><%= t("web-app-theme.new", :default => "New")%> Award</h2> | |||
<div class="inner"> | |||
<%= form_for :award, :url => awards_path, :html => { :class => :form } do |f| -%> | |||
<%= render :partial => "form", :locals => {:f => f} %> | |||
<% end -%> | |||
</div> | |||
</div> | |||
</div> | |||
|
|||
<% content_for :sidebar, render(:partial => 'sidebar') -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,34 @@ | |||
<div class="block"> | |||
<div class="secondary-navigation"> | |||
<ul class="wat-cf"> | |||
<li class="first"><%= link_to "#{t("web-app-theme.list", :default => "List")}", awards_path %></li> | |||
<li><%= link_to "#{t("web-app-theme.new", :default => "New")}", new_award_path %></li> | |||
<li class="active"><%= link_to "#{t("web-app-theme.show", :default => "Show")}", award_path %></li> | |||
</ul> | |||
</div> | |||
<div class="content"> | |||
<div class="inner"> | |||
|
|||
<p> | |||
<b><%= t("activerecord.attributes.award.teams_id", :default => t("activerecord.labels.teams_id", :default => "Teams")) %>:</b> | |||
<%= @award.teams_id %> | |||
</p> | |||
|
|||
<p> | |||
<b><%= t("activerecord.attributes.award.award", :default => t("activerecord.labels.award", :default => "Award")) %>:</b> | |||
<%= @award.award %> | |||
</p> | |||
|
|||
<p> | |||
<b><%= t("activerecord.attributes.award.judge", :default => t("activerecord.labels.judge", :default => "Judge")) %>:</b> | |||
<%= @award.judge %> | |||
</p> | |||
<div class="wat-cf"> | |||
<%= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => "#{t("web-app-theme.edit", :default=> "Edit")}") + " " + t("web-app-theme.edit", :default=> "Edit"), edit_award_path(@award), :class => "button" %> | |||
<%= link_to image_tag("web-app-theme/icons/cross.png", :alt => "#{t("web-app-theme.delete", :default=> "Delete")}") + " " + t("web-app-theme.delete", :default => "Delete"), award_path(@award), :method => "delete", :class => "button", :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}" %> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
|
|||
<% content_for :sidebar, render(:partial => 'sidebar') -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.