PageRenderTime 14ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_comment/templates/admin_comments.tpl

https://code.google.com/p/zotonic/
Smarty Template | 55 lines | 48 code | 7 blank | 0 comment | 4 complexity | 5a9a659a8bfdafafbc6db401971f96cf MD5 | raw file
 1{% extends "admin_base.tpl" %}
 2
 3{% block title %}
 4{_ Recent Comments _}
 5{% endblock %}
 6
 7{% block content %}
 8	<div id="content" class="zp-85">
 9		<div class="block clearfix">
10
11			<h2>{_ Comments _}</h2>
12
13			<h3 class="above-list">{_ Recent comments _}</h3>
14			<ul class="short-list">
15				<li class="headers clearfix">
16					<span class="zp-15">{_ Added on _}</span>
17					<span class="zp-15">{_ Page _}</span>
18					<span class="zp-25">{_ Message _}</span>
19					<span class="zp-15">{_ Name _}</span>
20					<span class="zp-15">{_ Email _}</span>
21					<span class="zp-15">{_ Options _}</span>
22				</li>
23			{% with m.search.paged[{recent_comments page=q.page}] as result %}
24				{% for comment in result %}
25					{% with comment.id as id %}
26					<li {% if not comment.is_visible %}class="unpublished" {% endif %}>
27						<a id="{{ #comment.id }}" href="{{ m.rsc[comment.rsc_id].page_url }}#comment-{{ id }}" class="clearfix">
28							<span class="zp-15">{{ comment.created|date:"d M Y, H:i" }}</span>
29							<span class="zp-15">{{ m.rsc[comment.rsc_id].title|truncate:20 }}</span>
30							<span class="zp-25">{{ comment.message|striptags|truncate:40 }}</span>
31							{% if comment.user_id %}
32								<span class="zp-30">{{ m.rsc[comment.user_id].title }} [#{{ comment.user_id }}]</span>
33							{% else %}
34								<span class="zp-15">{{ comment.name|truncate:20 }}</span>
35								<span class="zp-15" title="{{ comment.email|truncate }}">{{ comment.email|truncate:20|escape }}</span>
36							{% endif %}
37							<span class="zp-15">
38	                            {% button text=_"view" action={redirect location=[m.rsc[comment.rsc_id].page_url,"#comment-",id|format_integer]|join } %}
39								{% button text=_"delete" postback={comment_delete id=id on_success={slide_fade_out target=#comment.id}} %}
40							</span>
41						</a>
42					</li>
43					{% endwith %}
44				{% empty %}
45					<li>{_ There are no comments. _}</li>
46				{% endfor %}
47				</ul>
48			
49				{% pager result=result dispatch="admin_comments" qargs %}
50
51			{% endwith %}
52			
53		</div>
54	</div>
55{% endblock %}