diff --git a/web/templates/addCluster.html b/web/templates/addCluster.html index 2b82368..aa68c99 100644 --- a/web/templates/addCluster.html +++ b/web/templates/addCluster.html @@ -35,7 +35,7 @@
-
+
diff --git a/web/templates/create_notification.html b/web/templates/create_notification.html new file mode 100644 index 0000000..b0ffd68 --- /dev/null +++ b/web/templates/create_notification.html @@ -0,0 +1,76 @@ +{% extends "base_AdminLTE.html" %} +{% block title %}Docklet | Create Notification{% endblock %} + +{% block panel_title %}Add New Notifications{% endblock %} + +{% block panel_list %} + +{% endblock %} + +{##} +{% block content %} +
+
+
+
+

Add New Notifications

+ +
+ + +
+
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + all   + {% for group_name in groups %} + {{ group_name }}   + {% endfor %} +
+
+
+
+ +
+
+ +
+
+
+
+{% endblock %} + +{% block script_src %} + +{% endblock %} \ No newline at end of file diff --git a/web/templates/notification.html b/web/templates/notification.html index c6dd320..75f8e29 100644 --- a/web/templates/notification.html +++ b/web/templates/notification.html @@ -33,12 +33,11 @@
-

test rendering...

- - {% for title in notification_titles %} -

{{ title }}

- {% endfor %} - +

+ + + +

@@ -58,7 +57,7 @@ diff --git a/web/web.py b/web/web.py index 5516cf9..ea498b5 100755 --- a/web/web.py +++ b/web/web.py @@ -358,7 +358,7 @@ def notification_list(): return NotificationView.as_view() -@app.route("/notification/create/", methods=['POST']) +@app.route("/notification/create/", methods=['GET', 'POST']) @administration_required def create_notification(): return CreateNotificationView.as_view() diff --git a/web/webViews/notification/notification.py b/web/webViews/notification/notification.py index c978628..fe83f42 100644 --- a/web/webViews/notification/notification.py +++ b/web/webViews/notification/notification.py @@ -15,6 +15,13 @@ class NotificationView(normalView): class CreateNotificationView(normalView): + template_path = 'create_notification.html' + + @classmethod + def get(cls): + groups = dockletRequest.post('/user/groupNameList/')['groups'] + return cls.render(cls.template_path, groups=groups) + @classmethod def post(cls): dockletRequest.post('/notification/create/', request.form)
{{ notify['title'] }} {{ notify['content'] }} - {% for group_name in notify['groups'] %}{{ group_name }} {% endfor %} + {% for group_name in notify['groups'] %}{{ group_name }}  {% endfor %} {{ notify['create_date'] }} {{ notify['status'] }}