Commits

Benoît Allard  committed a704f47

web: improve formatting of the list pages

  • Participants
  • Parent commits 3981caa

Comments (0)

Files changed (5)

File web/templates/binaries.html

 {% block items %}
 {% for binary in binaries %}
   <li class="binary">
-    <h3><a href="{{ url_for('views.binary', name=binary.module.name, build=binary.build.number) }}">{{ binary.module.name }} - {{binary.build.number}}</a></h3>
-    <p>Included in {{ binary.releases | count }} releases</p>
+    <p>
+      <a href="{{ url_for('views.binary', name=binary.module.name, build=binary.build.number) }}">{{ binary.module.name }} - {{binary.build.number}}</a> is included in 
+      <span class="badge {{ 'badge-info' if binary.releases }}">{{ binary.releases | count }}</span> releases</p>
   </li>
 {% else %}
 <li> No binary in DB (yet)</li>

File web/templates/builds.html

 {% block items %}
 {% for build in builds %}
   <li class="build">
-    <h3><a href="{{ url_for('views.build', number=build.number) }}">{{ build.number }}</a></h3>
-    {% if build.binaries %}
-    <p>{{ build.binaries | count }} binaries built.</p>
-    {% endif %}
-    {% if build.changesets %}
-    <p>build contains {{ build.changesets| count }} changesets.</p>
-    {% endif %}
+    <p>
+      Build <a href="{{ url_for('views.build', number=build.number) }}">{{ build.number }}</a> built <span class="badge {{ 'badge-info' if (build.binaries | count) }}">{{ build.binaries | count }}</span> binaries from <span class="badge {% if build.changesets | count %}badge-info{% else %}badge-important{% endif %}">{{ build.changesets | count }}</span> changesets.
+    </p>
   </li>
 {% else %}
 <li> No build in DB (yet)</li>

File web/templates/issues.html

 {% block items %}
 {% for issue in issues %}
   <li class="issue">
-    <h3>{{ macros.render_issue(issue)|safe }}</h3>
     <p>
-      {% if issue.changesets %}
-        {{ issue.changesets | count }}
-      {% else %}
-        No
-      {% endif %}
+    {{ macros.render_issue(issue)|safe }}:
+      
+    <span class="badge {{ 'badge-info' if issue.changesets }}">{{ issue.changesets | count }}</span>
       linked changeset{% if (issue.changesets | count) > 1 %}s{% endif %}.
     </p>
   </li>

File web/templates/releases.html

 {% block items %}
 {% for release in releases %}
   <li class="release">
-    <h3><a href="{{ url_for('views.release', ref=release.ref, rc=release.rc) }}">{{ release }}</a></h3>
-    <p>Identifier: <pre>{{ release.identifier }}</pre></p>
-    <p>{{ release.binaries | count}} binaries.</p>
-    <p>{{ release.changesets | count }} changesets.</p>
+    <p>
+      <a href="{{ url_for('views.release', ref=release.ref, rc=release.rc) }}">{{ release }}</a>
+      (<tt>{{ release.identifier }}</tt>): 
+      <span class="badge badge-info">{{ release.binaries | count}}</span> binaries and
+      <span class="badge badge-info">{{ release.changesets | count }}</span> changesets.
+    </p>
   </li>
 {% else %}
   <li> No release in DB (yet)</li>

File web/templates/repositories.html

 {% block items %}
 {% for repo in repositories %}
   <li class="repository">
-    {{ macros.render_repository(repo)|safe }} ({{ repo.changesets|count }} changesets)
+    {{ macros.render_repository(repo)|safe }} (<span class="badge badge-info">{{ repo.changesets|count }}</span> changesets)
   </li>
 {% endfor %}
 {% endblock %}