Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Commit

Permalink
- closed bugs f77, 2b8 d8d
Browse files Browse the repository at this point in the history
- some changes to the css and to the html layout
  • Loading branch information
mgian committed Aug 4, 2009
1 parent c200dda commit e42729a
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .be/bugs/2b81b428-fc43-4970-9469-b442385b9c0d/values
Expand Up @@ -7,7 +7,7 @@ reporter: gianluca <gian@galactica>
severity: minor


status: open
status: closed


summary: Use the get_parser
Expand Down
@@ -0,0 +1 @@
prova
@@ -0,0 +1,11 @@
Content-type: text/plain


Date: Tue, 04 Aug 2009 19:48:58 +0000


From: Gianluca Montecchi <gian@grys.it>


In-reply-to: 433e2090-55d6-4b13-bc6d-0b509556f21b

2 changes: 1 addition & 1 deletion .be/bugs/c271a802-d324-48a6-b01d-63e4a72aa43e/values
Expand Up @@ -4,7 +4,7 @@ creator: gianluca <gian@galactica>
reporter: gianluca <gian@galactica>


severity: minor
severity: wishlist


status: open
Expand Down
2 changes: 1 addition & 1 deletion .be/bugs/d8dba78d-f82a-4674-9003-a0ec569b4a96/values
Expand Up @@ -7,7 +7,7 @@ reporter: gianluca <gian@galactica>
severity: wishlist


status: open
status: closed


summary: Add the possibility to specify the repository Directory ?
Expand Down
17 changes: 17 additions & 0 deletions .be/bugs/da2b09ff-af24-40f3-9b8d-6ffaa5f41164/values
@@ -0,0 +1,17 @@
creator: Gianluca Montecchi <gian@grys.it>


reporter: Gianluca Montecchi <gian@grys.it>


severity: wishlist


status: open


summary: Add an icon near the status string


time: Tue, 04 Aug 2009 21:15:52 +0000

127 changes: 66 additions & 61 deletions becommands/html.py
Expand Up @@ -38,14 +38,16 @@ def execute(args, test=False):
"""
parser = get_parser()
options, args = parser.parse_args(args)
complete(options, args, parser)
cmdutil.default_complete(options, args, parser,
bugid_args={0: lambda bug : bug.active==False})

if len(args) == 0:
out_dir = './html_export'
print "Creating the html output in ./html_export"
out_dir = options.outdir
print "Creating the html output in %s"%out_dir
else:
out_dir = args[0]
if len(args) > 1:
if len(args) > 0:
raise cmdutil.UsageError, "Too many arguments."

bd = bugdir.BugDir(from_disk=True, manipulate_encodings=not test)
Expand Down Expand Up @@ -76,6 +78,8 @@ def execute(args, test=False):

def get_parser():
parser = cmdutil.CmdOptionParser("be open OUTPUT_DIR")
parser.add_option("-o", "--output", metavar="export_dir", dest="outdir",
help="Set the output path, default is ./html_export", default="html_export")
return parser

longhelp="""
Expand All @@ -84,7 +88,12 @@ def get_parser():

def help():
return get_parser().help_str() + longhelp


def complete(options, args, parser):
for option, value in cmdutil.option_value_pairs(options, parser):
if "--complete" in args:
raise cmdutil.GetCompletions() # no positional arguments for list


class BEHTMLGen():
def __init__(self, bd):
Expand Down Expand Up @@ -127,43 +136,32 @@ def __init__(self, bd):
border = 1;
}
.open-row {
background-color: #e9e9e2;
width: 5%;
}
.assigned-row {
background-color: #f9f9f9;
width: 5%;
.wishlist-row {
background-color: #B4FF9B;
width: auto;
}
.test-row {
background-color: #f9f9f9;
width: 5%;
.minor-row {
background-color: #FCFF98;
width: auto;
}
.unconfirmed-row {
background-color: #f9f9f9;
width: 5%;
}
.fixed-row {
background-color: #f9f9f9;
width: 5%;
.serious-row {
background-color: #FFB648;
width: auto;
}
.closed-row {
background-color: #f9f9f9;
width: 5%;
.critical-row {
background-color: #FF752A;
width: auto;
}
.wontfix-row {
background-color: #f9f9f9;
width: 5%;
.fatal-row {
background-color: #FF3300;
width: auto;
}
.person {
font-family: courier;
}
Expand All @@ -187,7 +185,7 @@ def __init__(self, bd):
}
p {
width: 40em;
width: auto;
}
.inline-status-image {
Expand All @@ -200,23 +198,40 @@ def __init__(self, bd):
}
table {
border-style: none;
border-style: 10px solid #313131;
border-spacing: 0;
width: auto;
}
table.log {
}
td {
border-width: 0;
border-style: none;
padding-right: 0.5em;
padding-left: 0.5em;
width: auto;
}
.td_sel {
background-color: #afafaf;
border: 1px solid #afafaf;
font-weight:bold;
padding-right: 1em;
padding-left: 1em;
}
.td_nsel {
border: 0px;
padding-right: 1em;
padding-left: 1em;
}
tr {
vertical-align: top;
width: auto;
}
h1 {
Expand All @@ -240,8 +255,6 @@ def __init__(self, bd):
color: #305275;
}
.attrname {
text-align: right;
font-size: smaller;
Expand Down Expand Up @@ -308,13 +321,6 @@ def __init__(self, bd):
background-color: #f9f9f9;
}
.backptr {
font-size: smaller;
width: 100%;
text-align: left;
padding-bottom: 1em;
margin-top: 0;
}
.logcomment {
padding-left: 4em;
Expand All @@ -325,21 +331,14 @@ def __init__(self, bd):
font-family: courier;
}
.description {
background: #f2f2f2;
padding-left: 1em;
padding-right: 1em;
padding-top: 0.5em;
padding-bottom: 0.5em;
.table_bug {
background-color: #afafaf;
border: 2px solid #afafaf;
}
.message {
}
.littledate {
font-size: smaller;
}
.progress-meter-done {
background-color: #03af00;
}
Expand All @@ -350,6 +349,7 @@ def __init__(self, bd):
.progress-meter {
}
"""

self.index_first = """
Expand All @@ -364,12 +364,16 @@ def __init__(self, bd):
<div class="main">
<h1>BugsEverywhere Bug List</h1>
<table><tr>
<td><a href="index.html"><h2>Active Bugs</h2></a></td>
<td><a href="index_inactive.html"><h2>Inactive Bugs</h2></a></td>
<p></p>
<table>
<tr>
<td class=%s><a href="index.html">Active Bugs</a></td>
<td class=%s><a href="index_inactive.html">Inactive Bugs</a></td>
</tr>
</table>
<table width=100%>
<table class=table_bug>
<tbody>
"""

Expand Down Expand Up @@ -471,16 +475,17 @@ def create_index_file(self, out_dir_path, summary, bugs, ordered_bug, fileid):
try:
if fileid == "active":
FO = open(out_dir_path+"/index.html", "w")
FO.write(self.index_first%('td_sel','td_nsel'))
if fileid == "inactive":
FO = open(out_dir_path+"/index_inactive.html", "w")
FO.write(self.index_first%('td_nsel','td_sel'))
except:
raise cmdutil.UsageError, "Cannot create the index.html file."

FO.write(self.index_first)
c = 0
t = len(bugs) - 1
for l in range(t, -1, -1):
line = self.bug_line%(bugs[l].status,
line = self.bug_line%(bugs[l].severity,
bugs[l].uuid, bugs[l].uuid[0:3],
bugs[l].uuid, bugs[l].status,
bugs[l].uuid, bugs[l].severity,
Expand All @@ -489,12 +494,12 @@ def create_index_file(self, out_dir_path, summary, bugs, ordered_bug, fileid):
)
FO.write(line)
c += 1
self.CreateDetailFile(bugs[l], out_dir_path, fileid)
self.create_detail_file(bugs[l], out_dir_path, fileid)
when = time.ctime()
FO.write(self.index_last%when)


def CreateDetailFile(self, bug, out_dir_path, fileid):
def create_detail_file(self, bug, out_dir_path, fileid):
f = "%s.html"%bug.uuid
p = out_dir_path+"/bugs/"+f
try:
Expand Down

0 comments on commit e42729a

Please sign in to comment.