diff --git a/app/assets/stylesheets/layout/_body.scss b/app/assets/stylesheets/layout/_body.scss index c00c71e..61ecb48 100644 --- a/app/assets/stylesheets/layout/_body.scss +++ b/app/assets/stylesheets/layout/_body.scss @@ -55,6 +55,10 @@ body { h1, h2, h3, h4, h5, h6 { + &.title { + margin-bottom: 1em; + } + &.fancy { clear: both; text-align: center; diff --git a/app/views/contests/edit.html.erb b/app/views/contests/edit.html.erb index dfa4300..f626671 100644 --- a/app/views/contests/edit.html.erb +++ b/app/views/contests/edit.html.erb @@ -1,7 +1,7 @@ -
- <%= f.label :name %>
+ <%= form_for @contest, html: { class: 'square' } do |f| %>
+ <%= render 'shared/errors', messages: @contest.errors.full_messages %>
+
+
- <%= f.label :short_name %>
+
- <%= f.label :start %>
- <%= f.datetime_select :start %>
-
- <%= f.label :end %>
- <%= f.datetime_select :end %>
-
- <%= f.label :status %>
+
- <%= f.label :demos_id %>
+
- <%= f.label :default_time %>
- <%= f.time_select :default_time %>
-
- <%= f.label :winner_id %>
- <%= f.select :winner_id, @contest.contesters.collect{|t| [t.team, t.id]}, :include_blank => true %>
-
- <%= f.label :rules_id %>
- <%= f.select :rules_id, Category.find(Category::RULES).articles.collect{|a| [a, a.id]}, :include_blank => true %>
-
- <%= f.label :weight %>
+
- <%= f.label :modulus_base %>
+
- <%= f.label :modulus_even %>
+
- <%= f.label :modulus_3to1 %>
+
- <%= f.label :modulus_4to0 %>
+
- <%= f.submit 'Save' %> -
+ +Bracket | Slots | @@ -96,37 +93,35 @@|
---|---|---|
<%= namelink bracket %> | <%= bracket.slots %> | - <%= link_to 'Edit', edit_bracket_path(bracket) %> - <%= link_to 'Destroy', bracket, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('pencil'), edit_bracket_path(bracket) %> + <%= link_to icon('times'), bracket, confirm: 'Are you sure?', method: :delete %> |
+ +
Name | Download | @@ -134,34 +129,31 @@|
---|---|---|
<%= namelink map %> | <%= h map.download %> | - <%= link_to 'Edit', edit_map_path(map) %> - <%= link_to 'Remove', :action => "del_map", :id => @contest.id, :id2 => map.id %> + <%= link_to icon('pencil'), edit_map_path(map) %> + <%= link_to icon('times'), action: "del_map", id: @contest.id, id2: map.id %> |
+ <%= render 'shared/errors', messages: @contest.errors.full_messages %> + +
Team | Score | @@ -170,19 +162,19 @@||
---|---|---|---|
<%= link_to (h contester.team), contester %> | <%= h contester.score %> | <%= contester.statuses[contester.active] %> | <% if contester.active %> - <%= link_to 'Edit', edit_contester_path(contester) %> - <%= link_to 'Delete', contester, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('pencil'), edit_contester_path(contester) %> + <%= link_to icon('times'), contester, confirm: 'Are you sure?', method: :delete %> <% else %> <%= form_for contester do |c| %> - <%= c.hidden_field :active, {:value => 1} %> - <%= link_to 'Edit', edit_contester_path(contester) %> - <%= link_to_function 'Recover', "$('edit_contester_#{contester.id}').submit()" %> + <%= c.hidden_field :active, { value: 1 } %> + <%= link_to icon('pencil'), edit_contester_path(contester) %> + <%= link_to_function icon('rotate-left'), "$('edit_contester_#{contester.id}').submit()" %> <% end %> <% end %> | @@ -191,23 +183,21 @@
+ +
Name | Start date | @@ -223,18 +213,18 @@<%= h week.map1 %> | <%= h week.map2 %> | - <%= link_to 'Edit', edit_week_path(week) %> - <%= link_to 'Destroy', week, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('pencil'), edit_week_path(week) %> + <%= link_to icon('times'), week, confirm: 'Are you sure?', method: :delete %> |
---|
Teams | Date | @@ -258,21 +248,21 @@ <% end %>- <%= link_to 'Referee', :controller => :matches, :action => :ref, :id => match %> - <%= link_to 'Edit', edit_match_path(match) %> - <%= link_to 'Delete', match, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('flag-checkered'), controller: :matches, action: :ref, id: match %> + <%= link_to icon('pencil'), edit_match_path(match) %> + <%= link_to icon('times'), match, confirm: 'Are you sure?', method: :delete %> |
---|