Fixes gather captains not able to pick players

Added missing gather translation
Cleanup JS
This commit is contained in:
Luke Barratt 2014-05-10 14:52:45 +01:00
parent b25de09997
commit 9edc514275
5 changed files with 22 additions and 20 deletions

View file

@ -106,19 +106,9 @@ $(document).ready(function(){
});
$(function() {
var menuContests;
var menuGather;
var menuMaterial;
var menuForums;
$(function() {
$('div#indexMenu div.contests').hover(function(){
});
});
$("div#shoutbox").bind("mousewheel",function(ev, delta) {
var scrollTop = $(this).scrollTop();
$(this).scrollTop(scrollTop-Math.round(delta));
var scrollTop = $(this).scrollTop();
$(this).scrollTop(scrollTop-Math.round(delta));
});
// Gather stuff

View file

@ -192,4 +192,12 @@ table.gathers {
.team2 {
width: 35%;
}
}
/*
Player List
*/
ul.gatherers {
@include span-columns(12);
}

View file

@ -114,9 +114,9 @@ module ApplicationHelper
def flag country
if country and country.to_s.size > 0
image_tag "flags/#{country}.png", class: "flag"
image_tag "flags/#{country}.png", class: 'flag'
else
image_tag "flags/EU.png"
image_tag 'flags/EU.png', class: 'flag'
end
end

View file

@ -5,13 +5,14 @@
<%= if team.nil? then "Lobby" else team == 1 ? "Marines" : "Aliens" end %>
</h4>
<%= form_tag("/gathers/pick/#{@gather.id}") do %>
<%= form_tag "/gathers/pick/#{@gather.id}" do %>
<ul class="gatherers">
<% @gather.gatherers.ordered.team(team).each do |gatherer| %>
<li>
<% if @gatherer and gatherer.can_update? cuser, { team: @gatherer.team } %>
<% pick = true %>
<%= radio_button_tag :player, gatherer.id %><%= flag gatherer.user.country %>
<%= radio_button_tag :player, gatherer.id %>
<%= flag gatherer.user.country %>
<%= namelink gatherer.user %>
<% else %>
@ -31,8 +32,10 @@
<% end %>
</li>
<% end %>
<% if pick %>
<a class="button tiny">Pick</a>
<% end %>
</table>
</ul>
<% if pick %>
<div class="controls">
<%= submit_tag 'Pick' %>
</div>
<% end %>
<% end %>

View file

@ -21,6 +21,7 @@ en:
contests_contester_update: "Contester was successfully updated."
gather_create: "New Gather was started successfully."
gathers_join: "You have joined the Gather."
gathers_user_pick: "You have successfully selected a player for your team."
gatherers_update: "Gather player successfully updated."
files_create: "File was successfully created."
files_update: "File was successfully updated."