]> source.dussan.org Git - gitblit.git/commitdiff
Use static calls for settings and refine css layout to have fewer borders
authorJames Moger <james.moger@gitblit.com>
Tue, 6 Nov 2012 22:48:48 +0000 (17:48 -0500)
committerJames Moger <james.moger@gitblit.com>
Tue, 6 Nov 2012 22:48:48 +0000 (17:48 -0500)
groovy/sendmail-html.groovy

index c3b551d5c506ddd7808e9da871a246deb119e71c..11227d4fc528dfd3fabf240d67a83b3bdfc18fdd 100644 (file)
@@ -115,7 +115,7 @@ if (mailinglist != null) {
 }\r
 \r
 // add all mailing lists defined in gitblit.properties or web.xml\r
-toAddresses.addAll(gitblit.getStrings(Keys.mail.mailingLists))\r
+toAddresses.addAll(GitBlit.getStrings(Keys.mail.mailingLists))\r
 \r
 // add all team mailing lists\r
 def teams = gitblit.getRepositoryTeams(repository)\r
@@ -165,6 +165,10 @@ class HtmlMailWriter {
     .table td {\r
         vertical-align: middle;\r
     }\r
+    tr.noborder td {\r
+        border: none;\r
+        padding-top: 0px;\r
+    }\r
     .gravatar-column {\r
         width: 5%; \r
     }\r
@@ -177,14 +181,14 @@ class HtmlMailWriter {
     .status-column {\r
         width: 10%;\r
     }\r
-.table-disable-hover.table tbody tr:hover td,\r
-.table-disable-hover.table tbody tr:hover th {\r
-    background-color: inherit;\r
-}\r
-.table-disable-hover.table-striped tbody tr:nth-child(odd):hover td,\r
-.table-disable-hover.table-striped tbody tr:nth-child(odd):hover th {\r
-  background-color: #f9f9f9;\r
-}\r
+    .table-disable-hover.table tbody tr:hover td,\r
+    .table-disable-hover.table tbody tr:hover th {\r
+        background-color: inherit;\r
+    }\r
+    .table-disable-hover.table-striped tbody tr:nth-child(odd):hover td,\r
+    .table-disable-hover.table-striped tbody tr:nth-child(odd):hover th {\r
+      background-color: #f9f9f9;\r
+    }\r
     ''')\r
     }\r
 \r
@@ -247,7 +251,7 @@ class HtmlMailWriter {
                     writeCommit(commit)\r
 \r
                     // Write detail on that particular commit\r
-                    tr {\r
+                    tr('class' : 'noborder') {\r
                         td (colspan: includeGravatar ? 3 : 2)\r
                         td (colspan:2) { writeStatusTable(commit) }\r
                     }\r
@@ -289,7 +293,7 @@ class HtmlMailWriter {
             writeStatusLabel("addition", "addition")\r
         }\r
         builder.td {\r
-            a(href:blobDiffUrl(id, header.newPath)) { span(style:'font-family: monospace;', header.newPath) }\r
+            a(href:blobDiffUrl(id, header.newPath), header.newPath)\r
         }\r
     }\r
 \r
@@ -298,7 +302,7 @@ class HtmlMailWriter {
             writeStatusLabel("rename", "rename")\r
         }\r
         builder.td() {\r
-            a(href:blobDiffUrl(id, header.newPath)) { span(style : "font-family: monospace; ", header.oldPath + " copied to " + header.newPath) }\r
+            a(href:blobDiffUrl(id, header.newPath), header.oldPath + " copied to " + header.newPath)\r
         }\r
     }\r
 \r
@@ -307,7 +311,7 @@ class HtmlMailWriter {
             writeStatusLabel("deletion", "deletion")\r
         }\r
         builder.td() {\r
-            a(href:blobDiffUrl(id, header.oldPath)) { span(style : "font-family: monospace; ", header.oldPath) }\r
+            a(href:blobDiffUrl(id, header.oldPath), header.oldPath)\r
         }\r
     }\r
 \r
@@ -316,7 +320,7 @@ class HtmlMailWriter {
                        writeStatusLabel("modification", "modification")\r
         }\r
         builder.td() {\r
-            a(href:blobDiffUrl(id, header.oldPath)) { span(style : "font-family: monospace; ", header.oldPath) }\r
+            a(href:blobDiffUrl(id, header.oldPath), header.oldPath)\r
         }\r
     }\r
 \r
@@ -325,7 +329,7 @@ class HtmlMailWriter {
              writeStatusLabel("rename", "rename")\r
         }\r
         builder.td() {\r
-            a(href:blobDiffUrl(id, header.newPath)) { span(style : "font-family: monospace; ", header.olPath + " -> " + header.newPath) }\r
+            a(href:blobDiffUrl(id, header.newPath), header.olPath + " -> " + header.newPath)\r
         }\r
     }\r
 \r
@@ -414,6 +418,7 @@ class HtmlMailWriter {
             head {\r
                 link(rel:"stylesheet", href:"${url}/bootstrap/css/bootstrap.css")\r
                 link(rel:"stylesheet", href:"${url}/gitblit.css")\r
+                               link(rel:"stylesheet", href:"${url}/bootstrap/css/bootstrap-responsive.css")\r
                 writeStyle()\r
             }\r
             body {\r
@@ -481,8 +486,8 @@ mailWriter.baseCommitDiffUrl = baseCommitDiffUrl
 mailWriter.forwardSlashChar = forwardSlashChar\r
 mailWriter.commands = commands\r
 mailWriter.url = url\r
-mailWriter.mountParameters = gitblit.getBoolean(Keys.web.mountParameters, true)\r
-mailWriter.includeGravatar = gitblit.getBoolean(Keys.web.allowGravatar, true)\r
+mailWriter.mountParameters = GitBlit.getBoolean(Keys.web.mountParameters, true)\r
+mailWriter.includeGravatar = GitBlit.getBoolean(Keys.web.allowGravatar, true)\r
 mailWriter.shortCommitIdLength = GitBlit.getInteger(Keys.web.shortCommitIdLength, 8)\r
 \r
 def content = mailWriter.write()\r