{% include 'mcp_header.html' %}

<div class="iz-mcp">

	{% if S_MCP_REPORT %}
		<section class="iz-card iz-card--mcp" aria-labelledby="iz-report-title">
			<header class="iz-card__header">
				<h2 class="iz-card__title" id="iz-report-title">
					{% if S_PM %}{{ L_PM_REPORT_DETAILS }}{% else %}{{ L_REPORT_DETAILS }}{% endif %}
				</h2>
			</header>

			<div class="iz-card__body">
				<form method="post" id="mcp_report" class="iz-form" action="{{ S_CLOSE_ACTION }}">
					<div class="iz-toolbar" role="region" aria-label="{{ L_REPORT_DETAILS }}">
						<div class="iz-toolbar__left">
							<h3 class="iz-h3">
								{{ L_REPORT_REASON }}{{ L_COLON }}&nbsp;{{ REPORT_REASON_TITLE }}
							</h3>
							<p class="iz-help">
								{{ L_REPORTED }}&nbsp;{{ L_POST_BY_AUTHOR }}&nbsp;{{ REPORTER_FULL }}&nbsp;&laquo;&nbsp;<time>{{ REPORT_DATE }}</time>
							</p>
						</div>

						<div class="iz-toolbar__right">
							<fieldset class="iz-actions iz-actions--inline" aria-label="{{ L_OPTIONS }}">
								{% if not S_REPORT_CLOSED %}
									<button class="iz-btn iz-btn--secondary"
											type="submit"
											name="action[close]"
											value="{{ L_CLOSE_REPORT }}"
											title="{{ L_CLOSE_REPORT }}">
										{{ L_CLOSE_REPORT }}
									</button>
								{% endif %}

								<button class="iz-btn iz-btn--danger"
										type="submit"
										name="action[delete]"
										value="{{ L_DELETE_REPORT }}"
										title="{{ L_DELETE_REPORT }}">
									{{ L_DELETE_REPORT }}
								</button>
							</fieldset>
						</div>
					</div>

					<input type="hidden" name="report_id_list[]" value="{{ REPORT_ID }}" />
					{{ S_FORM_TOKEN }}

					{% if S_REPORT_CLOSED %}
						<p class="iz-alert iz-alert--info" role="status">{{ L_REPORT_CLOSED }}</p>
					{% endif %}

					<div class="iz-prose">
						{% if REPORT_TEXT %}
							{{ REPORT_TEXT }}
						{% else %}
							{{ REPORT_REASON_DESCRIPTION }}
						{% endif %}
					</div>
				</form>
			</div>
		</section>
	{% else %}
		<section class="iz-card iz-card--mcp" aria-labelledby="iz-post-details-title">
			<header class="iz-card__header">
				<h2 class="iz-card__title" id="iz-post-details-title">{{ L_POST_DETAILS }}</h2>
			</header>
		</section>
	{% endif %}


	<section class="iz-card iz-card--mcp" aria-labelledby="iz-post-title">
		<header class="iz-card__header">
			<div class="iz-toolbar" role="region" aria-label="{{ L_POST_DETAILS }}">
				<div class="iz-toolbar__left">
					<h2 class="iz-card__title" id="iz-post-title">
						<a class="iz-link iz-link--strong" href="{{ U_VIEW_POST }}">{{ POST_SUBJECT }}</a>
					</h2>
				</div>

				<div class="iz-toolbar__right">
					<a class="iz-link iz-link--muted topicreview-trigger"
					   href="#review"
					   id="review"
					   aria-expanded="true"
					   data-text-swap="{{ L_EXPAND_CLOSE }}"
					   data-text-original="{{ L_EXPAND_VIEW }}">
						{{ L_EXPAND_VIEW }}
					</a>
				</div>
			</div>
		</header>

		<div class="iz-card__body">
			{% if S_PM %}
				<p class="iz-meta">
					<strong>{{ L_SENT_AT }}{{ L_COLON }}</strong>&nbsp;<time>{{ POST_DATE }}</time><br />
					<strong>{{ L_PM_FROM }}{{ L_COLON }}</strong>&nbsp;{{ POST_AUTHOR_FULL }}
					{% if S_TO_RECIPIENT %}
						<br /><strong>{{ L_TO }}{{ L_COLON }}</strong>
						{% for to_recipient in to_recipient %}
							{% if to_recipient.NAME_FULL %}
								{{ to_recipient.NAME_FULL }}
							{% else %}
								<a class="iz-link" href="{{ to_recipient.U_VIEW }}"{% if to_recipient.COLOUR %} style="color:{{ to_recipient.COLOUR }};"{% endif %}>
									<strong>{{ to_recipient.NAME }}</strong>
								</a>
							{% endif %}
							&nbsp;
						{% endfor %}
					{% endif %}
					{% if S_BCC_RECIPIENT %}
						<br /><strong>{{ L_BCC }}{{ L_COLON }}</strong>
						{% for bcc_recipient in bcc_recipient %}
							{% if bcc_recipient.NAME_FULL %}
								{{ bcc_recipient.NAME_FULL }}
							{% else %}
								<a class="iz-link" href="{{ bcc_recipient.U_VIEW }}"{% if bcc_recipient.COLOUR %} style="color:{{ bcc_recipient.COLOUR }};"{% endif %}>
									<strong>{{ bcc_recipient.NAME }}</strong>
								</a>
							{% endif %}
							&nbsp;
						{% endfor %}
					{% endif %}
				</p>
			{% else %}
				<p class="iz-meta">
					{{ L_POSTED }}&nbsp;{{ L_POST_BY_AUTHOR }}&nbsp;{{ POST_AUTHOR_FULL }}&nbsp;&raquo;&nbsp;<time>{{ POST_DATE }}</time>
				</p>
			{% endif %}

			<div class="iz-toolbar" role="region" aria-label="{{ L_OPTIONS }}">
				<div class="iz-toolbar__left"></div>

				<div class="iz-toolbar__right">
					{% if U_EDIT %}
						<a class="iz-btn iz-btn--secondary" href="{{ U_EDIT }}" title="{{ L_EDIT_POST }}">{{ L_EDIT_POST }}</a>
					{% endif %}

					{% if S_POST_UNAPPROVED %}
						<form method="post" id="mcp_approve" class="iz-form iz-form--inline" action="{{ U_APPROVE_ACTION }}">
							<fieldset class="iz-actions iz-actions--inline">
								<button class="iz-btn iz-btn--secondary" type="submit" name="action[disapprove]" value="{{ L_DISAPPROVE }}" title="{{ L_DISAPPROVE }}">
									{{ L_DISAPPROVE }}
								</button>
								<button class="iz-btn iz-btn--primary" type="submit" name="action[approve]" value="{{ L_APPROVE }}" title="{{ L_APPROVE }}">
									{{ L_APPROVE }}
								</button>

								{% if not S_FIRST_POST %}<input type="hidden" name="mode" value="unapproved_posts" />{% endif %}
								<input type="hidden" name="post_id_list[]" value="{{ POST_ID }}" />
								{{ S_FORM_TOKEN }}
							</fieldset>
						</form>
					{% elseif S_POST_DELETED %}
						<form method="post" id="mcp_restore" class="iz-form iz-form--inline" action="{{ U_APPROVE_ACTION }}">
							<fieldset class="iz-actions iz-actions--inline">
								{% if S_CAN_DELETE_POST %}
									<button class="iz-btn iz-btn--danger" type="submit" name="action[delete]" value="{{ L_DELETE }}" title="{{ L_DELETE }}">
										{{ L_DELETE }}
									</button>
								{% endif %}
								<button class="iz-btn iz-btn--primary" type="submit" name="action[restore]" value="{{ L_RESTORE }}" title="{{ L_RESTORE }}">
									{{ L_RESTORE }}
								</button>

								{% if not S_FIRST_POST %}<input type="hidden" name="mode" value="deleted_posts" />{% endif %}
								<input type="hidden" name="post_id_list[]" value="{{ POST_ID }}" />
								{{ S_FORM_TOKEN }}
							</fieldset>
						</form>
					{% endif %}
				</div>
			</div>

			{% if S_POST_REPORTED and not S_MCP_REPORT %}
				<p class="iz-alert iz-alert--warn" role="status">
					<a class="iz-link iz-link--strong" href="{{ U_MCP_REPORT }}">{{ L_POST_REPORTED }}</a>
				</p>
			{% endif %}

			{% EVENT mcp_post_text_before %}
			<div class="iz-prose topicreview topicreview-expand">
				{{ POST_PREVIEW }}
			</div>
			{% EVENT mcp_post_text_after %}

			{% if S_HAS_ATTACHMENTS %}
				<section class="iz-card iz-card--subtle" aria-labelledby="iz-attachments-title">
					<header class="iz-card__header">
						<h3 class="iz-card__title" id="iz-attachments-title">{{ L_ATTACHMENTS }}</h3>
					</header>
					<div class="iz-card__body">
						{% EVENT ss_mcp_post_postrow_attachment_row_before %}
						{% for attachment in attachment %}{{ attachment.DISPLAY_ATTACHMENT }}{% endfor %}
						{% EVENT ss_mcp_post_postrow_attachment_row_after %}
					</div>
				</section>
			{% endif %}

			{% if DELETED_MESSAGE or DELETE_REASON %}
				<p class="iz-alert iz-alert--info" role="status">
					{{ DELETED_MESSAGE }}
					{% if DELETE_REASON %}<br /><strong>{{ L_REASON }}{{ L_COLON }}</strong>&nbsp;<em>{{ DELETE_REASON }}</em>{% endif %}
				</p>
			{% endif %}

			{% if SIGNATURE %}
				<div id="sig{{ POST_ID }}" class="signature">{{ SIGNATURE }}</div>
			{% endif %}

			{% if S_MCP_REPORT and S_CAN_VIEWIP %}
				<hr class="iz-hr" />
				<p class="iz-meta">
					{% if S_PM %}{{ L_THIS_PM_IP }}{% else %}{{ L_THIS_POST_IP }}{% endif %}{{ L_COLON }}
					{% if U_WHOIS %}
						<a class="iz-link" href="{{ U_WHOIS }}">{% if POST_IPADDR %}{{ POST_IPADDR }}{% else %}{{ POST_IP }}{% endif %}</a>
						{% if POST_IPADDR %}
							{{ POST_IP }}
						{% else %}
							&nbsp;&#40;<a class="iz-link iz-link--muted" href="{{ U_LOOKUP_IP }}">{{ L_LOOKUP_IP }}</a>&#41;
						{% endif %}
					{% else %}
						{% if POST_IPADDR %}
							{{ POST_IPADDR }}&nbsp;&#40;{{ POST_IP }}&#41;
						{% else %}
							{{ POST_IP }}
							{% if U_LOOKUP_IP %}&nbsp;&#40;<a class="iz-link iz-link--muted" href="{{ U_LOOKUP_IP }}">{{ L_LOOKUP_IP }}</a>&#41;{% endif %}
						{% endif %}
					{% endif %}
				</p>
			{% endif %}
		</div>
	</section>


	{% if S_CAN_LOCK_POST or S_CAN_DELETE_POST or S_CAN_CHGPOSTER or S_MCP_POST_ADDITIONAL_OPTS %}
		{% if S_CAN_CHGPOSTER %}
			<section class="iz-card iz-card--mcp" aria-labelledby="iz-chgposter-title">
				<header class="iz-card__header">
					<h2 class="iz-card__title" id="iz-chgposter-title">{{ L_MOD_OPTIONS }}</h2>
				</header>

				<div class="iz-card__body">
					<form method="post" id="mcp_chgposter" class="iz-form" action="{{ U_POST_ACTION }}">
						<div class="iz-grid iz-grid--2">
							{% if S_USER_SELECT %}
								<div class="iz-field">
									<label class="iz-label" for="chgposter_user">{{ L_CHANGE_POSTER }}{{ L_COLON }}</label>
									<div class="iz-field__row iz-field__row--actions">
										<select class="iz-select" name="u" id="chgposter_user">{{ S_USER_SELECT }}</select>
										<button class="iz-btn iz-btn--primary" type="submit" name="action[chgposter_ip]" value="{{ L_CONFIRM }}">{{ L_CONFIRM }}</button>
									</div>
								</div>
							{% endif %}

							<div class="iz-field">
								<div class="iz-field__row">
									<label class="iz-label" for="chgposter_username">{{ L_CHANGE_POSTER }}{{ L_COLON }}</label>
									<a class="iz-link iz-link--muted" href="{{ U_FIND_USERNAME }}" onclick="find_username(this.href); return false;">
										{{ L_FIND_USERNAME }}
									</a>
								</div>

								<div class="iz-field__row iz-field__row--actions">
									<input class="iz-input" type="text" name="username" id="chgposter_username" value="" placeholder="{{ L_USERNAME }}" autocomplete="off">
									<button class="iz-btn iz-btn--primary" name="action[chgposter]" value="{{ L_CONFIRM }}" type="submit">{{ L_CONFIRM }}</button>
								</div>
							</div>
						</div>

						{{ S_FORM_TOKEN }}
					</form>
				</div>
			</section>
		{% endif %}

		{% EVENT mcp_post_additional_options %}

		{% if S_CAN_LOCK_POST or S_CAN_DELETE_POST %}
			<section class="iz-card iz-card--mcp" aria-labelledby="iz-modopts-title">
				<header class="iz-card__header">
					<h2 class="iz-card__title" id="iz-modopts-title">{{ L_MOD_OPTIONS }}</h2>
				</header>

				<div class="iz-card__body">
					<form method="post" id="mcp_modopts" class="iz-form" action="{{ U_MCP_ACTION }}">
						<div class="iz-field">
							<label class="iz-label" for="mcp_action">{{ L_MOD_OPTIONS }}{{ L_COLON }}</label>
							<div class="iz-field__row iz-field__row--actions">
								<select class="iz-select" name="action" id="mcp_action">
									{% if S_CAN_LOCK_POST %}
										{% if S_POST_LOCKED %}
											<option value="unlock_post">{{ L_UNLOCK_POST }}&nbsp;&#91;{{ L_UNLOCK_POST_EXPLAIN }}&#93;</option>
										{% else %}
											<option value="lock_post">{{ L_LOCK_POST }}&nbsp;&#91;{{ L_LOCK_POST_EXPLAIN }}&#93;</option>
										{% endif %}
									{% endif %}
									{% if S_CAN_DELETE_POST %}<option value="delete_post">{{ L_DELETE_POST }}</option>{% endif %}
								</select>

								<button class="iz-btn iz-btn--primary" type="submit" value="{{ L_SUBMIT }}">{{ L_SUBMIT }}</button>
							</div>
						</div>

						{{ S_FORM_TOKEN }}
					</form>
				</div>
			</section>
		{% endif %}
	{% endif %}


	{% if S_MCP_QUEUE or S_MCP_REPORT or RETURN_TOPIC %}
		<p class="iz-meta">
			{% if S_MCP_QUEUE %}
				{{ RETURN_QUEUE }}&nbsp;&#124;&nbsp;{{ RETURN_TOPIC_SIMPLE }}&nbsp;&#124;&nbsp;{{ RETURN_POST }}
			{% elseif S_MCP_REPORT %}
				{{ RETURN_REPORTS }}
				{% if not S_PM %}
					&nbsp;&#124;&nbsp;<a class="iz-link" href="{{ U_VIEW_POST }}">{{ L_VIEW_POST }}</a>
					&nbsp;&#124;&nbsp;<a class="iz-link" href="{{ U_VIEW_TOPIC }}">{{ L_VIEW_TOPIC }}</a>
					&nbsp;&#124;&nbsp;<a class="iz-link" href="{{ U_VIEW_FORUM }}">{{ L_VIEW_FORUM }}</a>
				{% endif %}
			{% else %}
				{{ RETURN_TOPIC }}
			{% endif %}
		</p>
	{% endif %}


	{% if not S_MCP_QUEUE %}

		{% if S_SHOW_USER_NOTES %}
			<section class="iz-card iz-card--mcp" id="usernotes" aria-labelledby="iz-usernotes-title">
				<header class="iz-card__header">
					<h2 class="iz-card__title" id="iz-usernotes-title">{{ L_FEEDBACK }}</h2>
				</header>

				<div class="iz-card__body">
					<form method="post" id="mcp_notes" class="iz-form" action="{{ U_POST_ACTION }}">
						{% if S_USER_NOTES %}
							<div class="iz-prose">
								{% for usernotes in usernotes %}
									<p class="iz-meta">
										<strong>{{ L_REPORTED_BY }}{{ L_COLON }}&nbsp;{{ usernotes.REPORT_BY }}&nbsp;&laquo;&nbsp;<time>{{ usernotes.REPORT_AT }}</time></strong>
										{% if S_CLEAR_ALLOWED %}
											&nbsp;
											<label class="iz-choice" for="note_{{ usernotes.ID }}">
												<input class="iz-choice__input" type="checkbox" id="note_{{ usernotes.ID }}" name="marknote[]" value="{{ usernotes.ID }}" />
												<span class="iz-choice__label">{{ L_MARK }}</span>
											</label>
										{% endif %}
									</p>

									<div class="iz-prose">{{ usernotes.ACTION }}</div>
									<hr class="iz-hr" />
								{% endfor %}
							</div>

							{% if S_CLEAR_ALLOWED %}
								<fieldset class="iz-actions iz-actions--inline">
									<button class="iz-btn iz-btn--danger" type="submit" name="action[del_all]" value="{{ L_DELETE_ALL }}">{{ L_DELETE_ALL }}</button>
									<button class="iz-btn iz-btn--danger" type="submit" name="action[del_marked]" value="{{ L_DELETE_MARKED }}">{{ L_DELETE_MARKED }}</button>
								</fieldset>
							{% endif %}
						{% endif %}

						<h3 class="iz-h3">{{ L_ADD_FEEDBACK }}</h3>
						<p class="iz-help">{{ L_ADD_FEEDBACK_EXPLAIN }}</p>

						<div class="iz-field">
							<label class="iz-label" for="usernote">{{ L_ADD_FEEDBACK }}{{ L_COLON }}</label>
							<textarea class="iz-textarea" name="usernote" id="usernote" rows="4"></textarea>
						</div>

						<fieldset class="iz-actions iz-actions--inline">
							<button class="iz-btn iz-btn--primary" type="submit" name="action[add_feedback]" value="{{ L_SUBMIT }}">{{ L_SUBMIT }}</button>
							<button class="iz-btn iz-btn--secondary" type="reset" value="{{ L_RESET }}">{{ L_RESET }}</button>
							{{ S_FORM_TOKEN }}
						</fieldset>
					</form>
				</div>
			</section>
		{% endif %}


		{% if S_SHOW_REPORTS %}
			<section class="iz-card iz-card--mcp" id="reports" aria-labelledby="iz-reports-title">
				<header class="iz-card__header">
					<h2 class="iz-card__title" id="iz-reports-title">{{ L_MCP_POST_REPORTS }}</h2>
				</header>

				<div class="iz-card__body">
					<div class="iz-prose">
						{% for reports in reports %}
							<p class="iz-meta">
								<strong>
									{{ L_REPORTED_BY }}{{ L_COLON }}&nbsp;
									{% if reports.U_REPORTER %}<a class="iz-link" href="{{ reports.U_REPORTER }}">{{ reports.REPORTER }}</a>{% else %}{{ reports.REPORTER }}{% endif %}
									&nbsp;&laquo;&nbsp;<time>{{ reports.REPORT_TIME }}</time>
								</strong>
							</p>
							<p class="iz-help">
								{{ reports.REASON_TITLE }}{{ L_COLON }}&nbsp;{{ reports.REASON_DESC }}
								{% if reports.REPORT_TEXT %}<br />{{ reports.REPORT_TEXT }}{% endif %}
							</p>
							<hr class="iz-hr" />
						{% endfor %}
					</div>
				</div>
			</section>
		{% endif %}


		{% if S_CAN_VIEWIP and not S_MCP_REPORT %}
			<section class="iz-card iz-card--mcp" id="ip" aria-labelledby="iz-ip-title">
				<header class="iz-card__header">
					<h2 class="iz-card__title" id="iz-ip-title">{{ L_IP }}</h2>
				</header>

				<div class="iz-card__body">
					<p class="iz-meta">
						{{ L_THIS_POST_IP }}{{ L_COLON }}&nbsp;
						{% if U_WHOIS %}
							<a class="iz-link" href="{{ U_WHOIS }}">{% if POST_IPADDR %}{{ POST_IPADDR }}{% else %}{{ POST_IP }}{% endif %}</a>&nbsp;&#40;
							{% if POST_IPADDR %}{{ POST_IP }}{% else %}<a class="iz-link iz-link--muted" href="{{ U_LOOKUP_IP }}">{{ L_LOOKUP_IP }}</a>{% endif %}
							&#41;
						{% else %}
							{% if POST_IPADDR %}{{ POST_IPADDR }}&nbsp;&#40;{{ POST_IP }}&#41;{% else %}{{ POST_IP }}{% if U_LOOKUP_IP %}&nbsp;&#40;<a class="iz-link iz-link--muted" href="{{ U_LOOKUP_IP }}">{{ L_LOOKUP_IP }}</a>&#41;{% endif %}{% endif %}
						{% endif %}
					</p>

					<section class="iz-card iz-card--subtle" aria-labelledby="iz-other-users-title">
						<header class="iz-card__header">
							<h3 class="iz-card__title" id="iz-other-users-title">{{ L_USERS }}</h3>
						</header>

						<div class="iz-card__body">
							<div class="iz-table" role="region" aria-label="{{ L_USERS }}">
								<table class="iz-table__table">
									<thead class="iz-table__head">
										<tr class="iz-table__row">
											<th scope="col" class="iz-table__th iz-table__th--grow">{{ L_OTHER_USERS }}</th>
											<th scope="col" class="iz-table__th">{{ L_POSTS }}</th>
										</tr>
									</thead>

									<tbody class="iz-table__body">
										{% for userrow in userrow %}
										<tr class="iz-table__row">
											<td class="iz-table__td">
												{% if userrow.U_PROFILE %}
													<a class="iz-link" href="{{ userrow.U_PROFILE }}">{{ userrow.USERNAME }}</a>
												{% else %}
													{{ userrow.USERNAME }}
												{% endif %}
											</td>
											<td class="iz-table__td">
												<a class="iz-link" href="{{ userrow.U_SEARCHPOSTS }}" title="{{ L_SEARCH_POSTS_BY }} {{ userrow.USERNAME }}">
													{{ userrow.NUM_POSTS }}&nbsp;{{ L_SEARCH_POSTS_BY }}&nbsp;{{ userrow.USERNAME }}
												</a>
											</td>
										</tr>
										<!-- BEGINELSE -->
										<tr class="iz-table__row">
											<td class="iz-table__td" colspan="2">{{ L_NO_MATCHES_FOUND }}</td>
										</tr>
										{% endfor %}
									</tbody>
								</table>
							</div>

							<nav class="iz-pagination" aria-label="{{ L_PAGINATION }}">
								{% include 'pagination.html' %}
							</nav>
						</div>
					</section>

					<section class="iz-card iz-card--subtle" aria-labelledby="iz-ip-list-title">
						<header class="iz-card__header">
							<h3 class="iz-card__title" id="iz-ip-list-title">{{ L_IP }}</h3>
						</header>

						<div class="iz-card__body">
							<div class="iz-table" role="region" aria-label="{{ L_IP }}">
								<table class="iz-table__table">
									<thead class="iz-table__head">
										<tr class="iz-table__row">
											<th scope="col" class="iz-table__th iz-table__th--grow">{{ L_IPS_POSTED_FROM }}</th>
											<th scope="col" class="iz-table__th">{{ L_POSTS }}</th>
										</tr>
									</thead>

									<tbody class="iz-table__body">
										{% for iprow in iprow %}
										<tr class="iz-table__row">
											<td class="iz-table__td">
												{% if iprow.HOSTNAME %}
													<a class="iz-link" href="{{ iprow.U_WHOIS }}">{{ iprow.HOSTNAME }}</a>&nbsp;&#40;{{ iprow.IP }}&#41;
												{% else %}
													<a class="iz-link" href="{{ iprow.U_WHOIS }}">{{ iprow.IP }}</a>&nbsp;&#40;<a class="iz-link iz-link--muted" href="{{ iprow.U_LOOKUP_IP }}">{{ L_LOOKUP_IP }}</a>&#41;
												{% endif %}
											</td>
											<td class="iz-table__td">{{ iprow.NUM_POSTS }}</td>
										</tr>
										<!-- BEGINELSE -->
										<tr class="iz-table__row">
											<td class="iz-table__td" colspan="2">{{ L_NO_MATCHES_FOUND }}</td>
										</tr>
										{% endfor %}
									</tbody>

									<tfoot class="iz-table__foot">
										<tr class="iz-table__row">
											<td class="iz-table__td" colspan="2">
												{% if U_LOOKUP_ALL %}
													<a class="iz-link iz-link--muted" href="{{ U_LOOKUP_ALL }}#ip">{{ L_LOOKUP_ALL }}</a>
												{% endif %}

												<nav class="iz-pagination iz-pagination--compact" aria-label="{{ L_PAGINATION }}">
													<ul class="iz-pagination__list">
														{% for pagination_ips in pagination_ips %}
															{% if pagination_ips.S_IS_PREV %}
																<li class="iz-pagination__item"><a class="iz-pagination__link" href="{{ pagination_ips.PAGE_URL }}" rel="prev">{{ L_PREVIOUS }}</a></li>
															{% elseif pagination_ips.S_IS_CURRENT %}
																<li class="iz-pagination__item"><span class="iz-pagination__current" aria-current="page">{{ pagination_ips.PAGE_NUMBER }}</span></li>
															{% elseif pagination_ips.S_IS_ELLIPSIS %}
																<li class="iz-pagination__item iz-pagination__item--ellipsis">{{ L_ELLIPSIS }}</li>
															{% elseif pagination_ips.S_IS_NEXT %}
																<li class="iz-pagination__item"><a class="iz-pagination__link" href="{{ pagination_ips.PAGE_URL }}" rel="next">{{ L_NEXT }}</a></li>
															{% else %}
																<li class="iz-pagination__item"><a class="iz-pagination__link" href="{{ pagination_ips.PAGE_URL }}">{{ pagination_ips.PAGE_NUMBER }}</a></li>
															{% endif %}
														{% endfor %}
													</ul>
												</nav>
											</td>
										</tr>
									</tfoot>
								</table>
							</div>
						</div>
					</section>
				</div>
			</section>
		{% endif %}

	{% endif %}


	{% if S_TOPIC_REVIEW %}{% include 'posting_topic_review.html' %}{% endif %}

	<script>
	(function () {
		'use strict';

		function toggleTopicReview(e) {
			var trigger = e.currentTarget;
			var root = trigger.closest('.iz-card') || document;
			var review = root.querySelector('.topicreview');
			if (!review) return;

			e.preventDefault();

			var isExpanded = review.classList.toggle('topicreview-expand');
			trigger.setAttribute('aria-expanded', isExpanded ? 'true' : 'false');

			var swap = trigger.getAttribute('data-text-swap') || '';
			var original = trigger.getAttribute('data-text-original') || '';
			var current = trigger.textContent || '';

			trigger.textContent = (current == swap) ? original : swap;
		}

		document.addEventListener('DOMContentLoaded', function () {
			var trigger = document.querySelector('.topicreview-trigger');
			if (trigger) trigger.addEventListener('click', toggleTopicReview);
		});
	})();
	</script>

</div>

{% include 'mcp_footer.html' %}
