Show More
@@ -49,9 +49,6 b'' | |||||
49 | <span class="moderator_info"> |
|
49 | <span class="moderator_info"> | |
50 | {% if perms.boards.change_post or perms.boards.delete_post %} |
|
50 | {% if perms.boards.change_post or perms.boards.delete_post %} | |
51 | | <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a> |
|
51 | | <a href="{% url 'admin:boards_post_change' post.id %}">{% trans 'Edit' %}</a> | |
52 | <form action="{% url 'thread' thread.get_opening_post_id %}?post_id={{ post.id }}" method="post" class="post-button-form"> |
|
|||
53 | | <button name="method" value="toggle_hide_post">H</button> |
|
|||
54 | </form> |
|
|||
55 | {% endif %} |
|
52 | {% endif %} | |
56 | {% if perms.boards.change_thread or perms_boards.delete_thread %} |
|
53 | {% if perms.boards.change_thread or perms_boards.delete_thread %} | |
57 | {% if is_opening %} |
|
54 | {% if is_opening %} |
@@ -171,14 +171,5 b' class ThreadView(BaseBoardView, PostMixi' | |||||
171 | settings_manager = get_settings_manager(request) |
|
171 | settings_manager = get_settings_manager(request) | |
172 | settings_manager.del_fav_thread(opening_post) |
|
172 | settings_manager.del_fav_thread(opening_post) | |
173 |
|
173 | |||
174 | @permission_required('boards.post_hide_unhide') |
|
|||
175 | def toggle_hide_post(self, request, opening_post): |
|
|||
176 | post_id = request.GET.get(REQ_POST_ID) |
|
|||
177 |
|
||||
178 | if post_id: |
|
|||
179 | post = get_object_or_404(Post, id=post_id) |
|
|||
180 | post.set_hidden(not post.is_hidden()) |
|
|||
181 | post.save(update_fields=['hidden']) |
|
|||
182 |
|
||||
183 | def get_rss_url(self, opening_id): |
|
174 | def get_rss_url(self, opening_id): | |
184 | return reverse('thread', kwargs={'post_id': opening_id}) + 'rss/' |
|
175 | return reverse('thread', kwargs={'post_id': opening_id}) + 'rss/' |
General Comments 0
You need to be logged in to leave comments.
Login now