1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-24 09:12:56 +02:00

[feature/soft-delete] Implement the ability to soft-delete and restore posts

The soft delete feature seems to work.  Tests are pending.  A real icon is pending.  Add the permissions and the interface to soft-delete posts.  Also able to restore posts via the MCP queue

PHPBB3-9657
This commit is contained in:
Josh Woody
2010-06-27 14:22:36 -05:00
committed by Joas Schilling
parent c32d760806
commit fb13ab83e4
20 changed files with 553 additions and 197 deletions

View File

@@ -94,8 +94,13 @@
<!-- IF .postrow -->
<fieldset class="display-actions">
<!-- IF S_RESTORE -->
<input class="button2" type="submit" name="action[disapprove]" value="{L_DELETE}" />&nbsp;
<input class="button1" type="submit" name="action[restore]" value="{L_RESTORE}" />
<!-- ELSE -->
<input class="button2" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" />&nbsp;
<input class="button1" type="submit" name="action[approve]" value="{L_APPROVE}" />
<!-- ENDIF -->
<div><a href="#" onclick="marklist('mcp', 'post_id_list', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('mcp', 'post_id_list', false); return false;">{L_UNMARK_ALL}</a></div>
</fieldset>
<!-- ENDIF -->

View File

@@ -83,6 +83,13 @@
</dl>
<!-- ENDIF -->
<!-- IF (S_SOFT_DELETE_ALLOWED and not S_IS_DELETED) or (S_RESTORE_ALLOWED and S_IS_DELETED) -->
<dl>
<dt><label for="soft_delete">{L_SOFT_DELETE_POST}:</label></dt>
<dd><label for="soft_delete"><input type="checkbox" name="soft_delete"{S_SOFT_DELETE_CHECKED} id="soft_delete" /> {L_SOFT_DELETE_POST_EXPLAIN}</label></dd>
</dl>
<!-- ENDIF -->
<!-- IF S_SHOW_TOPIC_ICONS or S_SHOW_PM_ICONS -->
<dl>
<dt><label for="icon">{L_ICON}:</label></dt>

View File

@@ -144,7 +144,7 @@
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><!-- IF topicrow.DELETED_IMG --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.DELETED_IMG}</a><!-- ENDIF --><br />
<!-- IF .topicrow.pagination -->
<div class="pagination">
<ul>

View File

@@ -138,6 +138,7 @@
<h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
<p class="author"><!-- IF S_IS_BOT -->{postrow.MINI_POST_IMG}<!-- ELSE --><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><!-- ENDIF -->{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; {postrow.POST_DATE} </p>
<<<<<<< HEAD
<!-- IF postrow.S_POST_UNAPPROVED or postrow.S_POST_REPORTED -->
<form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}" data-ajax="post_approve">
<p class="rules">
@@ -148,6 +149,7 @@
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
{S_FORM_TOKEN}
<br /><!-- ENDIF -->
<!-- IF postrow.S_POST_DELETED -->{DELETED_IMG} <a href="{postrow.U_MCP_APPROVE}"><strong>{L_POST_DELETED_RESTORE}</strong></a><br /><!-- ENDIF -->
<!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG} <a href="{postrow.U_MCP_REPORT}"><strong>{L_POST_REPORTED}</strong></a><!-- ENDIF -->
</p>
</form>