PageRenderTime 27ms CodeModel.GetById 15ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/modules/mod_logging/templates/_admin_log_email_row.tpl

http://github.com/zotonic/zotonic
Smarty Template | 88 lines | 88 code | 0 blank | 0 comment | 7 complexity | 0dc27f16b949ba62ac36a47ed6466a25 MD5 | raw file
 1<tr class="{% if result_row.severity <= 1 %}log-error{% endif %}{% if result_row.severity == 2 %}log-warning{% endif %}" >
 2    {#
 3        Severity
 4    #}
 5    <td>
 6        {% with ["Fatal", "Error", "Warning", "Info", "Debug"] as levels %}
 7            {% with levels[result_row.severity|format_integer + 1] as level %}
 8                <a href="{% url admin_log_email severity=result_row.severity %}" title="{{ level }}">{{ level }}</a>
 9            {% endwith %}
10        {% endwith %}
11    </td>
12    {#
13        Status
14    #}
15    <td>
16        <a href="{% url admin_log_email severity=q.severity status=result_row.mailer_status %}" title="{{ result_row.mailer_message|make_list|escape }} [{{ result_row.mailer_host|escape }}]">
17            {{ result_row.mailer_status|escape }}
18        </a>
19    </td>
20    {#
21        Message nr
22    #}
23    <td>
24        <a href="{% url admin_log_email severity=4 message_nr=result_row.message_nr %}" title="{{ result_row.message_nr }}">
25            {{ result_row.message_nr|truncate:12|escape }}
26        </a>
27    </td>
28    {#
29        To
30    #}
31    <td>
32        {% if id.to_id %}
33            <a href="{% url admin_log_email severity=4 to=result_row.to_id %}" title="{{result_row.to_id|escape}}">{{ result_row.to_id }}</a> / 
34            <a href="{% url admin_log_email severity=4 to=result_row.envelop_to %}" title="{{result_row.envelop_to|escape}}">
35                {{ result_row.envelop_to|truncate:10|escape }}
36            </a>
37        {% else %}
38            <a href="{% url admin_log_email severity=4 to=result_row.envelop_to %}" title="{{result_row.envelop_to|escape}}">
39                {{ result_row.envelop_to|truncate:20|escape|default:"-" }}
40            </a>
41        {% endif %}
42    </td>
43    {#
44        From
45    #}
46    <td>
47        {% if result_row.from_id %}
48            <a href="{% url admin_log_email severity=4 from=result_row.from_id %}" title="{{result_row.from_id|escape}}">{{ result_row.from_id }}</a> /
49            <a href="{% url admin_log_email severity=4 from=result_row.envelop_from %}" title="{{result_row.envelop_from|escape}}">
50                {{ result_row.envelop_from|truncate:10|escape }}
51            </a>
52        {% else %}
53            <a href="{% url admin_log_email severity=4 from=result_row.envelop_from %}" title="{{result_row.envelop_from|escape}}">
54                {{ result_row.envelop_from|truncate:20|escape|default:"-" }}
55            </a>
56        {% endif %}
57    </td>
58    {#
59        Content
60    #}
61    <td>
62        <a href="{% url admin_log_email severity=4 content=result_row.content_id %}" title="{{ result_row.content_id|default:"-" }}">
63            {{ result_row.content_id|default:"-" }}
64        </a>
65    </td>
66    {#
67        Other
68    #}
69    <td>
70        <a href="{% url admin_log_email severity=4 other=result_row.other_id %}" title="{{ result_row.other_id|default:"-" }}">
71            {{ result_row.other_id|default:"-" }}
72        </a>
73    </td>
74    {#
75        Template
76    #}
77    <td>
78        <a href="{% url admin_log_email severity=4 template=result_row.message_template %}" title="{{ result_row.message_template|default:"-" }}">
79            {{ result_row.message_template|default:"-" }}
80        </a>
81    </td>
82    {#
83        Date
84    #}
85    <td>
86        {{ result_row.created|date:"Y-m-d H:i:s" }}
87    </td>
88</tr>