From f15762933e7f49caf095cf5c90f1b9b7cc548a34 Mon Sep 17 00:00:00 2001
From: Ryan Lerch
Date: Feb 15 2018 03:46:17 +0000
Subject: tidy up meetings widget
made the ical link for meeting items an icon rather than text
made the stream meetings widget message that shows if you arent
subscribed to any hubs.
tweak button styles a bit
---
diff --git a/hubs/widgets/meetings/__init__.py b/hubs/widgets/meetings/__init__.py
index 77cecc0..9c9c92e 100644
--- a/hubs/widgets/meetings/__init__.py
+++ b/hubs/widgets/meetings/__init__.py
@@ -47,10 +47,16 @@ class BaseView(RootWidgetView):
}
meetings = ordereddict(sorted(meetings.items(),
key=lambda x: x[1]["start_dt"]))
+ no_subscriptions = False
+ if instance.hub.hub_type == "stream":
+ user = hubs.models.User.query.get(instance.hub.name)
+ if not user.subscriptions:
+ no_subscriptions = True
return dict(
calendars=results["calendars"],
meetings=meetings,
hub_type=instance.hub.hub_type,
+ no_subscriptions=no_subscriptions,
)
diff --git a/hubs/widgets/meetings/templates/root.html b/hubs/widgets/meetings/templates/root.html
index 4c3dc34..9c2cfa7 100644
--- a/hubs/widgets/meetings/templates/root.html
+++ b/hubs/widgets/meetings/templates/root.html
@@ -4,9 +4,18 @@
You must configure a calendar in the hub configuration in order to use this widget.
{% elif hub_type == 'stream'%}
-
- The hubs you are subscribed to are not using calendars
-
+ {% if no_subscriptions %}
+
+ You aren't subscribed to any hubs.
+
+
+ Subscribe to a hub to show meetings here.
+
+ {% else%}
+
+ The hubs you are subscribed to are not using calendars
+
+ {% endif %}
{% endif %}
{% else %}
{% for title, next in meetings.items() %}
@@ -29,9 +38,9 @@
{{ next.location }}
@@ -51,8 +60,8 @@
{% endfor %}
{% if hub_type == 'team' %}
-
- View calendar on Fedocal
+
+ view entire meeting calendar
{% endif %}
{% endif %}