ensl.org/app/views/servers/show.html.erb

25 lines
764 B
Text
Raw Normal View History

2014-04-26 00:20:34 +00:00
<h1 class="fancy">
<span><%= h @server.name %></span>
</h1>
2014-04-26 00:20:34 +00:00
<% if map = Map.find_by_name(@server.map) and map.picture.length > 0 %>
<div class="preview">
<%= image_tag map.picture %>
</div>
<% end %>
2014-04-26 00:20:34 +00:00
<p>
<strong>IP:</strong>
<%= link_to @server.addr, "steam://connect/#{@server.addr}" %>
</p>
2014-04-26 00:20:34 +00:00
<%= cascade @server, ["dns", "password", "irc", ["Owner", :user], "description"] %>
<% if @server.can_update? cuser %>
2014-04-26 00:20:34 +00:00
<%= link_to 'Edit Server', edit_server_path(@server), class: 'button' %>
<%= link_to 'Delete Server', @server, confirm: 'Are you sure?', method: :delete, class: 'button' %>
<% if @server.domain == Server::DOMAIN_HLTV %>
2014-04-26 00:20:34 +00:00
<%= link_to 'Default Record', action: "default", id: @server, class: 'button' %>
<% end %>
<% end %>