Tweak the display of explicitly added documents some more.

- Legacy-Id: 4530
This commit is contained in:
Henrik Levkowetz 2012-06-27 10:22:01 +00:00
parent 239cd5d66d
commit fdb18755a7
2 changed files with 6 additions and 1 deletions

View file

@ -197,7 +197,12 @@ class Document(DocumentInfo):
name = a[0].name
elif self.type_id == "charter":
return "charter-ietf-%s" % self.chartered_group.acronym
return name
def display_name(self):
name = self.canonical_name()
if name.startswith('rfc'):
name = name.upper()
return name
class RelatedDocHistory(models.Model):

View file

@ -40,7 +40,7 @@ In order to add some individual documents to your list you have to:
<tr><th>Name</th><th>State</th><th>Title</th><th>Remove from list</th></tr>
{% for doc in cl.added_ids.all %}
<tr class="{% cycle oddrow,evenrow %}">
<td>{{ doc }}</td>
<td>{{ doc.display_name }}</td>
<td>{{ doc.get_state }}</td>
<td><a href="{{ doc.get_absolute_url }}"</a>{{ doc.title }}</td>
<td><a href="{% url community_remove_document cl.pk doc.pk %}">Remove</a></td>