forked from rDrama/rDrama
Hide self-deleted posts from other users.
parent
79f32e6d3a
commit
1e26fb3d79
|
@ -11,6 +11,8 @@
|
|||
{% set voted=-2 %}
|
||||
{% endif %}
|
||||
|
||||
{% set v_forbid_deleted = (p.deleted_utc != 0) and not (v and v.admin_level >= 2) and not (v and v.id == p.author_id) %}
|
||||
|
||||
{% block title %}
|
||||
|
||||
<style>
|
||||
|
@ -590,19 +592,23 @@
|
|||
{% if p.author %}<meta property="og:article:author" content="{{'@'+p.author_name}}">{% endif %}
|
||||
<meta property="article:published_time" content="{{p.created_datetime}}">
|
||||
{% if p.edited_utc %}<meta property="article:modified_time" content="{{p.edited_string}}">{% endif %}
|
||||
<meta property="og:description" name="description" content="{{p.plainbody(v)}}">
|
||||
{% if p.author %}<meta property="og:author" name="author" content="{{'@'+p.author_name}}">{% endif %}
|
||||
{% if not v_forbid_deleted -%}
|
||||
<meta property="og:description" name="description" content="{{p.plainbody(v)}}">
|
||||
<meta property="og:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}">
|
||||
<meta property="og:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/assets/images/{{SITE_NAME}}/site_preview.webp?v=1016{% endif %}">
|
||||
<meta property="og:url" content="{{p.permalink}}">
|
||||
{%- endif %}
|
||||
<meta property="og:site_name" content="{{request.host}}">
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="{{SITE_FULL}}">
|
||||
<meta name="twitter:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}">
|
||||
{% if not v_forbid_deleted -%}
|
||||
{% if p.author %}<meta name="twitter:creator" content="{{'@'+p.author_name}}">{% endif %}
|
||||
<meta name="twitter:description" content="{{p.plainbody(v)}}">
|
||||
<meta name="twitter:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb %}{{p.thumb_url}}{% else %}{{SITE_NAME}}/assets/images/{{SITE_NAME}}/site_preview.webp?v=1016{% endif %}">
|
||||
{%- endif %}
|
||||
<meta name="twitter:url" content="{{p.permalink}}">
|
||||
|
||||
{% endif %}
|
||||
|
@ -740,7 +746,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if p.realurl(v) %}
|
||||
{% if p.realurl(v) and not v_forbid_deleted %}
|
||||
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter %}agendaposter{% endif %}"><a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
|
||||
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
|
||||
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
|
||||
|
@ -754,6 +760,7 @@
|
|||
</h1>
|
||||
{% endif %}
|
||||
|
||||
{% if not v_forbid_deleted %}
|
||||
<div id="post-body" class="post-body mt-3">
|
||||
{% if p.realurl(v) %}
|
||||
{% if not p.embed_url and not p.is_image and not p.is_video and not p.is_audio %}
|
||||
|
@ -816,6 +823,11 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="post-body" class="post-body mt-3">
|
||||
<div id="post-text"><code>[Deleted by author.]</code></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if v and (v.id==p.author_id or v.admin_level > 2) and not v.is_suspended %}
|
||||
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
|
||||
|
@ -875,7 +887,7 @@
|
|||
<a class="list-inline-item" role="button" onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</a>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id != p.author_id and p.body %}
|
||||
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %}
|
||||
<a class="list-inline-item" role="button" onclick="expandMarkdown(this,'{{p.id}}')"><i class="fas text-expand-icon-{{p.id}} fa-expand-alt"></i><span>View source</span></a>
|
||||
{% endif %}
|
||||
|
||||
|
@ -978,7 +990,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
{% if v and v.id != p.author_id and p.body %}
|
||||
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %}
|
||||
<textarea autocomplete="off" class="d-none card border my-2 p-3 comment-box form-control rounded" id="markdown-{{p.id}}" readonly>{{p.body.strip()}}</textarea>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue