comments.tpl 2.04 KB
Newer Older
1
<hr role="presentation" id="comments" class="hidden-print"/>
2
<form action="#comments" method="POST">
3

4
    {* Comment list *}
5

6
    {if $comments|count > 0}
7
        <h3>{__('Comments', 'Comments of polled people')}</h3>
8
9
        {foreach $comments as $comment}
            <div class="comment">
Olivier PEREZ's avatar
Olivier PEREZ committed
10
                {if $admin && !$expired}
11
                    <button type="submit" name="delete_comment" value="{$comment->id|html}" class="btn btn-link" title="{__('Comments', 'Remove the comment')}"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">{__('Generic', 'Remove')}</span></button>
12
                {/if}
Antonin's avatar
Antonin committed
13
                <span class="comment_date">{$comment->date|date_format:$date_format['txt_datetime_short']}</span>
14
                <b>{$comment->name|html}</b>&nbsp;
15
                <span class="comment">{$comment->comment|escape|nl2br}</span>
16
17
18
            </div>
        {/foreach}
    {/if}
19

20
    {* Add comment form *}
Olivier PEREZ's avatar
Olivier PEREZ committed
21
    {if $active && !$expired}
Olivier PEREZ's avatar
Olivier PEREZ committed
22
        <div class="hidden-print jumbotron">
23
            <div class="col-md-6 col-md-offset-3">
24
                <fieldset id="add-comment"><legend>{__('Comments', 'Add a comment to the poll')}</legend>
25
                    <div class="form-group">
26
27
                        <label for="comment_name" class="control-label">{__('Generic', 'Your name')}</label>
                        <input type="text" name="name" id="comment_name" class="form-control" />
28
29
                    </div>
                    <div class="form-group">
30
                        <label for="comment" class="control-label">{__('Comments', 'Your comment')}</label>
31
32
33
                        <textarea name="comment" id="comment" class="form-control" rows="2" cols="40"></textarea>
                    </div>
                    <div class="pull-right">
34
                        <input type="submit" name="add_comment" value="{__('Comments', 'Send the comment')}" class="btn btn-success">
35
36
37
38
                    </div>
                </fieldset>
            </div>
            <div class="clearfix"></div>
39
        </div>
40
41
    {/if}
</form>