1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-18 06:38:43 +01:00

[ticket/13821] Support displaying ignored posts on post review page

PHPBB3-13821
This commit is contained in:
Marc Alexander 2022-01-22 22:23:17 +01:00
parent 6caf2f83ad
commit 9f09dec049
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
5 changed files with 23 additions and 8 deletions

View File

@ -1253,11 +1253,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
'S_FRIEND' => ($row['friend']) ? true : false,
'S_IGNORE_POST' => ($row['foe']) ? true : false,
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,
'S_HAS_ATTACHMENTS' => !empty($attachments[$row['post_id']]),
'S_FRIEND' => (bool) $row['friend'],
'S_IGNORE_POST' => (bool) $row['foe'],
'L_IGNORE_POST' => $row['foe'] ? $user->lang('POST_BY_FOE', get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
'S_POST_DELETED' => $row['post_visibility'] == ITEM_DELETED,
'L_DELETE_POST' => $l_deleted_message,
'POST_SUBJECT' => $post_subject,

View File

@ -604,6 +604,7 @@ $lang = array_merge($lang, array(
'POST_BY_AUTHOR' => 'by',
'POST_BY_FOE' => '<strong>%1$s</strong>, who is currently on your ignore list, made this post.',
'POST_DISPLAY' => '%1$sDisplay this post%2$s.',
'POST_DISPLAY_TEXT' => 'Display this post',
'POST_DAY' => '%.2f posts per day',
'POST_DELETED_ACTION' => 'Deleted post:',
'POST_DELETED' => 'This post has been deleted.',

View File

@ -361,6 +361,17 @@ $('.display_post').click(function(e) {
$('#post_hidden' + postId).hide();
});
/**
* Display hidden post on post review page
*/
$('.display_post_review').on('click', function(e) {
e.preventDefault();
let $displayPostLink = $(this);
$displayPostLink.closest('.post-ignore').removeClass('post-ignore');
$displayPostLink.hide();
});
/**
* Toggle the member search panel in memberlist.php.
*

View File

@ -6,7 +6,8 @@
<!-- IF post_review_row.S_IGNORE_POST -->
<div class="post bg3 post-ignore">
<div class="inner">
{post_review_row.L_IGNORE_POST}
{post_review_row.L_IGNORE_POST}<br>
<a class="display_post_review" href="{{ post_review_row.U_MINI_POST }}">{{ lang('POST_DISPLAY_TEXT') }}</a>
<!-- ELSE -->
<div class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
<div class="inner">

View File

@ -13,11 +13,13 @@
<!-- IF topic_review_row.S_IGNORE_POST -->
<div class="post bg3 post-ignore">
<div class="inner">
{topic_review_row.L_IGNORE_POST}
{topic_review_row.L_IGNORE_POST}<br>
<a class="display_post_review" href="{{ post_review_row.U_MINI_POST }}">{{ lang('POST_DISPLAY_TEXT') }}</a>
<!-- ELSE IF topic_review_row.S_POST_DELETED -->
<div class="post bg3 post-ignore">
<div class="inner">
{topic_review_row.L_DELETE_POST}
{topic_review_row.L_DELETE_POST}<br>
<a class="display_post_review" href="{{ post_review_row.U_MINI_POST }}">{{ lang('POST_DISPLAY_TEXT') }}</a>
<!-- ELSE -->
<div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF topic_review_row.POST_ID == REPORTED_POST_ID --> reported<!-- ENDIF -->">
<div class="inner">