From 3851513cad3e9d7ce4a1035a567da2bb32fad1f6 Mon Sep 17 00:00:00 2001 From: Menci Date: Mon, 5 Dec 2016 18:50:38 +0800 Subject: [PATCH] Show nameplate after user name --- views/article.ejs | 5 ++--- views/contest_ranklist.ejs | 6 +----- views/discussion.ejs | 2 +- views/header.ejs | 2 +- views/index.ejs | 6 +----- views/judge_detail.ejs | 2 +- views/judge_state.ejs | 2 +- views/ranklist.ejs | 6 +----- views/user.ejs | 4 ++-- 9 files changed, 11 insertions(+), 24 deletions(-) diff --git a/views/article.ejs b/views/article.ejs index 4d6a7e9..a974e8e 100644 --- a/views/article.ejs +++ b/views/article.ejs @@ -8,8 +8,7 @@

<%= article.title %>

- <%= article.user.username %> - <% if (article.user.nameplate) { %><%- article.user.nameplate %><% } %> 于 <%= syzoj.utils.formatDate(article.public_time) %> 发表,<%= syzoj.utils.formatDate(article.update_time) %> 最后更新 + <%= article.user.username %><% if (article.user.nameplate) { %><%- article.user.nameplate %><% } %> 于 <%= syzoj.utils.formatDate(article.public_time) %> 发表,<%= syzoj.utils.formatDate(article.update_time) %> 最后更新 <% if (article.allowedEdit) { %> 删除文章 编辑文章 @@ -27,7 +26,7 @@

- <%= comment.user.username %> + <%= comment.user.username %><% if (comment.user.nameplate) { %><%- comment.user.nameplate %><% } %> diff --git a/views/contest_ranklist.ejs b/views/contest_ranklist.ejs index 954eeac..4f349f8 100644 --- a/views/contest_ranklist.ejs +++ b/views/contest_ranklist.ejs @@ -40,11 +40,7 @@ <%= i %>
- <%= item.user.username %> - <% if (item.user.nameplate) { %> - <%= item.user.nameplate %> - <% } %> - + <%= item.user.username %><% if (item.user.nameplate) { %><%- item.user.nameplate %><% } %> <% for (let problem of problems) { %> <% if (item.player.score_details[problem.id]) { %> diff --git a/views/discussion.ejs b/views/discussion.ejs index 184d103..f2bcf45 100644 --- a/views/discussion.ejs +++ b/views/discussion.ejs @@ -20,7 +20,7 @@ <% for (let article of articles) { %> <%= article.title %> - <%= article.user.username %> + <%= article.user.username %><% if (article.user.nameplate) { %><%- article.user.nameplate %><% } %> <%= syzoj.utils.formatDate(article.public_time) %> <% } %> diff --git a/views/header.ejs b/views/header.ejs index a51b4d0..aae1cdf 100644 --- a/views/header.ejs +++ b/views/header.ejs @@ -26,7 +26,7 @@ <% if (user) { %>