zulip/zephyr/jstemplates/zephyr.html

66 lines
2.4 KiB
HTML
Raw Normal View History

{{! Client-side Mustache template for rendering zephyrs.}}
{{! Because we use table-layout: fixed for the Zephyr table,
all the column widths are computed from the first row;
these CSS classes specify the widths for that first,
collapsed row. (Otherwise, colspan breaks everything).}}
{{#include_layout_row}}
<tr style="visibility: collapse;" class="ztable_layout_row">
<td class="ztable_col1" />
<td class="ztable_col2" />
<td class="ztable_col3" />
</tr>
{{/include_layout_row}}
{{#each zephyrs}}
{{#with this}}
{{#include_bookend}}
<tr><td /><td /><td class="bookend" /></tr>
{{/include_bookend}}
{{#include_recipient}}
{{#if is_class}}
<tr class="recipient_row">
<td colspan="2"
class="message_label_clickable message_newstyle_class"
onclick="select_message_by_id({{id}}); narrow_class();"
title="{{display_recipient}}">{{display_recipient}}</td>
<td class="message_label_clickable message_newstyle_instance"
onclick="select_message_by_id({{id}}); narrow_instance();"
title="{{instance}}">{{instance}}</td>
</tr>
{{else}}
<tr class="recipient_row">
<td colspan="3" class="message_label_clickable message_newstyle_pm"
onclick="select_message_by_id({{id}}); narrow_by_recipient();"
title="Huddle with {{display_reply_to}}">Huddle with {{display_reply_to}}</td>
</tr>
{{/if}}
{{/include_recipient}}
<tr zid="{{id}}" id="{{dom_id}}"
class="zephyr_row{{^is_class}} personal-message{{/is_class}}"
onclick="select_message_by_id({{id}});">
<td class="message_picture">
{{#include_sender}}
<img class="img-rounded profile_picture"
src="https://secure.gravatar.com/avatar/{{gravatar_hash}}?d=identicon&s=30"/>
{{/include_sender}}
</td>
<td class="pointer"><p></p></td>
<td class="messagebox{{^include_sender}} prev_is_same_sender{{/include_sender}}{{^is_class}} personal-message{{/is_class}}"
onmousedown="zephyr_mousedown();" onmousemove="zephyr_mousemove();">
{{#include_sender}}
<span class="zephyr_sender"
onmouseover="show_email({{id}});"
onmouseout="hide_email();">
<span class="sender_name">{{sender_name}}</span>
<span class="sender_email invisible">{{sender_email}}</span>
</span>
{{/include_sender}}
<span class="zephyr_time" title="{{full_date_str}}">{{{timestr}}}</span>
<div class="message_content">{{{content}}}</div>
</td>
</tr>
{{/with}}
{{/each}}