Groups: Add admin-placeable alerts

This commit is contained in:
Maxim Leshchenko 2022-04-14 12:29:07 +02:00
parent 4b0740316d
commit 99344c5497
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
4 changed files with 17 additions and 0 deletions

View file

@ -346,6 +346,11 @@ class Club extends RowModel
{
return $this->getRecord()->website;
}
function getAlert(): ?string
{
return $this->getRecord()->alert;
}
use Traits\TSubscribable;
}

View file

@ -14,6 +14,8 @@
{block content}
<div class="left_big_block">
<div n:if="!is_null($alert = $club->getAlert())" class="group-alert">{strpos($alert, "@") === 0 ? tr(substr($alert, 1)) : $alert}</div>
<div class="content_title_expanded" onclick="hidePanel(this);">
{_"information"}
</div>

View file

@ -1648,6 +1648,15 @@ body.scrolled .toTop:hover {
color: #58462a;
}
.group-alert {
margin-bottom: 8px;
padding: 4px;
border: 1px solid #c3a476;
font-weight: 900;
background-color: #f3ddbd;
color: #58462a;
}
.knowledgeBaseArticle {
margin-top: -11px;
/* this is very stupid fix but nah */

View file

@ -0,0 +1 @@
ALTER TABLE `groups` ADD `alert` TEXT NULL DEFAULT NULL;