From 60ffc0e14910ffa7a805126740fcacbfdd37bfd2 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Feb 19 2018 03:18:59 +0000 Subject: [PATCH 1/5] make meetings no config warning show when owner This makes the no-config warning for the meetings widget only show when the owner is looking at the hub. otherwise, just a no meetings message is shown. --- diff --git a/hubs/static/css/style.css b/hubs/static/css/style.css index 38a1486..68f2542 100644 --- a/hubs/static/css/style.css +++ b/hubs/static/css/style.css @@ -374,6 +374,8 @@ header h5.m-b-1 { .text-fedora-green-dark{color: #488b18!important;} .text-fedora-purple-dark{color: #70488f!important;} +.text-muted-muted{color: #ddd!important;} + .typeahead, .twitter-typeahead { width: 100%!important; } diff --git a/hubs/widgets/meetings/templates/root.html b/hubs/widgets/meetings/templates/root.html index 9c2cfa7..65ed02f 100644 --- a/hubs/widgets/meetings/templates/root.html +++ b/hubs/widgets/meetings/templates/root.html @@ -1,14 +1,24 @@ {% if not calendars %} {% if hub_type == 'team' %} -

- You must configure a calendar in the hub configuration in order to use this widget. -

+ {% if widget_instance.hub.allows(g.user, "config") %} +
+
+ +
+
+ no meeting calendar configured
+ Set up a meeting calendar in this Hub's Configuration. +
+
+ {% else %} +
+ no upcoming meetings +
+ {% endif %} {% elif hub_type == 'stream'%} {% if no_subscriptions %}
- You aren't subscribed to any hubs. -
-
+ You aren't subscribed to any hubs. Subscribe to a hub to show meetings here.
{% else%} From 180b5692eccb4a9ff1d674cd4e4be862d1b7f973 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Feb 19 2018 03:19:38 +0000 Subject: [PATCH 2/5] 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 %}