mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-24 11:31:33 +00:00
Added styling to weeks and contester form pages
This commit is contained in:
parent
369d3eac57
commit
60130f8a16
4 changed files with 56 additions and 68 deletions
|
@ -1,40 +1,32 @@
|
|||
<h1>Editing: <%= h @contester.team.name %> in <%= h @contester.contest.name %></h1>
|
||||
<div class="contester">
|
||||
<h1>Editing: <%= h @contester.team.name %></h1>
|
||||
<h3 class="title"><%= h @contester.contest.name %></h3>
|
||||
|
||||
<div class="wide box">
|
||||
<%= form_for(@contester) do |f| %>
|
||||
<div id="error_explanation">
|
||||
<ul>
|
||||
<% @contester.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= form_for @contester, html: { class: 'square' } do |f| %>
|
||||
<%= render 'shared/errors', messages: @contester.errors.full_messages %>
|
||||
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :extra, "Extra Points" %>
|
||||
<%= f.text_field :extra %>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<%= f.label :extra, "Extra Points" %><br />
|
||||
<%= f.text_field :extra, :size => 5 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :score %><br />
|
||||
<%= f.text_field :score, :size => 5 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :win %><br />
|
||||
<%= f.text_field :win, :size => 5 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :loss %><br />
|
||||
<%= f.text_field :loss, :size => 5 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :draw %><br />
|
||||
<%= f.text_field :draw, :size => 5 %>
|
||||
</p>
|
||||
<p>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :score %>
|
||||
<%= f.text_field :score %>
|
||||
</div>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :win %>
|
||||
<%= f.text_field :win %>
|
||||
</div>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :loss %>
|
||||
<%= f.text_field :loss %>
|
||||
</div>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :draw %>
|
||||
<%= f.text_field :draw %>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<%= f.submit 'Update' %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= link_to 'Show', @contester %> |
|
||||
<%= link_to 'Back', @contester.contest %>
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<div class="wide box">
|
||||
<%= form_for(@week) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
<h3><%= @week.contest if @week.contest %></h3>
|
||||
|
||||
<%= form_for @week, html: { class: 'square' } do |f| %>
|
||||
<%= render 'shared/errors', messages: @week.errors.full_messages %>
|
||||
<%= f.hidden_field :contest_id %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name %><br />
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :name %>
|
||||
<%= f.text_field :name %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :start_date %><br />
|
||||
<%= f.date_select :start_date %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :map1_id, "1st map" %><br />
|
||||
<%= f.select :map1_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :map2_id, "2nd map" %><br />
|
||||
<%= f.select :map2_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Save' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :start_date %>
|
||||
<%= f.date_select :start_date %>
|
||||
</div>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :map1_id, "1st map" %>
|
||||
<%= f.select :map1_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
||||
</div>
|
||||
<div class="fields horizontal">
|
||||
<%= f.label :map2_id, "2nd map" %>
|
||||
<%= f.select :map2_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<%= f.submit 'Save Week' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<h1>Editing week</h1>
|
||||
<h1>Editing Week</h1>
|
||||
|
||||
<%= render :partial => "form" %>
|
||||
|
||||
<%= link_to 'Back', @contest %>
|
||||
<%= render partial: 'form' %>
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<h1>New week</h1>
|
||||
<h1>New Week</h1>
|
||||
|
||||
<%= render :partial => "form" %>
|
||||
|
||||
<%= link_to 'Back', weeks_path %>
|
||||
<%= render partial: 'form' %>
|
||||
|
|
Loading…
Reference in a new issue