mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
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.
10 lines
531 B
Handlebars
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">×</button>
|
|
</div>
|
|
</div>
|