From 32842be3094237d6dffe41b52b24b2d04f85576e Mon Sep 17 00:00:00 2001
From: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Date: Mon, 12 Dec 2016 20:17:20 +0500
Subject: Multiple Ui improvements (#4767)

* PLT-4911 - Adding new target for OAuth help links

* PLT-4953 - Fixing styles for the unread messages indicator

* PLT-4901 - Fixing header modal overlap on mobile

* PLT-4916 - Swapping position of edit and delete
---
 webapp/components/rhs_comment.jsx | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

(limited to 'webapp/components/rhs_comment.jsx')

diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx
index 8b5d56c01..c699fb353 100644
--- a/webapp/components/rhs_comment.jsx
+++ b/webapp/components/rhs_comment.jsx
@@ -166,49 +166,49 @@ export default class RhsComment extends React.Component {
             </li>
         );
 
-        if (isOwner) {
+        if (isOwner || isAdmin) {
             dropdownContents.push(
                 <li
                     role='presentation'
-                    key='edit-button'
+                    key='delete-button'
                 >
                     <a
                         href='#'
                         role='menuitem'
-                        data-toggle='modal'
-                        data-target='#edit_post'
-                        data-refocusid='#reply_textbox'
-                        data-title={Utils.localizeMessage('rhs_comment.comment', 'Comment')}
-                        data-message={post.message}
-                        data-postid={post.id}
-                        data-channelid={post.channel_id}
+                        onClick={(e) => {
+                            e.preventDefault();
+                            GlobalActions.showDeletePostModal(post, 0);
+                        }}
                     >
                         <FormattedMessage
-                            id='rhs_comment.edit'
-                            defaultMessage='Edit'
+                            id='rhs_comment.del'
+                            defaultMessage='Delete'
                         />
                     </a>
                 </li>
             );
         }
 
-        if (isOwner || isAdmin) {
+        if (isOwner) {
             dropdownContents.push(
                 <li
                     role='presentation'
-                    key='delete-button'
+                    key='edit-button'
                 >
                     <a
                         href='#'
                         role='menuitem'
-                        onClick={(e) => {
-                            e.preventDefault();
-                            GlobalActions.showDeletePostModal(post, 0);
-                        }}
+                        data-toggle='modal'
+                        data-target='#edit_post'
+                        data-refocusid='#reply_textbox'
+                        data-title={Utils.localizeMessage('rhs_comment.comment', 'Comment')}
+                        data-message={post.message}
+                        data-postid={post.id}
+                        data-channelid={post.channel_id}
                     >
                         <FormattedMessage
-                            id='rhs_comment.del'
-                            defaultMessage='Delete'
+                            id='rhs_comment.edit'
+                            defaultMessage='Edit'
                         />
                     </a>
                 </li>
-- 
cgit v1.2.3-1-g7c22

