summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_header.jsx
diff options
context:
space:
mode:
authorReed Garmsen <rgarmsen2295@gmail.com>2015-11-13 16:22:32 -0800
committerReed Garmsen <rgarmsen2295@gmail.com>2015-11-13 16:22:32 -0800
commiteacc06c7fc712e8b2e71c408327a449bc32c34d9 (patch)
tree62616763ec1389fdca315becb9550d1e2cf91cd2 /web/react/components/channel_header.jsx
parentf0b1adf6cfaf0f2825b514d2c5e132ebf583652b (diff)
downloadchat-eacc06c7fc712e8b2e71c408327a449bc32c34d9.tar.gz
chat-eacc06c7fc712e8b2e71c408327a449bc32c34d9.tar.bz2
chat-eacc06c7fc712e8b2e71c408327a449bc32c34d9.zip
Allow admins to change the display name for the default channel
Diffstat (limited to 'web/react/components/channel_header.jsx')
-rw-r--r--web/react/components/channel_header.jsx41
1 files changed, 22 insertions, 19 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index a8d4ec100..79c7f90a9 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -276,26 +276,27 @@ export default class ChannelHeader extends React.Component {
</li>
);
- if (!ChannelStore.isDefault(channel)) {
- if (isAdmin) {
- dropdownContents.push(
- <li
- key='rename_channel'
- role='presentation'
+ if (isAdmin) {
+ dropdownContents.push(
+ <li
+ key='rename_channel'
+ role='presentation'
+ >
+ <a
+ role='menuitem'
+ href='#'
+ data-toggle='modal'
+ data-target='#rename_channel'
+ data-display={channel.display_name}
+ data-name={channel.name}
+ data-channelid={channel.id}
>
- <a
- role='menuitem'
- href='#'
- data-toggle='modal'
- data-target='#rename_channel'
- data-display={channel.display_name}
- data-name={channel.name}
- data-channelid={channel.id}
- >
- {'Rename '}{channelTerm}{'...'}
- </a>
- </li>
- );
+ {'Rename '}{channelTerm}{'...'}
+ </a>
+ </li>
+ );
+
+ if (!ChannelStore.isDefault(channel)) {
dropdownContents.push(
<li
key='delete_channel'
@@ -314,7 +315,9 @@ export default class ChannelHeader extends React.Component {
</li>
);
}
+ }
+ if (!ChannelStore.isDefault(channel)) {
dropdownContents.push(
<li
key='leave_channel'