#237 translate the related type
This commit is contained in:
parent
e8e664b92e
commit
b9f783e9f1
@ -50,6 +50,15 @@ class Item(MPTTModel, SlideMixin):
|
||||
def get_releated_type(self):
|
||||
return self.get_releated_slide().prefix
|
||||
|
||||
def print_releated_type(self):
|
||||
"""
|
||||
Print the type of the releated item.
|
||||
|
||||
For use in Template
|
||||
??Why does {% trans item.print_releated_type|capfirst %} not work??
|
||||
"""
|
||||
return _(self.get_releated_type().capitalize())
|
||||
|
||||
def get_title(self):
|
||||
if self.releated_sid is None:
|
||||
return self.title
|
||||
|
@ -20,7 +20,7 @@
|
||||
{% endif %}
|
||||
<a href="{{ item.get_absolute_url }}">{{ item }}</a>
|
||||
{% if item.releated_sid %}
|
||||
({{ item.get_releated_type }})
|
||||
({{ item.print_releated_type }})
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if perms.agenda.can_manage_agenda %}
|
||||
|
Loading…
Reference in New Issue
Block a user