mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
message_edit: Rename show_edit_stream to is_stream_editable.
This commit renames show_edit_stream to is_stream_editable for more clarity.
This commit is contained in:
@@ -345,10 +345,10 @@ function edit_message(row, raw_content) {
|
||||
file_upload_enabled = true;
|
||||
}
|
||||
|
||||
const show_edit_stream =
|
||||
const is_stream_editable =
|
||||
message.is_stream && settings_data.user_can_move_messages_between_streams();
|
||||
// current message's stream has been already been added and selected in handlebar
|
||||
const available_streams = show_edit_stream
|
||||
const available_streams = is_stream_editable
|
||||
? stream_data.subscribed_subs().filter((s) => s.stream_id !== message.stream_id)
|
||||
: null;
|
||||
|
||||
@@ -364,7 +364,7 @@ function edit_message(row, raw_content) {
|
||||
content: raw_content,
|
||||
file_upload_enabled,
|
||||
minutes_to_edit: Math.floor(page_params.realm_message_content_edit_limit_seconds / 60),
|
||||
show_edit_stream,
|
||||
is_stream_editable,
|
||||
available_streams,
|
||||
stream_id: message.stream_id,
|
||||
stream_name: message.stream,
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
<div class="control-group no-margin">
|
||||
<div class="controls edit-controls">
|
||||
<div class="message_edit_header">
|
||||
<div class="stream_header_colorblock" {{#unless show_edit_stream}}style="display:none"{{/unless}}></div>
|
||||
<select class="select_edit_stream" id="select_stream_id_{{ message_id }}" {{#unless show_edit_stream}}style="display:none"{{/unless}}>
|
||||
<div class="stream_header_colorblock" {{#unless is_stream_editable}}style="display:none"{{/unless}}></div>
|
||||
<select class="select_edit_stream" id="select_stream_id_{{ message_id }}" {{#unless is_stream_editable}}style="display:none"{{/unless}}>
|
||||
<option value="{{ stream_id }}" selected='selected'>#{{ stream_name }}</option>
|
||||
{{#each available_streams}}
|
||||
<option value="{{ this.stream_id }}">#{{this.name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<i class="fa fa-angle-right" aria-hidden="true" {{#unless show_edit_stream}}style="display:none"{{/unless}}></i>
|
||||
<i class="fa fa-angle-right" aria-hidden="true" {{#unless is_stream_editable}}style="display:none"{{/unless}}></i>
|
||||
<input type="text" placeholder="{{topic}}" value="{{topic}}" class="message_edit_topic" id="message_edit_topic" />
|
||||
<div class="message_edit_breadcrumb_messages" style='display:none;'>
|
||||
<label class="checkbox">
|
||||
|
||||
Reference in New Issue
Block a user