2012-10-10 16:29:48 +02:00
|
|
|
{{! Client-side Mustache template for rendering messages.}}
|
2012-10-02 20:47:01 +02:00
|
|
|
|
2012-10-10 16:37:15 +02:00
|
|
|
{{! Because we use table-layout: fixed for the Message table,
|
2012-10-02 20:47:01 +02:00
|
|
|
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).}}
|
2012-10-02 23:19:33 +02:00
|
|
|
{{#include_layout_row}}
|
2012-10-15 22:35:46 +02:00
|
|
|
<tr class="ztable_layout_row">
|
2012-10-02 20:47:01 +02:00
|
|
|
<td class="ztable_col1" />
|
|
|
|
<td class="ztable_col2" />
|
|
|
|
</tr>
|
2012-10-02 23:19:33 +02:00
|
|
|
{{/include_layout_row}}
|
2012-10-02 20:47:01 +02:00
|
|
|
|
2012-10-10 16:29:48 +02:00
|
|
|
{{#each messages}}
|
2012-09-24 23:26:32 +02:00
|
|
|
{{#with this}}
|
2012-09-24 22:36:09 +02:00
|
|
|
{{#include_bookend}}
|
2013-06-21 23:35:45 +02:00
|
|
|
<tr class="bookend_tr"><td colspan="2" class="bookend{{#if subscribed}} sub-unsub-message{{/if}}{{#if unsubscribed}} sub-unsub-message{{/if}}">
|
2013-04-03 23:30:06 +02:00
|
|
|
{{#if subscribed}}
|
2013-04-17 05:52:20 +02:00
|
|
|
<span>--- Subscribed to stream {{subscribed}} ---</span>
|
2013-04-03 23:30:06 +02:00
|
|
|
{{/if}}
|
|
|
|
{{#if unsubscribed}}
|
2013-04-17 05:52:20 +02:00
|
|
|
<span>--- Unsubscribed from stream {{unsubscribed}} ---</span>
|
2013-04-03 23:30:06 +02:00
|
|
|
{{/if}}
|
2013-04-17 05:52:20 +02:00
|
|
|
</td>
|
2013-04-03 23:30:06 +02:00
|
|
|
</tr>
|
2012-09-24 22:36:09 +02:00
|
|
|
{{/include_bookend}}
|
|
|
|
|
2013-06-24 23:16:50 +02:00
|
|
|
{{#if show_date}}
|
2013-07-03 21:14:54 +02:00
|
|
|
<tr class="date_row" data-zid="{{id}}"><td colspan="4">{{{show_date}}}</td></tr>
|
2013-06-24 23:16:50 +02:00
|
|
|
{{/if}}
|
|
|
|
|
2013-07-25 22:08:16 +02:00
|
|
|
{{#if is_summary}}
|
2013-08-08 23:12:45 +02:00
|
|
|
<tr zid="{{first_message_id}}" data-messages="{{message_ids}}" class="summary_row selectable_row{{#include_footer}} last_message{{/include_footer}}{{^is_stream}} summary_row_private_message{{/is_stream}}">
|
2013-08-07 23:04:19 +02:00
|
|
|
<td class="summary_colorblock" style="background-color: {{background_color}};">
|
|
|
|
<span class="pointer_icon"><i class="icon-vector-caret-right"></i></span>
|
|
|
|
</td>
|
2013-07-25 22:08:16 +02:00
|
|
|
<td class="message_header message_header_stream right_part">
|
2013-08-26 22:20:10 +02:00
|
|
|
<i class="icon-vector-expand-alt"></i>
|
2013-08-07 23:50:49 +02:00
|
|
|
{{#if is_stream}}
|
2013-08-20 22:05:56 +02:00
|
|
|
{{display_recipient}} <i class="icon-vector-narrow icon-vector-small"></i><span class="copy-paste-text">></span> {{subject}} ({{count}} {{summary_adjective}})
|
2013-08-07 23:50:49 +02:00
|
|
|
{{else}}
|
2013-08-20 22:05:56 +02:00
|
|
|
You and {{display_reply_to}} ({{count}} {{summary_adjective}})
|
2013-08-07 23:50:49 +02:00
|
|
|
{{/if}}
|
2013-07-25 22:08:16 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{else}}
|
|
|
|
|
2012-09-20 21:33:45 +02:00
|
|
|
{{#include_recipient}}
|
2013-08-23 00:30:05 +02:00
|
|
|
<tr zid="{{id}}" class="recipient_row" data-messages="{{message_ids}}">
|
2012-10-10 23:31:26 +02:00
|
|
|
{{#if is_stream}}
|
2013-06-21 23:35:45 +02:00
|
|
|
<td class="message_header_colorblock" style="background-color: {{background_color}};"></td>
|
|
|
|
<td class="message_header message_header_stream right_part">
|
2013-08-23 01:04:34 +02:00
|
|
|
{{#if collapsible}}
|
2013-08-26 22:29:11 +02:00
|
|
|
<i class="icon-vector-collapse-alt"></i>
|
2013-08-23 01:04:34 +02:00
|
|
|
{{/if}}
|
2013-08-02 20:24:10 +02:00
|
|
|
{{#if invite_only}}<i class="icon-vector-lock" title="This is an invite-only stream"></i>{{/if}}
|
2012-12-01 04:37:52 +01:00
|
|
|
<span class="message_label_clickable narrows_by_recipient stream_label"
|
2012-10-31 17:45:50 +01:00
|
|
|
title="Narrow to stream "{{display_recipient}}"">{{display_recipient}}</span>
|
2013-07-17 22:53:07 +02:00
|
|
|
<i class="icon-vector-narrow icon-vector-small"></i><span class="copy-paste-text">></span>
|
2013-08-16 23:45:13 +02:00
|
|
|
<span class="stream_topic">
|
|
|
|
<span class="message_label_clickable narrows_by_subject"
|
2013-08-26 23:06:16 +02:00
|
|
|
title="Narrow to stream "{{display_recipient}}", topic "{{subject}}"">{{#if ../../../../../use_match_properties}}{{{match_subject}}}{{else}}{{subject}}{{/if}}</span>
|
2013-08-16 23:45:13 +02:00
|
|
|
{{#if empty_subject}}
|
|
|
|
<i class="icon-vector-pencil edit_subject"></i>
|
|
|
|
{{/if}}
|
|
|
|
{{#each subject_links}}<a href="{{this}}" target="_blank"><i class="icon-vector-external-link-sign"></i>{{/each}}
|
|
|
|
</span>
|
|
|
|
<span class="topic_edit">
|
|
|
|
<span class="topic_edit_form" id="{{id}}"></span>
|
|
|
|
</span>
|
2012-10-19 16:24:24 +02:00
|
|
|
</td>
|
2012-09-26 20:27:38 +02:00
|
|
|
</tr>
|
2012-09-28 17:19:31 +02:00
|
|
|
{{else}}
|
2013-06-21 23:35:45 +02:00
|
|
|
<td class="message_header_colorblock message_header_private_message" style="background-color: {{background_color}};"></td>
|
2013-07-02 20:37:44 +02:00
|
|
|
<td class="message_header message_header_private_message right_part dark_background">
|
2013-08-23 01:04:34 +02:00
|
|
|
{{#if collapsible}}
|
2013-08-26 22:29:11 +02:00
|
|
|
<i class="icon-vector-collapse-alt"></i>
|
2013-08-23 01:04:34 +02:00
|
|
|
{{/if}}
|
2013-02-16 09:43:27 +01:00
|
|
|
<span class="message_label_clickable narrows_by_recipient"
|
|
|
|
title="Narrow to your private messages with {{display_reply_to}}">
|
|
|
|
You and {{display_reply_to}}</span>
|
2012-10-17 22:03:00 +02:00
|
|
|
</td>
|
2012-09-20 21:33:45 +02:00
|
|
|
</tr>
|
2012-09-28 17:19:31 +02:00
|
|
|
{{/if}}
|
2012-09-20 21:33:45 +02:00
|
|
|
{{/include_recipient}}
|
2012-09-28 17:19:31 +02:00
|
|
|
<tr zid="{{id}}" id="{{dom_id}}"
|
2013-08-07 23:04:19 +02:00
|
|
|
class="message_row{{^is_stream}} private-message{{/is_stream}}{{#include_sender}} include-sender{{/include_sender}}{{#contains_mention}} mention{{/contains_mention}}{{#include_footer}} last_message{{/include_footer}}{{#unread}} unread{{/unread}} selectable_row">
|
2013-06-27 08:49:38 +02:00
|
|
|
<td class="messagebox_colorblock{{^is_stream}} message_header_private_message{{/is_stream}}" style="background-color: {{background_color}};"><span class="pointer_icon"><i class="icon-vector-caret-right"></i></span></td>
|
|
|
|
<td class="messagebox{{^include_sender}} prev_is_same_sender{{/include_sender}}{{^is_stream}} private-message{{/is_stream}}">
|
2013-07-03 23:25:24 +02:00
|
|
|
<div class="message_top_line">
|
2013-07-18 22:16:01 +02:00
|
|
|
<div class="unread_marker"></div>
|
2012-09-28 17:19:31 +02:00
|
|
|
{{#include_sender}}
|
2013-07-11 23:06:58 +02:00
|
|
|
<span class="message_sender sender_info_hover">
|
2013-06-13 23:48:23 +02:00
|
|
|
{{! See ../js/notifications.js for another user of avatar_url. }}
|
2013-05-10 22:48:02 +02:00
|
|
|
<div class="inline_profile_picture"
|
2013-06-13 23:48:23 +02:00
|
|
|
style="background-image: url('{{small_avatar_url}}');"/>
|
2012-11-06 19:30:16 +01:00
|
|
|
<span class="sender_name">{{sender_full_name}}</span>
|
2012-09-18 16:45:25 +02:00
|
|
|
</span>
|
2013-02-09 07:18:23 +01:00
|
|
|
{{/include_sender}}
|
2013-07-11 23:06:58 +02:00
|
|
|
<span class="message_time">{{timestr}}</span>
|
2013-05-24 00:03:39 +02:00
|
|
|
<div class="message_controls">
|
|
|
|
<div class="star">
|
|
|
|
<span class="message_star {{#if starred}}icon-vector-star{{else}}icon-vector-star empty-star{{/if}}"
|
|
|
|
title="{{#if starred}}Unstar{{else}}Star{{/if}} this message"></i>
|
|
|
|
</div>
|
2013-07-03 23:25:24 +02:00
|
|
|
<div class="info actions_hover">
|
2013-07-11 22:01:25 +02:00
|
|
|
<i class="icon-vector-chevron-down"></i>
|
2013-06-12 19:27:07 +02:00
|
|
|
</div>
|
2013-05-24 00:03:39 +02:00
|
|
|
</div>
|
2013-02-09 08:11:08 +01:00
|
|
|
</div>
|
2013-08-09 21:42:11 +02:00
|
|
|
<div class="message_content">{{#if ../../../use_match_properties}}{{{match_content}}}{{else}}{{{content}}}{{/if}}</div>
|
2013-05-15 00:22:16 +02:00
|
|
|
<div class="message_edit">
|
|
|
|
<div class="message_edit_form" id="{{id}}"></div>
|
|
|
|
</div>
|
2013-03-13 22:47:38 +01:00
|
|
|
<div class="message_expander message_length_controller" title="See the rest of this message">[More...]</div>
|
2013-05-08 23:17:49 +02:00
|
|
|
<div class="message_condenser message_length_controller" title="Make this message take up less space on the screen">[Condense this message]</div>
|
2013-05-21 17:48:46 +02:00
|
|
|
{{#if last_edit_timestr}}
|
|
|
|
<div class="message_edit_notice">Last edited: {{{last_edit_timestr}}}</div>
|
|
|
|
{{/if}}
|
2012-09-18 16:45:25 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
2013-07-25 22:08:16 +02:00
|
|
|
|
|
|
|
{{/if}}
|
2012-09-24 23:26:32 +02:00
|
|
|
{{/with}}
|
|
|
|
{{/each}}
|
2013-04-10 23:38:30 +02:00
|
|
|
|
|
|
|
{{#if trailing_bookend}}
|
2013-06-21 23:35:45 +02:00
|
|
|
<tr id="trailing_bookend" class="bookend_tr"><td colspan="2" class="bookend">
|
2013-04-10 23:38:30 +02:00
|
|
|
<center>{{trailing_bookend}}</center>
|
|
|
|
<span class="tiny"><p></p></span></td>
|
|
|
|
</tr>
|
|
|
|
{{/if}}
|