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
+6
-10
No files matched your search
@@ -173,6 +173,7 @@ class DiscussionDetailHandler extends DiscussionHandler {
|
|||||||
system.get('pagination.reply'),
|
system.get('pagination.reply'),
|
||||||
);
|
);
|
||||||
const uids = [
|
const uids = [
|
||||||
|
...this.vnode.owner ? [this.vnode.owner] : [],
|
||||||
this.ddoc.owner,
|
this.ddoc.owner,
|
||||||
...drdocs.map((drdoc) => drdoc.owner),
|
...drdocs.map((drdoc) => drdoc.owner),
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
|
|||||||
solutionCount: scnt,
|
solutionCount: scnt,
|
||||||
discussionCount: dcnt,
|
discussionCount: dcnt,
|
||||||
tdoc: this.tdoc,
|
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) {
|
if (this.tdoc && this.tsdoc) {
|
||||||
const fields = ['attend', 'startAt'];
|
const fields = ['attend', 'startAt'];
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="medium-3 columns">
|
<div class="medium-3 columns">
|
||||||
{% set owner_udoc = udict[tdoc.owner] %}
|
{% set owner_udoc = udict[tdoc.owner] %}
|
||||||
{% include "partials/contest_sidebar.html" %}
|
{% include "partials/contest_sidebar_management.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{% if tdoc %}
|
{% if not owner_udoc %}
|
||||||
{% if not owner_udoc %}
|
|
||||||
{% set owner_udoc = udoc %}
|
{% set owner_udoc = udoc %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if tdoc %}
|
||||||
{% if tdoc.rule == 'homework' %}
|
{% if tdoc.rule == 'homework' %}
|
||||||
{% include "partials/problem_sidebar_homework.html" %}
|
{% include "partials/problem_sidebar_homework.html" %}
|
||||||
{% include "partials/homework_sidebar.html" %}
|
{% include "partials/homework_sidebar.html" %}
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
{% set filetype = "testdata" %}
|
{% set filetype = "testdata" %}
|
||||||
{% include "partials/problem_files.html" %}
|
{% include "partials/problem_files.html" %}
|
||||||
</div>
|
</div>
|
||||||
{% set owner_udoc = udoc %}
|
|
||||||
{% include "partials/problem_sidebar.html" %}
|
{% include "partials/problem_sidebar.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -111,7 +111,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="medium-3 columns"><div data-sticky="large">
|
<div class="medium-3 columns"><div data-sticky="large">
|
||||||
{% set owner_udoc = udoc %}
|
|
||||||
{% include "partials/problem_sidebar.html" %}
|
{% include "partials/problem_sidebar.html" %}
|
||||||
</div></div>
|
</div></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -110,7 +110,6 @@
|
|||||||
{% set filetype = "additional_file" %}
|
{% set filetype = "additional_file" %}
|
||||||
{% include "partials/problem_files.html" %}
|
{% include "partials/problem_files.html" %}
|
||||||
</div>
|
</div>
|
||||||
{% set owner_udoc = udoc %}
|
|
||||||
{% include "partials/problem_sidebar.html" %}
|
{% include "partials/problem_sidebar.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% include 'components/md_hint.html' %}
|
{% include 'components/md_hint.html' %}
|
||||||
|
|||||||
@@ -48,7 +48,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="medium-3 columns">
|
<div class="medium-3 columns">
|
||||||
{% set owner_udoc = udoc %}
|
|
||||||
{% include "partials/problem_sidebar.html" %}
|
{% include "partials/problem_sidebar.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="medium-3 columns">
|
<div class="medium-3 columns">
|
||||||
{% set owner_udoc = udoc %}
|
|
||||||
{% include "partials/problem_sidebar.html" %}
|
{% include "partials/problem_sidebar.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="medium-3 columns">
|
<div class="medium-3 columns">
|
||||||
{% set owner_udoc = udoc %}
|
|
||||||
{% include "partials/problem_sidebar.html" %}
|
{% include "partials/problem_sidebar.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user