Updates to matches page

Tweaked layout for contest page
Various styling updates
This commit is contained in:
Luke Barratt 2014-04-21 19:19:03 +01:00
parent 5cd2d098a0
commit 01d83fd95c
30 changed files with 551 additions and 274 deletions

View file

@ -1,25 +1,19 @@
/*
Thread List
*/
#comments-thread {
@include span-columns(12);
h3 {
margin: 1em 0;
}
.comment-form {
@include span-columns(12);
margin-bottom: em(20);
h5 {
margin-top: 0;
margin-bottom: 1em;
}
.fields {
margin-bottom: em(20);
}
}
}
/*
Comment
*/
.comment {
$comment-gutter: 1.4em;
$comment-image-padding: .7em;
@ -100,3 +94,22 @@
}
}
}
/*
Comment Form
*/
.comment-form {
@include span-columns(12);
margin-bottom: em(20);
h1,
h5 {
margin-top: 0;
margin-bottom: 1em;
}
.fields {
margin-bottom: em(20);
}
}

View file

@ -6,12 +6,6 @@
margin-bottom: em(5);
.timestamp {
font-size: em(14);
border-radius: em(3);
background: $blue;
color: white;
display: inline-block;
font-style: italic;
padding: 0 em(6);
@extend .highlight;
}
}
}

View file

@ -56,6 +56,7 @@ body {
h1, h2, h3, h4, h5, h6 {
&.fancy {
clear: both;
text-align: center;
position: relative;
background-color: white;

View file

@ -26,7 +26,7 @@ ul.navigation {
> li {
float: left;
width: ($max-width - em(1))/7;
width: (100%/7);
border-right: em(1) solid transparent;
.count {

View file

@ -24,7 +24,8 @@
}
button,
a.button {
a.button,
.button {
@include button;
&.tiny {

View file

@ -29,3 +29,17 @@
text-align: center;
}
}
/*
Text Highlights
*/
.highlight {
font-size: em(14);
border-radius: em(3);
background: $blue;
color: white;
display: inline-block;
font-style: italic;
padding: 0 em(6);
}

View file

@ -71,6 +71,23 @@ table.contest {
}
}
div.widget.contest {
a.button {
margin: em(20) 0 0;
text-align: center;
width: 100%;
}
}
/*
Standings
*/
div.standings {
@include span-columns(12);
}
/*
Brackets
*/

View file

@ -147,6 +147,17 @@ div#categories {
@include span-columns(12);
padding: em(20) 0;
}
.text {
border-radius: $base-border-radius;
background: $light-gray;
margin-top: em(20);
padding: em(20);
fieldset {
border-color: $light-blue;
}
}
}
.header {

View file

@ -21,4 +21,209 @@ table#matches {
width: 10%;
text-align: right;
}
}
}
/*
Match Page
*/
div#match {
@include span-columns(12);
border-bottom: em(3) solid $light-gray;
.contesters,
.details,
.referee,
.predictions,
.report {
@include span-columns(12);
}
.contesters {
margin-bottom: em(20);
.vs {
margin: 0 auto;
display: block;
font: 50px $montserrat;
border-radius: 50px;
background: $blue;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
color: white;
font-style: italic;
text-transform: uppercase;
padding-right: 10px;
font-weight: bold;
}
.team-1,
.team-2 {
max-height: 100px;
overflow: hidden;
}
.team-1 {
@include span-columns(5);
line-height: 100px;
text-align: right;
}
.team-2 {
@include span-columns(5);
line-height: 100px;
text-align: left;
}
.versus {
@include span-columns(2);
position: relative;
font-weight: bold;
&.split:before {
content: "";
display: block;
position: absolute;
background: white;
width: 1px;
height: 100px;
margin: 0 auto;
left: 50%;
top: 0;
}
.score-1,
.score-2 {
font: 50px $montserrat;
color: white;
width: 50%;
position: absolute;
top: 0;
text-align: center;
line-height: 100px;
font-weight: bold;
}
.score-1 {
padding-left: 15px;
left: 0;
}
.score-2 {
padding-right: 15px;
right: 0;
}
}
}
.details {
margin-bottom: em(20);
text-align: center;
.contest,
.date {
text-align: center;
}
.date {
font-style: italic;
font-weight: normal;
}
.contest {
margin-bottom: em(10);
}
}
.lineups {
@include span-columns(12);
margin: em(20) 0 em(40);
i {
color: $gold;
}
.team-1 {
@include span-columns(6);
text-align: right;
.flag {
margin: 0 0 0 em(10);
}
}
.team-2 {
@include span-columns(6);
@include omega;
}
&.shift .team-2 {
@include shift(6);
}
}
.predictions {
text-align: center;
h4 {
margin-bottom: 1em;
}
input {
text-align: center;
}
.add {
@include span-columns(12);
text-align: center;
input {
float: none;
margin: em(20) 0 0 0;
}
}
.team-1 {
@include span-columns(6);
text-align: right;
.highlight {
margin-left: em(10);
}
}
.team-2 {
@include span-columns(6);
@include omega;
text-align: left;
.highlight {
margin-right: em(10);
}
}
}
.report {
margin: em(20) 0;
padding-top: em(20);
border-top: em(3) solid $light-gray;
}
}
/*
Map Page
*/
div#map {
.preview {
@include span-columns(12);
text-align: center;
img {
margin: em(20) 0;
}
}
}

View file

@ -16,11 +16,7 @@ div.article {
margin-bottom: em(40);
ul {
list-style-type: disc;
li {
margin-left: em(20);
}
@extend ul.disc;
}
}

View file

@ -49,7 +49,7 @@ module ApplicationHelper
end
def longdate time
printtime time, "%d %B %Y"
printtime time, "%e %B %Y"
end
def printtime time, format

View file

@ -158,11 +158,11 @@ class Match < ActiveRecord::Base
end
def team1_lineup
matchers.all(:conditions => {:contester_id => contester1_id}).collect{|matcher| matcher.user.username} * ", "
matchers.all(:conditions => {:contester_id => contester1_id})
end
def team2_lineup
matchers.all(:conditions => {:contester_id => contester2_id}).collect{|matcher| matcher.user.username} * ", "
matchers.all(:conditions => {:contester_id => contester2_id})
end
def get_friendly param = nil

View file

@ -1,5 +1,5 @@
<div id="reply" class="comment-form">
<h5>New comment</h5>
<h5>New Comment</h5>
<% if cuser %>
<%= form_for(@comment, remote: true) do |f| %>

View file

@ -1,23 +1,15 @@
<div class="box wide">
<h1>Editing comment</h1>
<div class="comment-form">
<h1>Editing Comment</h1>
<%= form_for(@comment) do |f| %>
<div id="error_explanation">
<ul>
<% @comment.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<%= render 'shared/errors', messages: @comment.errors.full_messages %>
<p>
<%= f.label :text %><br />
<%= f.text_area :text, :rows => 15, :cols => 60 %>
</p>
<p>
<div class="fields">
<%= f.text_area :text, rows: 5 %>
</div>
<div class="controls">
<%= f.submit 'Update' %>
</p>
</div>
<% end %>
</div>
<%= link_to 'Back', :back %>

View file

@ -47,7 +47,6 @@
<% if cuser and cuser.admin? %>
<%= link_to icon('pencil'), edit_contester_path(contester) %>
<%= link_to icon('times'), contester, confirm: 'Are you sure?', method: :delete %>
<%= link_to icon('refresh'), controller: "contesters", action: "recalc", id: contester %>
<% end %>
</td>
<% end %>

View file

@ -7,7 +7,7 @@
<% if @contester.team.logo %>
<div class="logo">
<%= image_tag @contester.team.logo.url, class: 'logo' %>
<%= image_tag @contester.team.logo.url, class: 'logo', alt: h(@contester.team.name) %>
</div>
<% end %>
</div>
@ -65,8 +65,6 @@
<%= render partial: 'teamers/list', locals: { teamers: @members, blacklist: nil, comment: false } %>
</div>
<%= link_to 'Back', @contester.contest, class: 'button' %>
<% if @contester.can_update? cuser %>
<%= link_to 'Edit', edit_contester_path(@contester), class: 'button' %>
<% end %>

View file

@ -1,36 +1,42 @@
<h1><%= @contest.name %></h1>
<h1 class="fancy">
<span><%= @contest.name %></span>
</h1>
<div class="contest info">
<h3>Details</h3>
<% content_for :sidebar do %>
<div class="widget contest">
<h4>Contest Details</h4>
<dl>
<dt>Start - End</dt>
<dd>
<%= longdate @contest.start %><br>
<%= longdate @contest.end %>
</dd>
<dt>Rules</dt>
<dd><%= namelink @contest.rules %></dd>
<dt>Status</dt>
<dd><%= @contest.statuses[@contest.status] %></dd>
<dt>Default</dt>
<dd>Sunday: <%=h @contest.default_time.strftime("%H:%M") %></dd>
</dl>
<dl>
<dt>Start - End</dt>
<dd>
<%= longdate @contest.start %><br>
<%= longdate @contest.end %>
</dd>
<dt>Rules</dt>
<dd><%= namelink @contest.rules %></dd>
<dt>Status</dt>
<dd><%= @contest.statuses[@contest.status] %></dd>
<dt>Default</dt>
<dd>Sunday: <%= Time.use_zone(timezone_offset) { @contest.default_time.strftime("%H:%M %Z") } %></dd>
</dl>
<% if @contest.contest_type == Contest::TYPE_LADDER %>
<%= link_to 'Scoring', "/contests/#{@contest}/score" %>
<% end %>
<% if cuser and cuser.admin? %>
<%= link_to 'Edit', edit_contest_path(@contest) %>
<% if @contest.contest_type == Contest::TYPE_LADDER %>
<%= link_to 'Scoring', "/contests/#{@contest}/score", class: 'button' %>
<% end %>
<% if cuser and cuser.admin? %>
<%= link_to 'Edit Contest', edit_contest_path(@contest), class: 'button' %>
<% end %>
</div>
<% end %>
<div class="standings">
<% if @contest.contest_type == Contest::TYPE_BRACKET %>
<%= render partial: 'bracket', locals: { contest: @contest } %>
<% else %>
<%= render partial: 'normal' %>
<% end %>
</div>
<% if @contest.contest_type == Contest::TYPE_BRACKET %>
<%= render partial: 'bracket', locals: { contest: @contest } %>
<% else %>
<%= render partial: 'normal' %>
<% end %>
<div id="contest" class="tabbed">
<ul id="contest-nav" class="tabs">
<li><a href="#results">Matches</a></li>
@ -47,7 +53,7 @@
<% if @contest.weeks.count > 0 %>
<table class="data">
<% @contest.weeks.ordered.each do |week| %>
<% next if week.matches.count == 0 %>
<% next if week.matches.realfinished.size == 0 %>
<tr>
<th><%= week.name %></th>
<th>Date</th>

View file

@ -21,6 +21,7 @@
<%= yield %>
</div>
<div id="sidebar">
<%= yield :sidebar %>
<% ['calendar', 'shoutbox', 'highlights', 'posts', 'poll'].each do |widget| %>
<%= render partial: "widgets/#{widget}" %>
<% end %>

View file

@ -1,25 +1,28 @@
<div class="wide box">
<%= form_for @map, :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<%= form_for @map, html: { multipart: true, class: 'square' } do |f| %>
<%= render 'shared/errors', messages: @map.errors.full_messages %>
<p>
<%= f.label :name %><br />
<%= f.text_field :name %>
</p>
<p>
<%= f.label :category_id %><br />
<%= f.select :category_id, Category.ordered.domain(Category::DOMAIN_GAMES).collect{|c| [c, c.id]} %>
</p>
<p>
<%= f.label :download %><br />
<%= f.text_field :download %>
</p>
<p>
<%= f.label :picture %><br />
<div class="fields horizontal">
<%= f.label :name %>
<%= f.text_field :name %>
</div>
<div class="fields horizontal">
<%= f.label :category_id %>
<%= f.select :category_id, Category.ordered.domain(Category::DOMAIN_GAMES).collect { |c| [c, c.id] } %>
</div>
<div class="fields horizontal">
<%= f.label :download %>
<%= f.text_field :download %>
</div>
<div class="fields horizontal">
<%= f.label :picture %>
<div class="inputs">
<% if @map.picture.length > 0 %>
<%= image_tag @map.picture %><br>
<% end %>
<%= f.file_field :picture %>
</p>
<p>
<%= f.submit 'Update' %>
</p>
<% end %>
</div>
</div>
</div>
<div class="controls">
<%= f.submit 'Update Map' %>
</div>
<% end %>

View file

@ -1,6 +1,3 @@
<h1>Editing map</h1>
<h1>Editing Map</h1>
<%= render :partial => "form" %>
<%= link_to 'Show', @map %> |
<%= link_to 'Back', maps_path %>
<%= render partial: 'form' %>

View file

@ -1,6 +1,6 @@
<h1>Listing maps</h1>
<table class="data">
<table class="striped">
<tr>
<th>Name</th>
<th>Download</th>
@ -8,17 +8,15 @@
</tr>
<% @maps.each do |map| %>
<tr class="<%= cycle('even', 'odd') %>">
<tr>
<td><%= namelink map %></td>
<td><%= h map.download %></td>
<td>
<%= link_to 'Edit', edit_map_path(map) %>
<%= link_to 'Destroy', map, :confirm => 'Are you sure?', :method => :delete %>
<%= link_to icon('pencil'), edit_map_path(map) %>
<%= link_to icon('times'), map, confirm: 'Are you sure?', method: :delete %>
</td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New map', new_map_path %>
<%= link_to 'New Map', new_map_path, class: 'button' %>

View file

@ -1,5 +1,3 @@
<h1>New map</h1>
<h1>New Map</h1>
<%= render :partial => "form" %>
<%= link_to 'Back', maps_path %>
<%= render partial: 'form' %>

View file

@ -1,21 +1,25 @@
<h1>
<%=h @map.name %>
</h1>
<div id="map">
<h1 class="fancy">
<span><%=h @map.name %></span>
</h1>
<div class="wide box">
<p class="bold">
Download: <%= link_to (h @map.download), (h @map.download) %>
</p>
<p class="bold">
Used in contests:
</p>
<ul>
<% @map.contests.each do |contest| %>
<li><%= namelink contest %></li>
<% if @map.picture.length > 0 %>
<div class="preview">
<%= image_tag @map.picture %>
</div>
<% end %>
</ul>
</div>
<%= link_to 'Edit', edit_map_path(@map) %> |
<%= link_to 'Back', maps_path %>
<% if @map.download.length > 0 %>
<strong>Download</strong><br>
<p><%= link_to (h @map.download), (h @map.download) %></p>
<% end %>
<h4>Played in Contests</h4>
<ul class="disc">
<% @map.contests.each do |contest| %>
<li><%= namelink contest %></li>
<% end %>
</ul>
<%= link_to 'Edit Map', edit_map_path(@map), class: 'button' %>
</div>

View file

@ -1,4 +1,4 @@
<table id="matches" class="data">
<table id="matches" class="striped">
<tr>
<th>Date and Time</th>
<th>Contest</th>
@ -17,11 +17,14 @@
<td><% if match.map1 and match.map2 %>
<%= link_to match.map1, :controller => :maps, :action => :show, :id => match.map1 %>,
<%= link_to match.map2, :controller => :maps, :action => :show, :id => match.map2 %>
<% end %></td>
<td><%= match.preds(1) %>% - <%= match.preds(2) %>%</td>
<td><%= link_to match, :class => "bold #{match.score_color}" do %>
<%= h match.score1 %> - <%= h match.score2 %>
<% end %></td>
</tr>
<% end %>
</td>
<td><%= match.preds(1) %>% - <%= match.preds(2) %>%</td>
<td>
<%= link_to match, :class => "bold #{match.score_color}" do %>
<%= h match.score1 %> - <%= h match.score2 %>
<% end %>
</td>
</tr>
<% end %>
</table>

View file

@ -1,36 +1,34 @@
<h2 class="center">
Matches
</h2>
<h3 class="center">
Of currently active contests
</h3>
<h1>Matches</h1>
<h3>Of currently active contests</h3>
<div class="wide box">
<div id="matchesTab">
<ul id="matchesTab-nav" class="tabs">
<li><a href="#UpcomingTab">Upcoming</a></li>
<li><a href="#RecentTab">Recent</a></li>
<li><a href="#YourTab">Your matches</a></li>
</ul>
<div class="box wide tabs">
<div class="tab" id="UpcomingTab">
<h3 class="center">Upcoming Matches</h3>
<%= render :partial => "matches/match", :locals => {:matches => @matches.unfinished.chrono} %>
</div>
<div class="tab" id="RecentTab">
<h3 class="center">Recent Matches</h3>
<%= render :partial => "matches/match", :locals => {:matches => @matches.realfinished.reverse_order.chrono} %>
</div>
<div class="tab" id="YourTab">
<h3 class="center">Your Matches (<%= if cuser then @matches.of_user(cuser).count else 0 end %>)</h3>
<% if cuser then %>
<%= render :partial => "matches/match", :locals => {:matches => @matches.of_user(cuser).reverse_order.chrono} %>
<% end %>
</div>
</div>
</div>
<script type="text/javascript">
var tabber1 = new Yetii({id: 'matchesTab'});
</script>
</div>
<div id="matches" class="tabbed">
<ul id="matches-nav" class="tabs">
<li><a href="#upcoming">Upcoming</a></li>
<li><a href="#recent">Recent</a></li>
<li><a href="#your">Your Matches</a></li>
</ul>
<div class="tabbed-contents">
<div class="tab" id="upcoming">
<h3>Upcoming Matches</h3>
<%= render partial: "matches/match", locals: { matches: @matches.unfinished.chrono } %>
</div>
<div class="tab" id="recent">
<h3>Recent Matches</h3>
<%= render partial: "matches/match", locals: { matches: @matches.realfinished.reverse_order.chrono } %>
</div>
<div class="tab" id="your">
<h3>Your Matches (<%= if cuser then @matches.of_user(cuser).count else 0 end %>)</h3>
<% if cuser then %>
<%= render partial: "matches/match", locals: { matches: @matches.of_user(cuser).reverse_order.chrono } %>
<% end %>
</div>
</div>
</div>
<script type="text/javascript">
new Yetii({
id: 'matches'
});
</script>

View file

@ -1,90 +1,118 @@
<div class="box wide center">
<h1>
<% if @match.score1 and @match.score2%>
<% if @match.score1 > @match.score2; c1 = 'green'; c2 = 'red' end %>
<% if @match.score1 < @match.score2; c1 = 'red'; c2 = 'green' end %>
<% if @match.score1 == @match.score2; c1 = 'yellow'; c2 = 'yellow' end %>
<%= namelink @match.contester1.team if @match.contester1 %>
<span class="<%= c1 %>"><%= h @match.score1 %></span>
-
<span class="<%= c2 %>"><%= h @match.score2 %></span>
<%= namelink @match.contester2.team if @match.contester2 %>
<% else %>
<%= namelink @match.contester1.team if @match.contester1 %>
vs
<%= namelink @match.contester2.team if @match.contester2 %>
<% end %>
</h1>
<h4 class="center">
<%= longtime @match.match_time %>
</h4>
<%= cascade @match, [:contest, :server, :hltv, :demo, :referee, [@match.contester1, "team1_lineup"], [@match.contester2, "team2_lineup"], ["Man of the Match", :motm]] %>
<p>
<b>Maps:</b>
<%= namelink @match.map1 %>, <%= namelink @match.map2 %>
</p>
<% if @match.hltv %>
<p>
<%= link_to "Connect to HLTV", "steam://connect/#{@match.hltv.addr}" %>
</p>
<% end %>
<%# if cuser and @match.can_update? cuser, [:matchers_attributes] %>
<%# if cuser and cuser.admin? %>
<!--p-->
<%#= link_to "Scoring and lineup", :action => "score", :id => @match %>
<!--/p-->
<%# end %>
<% if cuser and @match.can_update? cuser, [:report] %>
<p>
<%= link_to "Referee (Scoring, Line-Ups, Man of the match)", :controller => :matches, :action => "ref", :id => @match %>
</p>
<% end %>
<%# if cuser and @match.can_update? cuser, [:hltv] %>
<!--p-->
<%#= link_to "Extras", :action => "extra", :id => @match %>
<!--/p-->
<%# end %>
<br />
<h3>
Predictions (<%= @match.predictions.count %>)
</h3>
<% if @newpred.can_create? cuser %>
<%= form_for @newpred do |f| %>
<%= f.hidden_field :match_id %>
<%= f.text_field :score1, :size => 1 %> -
<%= f.text_field :score2, :size => 1 %>
<p>
<%= submit_tag "Save Prediction" %>
</p>
<% end %>
<% else %>
<p>
<b><%= @match.contester1.team if @match.contester1 %></b>: <%= @match.preds(1) %>%<br />
<b><%= @match.contester2.team if @match.contester2 %></b>: <%= @match.preds(2) %>%<br />
</p>
<% end %>
<div id="match">
<div class="contesters">
<% if @match.score1 and @match.score2 %>
<h1 class="team-1"><%= namelink @match.contester1.team if @match.contester1 %></h1>
<div class="versus split">
<div class="score-1">
<%= h @match.score1 %>
</div>
<span class="vs"></span>
<div class="score-2">
<%= h @match.score2 %>
</div>
</div>
<h1 class="team-2"><%= namelink @match.contester2.team if @match.contester2 %></h1>
<% else %>
<h1 class="team-1"><%= namelink @match.contester1.team if @match.contester1 %></h1>
<div class="versus">
<span class="vs">VS</span>
</div>
<h1 class="team-2"><%= namelink @match.contester2.team if @match.contester2 %></h1>
<% end %>
</div>
<% unless @match.report.nil? or @match.report.empty? %>
<div class="wide box">
<h3>
Report
</h3>
<p>
<%= raw @match.report %>
</p>
<% if @match.team1_lineup.any? || @match.team2_lineup.any? %>
<div class="lineups <%= 'shift' if !@match.team1_lineup.any? %>">
<% if @match.team1_lineup.any? %>
<div class="team-1">
<ul>
<% @match.team1_lineup.each do |teamer| %>
<li>
<% if teamer.user == @match.motm %>
<%= icon 'star' %>
<% end %>
<%= teamer.user.username %>
<%= flag teamer.user.country %>
</li>
<% end %>
</ul>
</div>
<% end %>
<%= add_comments @match %>
<% if @match.team2_lineup.any? %>
<div class="team-2">
<ul>
<% @match.team2_lineup.each do |teamer| %>
<li>
<%= flag teamer.user.country %>
<%= teamer.user.username %>
<% if teamer.user == @match.motm %>
<%= icon 'star' %>
<% end %>
</li>
<% end %>
</ul>
</div>
<% end %>
</div>
<% end %>
<div class="details">
<h3 class="contest"><%= @match.contest %></h3>
<h5 class="date"><%= @match.match_time.strftime("%A %e %B %Y") %></h5>
<h5 class="date"><%= Time.use_zone(timezone_offset) { @match.match_time.strftime("%H:%M %Z") } %></h5>
</div>
<div class="predictions">
<h4>Predictions (<%= @match.predictions.count %>)</h4>
<% if @newpred.can_create? cuser %>
<%= form_for @newpred do |f| %>
<%= f.hidden_field :match_id %>
<div class="fields">
<div class="team-1">
<%= f.text_field :score1, size: 1, placeholder: 0 %>
</div>
<div class="team-2">
<%= f.text_field :score2, size: 1, placeholder: 0 %>
</div>
</div>
<div class="add">
<%= submit_tag "Add Prediction", class: 'button tiny' %>
</div>
<% end %>
<% else %>
<div class="team-1">
<%= @match.contester1.team if @match.contester1 %>
<div class="highlight"><%= @match.preds(1) %>%</div>
</div>
<div class="team-2">
<div class="highlight"><%= @match.preds(2) %>%</div>
<%= @match.contester2.team if @match.contester2 %>
</div>
<% end %>
</div>
<div class="details">
<%= cascade @match, [:server, :demo, :referee] %>
<strong>Maps</strong><br>
<%= namelink @match.map1 %>, <%= namelink @match.map2 %>
</div>
<% unless @match.report.nil? or @match.report.empty? %>
<div class="report">
<h3>Match Report</h3>
<p><%= @match.report.html_safe %></p>
</div>
<% end %>
<% if cuser and @match.can_update? cuser, [:report] %>
<div class="referee">
<%= link_to "Referee Admin", { controller: :matches, action: 'ref', id: @match }, class: 'button' %>
</div>
<% end %>
</div>
<%= add_comments @match %>

View file

@ -8,9 +8,9 @@
<%= namelink @post.topic %>
</div>
</div>
<div class="square horizontal">
<div class="fields horizontal">
<%= f.label :text %>
<%= f.text_area :text, rows: 20 %>
<%= f.text_area :text, rows: 15 %>
</div>
<div class="controls">
<%= f.submit 'Save Post' %>

View file

@ -18,7 +18,7 @@
<dt>Location</dt>
<dd><%= post.user.from %></dd>
<dt>Joined</dt>
<dd><%= post.user.joined %></dd>
<dd><%= longdate post.user.created_at %></dd>
</dl>
</div>

View file

@ -5,7 +5,7 @@
<% if @team.logo %>
<div class="logo">
<%= image_tag @team.logo.url, class: 'logo' %>
<%= image_tag @team.logo.url, class: 'logo', alt: h(@team.name) %>
</div>
<% end %>

View file

@ -4,8 +4,8 @@
<div class="widget-content-wrapper">
<% if cuser and cuser.active_contests.count != 0 then %>
<div class="separator">
Your contests
<%= link_to "(More)", controller: :matches, matchesTab: "YourTab" %>
Your Matches
<%= link_to "More", controller: :matches, matches: 'your' %>
</div>
<ol>
<% cuser.active_contests.each do |contest| %>
@ -20,7 +20,7 @@
<% if Match.recent.count != 0 then %>
<div class="separator">
Latest Matches
<%= link_to "More", controller: :matches, matchesTab: "RecentTab" %>
<%= link_to 'More', controller: :matches, matches: 'recent' %>
</div>
<ol>
<% Match.realfinished.reverse_order.recent.chrono.each do |match| %>
@ -39,7 +39,7 @@
<% if Match.future5.count != 0 then %>
<div class="separator">
Upcoming matches
<%= link_to "More", controller: :matches, matchesTab: "UpcomingTab" %>
<%= link_to 'More', controller: :matches, matches: 'upcoming' %>
</div>
<ol>
<% Match.future5.chrono.each do |match| %>