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}} + + 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 }}. +

+
+

+
diff --git a/src/app/dashboard/template/event/worklist_created.html b/src/app/dashboard/template/event/worklist_created.html new file mode 100644 index 00000000..026602d2 --- /dev/null +++ b/src/app/dashboard/template/event/worklist_created.html @@ -0,0 +1,28 @@ +
+

+

+ + + {{author.full_name}} created the worklist + + {{ worklist.title }} + . + +

+ + + + + + + + + + + + + +
Title{{ worklist.title }}
Automatic{{ 'Yes' ? worklist.automatic : 'No' }}
Private{{ 'Yes' ? worklist.private : 'No' }}
+

+
diff --git a/src/app/dashboard/template/event/worklist_details_changed.html b/src/app/dashboard/template/event/worklist_details_changed.html new file mode 100644 index 00000000..2efa4c68 --- /dev/null +++ b/src/app/dashboard/template/event/worklist_details_changed.html @@ -0,0 +1,19 @@ +
+

+

+ + + {{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 }}. +

+

+
diff --git a/src/app/dashboard/template/event/worklist_filters_changed.html b/src/app/dashboard/template/event/worklist_filters_changed.html new file mode 100644 index 00000000..55ed772f --- /dev/null +++ b/src/app/dashboard/template/event/worklist_filters_changed.html @@ -0,0 +1,69 @@ +
+

+

+ + + {{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 + + +

+

+
diff --git a/src/app/dashboard/template/event/worklist_permission_created.html b/src/app/dashboard/template/event/worklist_permission_created.html new file mode 100644 index 00000000..65014eae --- /dev/null +++ b/src/app/dashboard/template/event/worklist_permission_created.html @@ -0,0 +1,34 @@ +
+

+

+ + + {{author.full_name}} created a permission for + + {{ worklist.title }} + . + +

+

+ + {{ evt.event_info.codename == 'move_items' ? 'Users' : 'Owners' }} + + + {{ evt.event_info.codename }} + +

+ +
+

+

+

+
diff --git a/src/app/dashboard/template/event/worklist_permissions_changed.html b/src/app/dashboard/template/event/worklist_permissions_changed.html new file mode 100644 index 00000000..2a110f7e --- /dev/null +++ b/src/app/dashboard/template/event/worklist_permissions_changed.html @@ -0,0 +1,44 @@ +
+

+

+ + + {{author.full_name}} updated the permissions of + + {{ worklist.title }} + . + +

+

+ + {{ evt.event_info.codename == 'move_items' ? 'Users' : 'Owners' }} + + + {{ evt.event_info.codename }} + +

+ Added: + +
+
+ Removed: + +
+

+

+
diff --git a/src/app/dashboard/template/subscription_event.html b/src/app/dashboard/template/subscription_event.html index d6de0bb5..980730a7 100644 --- a/src/app/dashboard/template/subscription_event.html +++ b/src/app/dashboard/template/subscription_event.html @@ -32,4 +32,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/profile/template/preferences.html b/src/app/profile/template/preferences.html index 85ac1582..d87e134e 100644 --- a/src/app/profile/template/preferences.html +++ b/src/app/profile/template/preferences.html @@ -173,6 +173,20 @@ ng-model="preferences.plugin_email_enable"> + +

+ Would you like to receive notifications from + worklists you are subscribed to? +

+ +
+ + +
diff --git a/src/app/services/provider/preference.js b/src/app/services/provider/preference.js index cbcfe6d9..56b2b9e2 100644 --- a/src/app/services/provider/preference.js +++ b/src/app/services/provider/preference.js @@ -238,4 +238,7 @@ angular.module('sb.services').provider('Preference', // Let our preference provider know about email preferences. PreferenceProvider.addPreference('plugin_email_enable', 'false'); + // Let our preference provider know about notifications preferences. + PreferenceProvider.addPreference( + 'receive_notifications_worklists', false); }); diff --git a/src/theme/base/discussion.less b/src/theme/base/discussion.less index e23f1e1e..d340a5e3 100644 --- a/src/theme/base/discussion.less +++ b/src/theme/base/discussion.less @@ -192,3 +192,7 @@ .panel .discussion::before { height: calc(100% - 35px); } + +.discussion-comment .kanban-card { + max-width: 300px; +}