forked from rDrama/rDrama
fdfdf
parent
5f5d1b1218
commit
53ebbe7ebf
|
@ -540,7 +540,6 @@ class User(Base, Stndrd, Age_times):
|
|||
if not self.has_badge(badge.id):
|
||||
new_badge = Badge(user_id=self.id,
|
||||
badge_id=badge.id,
|
||||
created_utc=int(time.time())
|
||||
)
|
||||
g.db.add(new_badge)
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ def activate(v):
|
|||
if not any([b.badge_id == 2 for b in user.badges]):
|
||||
mail_badge = Badge(user_id=user.id,
|
||||
badge_id=2,
|
||||
created_utc=time.time())
|
||||
g.db.add(mail_badge)
|
||||
|
||||
g.db.add(user)
|
||||
|
|
|
@ -166,7 +166,6 @@ def badge_grant_post(v):
|
|||
|
||||
new_badge = Badge(badge_id=badge_id,
|
||||
user_id=user.id,
|
||||
created_utc=int(time.time())
|
||||
)
|
||||
|
||||
desc = request.form.get("description")
|
||||
|
|
|
@ -21,7 +21,6 @@ def api_flag_post(pid, v):
|
|||
flag = Flag(post_id=post.id,
|
||||
user_id=v.id,
|
||||
reason=reason,
|
||||
created_utc=int(time.time())
|
||||
)
|
||||
|
||||
|
||||
|
@ -48,7 +47,6 @@ def api_flag_comment(cid, v):
|
|||
flag = CommentFlag(comment_id=comment.id,
|
||||
user_id=v.id,
|
||||
reason=reason,
|
||||
created_utc=int(time.time())
|
||||
)
|
||||
|
||||
g.db.add(flag)
|
||||
|
|
|
@ -459,7 +459,6 @@ def settings_block_user(v):
|
|||
|
||||
new_block = UserBlock(user_id=v.id,
|
||||
target_id=user.id,
|
||||
created_utc=int(time.time())
|
||||
)
|
||||
g.db.add(new_block)
|
||||
|
||||
|
|
|
@ -422,9 +422,7 @@
|
|||
|
||||
<li class="list-group-item"><a href="{{c.permalink}}?context=5#context"{% if c.author.is_private %} rel="nofollow"{% endif %}><i class="fas fa-dna"></i>Context</a></li>
|
||||
|
||||
{% if not (v and v.id==c.author_id) %}
|
||||
<li class="list-group-item"><a href="javascript:void(0)" data-toggle="modal" data-dismiss="modal" data-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}')" class="d-block"><i class="fas fa-flag"></i>Report</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if v and c.parent_submission and c.author_id==v.id %}
|
||||
<li class="list-group-item"><a href="javascript:void(0)" data-dismiss="modal" onclick="toggleEdit('{{c.id}}')" class="d-block"><i class="fas fa-edit"></i>Edit</a></li>
|
||||
|
|
|
@ -95,9 +95,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<ul class="list-group post-actions">
|
||||
{% if not (v and v.id==p.author_id) %}
|
||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}','{{'@'+p.author.username}}')" class="d-block"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
|
||||
{% endif %}
|
||||
{% if v and v.id==p.author_id %}
|
||||
{% if p.private %}
|
||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/publish/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</a></button>
|
||||
|
@ -331,9 +329,7 @@
|
|||
<li class="list-inline-item"><a href="javascript:void(0)" onclick="post('/save_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save"></i>Save</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if not (v and v.id==p.author_id) %}
|
||||
<li class="list-inline-item"><a href="javascript:void(0)" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}', '{{p.author.username}}')"><i class="fas fa-flag"></i>Report</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id==p.author_id %}
|
||||
<li class="list-inline-item"><a class="text-muted" href="javascript:void(0)" onclick="post('/pin/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-thumbtack"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</a></li>
|
||||
|
|
|
@ -151,9 +151,7 @@
|
|||
<li class="list-inline-item"><a href="javascript:void(0)" onclick="post('/save_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save"></i>Save</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if not (v and v.id==p.author_id) %}
|
||||
<li class="list-inline-item"><a href="javascript:void(0)" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}', '{{p.author.username}}')"><i class="fas fa-flag"></i>Report</a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id==p.author_id %}
|
||||
<li class="list-inline-item"><a class="text-muted" href="javascript:void(0)" onclick="post('/pin/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-thumbtack"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</a></li>
|
||||
|
@ -311,9 +309,8 @@
|
|||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/save_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save text-center text-muted mr-3"></i>Save</a></button>
|
||||
{% endif %}
|
||||
|
||||
{% if not (v and v.id==p.author_id) %}
|
||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}','{{'@'+p.author.username}}')" class="d-block"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id==p.author_id %}
|
||||
<button class="btn btn-link btn-block btn-lg text-muted text-left" id="pin-post-{{p.id}}" href="javascript:void(0)" onclick="post('/pin/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</button>
|
||||
{% if p.deleted_utc > 0 %}
|
||||
|
|
Loading…
Reference in New Issue