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

51 lines
1.3 KiB
Text
Raw Normal View History

2014-04-16 08:44:36 +00:00
<div id="user-profile">
<h1 class="fancy">
<span><%= @user.username %></span>
</h1>
2014-04-16 08:44:36 +00:00
<div class="photo">
<%= image_tag @user.profile.avatar.url %>
</div>
2014-04-16 08:44:36 +00:00
<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 %>
2014-04-16 08:44:36 +00:00
<li><a id="teams">Teams</a></li>
<% end %>
<% if @user.match_teams.count > 0 %>
2014-04-16 08:44:36 +00:00
<li><a id="matches">Matches</a></li>
<% end %>
<% if @user.predictions.count > 0 %>
2014-04-16 08:44:36 +00:00
<li><a id="predictions">Predictions</a></li>
<% end %>
<% if @user.articles.count > 0 %>
<li><a id="articles">Articles</a></li>
<% end %>
2014-04-16 08:44:36 +00:00
<% if @user.movies.count > 0 %>
<li><a id="movies">Movies</a></li>
<% end %>
2014-04-16 08:44:36 +00:00
<li><a id="comments">Comments</a></li>
</ul>
2014-04-16 08:44:36 +00:00
<div id="user-data" class="tabbed-contents">
<%= render :partial => "general" %>
2014-04-16 08:44:36 +00:00
</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 %>
2014-04-16 08:44:36 +00:00
</div>