Add post modify view
This allows moderators to modify posts (add sticky, etc). Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
{{block.super}}
|
||||
<script src="{% static 'board/jquery.js' %}"></script>
|
||||
<script src="{% static 'board/jsframe.min.js' %}"></script>
|
||||
<script src="{% static 'board/ban_window.js' %}"></script>
|
||||
<script src="{% static 'board/ban.js' %}"></script>
|
||||
{% endblock extrahead %}
|
||||
|
||||
{% block footer %}
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
{% load i18n static %}
|
||||
{# Title #}
|
||||
{% block title %}{% translate "Ban success" %}{% endblock %}
|
||||
{# Extra JS #}
|
||||
{% block extrajs %}
|
||||
<script src="{% static 'board/ban_window.js' %}"></script>
|
||||
{% endblock extrajs %}
|
||||
{# Body #}
|
||||
{% block content %}
|
||||
<div class="row" id="message">
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title>{% block title %}{% if title %}{{title}}{% else %}Index{% endif %}{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{% static 'board/style.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'board/font-awesome/css/font-awesome.min.css' %}">
|
||||
{% block extrastyle %}{% endblock %}
|
||||
<script src="{% static 'board/jquery.js' %}"></script>
|
||||
<script src="{% static 'board/jsframe.min.js' %}"></script>
|
||||
<script src="{% static 'board/post.js' %}"></script>
|
||||
{% if perms.board.create_ban %}
|
||||
<script src="{% static 'board/ban_window.js' %}"></script>
|
||||
<script src="{% static 'board/ban_menu.js' %}"></script>
|
||||
{% endif %}
|
||||
{% block extrajs %}{% endblock %}
|
||||
</head>
|
||||
|
||||
17
board/templates/board/post_modify_view.html
Normal file
17
board/templates/board/post_modify_view.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "board/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" action="{% url 'board:post_modify' post.id %}">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{% if perms.board.can_sticky %}
|
||||
<tr>
|
||||
<th>{{form.sticky.label_tag}}</th>
|
||||
<td>{{form.sticky}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr><td> </td><td><input type="submit" value="Modify post" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
{% endblock content %}
|
||||
@@ -6,6 +6,9 @@
|
||||
{% if perms.board.create_ban %}
|
||||
data-ban-url="{% url 'board:ban_create' board.url post.id %}"
|
||||
{% endif %}
|
||||
{% if perms.board.can_sticky %}
|
||||
data-modify-url="{% url 'board:post_modify' post.id %}"
|
||||
{% endif %}
|
||||
>
|
||||
{# Image #}
|
||||
{% if post.thumbnail %}
|
||||
@@ -24,7 +27,10 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{# Post ID, username, time #}
|
||||
{# Post ID, sticky, username, time #}
|
||||
{% if post.sticky and not post.op %}
|
||||
<span title="Stickied" class="fa fa-sticky-note"></span>
|
||||
{% endif %}
|
||||
<a href="#p{{post.id}}">#.</a>
|
||||
<span class="post_id">{{post.id}}</span>
|
||||
{% if post.subject %}
|
||||
|
||||
Reference in New Issue
Block a user