← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjohnston/launchpad/reply-link into lp:launchpad

 

Chris Johnston has proposed merging lp:~cjohnston/launchpad/reply-link into lp:launchpad.

Commit message:
Remove reply links from IC's when a user is not logged in.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjohnston/launchpad/reply-link/+merge/221429
-- 
https://code.launchpad.net/~cjohnston/launchpad/reply-link/+merge/221429
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjohnston/launchpad/reply-link into lp:launchpad.
=== modified file 'lib/lp/code/javascript/branchmergeproposal.inlinecomments.js'
--- lib/lp/code/javascript/branchmergeproposal.inlinecomments.js	2014-05-29 08:26:02 +0000
+++ lib/lp/code/javascript/branchmergeproposal.inlinecomments.js	2014-05-29 16:24:04 +0000
@@ -144,11 +144,11 @@
         '<div class="boardComment">' +
         '<div class="boardCommentDetails"></div>' +
         '<div class="boardCommentBody"><div></div></div>' +
-        '<div class="boardCommentFooter"></div>' +
         '</div>');
     if (Y.Lang.isUndefined(comment.person)) {
         // Creates a draft inline comment area.
         newrow.addClass('draft');
+        newrow.append('<div class="boardCommentFooter"></div>');
         newrow.one('.boardCommentDetails').set('text', 'Unsaved comment');
         newrow.one('.boardCommentBody div')
             .append('<span class="yui3-editable_text-text"></span>')
@@ -167,8 +167,11 @@
         // Wrap resources coming from LP.cache, as they come from
         // the LP API (updates during the page life-span). This way
         // the handling code can be unified.
-        newrow.one('.boardCommentFooter')
-            .append('<a class="js-action draft-edit">Reply</a>');
+        if (LP.links['me'] !== undefined) {
+            newrow.append('<div class="boardCommentFooter"></div>');
+            newrow.one('.boardCommentFooter')
+                .append('<a class="js-action draft-edit">Reply</a>');
+        }
         if (Y.Lang.isUndefined(comment.person.get)) {
             comment.person = namespace.lp_client.wrap_resource(
                 null, comment.person);


Follow ups