You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

116 lines
5.7 KiB

<% this.title = show_user.nickname + ' - 用户'; %>
<% include header %>
<div class="padding">
<div class="ui grid">
<div class="row">
<div class="five wide column">
<div class="ui card" style="width: 100%; " id="user_card">
<div class="blurring dimmable image">
<% if (show_user.allowedEdit) { %>
<div class="ui dimmer transition hidden">
<div class="content">
<div class="center">
<a class="ui inverted button" href="<%= syzoj.utils.makeUrl(['user', show_user.id, 'edit']) %>"><i class="edit icon"></i>修改资料</a>
</div>
</div>
</div>
<% } %>
<img src="<%= syzoj.utils.gravatar(show_user.email, 1000) %>">
</div>
<div class="content">
<div class="header"><%= show_user.username %> <% if (show_user.sex == 1) { %><i class="man icon"></i><% } else if (show_user.sex == -1) { %><i class="woman icon"></i><% } %></div>
<div class="meta">
<a class="group"><%= show_user.is_admin ? '管理员' : '普通用户' %></a>
</div>
</div>
<div class="extra content">
<a><i class="check icon"></i>通过 <%= show_user.ac_problems.length %> 题</a>
</div>
</div>
</div>
<div class="eleven wide column">
<div class="ui grid">
<div class="row">
<div class="sixteen wide column">
<div class="ui grid">
<div class="eight wide column">
<div class="ui grid">
<div class="row">
<div class="column">
<h4 class="ui top attached block header">用户名</h4>
<div class="ui bottom attached segment"><%= show_user.username %></div>
</div>
</div>
<div class="row">
<div class="column">
<h4 class="ui top attached block header">Email</h4>
<div class="ui bottom attached segment"><%= show_user.email %></div>
</div>
</div>
</div>
</div>
<div class="eight wide column">
<div class="ui grid">
<div class="row">
<div class="column">
<h4 class="ui top attached block header">个性签名</h4>
<div class="ui bottom attached segment"><%- show_user.information %></div>
</div>
</div>
<div class="row">
<div class="column">
<h4 class="ui top attached block header">通过的题目</h4>
<div class="ui bottom attached segment">
<% for (let problem of show_user.ac_problems) { %>
<a href="<%= syzoj.utils.makeUrl(['problem', problem]) %>"><%= problem %></a>
<% } %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="column">
<h4 class="ui top attached block header">帖子</h4>
<div class="ui bottom attached <% if (!show_user.articles.length) { %>center aligned <% } %>segment">
<% if (!show_user.articles.length) { %>该用户从未发表帖子<% } else { %>
<table class="ui very basic table">
<thead>
<tr>
<th>标题</th>
<th>时间</th>
</tr>
</thead>
<tbody>
<% for (let article of show_user.articles) { %>
<tr>
<td><a href="<%= syzoj.utils.makeUrl(['article', article.id]) %>"><%= article.title %></a></td>
<td><%= syzoj.utils.formatDate(article.public_time) %></td>
</tr>
<% } %>
</tbody>
</table>
<% } %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<% if (show_user.allowedEdit) { %>
<script>
$(function () {
$('#user_card .image').dimmer({
on: 'hover'
});
})
<% } %>
</script>
<% include footer %>