emails: added new tags to status sent

- make this distinct colored tags for quick status catch
- pass in the status type together with label to the notifiactions and templates
- fixed some UI issues on emails
This commit is contained in:
Marcin Kuzminski 2016-08-03 15:21:38 +02:00
parent 3b24829209
commit 1b62606fc2
10 changed files with 92 additions and 28 deletions

View file

@ -408,6 +408,8 @@ def comment_pull_request(request, apiuser, repoid, pullrequestid,
line_no=None,
status_change=(ChangesetStatus.get_status_lbl(status)
if status and allowed_to_change_status else None),
status_change_type=(status
if status and allowed_to_change_status else None),
closing_pr=False,
renderer=renderer
)

View file

@ -1363,9 +1363,11 @@ def comment_commit(
try:
rc_config = SettingsModel().get_all_settings()
renderer = rc_config.get('rhodecode_markup_renderer', 'rst')
status_change_label = ChangesetStatus.get_status_lbl(status)
comm = ChangesetCommentsModel().create(
message, repo, user, revision=commit_id, status_change=status,
message, repo, user, revision=commit_id,
status_change=status_change_label,
status_change_type=status,
renderer=renderer)
if status:
# also do a status change