Mercurial > kallithea
changeset 4888:66d6dc56479b
pullrequests: add option for adding repo owner as reviewer if none assigned
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 06 Mar 2015 16:37:19 +0100 |
parents | c5f49ffbd72b |
children | 5a1cd703a888 |
files | kallithea/templates/pullrequests/pullrequest_show.html |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/pullrequests/pullrequest_show.html Tue Dec 10 19:30:37 2013 +0100 +++ b/kallithea/templates/pullrequests/pullrequest_show.html Fri Mar 06 16:37:19 2015 +0100 @@ -242,6 +242,29 @@ </div> %endif </div> + + %if not c.pull_request_reviewers: + <div class="pr-details-title">${_('Potential Reviewers')}</div> + <div style="margin: 10px 0 10px 10px; max-width: 250px"> + <div> + ${_('Click to add the repository owner as reviewer:')} + </div> + <ul style="margin-top: 10px"> + %for u in [c.pull_request.other_repo.user]: + <li> + <a class="missing_reviewer missing_reviewer_${u.user_id}" + user_id="${u.user_id}" + fname="${u.name}" + lname="${u.lastname}" + nname="${u.username}" + gravatar_lnk="${h.gravatar_url(u.email, size=28)}" + gravatar_size="14" + title="Click to add reviewer to the list, then Save Changes.">${u.full_name}</a> + </li> + %endfor + </ul> + </div> + %endif </div> <div class="form" style="clear:both"> <div class="fields"> @@ -378,6 +401,11 @@ if (window.location.hash != "") { window.location.href = window.location.href; } + + $('.missing_reviewer').click(function(){ + var $this = $(this); + addReviewMember($this.attr('user_id'), $this.attr('fname'), $this.attr('lname'), $this.attr('nname'), $this.attr('gravatar_lnk'), $this.attr('gravatar_size')); + }); }); </script>