算法评测平台前端。
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.

75 lines
3.0 KiB

<% this.title = '讨论' %>
8 years ago
<% include header %>
<div class="padding">
<div class="ui grid">
<div class="row">
<div class="ten wide column">
<div class="ui breadcrumb">
<div class="section">讨论</div>
<i class="right angle icon divider"></i>
<% if (problem) { %>
<div class="section"><a href="<%= syzoj.utils.makeUrl(['discussion', 'problems']) %>">题目</a></div>
<i class="right angle icon divider"></i>
<div class="active section"><%= problem.title %></div>
<% } else if (in_problems) { %>
<div class="section">题目</div>
<% } else { %>
<div class="section">全局板块</div>
<% } %>
</div>
</div>
<div class="six wide right aligned column">
<% if(in_problems) { %>
<a style="margin-left: 10px; " href="<%= syzoj.utils.makeUrl(['discussion', 'global']) %>" class="ui labeled icon mini blue button">
<i class="world icon"></i>
全局板块
</a>
<% } else { %>
<% if (problem) { %>
<a style="margin-left: 10px; " href="<%= syzoj.utils.makeUrl(['problem', problem.id]) %>" class="ui labeled icon mini blue button">
<i class="arrow left icon"></i>
返回题目
</a>
<% } else { %>
<a style="margin-left: 10px; " href="<%= syzoj.utils.makeUrl(['discussion', 'problems']) %>" class="ui labeled icon mini blue button">
<i class="file outline icon"></i>
题目板块
</a>
<% } %>
<a style="margin-left: 10px; " href="<%= syzoj.utils.makeUrl(['article', 0, 'edit'], problem ? { problem_id: problem.id } : null) %>" class="ui labeled icon mini button">
<i class="write icon"></i>
发帖
</a>
<% } %>
</div>
8 years ago
</div>
</div>
<table class="ui very basic center aligned table">
<thead>
<tr>
<th class="left aligned" style="width: 50%; ">标题</th>
<% if (in_problems) { %>
<th style="width: 20%; ">所属题目</th>
<% } %>
<th style="width: 10%; ">作者</th>
<th style="width: 20%; ">发表时间</th>
</tr>
</thead>
<tbody>
<% for (let article of articles) { %>
<tr>
<td class="left aligned"><a href="<%= syzoj.utils.makeUrl(['article', article.id]) %>"><%= article.title %></a></td>
<% if (in_problems) { %>
<td><a href="<%= syzoj.utils.makeUrl(['discussion', 'problem', article.problem_id]) %>"><%= article.problem.title %></a></td>
<% } %>
<td><a href="<%= syzoj.utils.makeUrl(['user', article.user_id]) %>"><%= article.user.username %></a><% if (article.user.nameplate) { %><%- article.user.nameplate %><% } %></td>
<td><%= syzoj.utils.formatDate(article.public_time) %></td>
</tr>
<% } %>
</tbody>
</table>
<br>
8 years ago
<% include page %>
</div>
<% include footer %>