More a11y: dialogs on book page
[wolnelektury.git] / src / chunks / models.py
index 768e7ea..7bca1e2 100644 (file)
@@ -1,5 +1,5 @@
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
 #
 from django.conf import settings
 from django.core.cache import cache
@@ -69,9 +69,13 @@ class MenuItem(models.Model):
     class Meta:
         ordering = ('order',)
 
+    @property
+    def is_separator(self):
+        return self.name == '-'
+
     @property
     def final_name(self):
-        if self.name == '-':
+        if self.is_separator:
             return mark_safe('<hr>')
         if self.name:
             return self.name