From 180b5692eccb4a9ff1d674cd4e4be862d1b7f973 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Feb 19 2018 03:19:38 +0000 Subject: add warning for team owner if no repos are configured on repos widget fixes #581 --- diff --git a/hubs/widgets/repositories/templates/root.html b/hubs/widgets/repositories/templates/root.html index 0a81e9a..4371bc4 100644 --- a/hubs/widgets/repositories/templates/root.html +++ b/hubs/widgets/repositories/templates/root.html @@ -1,12 +1,30 @@ - -{% for repo in repos %} - - - - - -{% endfor %} -
{{repo["repo_name"]}}{{repo["issues_count"]}}{{repo["pr_count"]}}
+{% if repos %} + + {% for repo in repos %} + + + + + + {% endfor %} +
{{repo["repo_name"]}}{{repo["issues_count"]}}{{repo["pr_count"]}}
+{% else %} + {% if widget_instance.hub.allows(g.user, "config") %} +
+
+ +
+
+ no repositories configured
+ Set up repositories in the Software Development Platforms section in this Hub's Configuration. +
+
+ {% else %} +
+ no repositories +
+ {% endif %} +{% endif %}