ensl.org/app/views/users/_general.html.erb
Luke Barratt 4046d25017 Tests passing with redesign
Improved layout slightly to match grid
2014-04-17 08:55:19 +01:00

85 lines
No EOL
2.3 KiB
Text

<div class="group">
<h4>General information</h4>
<dl>
<dt>Age</dt>
<dd><%= @user.age %></dd>
<dt>Country</dt>
<dd><%= @user.country %></dd>
<dt>Town</dt>
<dd><%= @user.profile.town %></dd>
<dt>SteamID</dt>
<dd>
<%= @user.steamid %>
<%= link_to "Search for Steam Account", "http://steamidfinder.com/?STEAM_#{@user.steamid}" %>
</dd>
</dl>
<h4>Contact</h4>
<dl>
<% if !@user.profile.web.blank? %>
<dt>Web</dt>
<dd><%= @user.profile.web %></dd>
<% end %>
<% if cuser and cuser.admin? or @user.public_email %>
<dt>Email</dt>
<dd><%= @user.email_s %></dd>
<% end %>
<% if @user.profile.steam_profile and @user.profile.steam_profile != "" %>
<dt>Steam</dt>
<dd>
<% if @user.profile.steam_profile.match(/\A[0-9]*\z/) %>
<%= link_to @user.profile.steam_profile, "http://steamcommunity.com/profiles/#{@user.profile.steam_profile}" %>
<% elsif @user.profile.steam_profile.match(/\A[A-Za-z0-9_\-\+]{1,40}\z/) %>
<%= link_to @user.profile.steam_profile, "http://steamcommunity.com/id/#{@user.profile.steam_profile}" %>
<% end %>
</dd>
<% end %>
</dl>
<% if @user.profile.achievements and !@user.profile.achievements.empty? %>
<h4>Achievements</h4>
<%= @user.profile.achievements_parsed.html_safe %>
<% end %>
<%= link_to "Send PM", { controller: "messages", action: "new", id: "User", id2: @user }, { class: 'button tiny' } %>
</div>
<div class="group">
<h4>Statistics</h4>
<dl>
<dt>Joined</dt>
<dd><%= longtime @user.created_at %></dd>
<dt>Last visit</dt>
<dd><%= longtime @user.lastvisit %></dd>
<dt></dt>
<% if cuser and cuser.admin? %>
<dt>Last IP</dt>
<dd><%= @user.lastip %></dd>
<% end %>
<dt>Comments</dt>
<dd><%= @user.posted_comments.count %></dd>
<dt>Matches</dt>
<dd><%= @user.matches.count %></dd>
<% if @user.groups.count > 0 %>
<dt>Groups</dt>
<% for group in @user.groups.all %>
<dd><%= namelink group %></dd>
<% end %>
<% end %>
<% if @user.teamers.active.count > 0 %>
<dt>Teams</dt>
<% @user.teamers.active.each do |teamer| %>
<dd><%= namelink teamer.team %></dd>
<% end %>
<% end %>
</dl>
</div>