stream_settings: Remove pencil icon from 'General' tab in stream settings.

For user who is not an administrator.
Also implemented a banner that notifies the user if they can edit
the following settings (name/description and stream permission).
Also increased padding-top of stream header by 10px. This change is done
to increase vertical spacing between the banner
and the stream header.

Fixes #20001.
This commit is contained in:
Palash
2021-10-20 09:56:53 +05:30
committed by Tim Abbott
parent 0af00a3233
commit 4d44698805
3 changed files with 12 additions and 1 deletions

View File

@@ -857,6 +857,7 @@ h4.stream_setting_subsection_title {
.stream-header {
white-space: nowrap;
padding-top: 10px;
.stream-name {
display: inline-block;

View File

@@ -23,6 +23,9 @@
<div class="general_settings stream_section">
{{#with sub}}
<div class="stream-settings-tip-container">
{{> stream_settings_tip}}
</div>
<div class="stream-header">
{{> stream_privacy_icon
invite_only=invite_only
@@ -31,7 +34,7 @@
<span class="sub-stream-name" title="{{name}}">{{name}}</span>
</div>
<div class="stream_change_property_info alert-notification"></div>
<div class="button-group">
<div class="button-group" {{#unless can_change_name_description}}style="display:none"{{/unless}}>
<button id="open_stream_info_modal" class="button rounded small btn-warning" title="{{t 'Change stream info' }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
</button>

View File

@@ -0,0 +1,7 @@
{{#unless can_change_stream_permissions}}
{{#if can_change_name_description}}
<div class="tip">{{t "Only subscribers to this stream can edit stream permissions."}}</div>
{{else}}
<div class="tip">{{t "Only organization administrators can edit these settings."}}</div>
{{/if}}
{{/unless}}