mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix owner display on problem & contest (#614)
This commit is contained in:
1 parent
f79f3d2d79
commit
b73afc7af6
10 files changed
+4
-8
No files matched your search
@@ -173,6 +173,7 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
||||
system.get('pagination.reply'),
|
||||
);
|
||||
const uids = [
|
||||
...this.vnode.owner ? [this.vnode.owner] : [],
|
||||
this.ddoc.owner,
|
||||
...drdocs.map((drdoc) => drdoc.owner),
|
||||
];
|
||||
|
||||
@@ -376,6 +376,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
||||
solutionCount: scnt,
|
||||
discussionCount: dcnt,
|
||||
tdoc: this.tdoc,
|
||||
owner_udoc: (tid && this.tdoc.owner !== this.pdoc.owner) ? await user.getById(domainId, this.tdoc.owner) : null,
|
||||
};
|
||||
if (this.tdoc && this.tsdoc) {
|
||||
const fields = ['attend', 'startAt'];
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</div>
|
||||
<div class="medium-3 columns">
|
||||
{% set owner_udoc = udict[tdoc.owner] %}
|
||||
{% include "partials/contest_sidebar.html" %}
|
||||
{% include "partials/contest_sidebar_management.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,7 @@
|
||||
{% if tdoc %}
|
||||
{% if not owner_udoc %}
|
||||
{% set owner_udoc = udoc %}
|
||||
{% endif %}
|
||||
{% if tdoc %}
|
||||
{% if tdoc.rule == 'homework' %}
|
||||
{% include "partials/problem_sidebar_homework.html" %}
|
||||
{% include "partials/homework_sidebar.html" %}
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
{% set filetype = "testdata" %}
|
||||
{% include "partials/problem_files.html" %}
|
||||
</div>
|
||||
{% set owner_udoc = udoc %}
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-3 columns"><div data-sticky="large">
|
||||
{% set owner_udoc = udoc %}
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
</div></div>
|
||||
</div>
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
{% set filetype = "additional_file" %}
|
||||
{% include "partials/problem_files.html" %}
|
||||
</div>
|
||||
{% set owner_udoc = udoc %}
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
{% else %}
|
||||
{% include 'components/md_hint.html' %}
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-3 columns">
|
||||
{% set owner_udoc = udoc %}
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-3 columns">
|
||||
{% set owner_udoc = udoc %}
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-3 columns">
|
||||
{% set owner_udoc = udoc %}
|
||||
{% include "partials/problem_sidebar.html" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user