0001-WIP-add-additional-read-only-information-in-main-tab.patch
fargo/fargo/tables.py | ||
---|---|---|
7 | 7 | |
8 | 8 |
class DocumentTable(tables.Table): |
9 | 9 |
'''Display the list of documents of the user''' |
10 |
filename = tables.Column(verbose_name=_('filename').title())
|
|
10 |
title = tables.Column(verbose_name=_('title').title())
|
|
11 | 11 |
size = tables.TemplateColumn(template_code='{{ record.document.content.size|filesizeformat }}', |
12 | 12 |
orderable=False, |
13 | 13 |
verbose_name=_('size').title()) |
... | ... | |
15 | 15 | |
16 | 16 |
class Meta: |
17 | 17 |
model = models.Document |
18 |
fields = ('filename', 'size', 'created')
|
|
18 |
fields = ('title', 'size', 'created')
|
|
19 | 19 |
empty_text = _('You currently have no documents') |
fargo/templates/fargo/table.html | ||
---|---|---|
28 | 28 |
<td {{ column.attrs.td.as_html }}>{% if column.localize == None %}{{ cell }}{% else %}{% if column.localize %}{{ cell|localize }}{% else %}{{ cell|unlocalize }}{% endif %}{% endif %}</td> |
29 | 29 |
{% endfor %} |
30 | 30 |
{% with url=row.record.get_thumbnail_url %} |
31 |
<td class="thumbnail">{% if url %}<img src="{{ url }}"/>{% endif %}</td> |
|
31 |
<td class="thumbnail" rowspan=2>{% if url %}<img src="{{ url }}"/>{% endif %}</td>
|
|
32 | 32 |
{% endwith %} |
33 |
<td class="action-column"> |
|
33 |
<td class="action-column" rowspan=2>
|
|
34 | 34 |
{% block action-column %} |
35 | 35 |
{% if include_edit_link %} |
36 | 36 |
<a class="icon-edit" rel="popup" href="{% url 'edit' pk=row.record.pk %}"></a> |
... | ... | |
44 | 44 |
{% endblock %} |
45 | 45 |
</td> |
46 | 46 |
</tr> |
47 |
<tr class="{{ forloop.counter|divisibleby:2|yesno:"even,odd" }} {{row.record.css_classes}}"> |
|
48 |
<td class="description" colspan=3> |
|
49 |
{{row.record.description}} |
|
50 |
({% trans "filename: " %}{{row.record.filename}} ; {% trans "valid until: " %}{{row.record.expiration_date}}) |
|
51 |
</td> |
|
52 |
</tr> |
|
47 | 53 |
{% endblock table.tbody.row %} |
48 | 54 | |
49 | 55 |
{% block pagination.cardinality %} |
50 |
- |