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

72 lines
1.8 KiB
Text

<table>
<tr>
<td id="userNavi">
<div class="box">
<%= image_tag @user.profile.avatar.url, :id => "user" %>
<div class="center bold">
<%= @user.username %>
</div>
</div>
<br />
<div class="box center">
<a href="javascript:;" id="general">General</a>
</div>
<div class="box center">
<a href="javascript:;" id="favorites">Favorites</a>
</div>
<div class="box center">
<a href="javascript:;" id="computer">Computer</a>
</div>
<% if @user.articles.count > 0 %>
<div class="box center">
<a href="javascript:;" id="articles">Articles</a>
</div>
<% end %>
<% if @user.movies.count > 0 %>
<div class="box center">
<a href="javascript:;" id="movies">Movies</a>
</div>
<% end %>
<% if @user.teamers.past.count > 0 %>
<div class="box center">
<a href="javascript:;" id="teams">Teams</a>
</div>
<% end %>
<% if @user.match_teams.count > 0 %>
<div class="box center">
<a href="javascript:;" id="matches">Matches</a>
</div>
<% end %>
<% if @user.predictions.count > 0 %>
<div class="box center">
<a href="javascript:;" id="predictions">Predictions</a>
</div>
<% end %>
<div class="box center">
<a href="javascript:;" id="comments">Comments</a>
</div>
<div class="center">
<% if cuser and @user.can_update? cuser %>
<%= link_to 'Edit', edit_user_path(@user) %>
<%= link_to 'My Agenda', "/users/agenda/#{cuser.id}" %>
<% end %>
</div>
</td>
<td id="userData" class="box">
<%= render :partial => "general" %>
</td>
</tr>
</table>