Changeset - 7eea0a7fbc7d
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 11 years ago 2015-03-03 22:26:19
thomas.de.schampheleire@gmail.com
pullrequest overview: add delete button to own pull requests

In anticipation of the re-use of the pullrequest overview to display 'my
pullrequests', add a delete button to all pullrequests owned by the
currently logged-in user.
An explicit width is added to the column because the column is otherwise
unnecessarily large.
1 file changed with 15 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
@@ -21,12 +21,26 @@
 
    </thead>
 
% for pr in pullrequests:
 
    <tr class="${'pr-closed' if pr.is_closed() else ''}">
 
      <td>
 
      <td width="60px">
 
        ## review status
 
        %if pr.last_review_status:
 
          <i class="icon-circle changeset-status-${pr.last_review_status}" title="${_("Someone voted: %s") % pr.last_review_status}"></i>
 
        %else:
 
          <i class="icon-circle changeset-status-not_reviewed" title="${_("Nobody voted")}"></i>
 
        %endif
 

	
 
        ## delete button
 
        %if pr.author.user_id == c.authuser.user_id:
 
          ${h.form(url('pullrequest_delete', repo_name=pr.other_repo.repo_name, pull_request_id=pr.pull_request_id),method='delete', style="display:inline-block")}
 
          <button class="action_button"
 
                  id="remove_${pr.pull_request_id}"
 
                  name="remove_${pr.pull_request_id}"
 
                  title="${_('Delete Pull Request')}"
 
                  onclick="return confirm('${_('Confirm to delete this pull request')}');">
 
            <i class="icon-minus-circled"></i>
 
          </button>
 
          ${h.end_form()}
 
        %endif
 
      </td>
 
      <td>
 
        <a href="${pr.url()}">
0 comments (0 inline, 0 general)