summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-11-06 17:48:48 -0500
committerJames Moger <james.moger@gitblit.com>2012-11-06 17:48:48 -0500
commit4789d15e2fb3b8e7698735962d7ecc5f7c351d23 (patch)
tree0520bb4b8f0c6237c59e9d78eb82e68d4e02950e
parent798581cab5817310a1b9991dac3b10cd7813f86a (diff)
downloadgitblit-4789d15e2fb3b8e7698735962d7ecc5f7c351d23.tar.gz
gitblit-4789d15e2fb3b8e7698735962d7ecc5f7c351d23.zip
Use static calls for settings and refine css layout to have fewer borders
-rw-r--r--groovy/sendmail-html.groovy39
1 files changed, 22 insertions, 17 deletions
diff --git a/groovy/sendmail-html.groovy b/groovy/sendmail-html.groovy
index c3b551d5..11227d4f 100644
--- a/groovy/sendmail-html.groovy
+++ b/groovy/sendmail-html.groovy
@@ -115,7 +115,7 @@ if (mailinglist != null) {
}
// add all mailing lists defined in gitblit.properties or web.xml
-toAddresses.addAll(gitblit.getStrings(Keys.mail.mailingLists))
+toAddresses.addAll(GitBlit.getStrings(Keys.mail.mailingLists))
// add all team mailing lists
def teams = gitblit.getRepositoryTeams(repository)
@@ -165,6 +165,10 @@ class HtmlMailWriter {
.table td {
vertical-align: middle;
}
+ tr.noborder td {
+ border: none;
+ padding-top: 0px;
+ }
.gravatar-column {
width: 5%;
}
@@ -177,14 +181,14 @@ class HtmlMailWriter {
.status-column {
width: 10%;
}
-.table-disable-hover.table tbody tr:hover td,
-.table-disable-hover.table tbody tr:hover th {
- background-color: inherit;
-}
-.table-disable-hover.table-striped tbody tr:nth-child(odd):hover td,
-.table-disable-hover.table-striped tbody tr:nth-child(odd):hover th {
- background-color: #f9f9f9;
-}
+ .table-disable-hover.table tbody tr:hover td,
+ .table-disable-hover.table tbody tr:hover th {
+ background-color: inherit;
+ }
+ .table-disable-hover.table-striped tbody tr:nth-child(odd):hover td,
+ .table-disable-hover.table-striped tbody tr:nth-child(odd):hover th {
+ background-color: #f9f9f9;
+ }
''')
}
@@ -247,7 +251,7 @@ class HtmlMailWriter {
writeCommit(commit)
// Write detail on that particular commit
- tr {
+ tr('class' : 'noborder') {
td (colspan: includeGravatar ? 3 : 2)
td (colspan:2) { writeStatusTable(commit) }
}
@@ -289,7 +293,7 @@ class HtmlMailWriter {
writeStatusLabel("addition", "addition")
}
builder.td {
- a(href:blobDiffUrl(id, header.newPath)) { span(style:'font-family: monospace;', header.newPath) }
+ a(href:blobDiffUrl(id, header.newPath), header.newPath)
}
}
@@ -298,7 +302,7 @@ class HtmlMailWriter {
writeStatusLabel("rename", "rename")
}
builder.td() {
- a(href:blobDiffUrl(id, header.newPath)) { span(style : "font-family: monospace; ", header.oldPath + " copied to " + header.newPath) }
+ a(href:blobDiffUrl(id, header.newPath), header.oldPath + " copied to " + header.newPath)
}
}
@@ -307,7 +311,7 @@ class HtmlMailWriter {
writeStatusLabel("deletion", "deletion")
}
builder.td() {
- a(href:blobDiffUrl(id, header.oldPath)) { span(style : "font-family: monospace; ", header.oldPath) }
+ a(href:blobDiffUrl(id, header.oldPath), header.oldPath)
}
}
@@ -316,7 +320,7 @@ class HtmlMailWriter {
writeStatusLabel("modification", "modification")
}
builder.td() {
- a(href:blobDiffUrl(id, header.oldPath)) { span(style : "font-family: monospace; ", header.oldPath) }
+ a(href:blobDiffUrl(id, header.oldPath), header.oldPath)
}
}
@@ -325,7 +329,7 @@ class HtmlMailWriter {
writeStatusLabel("rename", "rename")
}
builder.td() {
- a(href:blobDiffUrl(id, header.newPath)) { span(style : "font-family: monospace; ", header.olPath + " -> " + header.newPath) }
+ a(href:blobDiffUrl(id, header.newPath), header.olPath + " -> " + header.newPath)
}
}
@@ -414,6 +418,7 @@ class HtmlMailWriter {
head {
link(rel:"stylesheet", href:"${url}/bootstrap/css/bootstrap.css")
link(rel:"stylesheet", href:"${url}/gitblit.css")
+ link(rel:"stylesheet", href:"${url}/bootstrap/css/bootstrap-responsive.css")
writeStyle()
}
body {
@@ -481,8 +486,8 @@ mailWriter.baseCommitDiffUrl = baseCommitDiffUrl
mailWriter.forwardSlashChar = forwardSlashChar
mailWriter.commands = commands
mailWriter.url = url
-mailWriter.mountParameters = gitblit.getBoolean(Keys.web.mountParameters, true)
-mailWriter.includeGravatar = gitblit.getBoolean(Keys.web.allowGravatar, true)
+mailWriter.mountParameters = GitBlit.getBoolean(Keys.web.mountParameters, true)
+mailWriter.includeGravatar = GitBlit.getBoolean(Keys.web.allowGravatar, true)
mailWriter.shortCommitIdLength = GitBlit.getInteger(Keys.web.shortCommitIdLength, 8)
def content = mailWriter.write()