Add poster ip address display
This commit is contained in:
parent
9981a68a7e
commit
fedc6be825
5 changed files with 19 additions and 2 deletions
|
@ -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:"
|
||||
|
|
|
@ -28,7 +28,7 @@ msgid "Promote user title"
|
|||
msgstr "Продвинуть пользователя"
|
||||
|
||||
msgid "IP address logged"
|
||||
msgstr "IP адрес"
|
||||
msgstr "IP<span> адрес</span>"
|
||||
|
||||
msgid "Note"
|
||||
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>
|
||||
@endif
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue