mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
Searching for a word that appears in a message in a empty string topic via the search box resulted in a message view where the topic names in the recipient_row were empty string instead of `realm_empty_topic_display_name`. This commit fixes that bug.
107 lines
6.6 KiB
Handlebars
107 lines
6.6 KiB
Handlebars
{{#if is_stream}}
|
|
<div class="message_header message_header_stream right_part" data-stream-id="{{stream_id}}">
|
|
<div class="message-header-contents" style="background: {{recipient_bar_color}};">
|
|
{{! stream link }}
|
|
<a class="message_label_clickable narrows_by_recipient stream_label tippy-narrow-tooltip"
|
|
href="{{stream_url}}"
|
|
data-tippy-content="{{t 'Go to #{display_recipient}' }}">
|
|
<span class="stream-privacy-modified-color-{{stream_id}} stream-privacy filter-icon" style="color: {{stream_privacy_icon_color}}">
|
|
{{> stream_privacy .}}
|
|
</span>
|
|
|
|
{{~! Recipient (e.g. stream/topic or topic) ~}}
|
|
<span class="message-header-stream-name">
|
|
{{~display_recipient~}}
|
|
</span>
|
|
{{#if is_archived}}
|
|
<span class="message-header-stream-archived"><i class="archived-indicator">({{t 'archived' }})</i></span>
|
|
{{/if}}
|
|
</a>
|
|
<span class="stream_topic_separator"><i class="zulip-icon zulip-icon-chevron-right"></i></span>
|
|
|
|
{{! 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_topic tippy-narrow-tooltip"
|
|
href="{{topic_url}}"
|
|
data-tippy-content="{{t 'Go to #{display_recipient} > {topic_display_name}' }}">
|
|
{{#if (and use_match_properties (not is_empty_string_topic))}}
|
|
<span class="stream-topic-inner">{{{match_topic}}}</span>
|
|
{{else}}
|
|
<span class="stream-topic-inner {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{topic_display_name}}</span>
|
|
{{/if}}
|
|
</a>
|
|
</span>
|
|
<span class="recipient_bar_controls no-select">
|
|
<span class="topic_edit hidden-for-spectators"></span>
|
|
|
|
{{! exterior links (e.g. to a trac ticket) }}
|
|
{{#each topic_links}}
|
|
<a href="{{this.url}}" target="_blank" rel="noopener noreferrer" class="external-topic-link recipient-bar-control no-underline">
|
|
<i class="fa fa-external-link-square recipient_bar_icon" data-tippy-content="Open {{this.text}}" aria-label="{{t 'External link' }}"></i>
|
|
</a>
|
|
{{/each}}
|
|
|
|
{{! edit topic pencil icon }}
|
|
{{#if is_topic_editable}}
|
|
<i class="fa fa-pencil on_hover_topic_edit recipient-bar-control recipient_bar_icon hidden-for-spectators" data-tippy-content="{{t 'Edit topic'}}" role="button" tabindex="0" aria-label="{{t 'Edit topic' }}"></i>
|
|
{{/if}}
|
|
|
|
{{#if (and user_can_resolve_topic (not is_empty_string_topic))}}
|
|
{{#if topic_is_resolved}}
|
|
<i class="fa fa-check on_hover_topic_unresolve recipient-bar-control recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as unresolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as unresolved' }}"></i>
|
|
{{else}}
|
|
<i class="fa fa-check on_hover_topic_resolve recipient-bar-control recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as resolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as resolved' }}"></i>
|
|
{{/if}}
|
|
<div class="toggle_resolve_topic_spinner recipient_bar_icon" style="display: none"></div>
|
|
{{/if}}
|
|
|
|
{{#if (and is_subscribed (not is_archived))}}
|
|
<span class="change_visibility_policy recipient-bar-control hidden-for-spectators" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}">
|
|
{{#if (eq visibility_policy all_visibility_policies.FOLLOWED)}}
|
|
<i class="zulip-icon zulip-icon-follow recipient_bar_icon" data-tippy-content="{{t 'You follow this topic.'}}"
|
|
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You follow this topic.' }}"></i>
|
|
{{else if (eq visibility_policy all_visibility_policies.UNMUTED)}}
|
|
<i class="zulip-icon zulip-icon-unmute-new recipient_bar_icon" data-tippy-content="{{t 'You have unmuted this topic.'}}"
|
|
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have unmuted this topic.' }}"></i>
|
|
{{else if (eq visibility_policy all_visibility_policies.MUTED)}}
|
|
<i class="zulip-icon zulip-icon-mute-new recipient_bar_icon" data-tippy-content="{{t 'You have muted this topic.'}}"
|
|
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'You have muted this topic.' }}"></i>
|
|
{{else}}
|
|
<i class="zulip-icon zulip-icon-inherit recipient_bar_icon"
|
|
role="button" tabindex="0" aria-haspopup="true" aria-label="{{t 'Notifications are based on your configuration for this channel.' }}"></i>
|
|
{{/if}}
|
|
</span>
|
|
{{/if}}
|
|
|
|
{{! Topic menu }}
|
|
<i class="zulip-icon zulip-icon-more-vertical recipient-row-topic-menu recipient-bar-control recipient_bar_icon" tabindex="0" aria-label="{{t 'Topic actions menu' }}" aria-haspopup="true" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-topic-url="{{topic_url}}"></i>
|
|
</span>
|
|
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="message_header message_header_private_message">
|
|
<div class="message-header-contents">
|
|
<a class="message_label_clickable narrows_by_recipient stream_label tippy-narrow-tooltip"
|
|
href="{{pm_with_url}}"
|
|
data-tippy-content="{{t 'Go to direct messages with {display_reply_to_for_tooltip}' }}">
|
|
<span class="private_message_header_icon"><i class="zulip-icon zulip-icon-user"></i></span>
|
|
<span class="private_message_header_name">
|
|
{{~#tr}}You and <z-user-names></z-user-names>
|
|
{{#*inline "z-user-names"}}
|
|
{{#each recipient_users}}
|
|
{{~full_name}}{{#if should_add_guest_user_indicator}} <i>({{t 'guest'}})</i>{{/if}}{{#unless @last}}, {{/unless~}}
|
|
{{/each}}
|
|
{{/inline}}
|
|
{{/tr~}}
|
|
</span>
|
|
</a>
|
|
<span class="recipient_row_date {{#if (and (not always_display_date) date_unchanged )}}recipient_row_date_unchanged{{/if}}">{{{date}}}</span>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|