mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-25 03:50:53 +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, html: { class: 'square' } do |f| %>
|
||||||
<%= form_for(@contester) do |f| %>
|
<%= render 'shared/errors', messages: @contester.errors.full_messages %>
|
||||||
<div id="error_explanation">
|
|
||||||
<ul>
|
<div class="fields horizontal">
|
||||||
<% @contester.errors.full_messages.each do |msg| %>
|
<%= f.label :extra, "Extra Points" %>
|
||||||
<li><%= msg %></li>
|
<%= f.text_field :extra %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="fields horizontal">
|
||||||
<p>
|
<%= f.label :score %>
|
||||||
<%= f.label :extra, "Extra Points" %><br />
|
<%= f.text_field :score %>
|
||||||
<%= f.text_field :extra, :size => 5 %>
|
</div>
|
||||||
</p>
|
<div class="fields horizontal">
|
||||||
<p>
|
<%= f.label :win %>
|
||||||
<%= f.label :score %><br />
|
<%= f.text_field :win %>
|
||||||
<%= f.text_field :score, :size => 5 %>
|
</div>
|
||||||
</p>
|
<div class="fields horizontal">
|
||||||
<p>
|
<%= f.label :loss %>
|
||||||
<%= f.label :win %><br />
|
<%= f.text_field :loss %>
|
||||||
<%= f.text_field :win, :size => 5 %>
|
</div>
|
||||||
</p>
|
<div class="fields horizontal">
|
||||||
<p>
|
<%= f.label :draw %>
|
||||||
<%= f.label :loss %><br />
|
<%= f.text_field :draw %>
|
||||||
<%= f.text_field :loss, :size => 5 %>
|
</div>
|
||||||
</p>
|
<div class="controls">
|
||||||
<p>
|
|
||||||
<%= f.label :draw %><br />
|
|
||||||
<%= f.text_field :draw, :size => 5 %>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<%= f.submit 'Update' %>
|
<%= f.submit 'Update' %>
|
||||||
</p>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= link_to 'Show', @contester %> |
|
|
||||||
<%= link_to 'Back', @contester.contest %>
|
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
<div class="wide box">
|
<h3><%= @week.contest if @week.contest %></h3>
|
||||||
<%= form_for(@week) do |f| %>
|
|
||||||
<%= f.error_messages %>
|
|
||||||
<%= f.hidden_field :contest_id %>
|
|
||||||
|
|
||||||
<p>
|
<%= form_for @week, html: { class: 'square' } do |f| %>
|
||||||
<%= f.label :name %><br />
|
<%= render 'shared/errors', messages: @week.errors.full_messages %>
|
||||||
<%= f.text_field :name %>
|
<%= f.hidden_field :contest_id %>
|
||||||
</p>
|
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :start_date %><br />
|
<%= f.label :name %>
|
||||||
<%= f.date_select :start_date %>
|
<%= f.text_field :name %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :map1_id, "1st map" %><br />
|
<%= f.label :start_date %>
|
||||||
<%= f.select :map1_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
<%= f.date_select :start_date %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.label :map2_id, "2nd map" %><br />
|
<%= f.label :map1_id, "1st map" %>
|
||||||
<%= f.select :map2_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
<%= f.select :map1_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
<div class="fields horizontal">
|
||||||
<%= f.submit 'Save' %>
|
<%= f.label :map2_id, "2nd map" %>
|
||||||
</p>
|
<%= f.select :map2_id, @week.contest.maps.basic.collect{|m| [m.name, m.id]} %>
|
||||||
<% end %>
|
</div>
|
||||||
</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" %>
|
<%= render partial: 'form' %>
|
||||||
|
|
||||||
<%= link_to 'Back', @contest %>
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
<h1>New week</h1>
|
<h1>New Week</h1>
|
||||||
|
|
||||||
<%= render :partial => "form" %>
|
<%= render partial: 'form' %>
|
||||||
|
|
||||||
<%= link_to 'Back', weeks_path %>
|
|
||||||
|
|
Loading…
Reference in a new issue