Show branch name for translation contribution

Also fix the condition to show branch for commits and show
only date for translation records.

Change-Id: I4d32cb668b903bae521f46456cd0622625596ab7
This commit is contained in:
Ilya Shakhat 2016-05-25 18:23:32 +03:00 committed by Ilya Shakhat
parent a671763b6e
commit 69caa46d1d
2 changed files with 5 additions and 2 deletions

View File

@ -101,6 +101,9 @@ def extend_record(record):
record['title'] = filter_bug_title(record['title'])
record['status_class'] = re.sub('\s+', '', record['status'])
elif record['record_type'] == 'tr':
record['date_str'] = format_date(record['date']) # no need for hours
return record

View File

@ -80,11 +80,11 @@ show_record_type=True, show_user_gravatar=True, gravatar_size=32, show_all=True)
<div class="header">{%html author_link %} ({%html company_link %})</div>
{%/if%}
<div class="header">${date_str} in {%html module_link%}
{%if record_type == "mark" || record_type == "review" || record_type == "patch" || record_type == "ci" %}
{%if record_type == "mark" || record_type == "review" || record_type == "patch" || record_type == "ci" || record_type == "tr" %}
{%if branch != "master" %}(${branch}){%/if%}
{%/if%}
{%if record_type == "commit" %}
{%if branches.substring(0, 6) != "master" %}(${branches}){%/if%}
{%if branches.indexOf("master") < 0 %}(${branches}){%/if%}
{%/if%}
</div>