<h1 class="fancy">
  <span><%= h @server.name %></span>
</h1>

<% if map = Map.find_by_name(@server.map) and map.picture.length > 0 %>
  <div class="preview">
    <%= image_tag map.picture %>
  </div>
<% end %>

<p>
  <strong>IP:</strong>
  <%= link_to @server.addr, "steam://connect/#{@server.addr}" %>
</p>

<%= cascade @server, ["dns", "password", "irc", ["Owner", :user], "description"] %>

<% if @server.can_update? cuser %>
  <%= link_to 'Edit Server', edit_server_path(@server), class: 'button' %>
  <% if @server.domain == Server::DOMAIN_HLTV %>
    <%= link_to 'Default Record', action: "default", id: @server, class: 'button' %>
  <% end %>
<% end %>
