mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Split the recipient row of a message group into a partial
(imported from commit 660514daf932235b7c47ac4c22f963da17c7fc8b)
This commit is contained in:
@@ -12,74 +12,7 @@
|
||||
{{/if}}
|
||||
|
||||
<div class="recipient_row">
|
||||
{{#if is_stream}}
|
||||
<div class="message_header message_header_stream right_part">
|
||||
<div class="message-header-wrapper">
|
||||
<div class="message-header-contents">
|
||||
{{! stream link }}
|
||||
<a class="message_label_clickable narrows_by_recipient stream_label {{color_class}}"
|
||||
style="background: {{background_color}}; border-left-color: {{background_color}};"
|
||||
href="{{stream_url}}"
|
||||
title="Narrow to stream "{{display_recipient}}"">
|
||||
{{! invite only lock }}
|
||||
{{#if invite_only}}
|
||||
<i class="icon-vector-lock invite-stream-icon" title="This is an invite-only stream"></i>
|
||||
{{/if}}
|
||||
{{display_recipient}}
|
||||
</a>
|
||||
|
||||
{{! hidden narrow icon for copy-pasting }}
|
||||
<span class="copy-paste-text">></span>
|
||||
|
||||
{{! topic stuff }}
|
||||
<span class="stream_topic">
|
||||
{{! topic link }}
|
||||
<a class="message_label_clickable narrows_by_subject"
|
||||
href="{{topic_url}}"
|
||||
title="Narrow to stream "{{display_recipient}}", topic "{{subject}}"">
|
||||
{{#if ../../../use_match_properties}}
|
||||
{{{match_subject}}}
|
||||
{{else}}
|
||||
{{subject}}
|
||||
{{/if}}
|
||||
</a>
|
||||
|
||||
{{! edit subject pencil icon }}
|
||||
{{#if always_visible_topic_edit}}
|
||||
<i class="icon-vector-pencil always_visible_topic_edit"></i>
|
||||
{{else}}
|
||||
{{#if on_hover_topic_edit}}
|
||||
<i class="icon-vector-pencil on_hover_topic_edit"></i>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{! exterior links (e.g. to a trac ticket) }}
|
||||
{{#each subject_links}}
|
||||
<a href="{{this}}" target="_blank">
|
||||
<i class="icon-vector-external-link-sign"></i>
|
||||
</a>
|
||||
{{/each}}
|
||||
</span>
|
||||
|
||||
<span class="topic_edit">
|
||||
<span class="topic_edit_form" id="{{id}}"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="message_header message_header_private_message dark_background">
|
||||
<div class="message-header-wrapper">
|
||||
<div class="message-header-contents">
|
||||
<a class="message_label_clickable narrows_by_recipient"
|
||||
href="{{pm_with_url}}"
|
||||
title="Narrow to your private messages with {{display_reply_to}}">
|
||||
You and {{display_reply_to}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{partial "recipient_row" "use_match_properties" ../../use_match_properties}}
|
||||
{{#each messages}}
|
||||
{{#with this}}
|
||||
{{partial "single_message" "use_match_properties" ../../../../use_match_properties}}
|
||||
|
||||
68
static/templates/recipient_row.handlebars
Normal file
68
static/templates/recipient_row.handlebars
Normal file
@@ -0,0 +1,68 @@
|
||||
{{#if is_stream}}
|
||||
<div class="message_header message_header_stream right_part">
|
||||
<div class="message-header-wrapper">
|
||||
<div class="message-header-contents">
|
||||
{{! stream link }}
|
||||
<a class="message_label_clickable narrows_by_recipient stream_label {{color_class}}"
|
||||
style="background: {{background_color}}; border-left-color: {{background_color}};"
|
||||
href="{{stream_url}}"
|
||||
title="Narrow to stream "{{display_recipient}}"">
|
||||
{{! invite only lock }}
|
||||
{{#if invite_only}}
|
||||
<i class="icon-vector-lock invite-stream-icon" title="This is an invite-only stream"></i>
|
||||
{{/if}}
|
||||
{{display_recipient}}
|
||||
</a>
|
||||
|
||||
{{! hidden narrow icon for copy-pasting }}
|
||||
<span class="copy-paste-text">></span>
|
||||
|
||||
{{! topic stuff }}
|
||||
<span class="stream_topic">
|
||||
{{! topic link }}
|
||||
<a class="message_label_clickable narrows_by_subject"
|
||||
href="{{topic_url}}"
|
||||
title="Narrow to stream "{{display_recipient}}", topic "{{subject}}"">
|
||||
{{#if use_match_properties}}
|
||||
{{{match_subject}}}
|
||||
{{else}}
|
||||
{{subject}}
|
||||
{{/if}}
|
||||
</a>
|
||||
|
||||
{{! edit subject pencil icon }}
|
||||
{{#if always_visible_topic_edit}}
|
||||
<i class="icon-vector-pencil always_visible_topic_edit"></i>
|
||||
{{else}}
|
||||
{{#if on_hover_topic_edit}}
|
||||
<i class="icon-vector-pencil on_hover_topic_edit"></i>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{! exterior links (e.g. to a trac ticket) }}
|
||||
{{#each subject_links}}
|
||||
<a href="{{this}}" target="_blank">
|
||||
<i class="icon-vector-external-link-sign"></i>
|
||||
</a>
|
||||
{{/each}}
|
||||
</span>
|
||||
|
||||
<span class="topic_edit">
|
||||
<span class="topic_edit_form" id="{{id}}"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="message_header message_header_private_message dark_background">
|
||||
<div class="message-header-wrapper">
|
||||
<div class="message-header-contents">
|
||||
<a class="message_label_clickable narrows_by_recipient"
|
||||
href="{{pm_with_url}}"
|
||||
title="Narrow to your private messages with {{display_reply_to}}">
|
||||
You and {{display_reply_to}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -293,6 +293,7 @@ function render(template_name, args) {
|
||||
];
|
||||
|
||||
global.use_template('single_message'); // partial
|
||||
global.use_template('recipient_row'); // partial
|
||||
global.use_template('bookend'); // partial
|
||||
|
||||
var html = render('message_group', {message_groups: groups});
|
||||
|
||||
Reference in New Issue
Block a user