Changeset - 18fc1888455f
[Not reviewed]
default
0 6 0
Thomas De Schampheleire - 11 years ago 2015-06-23 20:23:13
thomas.de.schampheleire@gmail.com
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.
6 files changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
kallithea/model/comment.py
Show inline comments
 
@@ -100,7 +100,7 @@ class ChangesetCommentsModel(BaseModel):
 
            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 @@ class ChangesetCommentsModel(BaseModel):
 
                '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,
kallithea/model/db.py
Show inline comments
 
@@ -472,10 +472,6 @@ class User(Base, BaseModel):
 
        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 @@ class User(Base, BaseModel):
 
                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)
 

	
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -114,7 +114,7 @@ ${self.repo_context_bar('changelog', c.c
 
                         <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') %>
kallithea/templates/changeset/changeset_file_comment.html
Show inline comments
 
@@ -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>
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
@@ -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))}">
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -158,7 +158,7 @@ ${self.repo_context_bar('showpullrequest
 
                  <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>
0 comments (0 inline, 0 general)