[copr] master: Style the builds table a bit (a714cfd)

bkabrda at fedoraproject.org bkabrda at fedoraproject.org
Mon Jan 21 11:13:05 UTC 2013


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : master

>---------------------------------------------------------------

commit a714cfd8782bc147af600afe24061f39cebdb7cf
Author: Bohuslav Kabrda <bkabrda at redhat.com>
Date:   Mon Jan 21 09:29:40 2013 +0100

    Style the builds table a bit


>---------------------------------------------------------------

 coprs_frontend/coprs/static/style-new.css          |   33 ++++++++++++++++++++
 .../templates/coprs/detail/_builds_table.html      |   17 +++------
 2 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/coprs_frontend/coprs/static/style-new.css b/coprs_frontend/coprs/static/style-new.css
index 527b1f5..46c44c9 100644
--- a/coprs_frontend/coprs/static/style-new.css
+++ b/coprs_frontend/coprs/static/style-new.css
@@ -174,6 +174,15 @@ div.horizontal-menu div.selected, div.horizontal-menu div.unselected {
   float: left;
 }
 
+div.pkg-url-list {
+  white-space: pre;
+  background-color: #f9f9f9;
+  font-family: monospace;
+  padding: 1em;
+  line-height: 120%;
+  font-size: 1.1em;
+}
+
 div.shift-right {
   margin-left: 1em;
 }
@@ -198,6 +207,30 @@ table.releases {
   border-collapse:collapse;
 }
 
+table.builds-table {
+  width: 100%;
+}
+
+tr.build-pending {
+  color: #3B6EB4;
+}
+
+tr.build-running {
+  color: #FF6600;
+}
+
+tr.build-succeeded {
+  color: #22DD22;
+}
+
+tr.build-failed {
+  color: #DD2222;
+}
+
+tr.build-canceled {
+  color: #CDC90C;
+}
+
 table.releases th {
   background-color: #f2f2f2;
 }
diff --git a/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html b/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html
index ac44dc4..b2fa2b9 100644
--- a/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html
+++ b/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html
@@ -2,7 +2,7 @@
 
 {% macro builds_table(builds) %}
   {% if builds %}
-    <table class=builds-table>
+    <table class="builds-table">
       <tr>
         <th>Id</th>
         <th>Submitted on</th>
@@ -14,14 +14,14 @@
         <th>Action</th>
       </tr>
     {% for build in builds %}
-      <tr class=build-{{ build.state }}>
+      <tr class="build-{{ build.state }}">
         <td>{{ build.id }}</td>
         <td>{{ build.submitted_on|date_from_secs }}</td>
         <td>{{ build.user.name }}</td>
         <td>{{ build.started_on|date_from_secs or 'Not yet' }}</td>
         <td>{{ build.ended_on|date_from_secs or 'Not yet' }}</td>
         <td>{{ build.state }}</td>
-        <td>{% if build.results %}<a href={{ build.results }}>{% endif %}{{ build.results }}{% if build.results %}</a>{% endif %}</td>
+        <td>{% if build.results %}<a href="{{ build.results }}">{% endif %}{{ build.results }}{% if build.results %}</a>{% endif %}</td>
         <td>
           {% if g.user and g.user == build.user %}
             {{ copr_build_cancel_form(build) }}
@@ -32,14 +32,9 @@
       </tr>
       <tr>
         <td colspan=8>
-          <h4>Package URLs:</h4>
-          <ul class=packages-list>
-            {% if build.pkgs is not none %}
-              {% for pkg in build.pkgs.split() %}
-                <li><a href={{ pkg }}>{{ pkg }}</a></li>
-              {% endfor %}
-            {% endif %}
-          </ul>
+          <h2>Package URLs:</h2>
+          <div class="pkg-url-list">{% if build.pkgs is not none %}{% for pkg in build.pkgs.split() %}<a href="{{ pkg }}">{{ pkg }}</a>
+{% endfor %}{% endif %}</div>
         </td>
       </tr>
     {% endfor %}



More information about the copr-devel mailing list