zulip/zephyr/jstemplates/message.html
Keegan McAllister 9356c0ca95 Add a link for the actions popover next to the timestamp
Hopefully the text and link-like styling will make it more clear that this
feature exists.

The sender's name is still clickable, but loses the link-like styling since the
popover isn't about the sender.  The space between the sender's name and this
link is now active as well.

We also remove the sender's email address that was previously visible on hover.
It's not hard for the name + email + actions link + timestamp to be too long
for one line.  The email is still present in the popover.

(imported from commit 3a85f199c42102cac0d217543db0a539935e2914)
2013-02-11 13:59:18 -05:00

74 lines
3.2 KiB
HTML

{{! Client-side Mustache template for rendering messages.}}
{{! Because we use table-layout: fixed for the Message 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 class="ztable_layout_row">
<td class="ztable_col1" />
<td class="ztable_col2" />
<td class="ztable_col3" />
</tr>
{{/include_layout_row}}
{{#each messages}}
{{#with this}}
{{#include_bookend}}
<tr class="bookend_tr"><td /><td /><td class="bookend" /></tr>
{{/include_bookend}}
{{#include_recipient}}
{{#if is_stream}}
<tr zid="{{id}}" class="recipient_row">
<td colspan="2"
class="message_header message_header_stream left_part" style="background-color: {{background_color}};">
</td>
<td class="message_header message_header_stream right_part" style="background-color: {{background_color}};">
{{#if invite_only}}<i class="icon-lock" title="This is an invite-only stream"></i>{{/if}}
<span class="message_label_clickable narrows_by_recipient stream_label"
title="Narrow to stream &quot;{{display_recipient}}&quot;">{{display_recipient}}</span>
&nbsp; | &nbsp;
<span class="message_label_clickable narrows_by_subject"
title="Narrow to stream &quot;{{display_recipient}}&quot;, subject &quot;{{subject}}&quot;">{{subject}}</span>
</td>
</tr>
{{else}}
<tr zid="{{id}}" class="recipient_row">
<td colspan="2"
class="message_header message_header_private_message left_part">
</td>
<td class="message_label_clickable narrows_by_recipient message_header message_header_private_message right_part"
title="Narrow to your private messages with {{display_reply_to}}">You and {{display_reply_to}}</td>
</tr>
{{/if}}
{{/include_recipient}}
<tr zid="{{id}}" id="{{dom_id}}"
class="message_row{{^is_stream}} private-message{{/is_stream}}{{#include_sender}} include-sender{{/include_sender}}">
<td class="message_picture">
{{#include_sender}}
<img class="img-rounded profile_picture actions_hover"
src="https://secure.gravatar.com/avatar/{{gravatar_hash}}?d=identicon&s=30?stamp={{stamp}}"/>
{{/include_sender}}
</td>
<td class="pointer"><p></p></td>
<td class="messagebox{{^include_sender}} prev_is_same_sender{{/include_sender}}{{^is_stream}} private-message{{/is_stream}}">
<div class="message_top_line actions_hover">
{{#include_sender}}
<span class="message_sender">
<img class="inline_profile_picture message_body_gravatar img-rounded" src="https://secure.gravatar.com/avatar/{{gravatar_hash}}?d=identicon&s=30?stamp={{stamp}}"/>
<span class="sender_name">{{sender_full_name}}</span>
</span>
{{/include_sender}}
<div class="message_right">
{{! If include_sender is not set, we will never show this link anyway. }}
{{#include_sender}}<span class="actions_link">&laquo; Info</span>{{/include_sender}}
<span class="message_time">{{{timestr}}}</span>
</div>
</div>
<div class="message_content">{{{content}}}</div>
</td>
</tr>
{{/with}}
{{/each}}