diff --git a/src/app/dashboard/controller/worklist_event_controller.js b/src/app/dashboard/controller/worklist_event_controller.js new file mode 100644 index 00000000..a11a4ee8 --- /dev/null +++ b/src/app/dashboard/controller/worklist_event_controller.js @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2016 Codethink Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. You may obtain + * a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * A controller for Worklist event notifications. + */ +angular.module('sb.dashboard').controller('WorklistEventController', + function ($scope, Worklist) { + 'use strict'; + + $scope.worklist = Worklist.get({ + id: $scope.evt.event_info.worklist_id + }); + } +); diff --git a/src/app/dashboard/template/event/worklist_contents_changed.html b/src/app/dashboard/template/event/worklist_contents_changed.html new file mode 100644 index 00000000..0b7eec3f --- /dev/null +++ b/src/app/dashboard/template/event/worklist_contents_changed.html @@ -0,0 +1,32 @@ +
+ + + {{author.full_name}} created the worklist + + {{ worklist.title }} + . + +
+Title | +{{ worklist.title }} | +
Automatic | +{{ 'Yes' ? worklist.automatic : 'No' }} | +
Private | +{{ 'Yes' ? worklist.private : 'No' }} | +
+ + + {{author.full_name}} updated the worklist + + {{ worklist.title }} + . + +
++ {{ evt.event_info.field | capitalize }} was updated + from {{ evt.event_info.old_value }} + to {{ evt.event_info.new_value }}. +
+ ++ + + {{author.full_name}} updated the filters of + + {{ worklist.title }} + . + +
++ Added: + {{ evt.event_info.added.type == 'Story' ? 'Stories' : 'Tasks' }} + where + + {{ criterion.field | capitalize }} + {{ criterion.negative ? 'is not' : 'is' }} + {{ criterion.title }} + + and + + +
++ Removed: + {{ evt.event_info.removed.type == 'Story' ? 'Stories' : 'Tasks' }} + where + + {{ criterion.field | capitalize }} + {{ criterion.negative ? 'is not' : 'is' }} + {{ criterion.title }} + + and + + +
+
+ Updated:
+
+ From: {{ evt.event_info.updated.old.type == 'Story' ? 'Stories' : 'Tasks' }}
+ where
+
+ {{ criterion.field | capitalize }}
+ {{ criterion.negative ? 'is not' : 'is' }}
+ {{ criterion.title }}
+
+ and
+
+
+
+ To: {{ evt.event_info.updated.new.type == 'Story' ? 'Stories' : 'Tasks' }}
+ where
+
+ {{ criterion.field | capitalize }}
+ {{ criterion.negative ? 'is not' : 'is' }}
+ {{ criterion.title }}
+
+ and
+
+
+
+ + + {{author.full_name}} created a permission for + + {{ worklist.title }} + . + +
++ + {{ evt.event_info.codename == 'move_items' ? 'Users' : 'Owners' }} + + + {{ evt.event_info.codename }} + +
+ + + {{author.full_name}} updated the permissions of + + {{ worklist.title }} + . + +
++ + {{ evt.event_info.codename == 'move_items' ? 'Users' : 'Owners' }} + + + {{ evt.event_info.codename }} + +
+ Would you like to receive notifications from + worklists you are subscribed to? +
+ +
+
+ + + {{author.full_name}} + + added the card "{{ evt.event_info.added.item_title }}" to + + + removed the card "{{ evt.event_info.removed.item_title }}" from + + + updated the card "{{ evt.event_info.updated.old.item_title }}" in + + + {{ worklist.title }} + + + in position {{ evt.event_info.added.position + 1 }} + . + +
++ Moved from position {{ evt.event_info.updated.old.position + 1 }} + to {{ evt.event_info.updated.new.position + 1 }}. +
+