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

Proposed by Chris Johnston
Status: Merged
Approved by: William Grant
Approved revision: no longer in the source branch.
Merged at revision: 17028
Proposed branch: lp:~cjohnston/launchpad/reply-link
Merge into: lp:launchpad
Diff against target: 30 lines (+6/-3)
1 file modified
lib/lp/code/javascript/branchmergeproposal.inlinecomments.js (+6/-3)
To merge this branch: bzr merge lp:~cjohnston/launchpad/reply-link
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+221429@code.launchpad.net

Commit message

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

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/code/javascript/branchmergeproposal.inlinecomments.js'
2--- lib/lp/code/javascript/branchmergeproposal.inlinecomments.js 2014-05-29 08:26:02 +0000
3+++ lib/lp/code/javascript/branchmergeproposal.inlinecomments.js 2014-05-29 16:24:04 +0000
4@@ -144,11 +144,11 @@
5 '<div class="boardComment">' +
6 '<div class="boardCommentDetails"></div>' +
7 '<div class="boardCommentBody"><div></div></div>' +
8- '<div class="boardCommentFooter"></div>' +
9 '</div>');
10 if (Y.Lang.isUndefined(comment.person)) {
11 // Creates a draft inline comment area.
12 newrow.addClass('draft');
13+ newrow.append('<div class="boardCommentFooter"></div>');
14 newrow.one('.boardCommentDetails').set('text', 'Unsaved comment');
15 newrow.one('.boardCommentBody div')
16 .append('<span class="yui3-editable_text-text"></span>')
17@@ -167,8 +167,11 @@
18 // Wrap resources coming from LP.cache, as they come from
19 // the LP API (updates during the page life-span). This way
20 // the handling code can be unified.
21- newrow.one('.boardCommentFooter')
22- .append('<a class="js-action draft-edit">Reply</a>');
23+ if (LP.links['me'] !== undefined) {
24+ newrow.append('<div class="boardCommentFooter"></div>');
25+ newrow.one('.boardCommentFooter')
26+ .append('<a class="js-action draft-edit">Reply</a>');
27+ }
28 if (Y.Lang.isUndefined(comment.person.get)) {
29 comment.person = namespace.lp_client.wrap_resource(
30 null, comment.person);