File: comment.tt

package info (click to toggle)
libmojomojo-perl 1.01%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,272 kB
  • ctags: 879
  • sloc: perl: 14,055; sh: 145; xml: 120; ruby: 6; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[% IF c.action.reverse == 'pageadmin/edit' || c.action.reverse == 'jsrpc/render' %]
    [[% loc('comments disabled for preview') %]]
[% ELSE %]
    [% IF c.action.reverse != 'page/search' %]
        [% IF comments.count %]
<h4>[%comments.count%] [% IF comments.count == 1; loc('Comment'); ELSE; loc('Comments'); END %]</h4>
            [% WHILE ( comment = comments.next ) %]
<div class="comment">
    <dl>
        <dt>[% loc('poster') %]</dt>
        <dd><a href="[%comment.poster.link%]">[%comment.poster.name%]</a></dd>
        <dt>[% loc('posted') %]</dt>
        <dd>[% comment.posted.ymd %] [% comment.posted.hms %]</dd>
        <dt>
            [% loc('comment') %]:
            [% IF user.can_edit(page.path) %]
            [<b class="remove"><a href="[% c.uri_for('comment','remove',comment.id) %]">&times;</a></b>]
            [% END %]
        </dt>
        <dd>[% comment.formatted %]</dd>
    </dl>
</div>
            [% END # WHILE %]
        [% ELSE # comments.count %]
<h4>[%loc('No Comments posted')%]</h4>
        [% END # comments.count %]
<p><small><a href="#" class="toggleInfo" id="commentlink">[% loc('add a comment') %]</a></small></p>
<div id="hidden_info"  class="framedpopup">
        [% IF user %]
            [% PROCESS comment/post.tt %]
        [% ELSE %]
            [% PROCESS comment/login.tt %]
        [% END %]
</div>
    [% END %]
[% END %]