zulip/static/templates/compose_resolved_topic.hbs
Priyam Seth 17f74a3f57 compose: Show warning while composing to a resolved topic.
This commit creates the function warn_if_topic_resolved that checks if
the topic to which the user is composing is resolved or not. First it
checks if the stream exists and then if the topic name starts with the
RESOLVED_TOPIC_PREFIX. If the conditions are true, a warning banner is
shown to the user.

It also shows to the user a button to unresolve the topic, if he has
the permission to do so.

Fixes #20584.
2022-02-01 17:50:17 -08:00

10 lines
531 B
Handlebars

<div class="compose_resolved_topic" data-stream-id="{{stream_id}}" data-topic-name="{{topic_name}}">
<p>{{#tr}}You are sending a message to a resolved topic. You can send as-is or unresolve the topic first.{{/tr}}</p>
<div class="compose_resolved_topic_user_controls">
{{#if can_move_topic}}
<button class="btn btn-warning compose_unresolve_topic" >{{t "Unresolve topic" }}</button>
{{/if}}
<button type="button" class="compose_resolved_topic_close close">&times;</button>
</div>
</div>