make "edit" and "view source' mutually exclusive again

pull/134/head
Aevann 2023-02-26 12:02:22 +02:00
parent fd9e1c3fec
commit af1b52b98a
1 changed files with 2 additions and 4 deletions

View File

@ -38,7 +38,7 @@
<ul class="list-group post-actions">
{% if v.id==p.author_id %}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-2"></i>Edit</button>
{% elif p.body %}
{% elif p.body and v.admin_level < PERMS['POST_EDITING'] %}
<button type="button" class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-dismiss="modal" data-nonce="{{g.nonce}}" data-onclick="expandMarkdown('{{p.id}}','p')"><i class="fas text-expand-icon-{{p.id}} fa-expand-alt text-center mr-2"></i><span class="expand-text-p-{{p.id}}">View source</span></button>
{% endif %}
@ -211,9 +211,7 @@
{% if v and v.can_edit(p) %}
<button type="button" class="list-inline-item" data-nonce="{{g.nonce}}" data-onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</button>
{% endif %}
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %}
{% elif v and v.id != p.author_id and p.body and not v_forbid_deleted %}
<button type="button" class="list-inline-item" data-nonce="{{g.nonce}}" data-onclick="expandMarkdown('{{p.id}}','p')"><i class="fas text-expand-icon-{{p.id}} fa-expand-alt"></i><span class="expand-text-p-{{p.id}}">View source</span></button>
{% endif %}