diff options
4 files changed, 33 insertions, 25 deletions
diff --git a/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/comments/06e45775-1c46-4793-a34e-2cc86a8db097/body b/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/comments/06e45775-1c46-4793-a34e-2cc86a8db097/body new file mode 100644 index 0000000..c5f1b4f --- /dev/null +++ b/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/comments/06e45775-1c46-4793-a34e-2cc86a8db097/body @@ -0,0 +1 @@ +Added the option in my be-html branch diff --git a/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/comments/06e45775-1c46-4793-a34e-2cc86a8db097/values b/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/comments/06e45775-1c46-4793-a34e-2cc86a8db097/values new file mode 100644 index 0000000..f7b7498 --- /dev/null +++ b/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/comments/06e45775-1c46-4793-a34e-2cc86a8db097/values @@ -0,0 +1,8 @@ +Author: Gianluca Montecchi <gian@grys.it> + + +Content-type: text/plain + + +Date: Thu, 08 Oct 2009 20:16:46 +0000 + diff --git a/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/values b/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/values index 8b58566..1b71be1 100644 --- a/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/values +++ b/.be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/values @@ -7,7 +7,7 @@ reporter: gianluca <gian@galactica> severity: wishlist -status: open +status: closed summary: Add a verbose option? diff --git a/becommands/html.py b/becommands/html.py index 38b6012..d5c4771 100644 --- a/becommands/html.py +++ b/becommands/html.py @@ -456,7 +456,7 @@ class BEHTMLGen(): %s - + %s </tbody> </table> </div> @@ -472,21 +472,14 @@ class BEHTMLGen(): <td align="right">%s</td><td>%s</td> </tr> """ - - self.comment_section = """ - """ - - self.begin_comment_section =""" + self.comment_section =""" <tr> <td align="right">Comments: </td> <td> - """ - - - self.end_comment_section =""" + %s </td> </tr> """ @@ -511,7 +504,12 @@ class BEHTMLGen(): FI.close() except: pass - + try: + FI.open("%s/comment_section.tpl"%self.template) + self.comment_section = FI.read() + FI.close() + except: + pass def create_index_file(self, out_dir_path, summary, bugs, ordered_bug, fileid, encoding): @@ -602,21 +600,16 @@ class BEHTMLGen(): det_line += self.detail_line%("Created : ", escape(bug.time_string)) det_line += self.detail_line%("Summary : ", escape(bug.summary)) det_line += """<tr><td colspan="2"><hr /></td></tr>""" - - if fileid == "active": - FD.write(detail_file_%(encoding, "../index.html", det_line, "../index.html")) - if fileid == "inactive": - FD.write(detail_file_%(encoding, "../index_inactive.html", det_line, "../index_inactive.html")) - - FD.write(self.begin_comment_section) + tr = [] b = '' level = 0 stack = [] + com = "" for depth,comment in bug_.comment_root.thread(flatten=False): while len(stack) > depth: stack.pop(-1) # pop non-parents off the stack - FD.write("</div>\n") # close non-parent <div class="comment... + com += "</div>\n" # close non-parent <div class="comment... assert len(stack) == depth stack.append(comment) lines = ["--------- Comment ---------", @@ -626,14 +619,20 @@ class BEHTMLGen(): ""] lines.extend(escape(comment.body).splitlines()) if depth == 0: - FD.write('<div class="commentF">') + com += '<div class="commentF">' else: - FD.write('<div class="comment">') - FD.write("<br />\n".join(lines)+"<br />\n") + com += '<div class="comment">' + #FD.write("<br />\n".join(lines)+"<br />\n") + com += "<br />\n".join(lines)+"<br />\n" while len(stack) > 0: stack.pop(-1) - FD.write("</div>\n") # close every remaining <div class="comment... - FD.write(self.end_comment_section) + com += "</div>\n" # close every remaining <div class="comment... + comments = self.comment_section%com + + if fileid == "active": + FD.write(detail_file_%(encoding, "../index.html", det_line, comments, "../index.html")) + if fileid == "inactive": + FD.write(detail_file_%(encoding, "../index_inactive.html", det_line, comments, "../index_inactive.html")) FD.close() |