-
{{ msg.text | nl2br }}
+
{{ msg.text | nl2br }}
-
@@ -34,31 +34,29 @@
diff --git a/resources/views/pages/messages/overview.twig b/resources/views/pages/messages/overview.twig
index 09cfdc7b..f11c9d94 100644
--- a/resources/views/pages/messages/overview.twig
+++ b/resources/views/pages/messages/overview.twig
@@ -36,7 +36,7 @@
{% for c in conversations %}
- {{ m.user(c.other_user, {'show_pronoun_if_configured': true, 'url': url('messages/' ~ c.other_user.id ~ '#newest')}) }}
+ {{ m.user(c.other_user, {'pronoun': true, 'url': url('messages/' ~ c.other_user.id ~ '#newest')}) }}
{% if c.unread_messages > 0 %}
{{ c.unread_messages }}
diff --git a/resources/views/pages/news/news.twig b/resources/views/pages/news/news.twig
index 3829b879..f604deaa 100644
--- a/resources/views/pages/news/news.twig
+++ b/resources/views/pages/news/news.twig
@@ -22,7 +22,7 @@
{{ m.icon('clock') }}
{{ comment.created_at.format(__('Y-m-d H:i')) }}
- {{ m.user(comment.user) }}
+ {{ m.user(comment.user, {'pronoun': true}) }}
{% if comment.user.id == user.id or has_permission_to('admin_news') or has_permission_to('comment.delete') %}
diff --git a/resources/views/pages/questions/overview.twig b/resources/views/pages/questions/overview.twig
index e9dcdab8..ecaf3dd3 100644
--- a/resources/views/pages/questions/overview.twig
+++ b/resources/views/pages/questions/overview.twig
@@ -44,7 +44,7 @@
{% if has_permission_to('question.edit') %}
- {{ m.user(question.user) }}
+ {{ m.user(question.user, {'pronoun': true}) }}
{% endif %}
@@ -78,7 +78,7 @@
{{ m.icon('clock') }} {{ question.updated_at.format(__('Y-m-d H:i')) }}
- {{ m.user(question.answerer) }}
+ {{ m.user(question.answerer, {'pronoun': true}) }}
diff --git a/src/Controllers/DesignController.php b/src/Controllers/DesignController.php
index d0420fd3..4df6e7a2 100644
--- a/src/Controllers/DesignController.php
+++ b/src/Controllers/DesignController.php
@@ -4,6 +4,7 @@ namespace Engelsystem\Controllers;
use Engelsystem\Config\Config;
use Engelsystem\Http\Response;
+use Engelsystem\Models\User\PersonalData;
use Engelsystem\Models\User\State;
use Engelsystem\Models\User\User;
@@ -48,6 +49,9 @@ class DesignController extends BaseController
'user_id' => 1337,
'arrived' => false,
]));
+ $demoUser2->__set('personalData', (new PersonalData())->forceFill([
+ 'pronoun' => 'it/its',
+ ]));
$themes = $this->config->get('themes');
$data = [
diff --git a/tests/Unit/Controllers/MessagesControllerTest.php b/tests/Unit/Controllers/MessagesControllerTest.php
index 4c199723..81243b03 100644
--- a/tests/Unit/Controllers/MessagesControllerTest.php
+++ b/tests/Unit/Controllers/MessagesControllerTest.php
@@ -141,7 +141,7 @@ class MessagesControllerTest extends ControllerTest
$this->assertTrue($c['other_user'] instanceof User);
$this->assertTrue($c['latest_message'] instanceof Message);
- $this->assertEquals('string', gettype($c['unread_messages']));
+ $this->assertIsNumeric($c['unread_messages']);
$this->assertEquals('b', $c['other_user']->name);
$this->assertEquals('b>a', $c['latest_message']->text);
|