Mercurial > kallithea
changeset 5245:18fc1888455f
user: rename property username_and_name into full_name_and_username
In analogy of existing properties full_name and full_name_or_username,
rename username_and_name into full_name_and_username.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Tue, 23 Jun 2015 20:23:13 +0200 |
parents | df3079729bd9 |
children | fd00b28ac7d4 |
files | kallithea/model/comment.py kallithea/model/db.py kallithea/templates/changeset/changeset.html kallithea/templates/changeset/changeset_file_comment.html kallithea/templates/pullrequests/pullrequest_data.html kallithea/templates/pullrequests/pullrequest_show.html |
diffstat | 6 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/comment.py Tue Jun 30 21:27:36 2015 +0200 +++ b/kallithea/model/comment.py Tue Jun 23 20:23:13 2015 +0200 @@ -100,7 +100,7 @@ recipients += [cs_author] email_kwargs = { 'status_change': status_change, - 'cs_comment_user': h.person(user, 'username_and_name'), + 'cs_comment_user': h.person(user, 'full_name_and_username'), 'cs_target_repo': h.canonical_url('summary_home', repo_name=repo.repo_name), 'cs_comment_url': comment_url, 'raw_id': revision, @@ -148,7 +148,7 @@ 'status_change': status_change, 'closing_pr': closing_pr, 'pr_comment_url': comment_url, - 'pr_comment_user': h.person(user, 'username_and_name'), + 'pr_comment_user': h.person(user, 'full_name_and_username'), 'pr_target_repo': h.canonical_url('summary_home', repo_name=pull_request.other_repo.repo_name), 'repo_name': pull_request.other_repo.repo_name,
--- a/kallithea/model/db.py Tue Jun 30 21:27:36 2015 +0200 +++ b/kallithea/model/db.py Tue Jun 23 20:23:13 2015 +0200 @@ -472,10 +472,6 @@ return [x.ip_addr for x in ret] @property - def username_and_name(self): - return '%s (%s %s)' % (self.username, self.firstname, self.lastname) - - @property def full_name(self): return '%s %s' % (self.firstname, self.lastname) @@ -485,6 +481,10 @@ if (self.firstname and self.lastname) else self.username) @property + def full_name_and_username(self): + return '%s (%s %s)' % (self.username, self.firstname, self.lastname) + + @property def full_contact(self): return '%s %s <%s>' % (self.firstname, self.lastname, self.email)
--- a/kallithea/templates/changeset/changeset.html Tue Jun 30 21:27:36 2015 +0200 +++ b/kallithea/templates/changeset/changeset.html Tue Jun 23 20:23:13 2015 +0200 @@ -114,7 +114,7 @@ <div class="gravatar"> ${h.gravatar(h.email_or_none(c.changeset.author), size=20)} </div> - <span><b>${h.person(c.changeset.author,'username_and_name')}</b> - ${h.age(c.changeset.date,True)} ${h.fmt_date(c.changeset.date)}</span><br/> + <span><b>${h.person(c.changeset.author,'full_name_and_username')}</b> - ${h.age(c.changeset.date,True)} ${h.fmt_date(c.changeset.date)}</span><br/> <span>${h.email_or_none(c.changeset.author)}</span><br/> </div> <% rev = c.changeset.extra.get('source') %>
--- a/kallithea/templates/changeset/changeset_file_comment.html Tue Jun 30 21:27:36 2015 +0200 +++ b/kallithea/templates/changeset/changeset_file_comment.html Tue Jun 23 20:23:13 2015 +0200 @@ -12,7 +12,7 @@ ${h.gravatar(co.author.email, size=20)} </div> <div class="user"> - ${co.author.username_and_name} + ${co.author.full_name_and_username} </div> <span>
--- a/kallithea/templates/pullrequests/pullrequest_data.html Tue Jun 30 21:27:36 2015 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_data.html Tue Jun 23 20:23:13 2015 +0200 @@ -58,7 +58,7 @@ </a> </td> <td> - ${pr.author.username_and_name} + ${pr.author.full_name_and_username} </td> <td> <span class="tooltip" title="${h.tooltip(h.fmt_date(pr.created_on))}">
--- a/kallithea/templates/pullrequests/pullrequest_show.html Tue Jun 30 21:27:36 2015 +0200 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Tue Jun 23 20:23:13 2015 +0200 @@ -158,7 +158,7 @@ <div class="gravatar"> ${h.gravatar(c.pull_request.author.email, size=20)} </div> - <span>${c.pull_request.author.username_and_name}</span><br/> + <span>${c.pull_request.author.full_name_and_username}</span><br/> <span><a href="mailto:${c.pull_request.author.email}">${c.pull_request.author.email}</a></span><br/> </div> </div>