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.

77 lines
3.1 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: 45%; ">标题</th>
<% if (in_problems) { %>
<th style="width: 20%; ">所属题目</th>
<% } %>
<th style="width: 10%; ">作者</th>
<th style="width: 10%; ">回复数</th>
<th style="width: 15%; ">最新回复</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><%= article.comments_num %></td>
<td><%= syzoj.utils.formatDate(article.sort_time) %></td>
</tr>
<% } %>
</tbody>
</table>
<br>
8 years ago
<% include page %>
</div>
<% include footer %>