mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: fix bugs and add hint (#635)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
e02d8b5d43
commit
7687b99f07
13 files changed
+81
-49
No files matched your search
@@ -14,12 +14,10 @@
|
||||
comment_ref,
|
||||
reply_ref,
|
||||
comment_post_perm,
|
||||
comment_edit_perm,
|
||||
comment_edit_self_perm,
|
||||
comment_delete_perm,
|
||||
comment_delete_self_perm,
|
||||
reply_post_perm,
|
||||
reply_edit_perm,
|
||||
reply_edit_self_perm,
|
||||
reply_delete_perm,
|
||||
reply_delete_self_perm,
|
||||
@@ -101,7 +99,7 @@
|
||||
{% if handler.user.hasPerm(reply_post_perm) %}
|
||||
{{ action(_('Reply'), 'reply', 'comment', {operation: reply_post_op, drid: doc._id}, 'reply') }}
|
||||
{% endif %}
|
||||
{% if (handler.user.hasPerm(comment_edit_self_perm) and handler.user.own(doc)) or handler.user.hasPerm(comment_edit_perm) %}
|
||||
{% if handler.user.hasPerm(comment_edit_self_perm) and handler.user.own(doc) %}
|
||||
{{ action(_('Edit'), 'edit', 'comment', {operation: comment_edit_op, drid: doc._id}, 'edit') }}
|
||||
{% endif %}
|
||||
{% if (handler.user.hasPerm(comment_delete_self_perm) and handler.user.own(doc)) or handler.user.hasPerm(comment_delete_perm) %}
|
||||
@@ -142,10 +140,10 @@
|
||||
{% if handler.user.hasPerm(reply_post_perm) %}
|
||||
{{ action(_('Reply'), 'reply', 'reply', {}, 'reply') }}
|
||||
{% endif %}
|
||||
{% if handler.user.own(doc) or handler.user.hasPerm(reply_edit_perm) %}
|
||||
{% if handler.user.own(rdoc) and handler.user.hasPerm(reply_edit_self_perm) %}
|
||||
{{ action(_('Edit'), 'edit', 'reply', {operation: reply_edit_op, drid: doc._id, drrid: rdoc._id}, 'edit') }}
|
||||
{% endif %}
|
||||
{% if handler.user.own(doc) or handler.user.hasPerm(reply_delete_perm) %}
|
||||
{% if (handler.user.own(rdoc) and handler.user.hasPerm(reply_delete_self_perm)) or handler.user.hasPerm(reply_delete_perm) %}
|
||||
{{ action(_('Delete'), 'delete', 'reply', {operation: reply_delete_op, drid: doc._id, drrid: rdoc._id}, 'delete') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user