Modify message list template to switch to a cleaner appearance.

* Switch to a 2-column layout by removing the old unused message tools
    column and the pointer columns.
  * Change column spans to 2 instead of 4.
  * Change recipient bar to have a colorblock on the left.
  * Add a special "last_message" class to messages that appear last
    in a message block.

(imported from commit 55036587445c699d5c55d52b0236daf402a80cff)
This commit is contained in:
Allen Rabinovich 2013-06-21 14:35:45 -07:00 committed by Waseem Daher
parent d9f5b98aea
commit f22a13df83
1 changed files with 9 additions and 12 deletions

View File

@ -8,15 +8,13 @@
<tr class="ztable_layout_row">
<td class="ztable_col1" />
<td class="ztable_col2" />
<td class="ztable_col3" />
<td class="ztable_col4" />
</tr>
{{/include_layout_row}}
{{#each messages}}
{{#with this}}
{{#include_bookend}}
<tr class="bookend_tr"><td colspan="4" class="bookend{{#if subscribed}} sub-unsub-message{{/if}}{{#if unsubscribed}} sub-unsub-message{{/if}}">
<tr class="bookend_tr"><td colspan="2" class="bookend{{#if subscribed}} sub-unsub-message{{/if}}{{#if unsubscribed}} sub-unsub-message{{/if}}">
{{#if subscribed}}
<span>--- Subscribed to stream {{subscribed}} ---</span>
{{/if}}
@ -30,8 +28,8 @@
{{#include_recipient}}
{{#if is_stream}}
<tr zid="{{id}}" class="recipient_row">
<td colspan="4" class="message_header message_header_stream right_part {{color_class}}"
style="background-color: {{background_color}};">
<td class="message_header_colorblock" style="background-color: {{background_color}};"></td>
<td class="message_header message_header_stream right_part">
{{#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>
@ -43,7 +41,8 @@
</tr>
{{else}}
<tr zid="{{id}}" class="recipient_row">
<td colspan="4" class="message_header message_header_private_message right_part dark_background">
<td class="message_header_colorblock message_header_private_message" style="background-color: {{background_color}};"></td>
<td class="message_header message_header_private_message right_part">
<span class="message_label_clickable narrows_by_recipient"
title="Narrow to your private messages with {{display_reply_to}}">
You and {{display_reply_to}}</span>
@ -52,9 +51,10 @@
{{/if}}
{{/include_recipient}}
<tr zid="{{id}}" id="{{dom_id}}"
class="message_row{{^is_stream}} private-message{{/is_stream}}{{#include_sender}} include-sender{{/include_sender}}{{#contains_mention}} mention{{/contains_mention}}">
<td class="pointer"><p></p></td>
<td class="messagebox{{^include_sender}} prev_is_same_sender{{/include_sender}}{{^is_stream}} private-message{{/is_stream}}">
<td class="messagebox_colorblock{{^is_stream}} message_header_private_message{{/is_stream}}{{#include_footer}} last_message{{/include_footer}}" style="background-color: {{background_color}};"></td>
<td class="messagebox{{^include_sender}} prev_is_same_sender{{/include_sender}}{{^is_stream}} private-message{{/is_stream}}{{#include_footer}} last_message{{/include_footer}}">
<div class="message_top_line">
{{#include_sender}}
<span class="message_sender actions_hover">
@ -85,15 +85,12 @@
<div class="message_edit_notice">Last edited: {{{last_edit_timestr}}}</div>
{{/if}}
</td>
<td class="message_data{{^include_sender}} prev_is_same_sender{{/include_sender}}">
</td>
<td class="pointer"><p></p></td>
</tr>
{{/with}}
{{/each}}
{{#if trailing_bookend}}
<tr id="trailing_bookend" class="bookend_tr"><td colspan="4" class="bookend">
<tr id="trailing_bookend" class="bookend_tr"><td colspan="2" class="bookend">
<center>{{trailing_bookend}}</center>
<span class="tiny"><p></p></span></td>
</tr>