mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: feat: allow star problem
This commit is contained in:
1 parent
f7f977293c
commit
ef32ee3865
8 files changed
+63
-4
No files matched your search
@@ -1,4 +1,3 @@
|
||||
{% set no_path_section = true %}
|
||||
{% extends "layout/basic.html" %}
|
||||
{% block content %}
|
||||
<script>
|
||||
@@ -35,6 +34,16 @@
|
||||
<span class="record-status--text {{ model.builtin.STATUS_CODES[rdoc['status']] }}">{{ rdoc.score }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) and not tdoc %}
|
||||
<form class="form--inline" action="{{ url('problem_main') }}" method="post">
|
||||
<input type="hidden" name="pid" value="{{ pdoc.docId }}">
|
||||
<input type="hidden" name="operation" value="{{ "star" if not psdoc.star else "unstar" }}">
|
||||
<button class="star{% if psdoc.star %} activated{% endif %}" type="submit">
|
||||
<span class="starred--hide"><span class="icon icon-star--outline" data-tooltip="{{ _('Star') }}"></span></span>
|
||||
<span class="starred--show"><span class="icon icon-star" data-tooltip="{{ _('Unstar') }}"></span></span>
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
#{{ pdoc.pid|default(pdoc.docId) }}. {{ pdoc.title }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user