displaying service list on main page

212 views
Skip to first unread message

Joseph Ward

unread,
Jan 23, 2014, 10:24:43 PM1/23/14
to stash...@googlegroups.com
i have read a few posts about organizing the main page using service lists.

i see how it is sorted by service list, but is there any way to have the service list actually printed on the page?

like

<service list>
   <service>
   <service>
<service list>
   <service>
   <service>


does that make sense?

Andrew Shirkey

unread,
Apr 12, 2016, 9:19:31 PM4/12/16
to Stashboard
Did you ever figure out how to do this?

Игорь Шестаков

unread,
Nov 8, 2017, 7:23:18 AM11/8/17
to Stashboard

--- a/stashboard/stashboard/handlers/site.py
+++ b/stashboard/stashboard/handlers/site.py
@@ -137,6 +137,7 @@
             service_dict = {
                 "slug": service.slug,
                 "name": service.name,
+                "list": service.list.name,
                 "url": service.url(),
                 "status": status,
                 "has_issues": has_issues,
diff --git a/stashboard/stashboard/templates/index.html b/stashboard/stashboard/templates/index.html
index ca6ba2b..6b0407f 100644
--- a/stashboard/stashboard/templates/index.html
+++ b/stashboard/stashboard/templates/index.html
@@ -13,6 +13,11 @@
 
   <tbody>
     {% for service in services %}
+    {% ifchanged service.list %}
+    <tr>
+      <th>{{ service.list }}</th>
+    </tr>
+    {% endifchanged %}
     <tr id="{{ service.slug}}">
       <td>
 	<a href="{{ service.url }}">{{ service.name }}</a>
Reply all
Reply to author
Forward
0 new messages