review/templates/pieces/comment.html @ 802d01307f77

web: add a bit of context for colorboxes
author Steve Losh <steve@stevelosh.com>
date Fri, 18 Jun 2010 21:12:56 -0400
parents 78d9f73badd9
children 63bcbedb9341
<div class="comment group" id="comment-{{ comment.identifier }}">
    <a href="#comment-{{ comment.identifier }}" rel="comments" class="expand" id="comment-expand-{{ comment.identifier }}">&rarr;</a>
    <script type="text/javascript">
        $(function() {
            $("#comment-expand-{{ comment.identifier }}").colorbox({inline: true, href: "#comment-{{ comment.identifier }}-colorboxed"});
        });
    </script>

    <div class="avatar">
        <img src="{{ utils['item_gravatar'](comment, 30) }}" />
    </div>
    <div>
        <div class="author">
            <a href="mailto:{{ utils['email'](comment.author) }}">{{ utils['templatefilters'].person(comment.author) }}</a>
            said:
        </div>
        <div class="message">{{ comment.message }}</div>
    </div>

    <div id="comment-{{ comment.identifier }}-colorboxed" class="colorboxed">
        <div class="avatar">
            <img src="{{ utils['item_gravatar'](comment, 30) }}" />
        </div>
        <div>
            <div class="author">
                <a href="mailto:{{ utils['email'](comment.author) }}">{{ utils['templatefilters'].person(comment.author) }}</a>
                said:
            </div>
            <div class="context">
                {% if comment.filename %}
                    <div class="context-head">on {{ comment.filename }}</div>
                {% else %}
                    <div class="context-head">on changeset {{ rev.rev() }}:{{ utils['node_short'](rev.node()) }}</div>
                {% endif %}
            </div>
            <div class="message">{{ comment.message }}</div>
        </div>
    </div>
</div>