- Team |
- Score |
- Status |
- Actions |
+ Team |
+ Score |
+ Status |
+ |
<% @contest.contesters.each do |contester| %>
@@ -166,7 +166,7 @@
<%= link_to (h contester.team), contester %> |
<%= h contester.score %> |
<%= contester.statuses[contester.active] %> |
-
+ |
<% if contester.active %>
<%= link_to icon('pencil'), edit_contester_path(contester) %>
<%= link_to icon('times'), contester, confirm: 'Are you sure?', method: :delete %>
@@ -197,13 +197,13 @@
-
+
- Name |
- Start date |
- Map1 |
- Map2 |
- Options |
+ Name |
+ Start date |
+ Map1 |
+ Map2 |
+ |
<% @contest.weeks.each do |week| %>
@@ -212,7 +212,7 @@
<%= week.start_date.strftime("%d %B %y") %> |
<%= h week.map1 %> |
<%= h week.map2 %> |
-
+ |
<%= link_to icon('pencil'), edit_week_path(week) %>
<%= link_to icon('times'), week, confirm: 'Are you sure?', method: :delete %>
|
@@ -224,12 +224,12 @@
-
+
- Teams |
- Date |
- Score |
- Options |
+ Teams |
+ Date |
+ Score |
+ |
<% @contest.matches.each do |match| %>
@@ -247,7 +247,7 @@
<%= h match.score1 %> - <%= h match.score2 %>
<% end %>
-
+ |
<%= 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 %>
diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb
index 650150b..1d464cb 100644
--- a/app/views/contests/index.html.erb
+++ b/app/views/contests/index.html.erb
@@ -1,82 +1,73 @@
-Listing Contests
+Listing Contests
<% if cuser and cuser.admin? %>
- <%= link_to 'New Contest', new_contest_path %>
+ <%= link_to 'New Contest', new_contest_path, class: 'button' %>
<% end %>
-Current Contests
-
-
- Name |
- Start |
- End |
- Rules |
- Status |
- <% if cuser and cuser.admin? %>
- Options |
- <% end %>
-
+
+
+ Current Contests
- <% @contests_active.each do |contest| %>
-
- <%= link_to (h contest.name), contest %> |
- <%= longtime contest.start %> |
- <%= longtime contest.end %> |
- <% if contest.rules and contest.rules.title then %>
- <%= link_to (h contest.rules.title), contest.rules %> |
- <% else %>
- <%= "No ruleset specified" %> |
+
+
+ Name |
+ Start |
+ Status |
+ <% if cuser and cuser.admin? %>
+ |
+ <% end %>
+
+
+ <% @contests_active.each do |contest| %>
+
+ <%= link_to (h contest.name), contest %> |
+ <%= longdate contest.start %> |
+ <%= contest.statuses[contest.status] %> |
+ <% if cuser and cuser.admin? %>
+
+ <%= link_to icon('pencil'), edit_contest_path(contest) %>
+ <%= link_to icon('times'), contest, confirm: 'Are you sure?', method: :delete %>
+ |
+ <% end %>
+
<% end %>
- <%= contest.statuses[contest.status] %> |
- <% if cuser and cuser.admin? %>
-
- <%= link_to 'Edit', edit_contest_path(contest) %>
- <%= link_to 'Destroy', contest, :confirm => 'Are you sure?', :method => :delete %>
- |
+
+
+
+
+ Previous Contests
+
+
+
+ Name |
+ Date |
+ Winner |
+ <% if cuser and cuser.admin? %>
+ |
+ <% end %>
+
+
+ <% @contests_inactive.reverse_each do |contest| %>
+
+ <%= link_to (h contest.name), contest %> |
+ <%= longdate contest.start %> |
+ <% if contest.winner then %>
+ <%= flag contest.winner.team.country %> <%= link_to (h contest.winner.team.name), contest.winner %> |
+ <% else %>
+ |
+ <% end %>
+ <% if cuser and cuser.admin? %>
+
+ <%= link_to icon('pencil'), edit_contest_path(contest) %>
+ <%= link_to icon('times'), contest, confirm: 'Are you sure?', method: :delete %>
+ |
+ <% end %>
+
<% end %>
-
+
+
+
+ <% if cuser and cuser.admin? %>
+ <%= link_to 'New Contest', new_contest_path, class: 'button' %>
<% end %>
-
-
-Previous Contests
-
-
- Name |
- Start |
- End |
- Winner |
- |
- Status |
- <% if cuser and cuser.admin? %>
- Options |
- <% end %>
-
-
- <% @contests_inactive.reverse_each do |contest| %>
-
- <%= link_to (h contest.name), contest %> |
- <%= longtime contest.start %> |
- <%= longtime contest.end %> |
- <% if contest.winner then %>
- <%= flag contest.winner.team.country %> |
- <%= link_to (h contest.winner.team.name), contest.winner %> |
- <% else %>
- <%= %> |
- <%= %> |
- <% end %>
- <%= contest.statuses[contest.status] %> |
- <% if cuser and cuser.admin? %>
-
- <%= link_to 'Edit', edit_contest_path(contest) %>
- <%= link_to 'Destroy', contest, :confirm => 'Are you sure?', :method => :delete %>
- |
- <% end %>
-
- <% end %>
-
-
-
-
-<% if cuser and cuser.admin? %>
- <%= link_to 'New Contest', new_contest_path %>
-<% end %>
+
\ No newline at end of file
diff --git a/app/views/contests/new.html.erb b/app/views/contests/new.html.erb
index 3537326..5ee5cd1 100644
--- a/app/views/contests/new.html.erb
+++ b/app/views/contests/new.html.erb
@@ -1,36 +1,33 @@
New Contest
-
- <%= form_for @contest do |f| %>
- <%= f.error_messages %>
-
- <%= f.label :name %>
- <%= f.text_field :name %>
-
-
- <%= f.label :contest_type %>
- <%= f.select :contest_type, @contest.types.invert %>
-
-
- <%= f.label :start %>
- <%= f.datetime_select :start %>
-
-
- <%= f.label :end %>
- <%= f.datetime_select :end %>
-
-
- <%= f.label :status %>
- <%= f.select :status, @contest.statuses.invert %>
-
-
- <%= f.label :default_time %>
- <%= f.time_select :default_time %>
-
-
- <%= f.submit 'Save' %>
-
- <% end %>
-
+<%= form_for @contest, html: { class: 'square' } do |f| %>
+ <%= render 'shared/errors', messages: @contest.errors.full_messages %>
-<%= link_to 'Back', contests_path %>
+
+ <%= f.label :name %>
+ <%= f.text_field :name %>
+
+
+ <%= f.label :contest_type %>
+ <%= f.select :contest_type, @contest.types.invert %>
+
+
+ <%= f.label :start %>
+ <%= f.datetime_select :start, datetime_separator: '', time_separator: '' %>
+
+
+ <%= f.label :end %>
+ <%= f.datetime_select :end, datetime_separator: '', time_separator: '' %>
+
+
+ <%= f.label :status %>
+ <%= f.select :status, @contest.statuses.invert %>
+
+
+ <%= f.label :default_time %>
+ <%= f.time_select :default_time, time_separator: '' %>
+
+
+ <%= f.submit 'Save' %>
+
+<% end %>
diff --git a/app/views/gathers/index.html.erb b/app/views/gathers/index.html.erb
index 16cd2e7..01d4223 100644
--- a/app/views/gathers/index.html.erb
+++ b/app/views/gathers/index.html.erb
@@ -1,46 +1,50 @@
Gather Archive
-Players in bold were captains for their respective teams.
+Players in bold were captains for their respective teams.
-
+
- Date |
- Team1 |
- Team2 |
- Map |
- Server |
+ Date |
+ Team 1 |
+ Team 2 |
<% @gathers.each do |gather| %>
<%= link_to gather.updated_at.strftime("%Y/%m/%d %H:%M:%S"), gather %> |
- <% gather.gatherers.each do |gatherer| %>
- <% if gatherer.team == 1 %>
- <% if gather.captain1 == gatherer %>
-
+
+ <% gather.gatherers.each do |gatherer| %>
+ -
+ <% if gatherer.team == 1 %>
+ <% if gather.captain1 == gatherer %>
+
+ <% end %>
+ <%= link_to gatherer.user.to_s, User.find_by_username(gatherer.user.to_s) %>
+ <% if gather.captain1 == gatherer %>
+
+ <% end %>
<% end %>
- <%= link_to gatherer.user.to_s, User.find_by_username(gatherer.user.to_s) %>
- <% if gather.captain1 == gatherer %>
-
- <% end %>
+
<% end %>
- <% end %>
+
|
- <% gather.gatherers.each do |gatherer| %>
- <% if gatherer.team == 2 %>
- <% if gather.captain2 == gatherer %>
-
+
+ <% gather.gatherers.each do |gatherer| %>
+ -
+ <% if gatherer.team == 2 %>
+ <% if gather.captain2 == gatherer %>
+
+ <% end %>
+ <%= link_to gatherer.user.to_s, User.find_by_username(gatherer.user.to_s) %>
+ <% if gather.captain2 == gatherer %>
+
+ <% end %>
<% end %>
- <%= link_to gatherer.user.to_s, User.find_by_username(gatherer.user.to_s) %>
- <% if gather.captain2 == gatherer %>
-
- <% end %>
+
<% end %>
- <% end %>
+
|
- <%= gather.map1 %> |
- <%= gather.server %> |
<% end %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a2f52c5..f0ab818 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -3,6 +3,7 @@ en:
articles_article_views: "Views"
bans_create: "Ban was successfully created."
bans_update: "Ban was successfully updated."
+ brackets_update: "Bracket was successfully updated."
articles_create: "Article was successfully created."
articles_update: "Article was successfully updated."
articles_revert: "Article reverted to version: {{version}}"
| |