← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjohnston/launchpad/boardCommentActivity into lp:launchpad

 

Chris Johnston has proposed merging lp:~cjohnston/launchpad/boardCommentActivity into lp:launchpad.

Commit message:
Move bug activities out of boardCommentFooter into boardCommentActivity

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjohnston/launchpad/boardCommentActivity/+merge/221430
-- 
https://code.launchpad.net/~cjohnston/launchpad/boardCommentActivity/+merge/221430
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjohnston/launchpad/boardCommentActivity into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/bugcomment.py'
--- lib/lp/bugs/browser/bugcomment.py	2012-07-11 22:21:24 +0000
+++ lib/lp/bugs/browser/bugcomment.py	2014-05-29 16:26:56 +0000
@@ -273,12 +273,11 @@
         return canonical_url(self, view_name='+download')
 
     @property
-    def show_footer(self):
-        """Return True if the footer should be shown for this comment."""
+    def show_activity(self):
+        """Return True if the activity should be shown for this comment."""
         return bool(
             len(self.activity) > 0 or
-            self.bugwatch or
-            self.show_spam_controls)
+            self.bugwatch)
 
 
 class BugCommentView(LaunchpadView):

=== modified file 'lib/lp/bugs/doc/bugcomment.txt'
--- lib/lp/bugs/doc/bugcomment.txt	2012-10-10 03:12:08 +0000
+++ lib/lp/bugs/doc/bugcomment.txt	2014-05-29 16:26:56 +0000
@@ -358,21 +358,21 @@
     status: New → Confirmed
 
 The activity will be inserted into the footer of the comment. If a
-BugComment has some activity associated with it, it's show_footer
+BugComment has some activity associated with it, it's show_activity
 property will be True.
 
-    >>> bug_comment.show_footer
+    >>> bug_comment.show_activity
     True
 
     >>> bug_comment.activity = []
-    >>> bug_comment.show_footer
+    >>> bug_comment.show_activity
     False
 
-BugComment.show_footer will also be True if a BugWatch is associated
+BugComment.show_activity will also be True if a BugWatch is associated
 with the comment.
 
     >>> bug_comment.bugwatch = factory.makeBugWatch()
-    >>> bug_comment.show_footer
+    >>> bug_comment.show_activity
     True
 
 

=== modified file 'lib/lp/bugs/interfaces/bugmessage.py'
--- lib/lp/bugs/interfaces/bugmessage.py	2013-01-07 02:40:55 +0000
+++ lib/lp/bugs/interfaces/bugmessage.py	2014-05-29 16:26:56 +0000
@@ -132,7 +132,9 @@
         'The URL for submitting replies to this comment.')
     activity = Attribute(
         "A list of BugActivityItems associated with this comment.")
-    show_footer = Attribute(
+    show_activity = Attribute(
+        "Whether or not to show an activity for the comment.")
+    show_spam_controls = Attribute(
         "Whether or not to show a footer for the comment.")
     patches = Attribute(
         "Patches attched to this comment.")

=== modified file 'lib/lp/bugs/templates/bugcomment-box.pt'
--- lib/lp/bugs/templates/bugcomment-box.pt	2014-05-28 20:38:48 +0000
+++ lib/lp/bugs/templates/bugcomment-box.pt	2014-05-29 16:26:56 +0000
@@ -93,15 +93,7 @@
       replace="structure comment/@@+comment-body-text" />
   </div>
 
-  <div class="boardCommentFooter" tal:condition="comment/show_footer">
-    <a tal:attributes="id string:mark-spam-${context/index};"
-       tal:condition="view/show_spam_controls"
-       class="js-action mark-spam" href="#">
-       <tal:not-spam condition="not: context/visible"
-       >Unhide</tal:not-spam>
-       <tal:spam condition="context/visible"
-       >Hide</tal:spam>
-    </a>
+  <div class="boardCommentActivity" tal:condition="comment/show_activity">
     <tal:activity
         define="activity_list comment/activity"
         condition="comment/activity">
@@ -159,4 +151,14 @@
       </div>
     </tal:bugwatch-footer>
   </div>
+  <div class="boardCommentFooter" tal:condition="comment/show_spam_controls">
+    <a tal:attributes="id string:mark-spam-${context/index};"
+       tal:condition="view/show_spam_controls"
+       class="js-action mark-spam" href="#">
+       <tal:not-spam condition="not: context/visible"
+       >Unhide</tal:not-spam>
+       <tal:spam condition="context/visible"
+       >Hide</tal:spam>
+    </a>
+  </div>
 </div>


Follow ups