2014-04-15 09:59:52 +00:00
<div id="gather-stats">
2014-03-23 00:22:25 +00:00
<% if @gather.status == Gather::STATE_RUNNING %>
2014-04-15 09:59:52 +00:00
2014-03-23 00:22:25 +00:00
<% if @gatherer and @gatherer.can_destroy? cuser %>
2014-04-15 09:59:52 +00:00
<p>Gather running, <%= Gather::FULL - @gather.gatherers.length %> more needed.</p>
<%= link_to 'Leave Gather', @gatherer, confirm: 'Are you sure?', method: :delete, class: 'button tiny' %>
<% elsif (g = Gatherer.new(gather: @gather, user: cuser)).can_create?(cuser) %>
2014-03-23 00:22:25 +00:00
<%= form_for g do |f| %>
<%= f.hidden_field :gather_id %>
<%= f.hidden_field :user_id %>
2014-04-15 09:59:52 +00:00
<p>Gather running, <%= Gather::FULL - @gather.gatherers.length %> more needed.</p>
2014-04-05 00:03:13 +00:00
<p>
You can download custom maps via the
<%= link_to "Steam Workshop", "http://steamcommunity.com/workshop/browse?searchtext=&childpublishedfileid=0§ion=items&appid=4920&browsesort=trend&requiredtags%5B%5D=level" %>.
2014-03-23 00:22:25 +00:00
</p>
2014-04-15 09:59:52 +00:00
2014-03-23 00:22:25 +00:00
<p>
<% if cuser.gatherers.count < 5 %>
<%= f.check_box :confirm %> I have read the <%= link_to "rules", article_url(Article::G_RULES) %>, installed NS and Teamspeak3.
<% end %>
2014-04-15 09:59:52 +00:00
<a href="javascript:" id="gatherJoinBtn" class="button">
2014-03-23 00:22:25 +00:00
Click to join gather!
</a>
</p>
<% end %>
2014-04-15 09:59:52 +00:00
2014-03-23 00:22:25 +00:00
<% else %>
2014-04-19 01:12:02 +00:00
<p>Log in to join the gather.</p>
2014-04-15 09:59:52 +00:00
2014-03-23 00:22:25 +00:00
<% end %>
2014-04-15 09:59:52 +00:00
2014-03-23 00:22:25 +00:00
<% elsif @gather.status == Gather::STATE_VOTING %>
2014-04-15 09:59:52 +00:00
<p>Please vote captains and maps.</p>
2014-03-23 00:22:25 +00:00
<% elsif @gather.status == Gather::STATE_PICKING %>
2014-04-15 09:59:52 +00:00
<p>
<% if @gatherer and @gatherer.captain? %>
<% if @gatherer.turn? %>
It is your turn, please pick a player from the lobby!
<% else%>
Wait for the other captain to pick.
<% end %>
<% else %>
Captains are picking the teams, please wait. Are you a panda?<br>
2014-03-23 00:22:25 +00:00
<% end %>
2014-04-15 09:59:52 +00:00
</p>
2014-03-23 00:22:25 +00:00
<% elsif @gather.status == Gather::STATE_FINISHED and @gather.server %>
Gather finished, join the
<% if @gather.server and @gather.server.ip and @gather.server.password %>
<%= link_to "Server", "steam://run/4920//connect #{@gather.server.ip} #{@gather.server.password}" %>
<% else %>
Server
<% end %>
2014-04-15 09:59:52 +00:00
and TS3. <br>
Maps: <%= namelink @gather.map1.map if @gather.map1 %>, <%= (namelink @gather.map2.map) if @gather.map2 %> <br>
2014-03-23 00:22:25 +00:00
Server: <% if @gather.server %>
<%= @gather.server %>
2014-04-15 09:59:52 +00:00
(<%= @gather.server.ip %>:<%= @gather.server.port %> ; password = <%= if @gather.server.password then @gather.server.password else "<Password not specified>" end %>)
2014-03-23 00:22:25 +00:00
<% end %>
<% end %>
2014-04-15 09:59:52 +00:00
2014-03-23 00:22:25 +00:00
<% if cuser and cuser.admin? %>
2014-04-15 09:59:52 +00:00
<%= link_to "Admin Page", edit_gather_url, class: 'admin button' %>
2014-03-23 00:22:25 +00:00
<% end %>
</div>