diff --git a/app/assets/stylesheets/components/_forms.scss b/app/assets/stylesheets/components/_forms.scss index 176ce8d..cab3868 100644 --- a/app/assets/stylesheets/components/_forms.scss +++ b/app/assets/stylesheets/components/_forms.scss @@ -3,6 +3,7 @@ */ form { + .inline { float: left; display: inline-block; @@ -48,6 +49,7 @@ form { display: inline-block; margin-right: em(10); float: left; + max-width: 100%; select { @include appearance(none); @@ -65,6 +67,7 @@ form { margin: 0; padding: $select-padding em(50) $select-padding $input-padding; font-size: $input-font-size; + max-width: 100%; option { font-size: $input-font-size; @@ -143,7 +146,6 @@ form { } > label.checkbox { - display: none; position: relative; width: em(40); height: em(40); diff --git a/app/assets/stylesheets/components/_tables.scss b/app/assets/stylesheets/components/_tables.scss index 3cb4dc8..3d2e0f0 100644 --- a/app/assets/stylesheets/components/_tables.scss +++ b/app/assets/stylesheets/components/_tables.scss @@ -12,13 +12,13 @@ table { th { border-bottom: 1px solid darken($base-border-color, 15%); font-weight: bold; - padding: ($base-line-height / 2) 0; + padding: 0.5em 0; text-align: left; } td { border-bottom: 1px solid $base-border-color; - padding: ($base-line-height / 2) 0; + padding: 0.5em 0; } tr, td, th { @@ -41,4 +41,4 @@ table.striped > tbody { > tr:nth-child(2n) td { background-color: transparentize($light-blue, 0.9); } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/layout/_navigation.scss b/app/assets/stylesheets/layout/_navigation.scss index f6db7c3..d2be986 100644 --- a/app/assets/stylesheets/layout/_navigation.scss +++ b/app/assets/stylesheets/layout/_navigation.scss @@ -27,7 +27,7 @@ ul.navigation { > li { float: left; width: (100%/7); - border-right: em(1) solid transparent; + border-right: 0.1em solid transparent; .count { float: right; diff --git a/app/assets/stylesheets/pages/_contests.scss b/app/assets/stylesheets/pages/_contests.scss index 25cb5c5..4731663 100644 --- a/app/assets/stylesheets/pages/_contests.scss +++ b/app/assets/stylesheets/pages/_contests.scss @@ -144,3 +144,50 @@ table.brackets { width: em(150); } } + +/* + Contest Page +*/ + +#contest { + + table.weeks { + + .week { + width: 50%; + } + + .date { + width: 30%; + } + + .score { + width: 10%; + text-align: right; + } + } + + table.matches { + + .team { + width: 50%; + } + + .date { + width: 50%; + text-align: right; + } + } + + table.predictions { + + .user { + width: 50%; + } + + .result { + width: 50%; + text-align: right; + } + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/pages/_matches.scss b/app/assets/stylesheets/pages/_matches.scss index 5fe69e8..a0c483c 100644 --- a/app/assets/stylesheets/pages/_matches.scss +++ b/app/assets/stylesheets/pages/_matches.scss @@ -141,10 +141,47 @@ div#match { @include span-columns(12); margin: em(20) 0 em(40); + h3 { + text-align: center; + margin-bottom: 1em; + } + i { color: $gold; } + .team-1, + .team-2 { + position: relative; + + .player { + @include span-columns(12); + line-height: em(40); + margin-bottom: em(10); + } + + .players { + position: relative; + } + + .controls { + top: 0; + position: absolute; + z-index: 100; + + input { + margin: 0; + } + } + + form { + + label.checkbox { + padding: 0; + } + } + } + .team-1 { @include span-columns(6); text-align: right; @@ -152,16 +189,64 @@ div#match { .flag { margin: 0 0 0 em(10); } + + .controls { + left: 0; + } + + form { + + label.checkbox { + float: right; + margin-left: 1em; + } + } } .team-2 { @include span-columns(6); @include omega; + + .controls { + right: 0; + } + + form { + + label.checkbox { + float: left; + margin-right: 1em; + } + } } &.shift .team-2 { @include shift(6); } + + .mercenaries { + @include span-columns(12); + + input { + margin: 0; + } + } + } + + .scoring { + @include span-columns(12); + border-top: em(3) solid $light-gray; + + h3 { + margin-bottom: 1em; + } + + .scores input { + width: auto; + margin-left: 0; + text-align: center; + width: em(40); + } } .predictions { @@ -209,6 +294,16 @@ div#match { margin: em(20) 0; padding-top: em(20); border-top: em(3) solid $light-gray; + + textarea { + margin: em(20) 0; + width: 100%; + height: em(600); + } + + .mceLayout { + margin: em(20) 0; + } } } diff --git a/app/views/contests/show.html.erb b/app/views/contests/show.html.erb index 12007f5..dac3088 100644 --- a/app/views/contests/show.html.erb +++ b/app/views/contests/show.html.erb @@ -51,15 +51,15 @@ <% if @contest.weeks.count > 0 %> -
<%= week.name %> | -Date | -Score | +<%= week.name %> | +Date | +Score | <% if @contest.contest_type == Contest::TYPE_LADDER %> -Points | +Points | <% end %><%= shorttime match.match_time %> | -+ | <%= link_to match, :class => "bold #{match.score_color}" do %> <%= h match.score1 %> - <%= h match.score2 %> <% end %> | <% if @contest.contest_type == Contest::TYPE_LADDER %> -+ | <%= match.points1 %> / <%= match.points2 %> | <% end %> @@ -88,13 +88,13 @@ <% end %>
---|
Teams | -Date | -Score | +Teams | +Date | +Score | <% if @contest.contest_type == Contest::TYPE_LADDER %> -Points | +Points | <% end %>
---|
Teams | -Date | +Teams | +Date | + | <%= link_to shorttime(match.match_time), match %> | @@ -152,22 +152,22 @@
---|
User | -Result | +User | +Result |
---|---|---|---|
<%= namelink prediction.user %> | -<%= prediction.correct %> / <%= prediction.total %> correct (<%= prediction.score.to_f.round(2) %>%) | +<%= prediction.correct %> / <%= prediction.total %> correct (<%= prediction.score.to_f.round(2) %>%) |
Please do not forget to include contact details, such as an email address or a Steam account in the case that you do not have an ENSL account.
diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index f8e989e..fdf0c37 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -1,38 +1,38 @@
- <%= f.label :contester1_id, "Team #1" %>
+
- <%= f.label :contester2_id, "Team #2" %>
+
- <%= f.label :map1_id, "Team 1's map" %>
+
- <%= f.label :map2_id, "Team 2's map" %>
+
- <%= f.label :match_time %>
- <%= f.datetime_select :match_time %>
-
- <%= f.label :referee_id %>
+
- <%= f.label :week_id %>
+
- <%= f.submit 'Save' %> -
+- <% if matcher = @match.matchers.first(:conditions => {:user_id => teamer.user_id}) %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][id]", matcher.id %> - <% end %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][user_id]", teamer.user_id %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][contester_id]", contester.id %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][match_id]", @match.id %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][merc]", false %> - <%= check_box_tag "match[matchers_attributes][#{@n}][_destroy]", "keep", @match.users.exists?(teamer.user) %> - <%= teamer.user %> -
- <% @n = @n + 1; end %> -+
- <%= hidden_field_tag "match[matchers_attributes][#{@n}][contester_id]", contester.id %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][match_id]", @match.id %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][merc]", true %> - <%= hidden_field_tag "match[matchers_attributes][#{@n}][_destroy]", "keep" %> - <%= link_to_function 'Merc', "findUser('match[matchers_attributes][#{@n}][merc][user_id]')" %>: - <%= text_field_tag "match[matchers_attributes][#{@n}][user_id]", '', :size => 5 %> -
+ <%= label_tag "player_#{@n}", '', class: 'checkbox' %> + + <%= matcher.user %> +- <%= f.submit "Save" %> -
- <% end %> -- <%= f.submit "Save" %> -
- <% end %> -- <%= f.label :server_id %> - <%= f.select :server_id, Server.hlds.active.collect{|d| ["#{d.name}", d.id]}, {:include_blank => true} %> -
- -- <%= f.label :forfeit %> - <%= f.check_box :forfeit %> -
- -- Score: - <%= f.text_field :score1, :size => 1 %> - <%= f.text_field :score2, :size => 2 %> -
- -- <%= f.label :demo %>: - <%= f.select :demo_id, DataFile.ordered.collect{|d| ["#{d.name}", d.id]}, {:include_blank => true} %> -
- -- <%= link_to_function 'Man of the match', "findUser('motm')" %>: - <%= f.text_field :motm_name, {:value => User.get(@match.motm_id)} %> -
- -- <%= f.submit "Save" %> -
- <% end %> -- <%= f.text_area :report, :rows => 20, :cols => 60 %> -
- -- <%= f.submit "Save" %> -
- <% end %> -