@@ -148,6 +148,7 @@ class Topic extends Page
$this->crumbs = $this->crumbs($topic);
$this->online = $this->c->Online->calc($this)->info();
$this->stats = null;
+ $this->showIpAddrs = $this->c->userRules->viewIP;
if (
$topic->canReply
@@ -216,6 +216,19 @@ class Post extends DataModel
);
}
+ /**
+ * Ссылка на страницу данных об ip
+ */
+ protected function getlinkGetHost(): string
+ {
+ return $this->c->Router->link(
+ 'AdminHost',
+ [
+ 'ip' => $this->poster_ip,
+ ]
+ );
+ }
+
/**
* HTML код сообщения
*/
@@ -28,7 +28,7 @@ msgid "Promote user title"
msgstr "Promote user"
msgid "IP address logged"
-msgstr "IP address logged"
+msgstr "IP<span> address</span>"
msgid "Note"
msgstr "Note:"
msgstr "Продвинуть пользователя"
-msgstr "IP адрес"
+msgstr "IP<span> адрес</span>"
msgstr "Замечание"
@@ -107,6 +107,9 @@
@if ($post->user->location)
<li class="f-location"><span class="f-psfont">{!! __(['From %s', $post->user->censorLocation]) !!}</span></li>
@endif
+ @if ($p->showIpAddrs)
+ <li class="f-poster-ip"><a href="{{ $post->linkGetHost }}" title="{{ $post->poster_ip }}"><span class="f-psfont">{!! __('IP address logged') !!}</span></a></li>
+ @endif
</ul>
</div>