about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--public/css/style.css21
-rw-r--r--views/index.tt11
-rw-r--r--views/layouts/main.tt10
-rw-r--r--views/project/index.tt42
4 files changed, 60 insertions, 24 deletions
diff --git a/public/css/style.css b/public/css/style.css
index b4ae038..d035f0e 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -32,3 +32,24 @@ pre {
     font-family: \"lucida console\",\"monaco\",\"andale mono\",\"bitstream vera sans mono\",\"consolas\",monospace;
 }
 
+.commits{
+   border:1px solid #bedce7;
+   margin-top:.5em;
+   padding:0 .5em .5em .5em;
+   background:#eaf2f5;
+   overflow:hidden;
+}
+
+#display_test_result {
+   background: black;
+   color: white;
+}
+
+.commits .description {
+   float: left;
+}
+
+.commits .git {
+   float: right;
+}
+
diff --git a/views/index.tt b/views/index.tt
index 7b44ac5..6a79821 100644
--- a/views/index.tt
+++ b/views/index.tt
@@ -1,4 +1,6 @@
-<h2>Projects</h2>
+<h2>Dashboard</h2>
+
+<h3>Projects</h3>
 
 <ul>
   : for $projects -> $project {
@@ -6,3 +8,10 @@
   : }
 </ul>
 
+<h3>Builds pending</h3>
+
+<ul>
+  : for $builds -> $build {
+  <li><a href="<: $uri_base :>task/<: $build :>"><: $build :></a></li>
+  : }
+</ul>
diff --git a/views/layouts/main.tt b/views/layouts/main.tt
index bad65ab..9b97dbf 100644
--- a/views/layouts/main.tt
+++ b/views/layouts/main.tt
@@ -8,15 +8,11 @@
     <script type="text/javascript">
       $(document).ready(function() {
         $('.commits a').click(function() {
-          var url = '/api/build/'
-            + $(this).parent("li").parent("ul").attr('id')
-            + '/'
-            + $(this).parent("li").attr('id')
-            + '/'
-            + $(this).text().toLowerCase();
+          var url = $(this).attr("href");
           $.getJSON(url, null, function(data) {
-            $("#display_test_result").html("<pre>" + data.content + "<pre>")
+            $("#display_test_result").html("<pre>" + data.content + "<pre>");
           });
+          return false;
       })})
     </script>
   </head>
diff --git a/views/project/index.tt b/views/project/index.tt
index 813907b..7f1aeb6 100644
--- a/views/project/index.tt
+++ b/views/project/index.tt
@@ -1,24 +1,34 @@
 <h2><: $project :></h2>
 
-<ul>
-  <li>url: <: $url :></li>
-  <li>description: <: $description :></li>
-  <li><a href="<: $base_uri :>/project/<: $project :>/feed">feed</a></li>
-</ul>
+<small>"<: $description :>"</small> &mdash; <a href="<: $url :>">view more</a>.
 
 <h3>Builds</h3>
 
-<ul class="commits" id="<: $project :>">
-  :for $builds -> $build {
-  <li id="<: $build.commit :>">
-    Commit <: $build.commit :> (<: $build.date.ymd :>)<br />
-    author: <: $build.author.name :> - <a href="<: $build.compare :>">compare</a><br />
-    :for $build.version.keys() -> $version {
-        <a href="#"><: $version :></a>=<: $build.version[$version] :>
-    :}
-  </li>
-  :}
-</ul>
+<a href="<: $base_uri :>/project/<: $project :>/feed">feed</a>
+
+<div class="commits">
+:for $builds -> $build {
+    <div class="commit" id="<: $build.commit :>">
+        <div class="description">
+            <div class="message"><pre><: $build.message :></pre></div>
+            <div class="name"><: $build.author.name :></div>
+            <div class="date"><: $build.timestamp :></div>
+            <div class="builds">
+                :for $build.version.keys() -> $version {
+                    <a href="<: $uri_base :>/api/build/<: $project :>/<: $build.commit :>/<: $version :>"><: $version :></a> <: $build.version[$version] :>
+                :}
+            </div>
+        </div>
+        <div class="git">
+            <ul>
+            <li>commit&nbsp;&nbsp;<a href="<: $build.url :>"><: $build.commit :></a></li>
+            <li><a href="<: $build.compare :>">compare</a></li>
+            </ul>
+        </div>
+    </div>
+:}
+</div>
 
 <div id="display_test_result">
 </div>
+