Part of lp.bugs.browser.bugcomment View In Hierarchy
It keeps track of which index it has in the bug comment list and also provides functionality to truncate the comment.
Note that although this class is called BugComment it really takes as an argument a bugtask. The reason for this is to allow canonical_url()s of BugComments to take you to the correct (task-specific) location.
Method | __init__ | Undocumented |
Method | bugattachments | Undocumented |
Method | show_for_admin | Show hidden comments for Launchpad admins. |
Method | text_for_display | Undocumented |
Method | isIdenticalTo | Compare this BugComment to another and return True if they are |
Method | isEmpty | Return True if text_for_display is empty. |
Method | add_comment_url | Undocumented |
Method | download_url | Undocumented |
Method | show_activity | Return True if the activity should be shown for this comment. |
Inherited from MessageComment:
Method | extra_css_class | Undocumented |
Method | display_attachments | Undocumented |
Method | comment_author | The author of the comment. |
Method | has_body | Is there body text? |
Method | comment_date | The date of the comment. |
Method | body_text | Undocumented |
Method | too_long | Undocumented |
Method | too_long_to_render | Undocumented |
This is used in templates to add a class to hidden comments to enable display for admins, so the admin can see the comment even after it is hidden. Since comments aren't published unless the user is registry or admin, this can just check if the comment is visible.