Add templates for tags added/deleted subscription events

Tag/Untag events were blank on the dashboard. Now users will get
notifications about these events, including a link to the relevant
story.

For this patch to work properly we need to add to tag events the
story_title (https://review.openstack.org/#/c/251566/)

Change-Id: Iaa6316f3ab7950c36d8ff3c0979bf19d05513a60
This commit is contained in:
Pedro Alvarez 2015-12-01 01:07:41 +00:00 committed by Pedro Alvarez
parent c73321e3dd
commit e0da643ba8
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<div>
<p>
<span time-moment eventdate="evt.created_at" class="pull-right"></span>
<span>{{ author.full_name }} tagged the story <a href="#!/story/{{evt.event_info.story_id}}">{{evt.event_info.story_title}}</a> as:</span>
</p>
<p>
<ul class="list-inline">
<li ng-repeat="tag in evt.event_info.tags">
<span class="label label-warning">{{ tag }}</span>
</li>
</ul>
</p>
</div>

View File

@ -0,0 +1,13 @@
<div>
<p>
<span time-moment eventdate="evt.created_at" class="pull-right"></span>
<span>{{ author.full_name }} removed the following tags from the story <a href="#!/story/{{evt.event_info.story_id}}">{{evt.event_info.story_title}}</a>:</span>
</p>
<p>
<ul class="list-inline">
<li ng-repeat="tag in evt.event_info.tags">
<span class="label label-default"><strike>{{ tag }}</strike></span>
</li>
</ul>
</p>
</div>

View File

@ -5,6 +5,12 @@
<div ng-switch-when="story_details_changed">
<div ng-include src="'app/dashboard/template/event/story_details_changed.html'"></div>
</div>
<div ng-switch-when="tags_added">
<div ng-include src="'app/dashboard/template/event/tags_added.html'"></div>
</div>
<div ng-switch-when="tags_deleted">
<div ng-include src="'app/dashboard/template/event/tags_deleted.html'"></div>
</div>
<div ng-switch-when="task_assignee_changed">
<div ng-include src="'app/dashboard/template/event/task_assignee_changed.html'"></div>
</div>