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

50 lines
1.3 KiB
Text

<div id="user-profile">
<h1 class="fancy">
<span><%= @user.username %></span>
</h1>
<div class="photo">
<%= image_tag @user.profile.avatar.url %>
</div>
<div class="tabs tabbed">
<ul id="user-nav" class="tabs">
<li class="activeli"><a id="general">General</a></li>
<% if @user.teamers.past.count > 0 %>
<li><a id="teams">Teams</a></li>
<% end %>
<% if @user.match_teams.count > 0 %>
<li><a id="matches">Matches</a></li>
<% end %>
<% if @user.predictions.count > 0 %>
<li><a id="predictions">Predictions</a></li>
<% end %>
<% if @user.articles.count > 0 %>
<li><a id="articles">Articles</a></li>
<% end %>
<% if @user.movies.count > 0 %>
<li><a id="movies">Movies</a></li>
<% end %>
<li><a id="comments">Comments</a></li>
</ul>
<div id="user-data" class="tabbed-contents">
<%= render :partial => "general" %>
</div>
</div>
<% if cuser and @user.can_update? cuser %>
<%= link_to 'Edit', edit_user_path(@user), class: 'button' %>
<%= link_to 'My Agenda', "/users/agenda/#{cuser.id}", class: 'button' %>
<% end %>
<% if cuser and cuser.admin? %>
<%= link_to 'Show History', "/users/history/#{@user.id}", class: 'button' %>
<% end %>
</div>