Mercurial > kallithea
changeset 4895:780c1aab1357
pullrequest overview: remove custom handling of 'my pullrequests'
Re-use the same displaying code for the 'my pullrequests' overview as for
the repository pullrequests overview. Remove the now unused CSS styling as
well.
This removes the 'delete' button on the author's pullrequests. One could
argue whether the pullrequest overview is the right place for this button,
while it does not appear on the pull request page itself.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Tue, 03 Mar 2015 21:48:53 +0100 |
parents | 7eea0a7fbc7d |
children | 27d214c87144 |
files | kallithea/public/css/style.css kallithea/templates/pullrequests/pullrequest_show_my.html kallithea/templates/pullrequests/pullrequest_show_my_data.html |
diffstat | 3 files changed, 7 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/css/style.css Tue Mar 03 22:26:19 2015 +0100 +++ b/kallithea/public/css/style.css Tue Mar 03 21:48:53 2015 +0100 @@ -4648,13 +4648,12 @@ *****/ .pullrequests_section_head { padding: 10px 10px 10px 0px; + margin: 0 20px; font-size: 16px; font-weight: bold; } -div.pr-details-title.closed, -#pullrequests_container li.closed div div - { +div.pr-details-title.closed { color: #555; background: #eee; } @@ -4671,9 +4670,6 @@ div.pr-desc { margin: 0px 20px; } -div.pr-closed { - background-color: #eee; -} tr.pr-closed td { background-color: #eee !important; color: #555 !important;
--- a/kallithea/templates/pullrequests/pullrequest_show_my.html Tue Mar 03 22:26:19 2015 +0100 +++ b/kallithea/templates/pullrequests/pullrequest_show_my.html Tue Mar 03 21:48:53 2015 +0100 @@ -30,9 +30,7 @@ </div> </div> - <div id="pullrequests_container" class="table"> - <%include file='pullrequest_show_my_data.html'/> - </div> + <%include file='pullrequest_show_my_data.html'/> </div> </%def>
--- a/kallithea/templates/pullrequests/pullrequest_show_my_data.html Tue Mar 03 22:26:19 2015 +0100 +++ b/kallithea/templates/pullrequests/pullrequest_show_my_data.html Tue Mar 03 21:48:53 2015 +0100 @@ -1,69 +1,7 @@ +<%namespace name="pullrequests" file="/pullrequests/pullrequest_data.html"/> + <div class="pullrequests_section_head">${_('Pull Requests Created by Me')}</div> -<ul> - %if c.my_pull_requests: - %for pull_request in c.my_pull_requests: - <li class="${'closed' if pull_request.is_closed() else ''}"> - <div style="height: 12px"> - %if pull_request.last_review_status: - <i class="icon-circle changeset-status-${pull_request.last_review_status}" title="${_("Someone voted: %s") % pull_request.last_review_status}"></i> - %else: - <i class="icon-circle changeset-status-not_reviewed" title="${_("Nobody voted")}"></i> - %endif - <a href="${pull_request.url()}"> - ${pull_request.title or _("(no title)")} - </a> - ${_('created on %s from') % (h.fmt_date(pull_request.created_on))} - <% org_ref_name=pull_request.org_ref.rsplit(':', 2)[-2] %> - <a href="${h.url('summary_home', repo_name=pull_request.org_repo.repo_name, anchor=org_ref_name)}"> - ${pull_request.org_repo.repo_name}#${org_ref_name} - </a> - %if pull_request.is_closed(): - (${_('Closed')}) - %endif - ${h.form(url('pullrequest_delete', repo_name=pull_request.other_repo.repo_name, pull_request_id=pull_request.pull_request_id),method='delete', style="display:inline-block")} - <button class="action_button" - id="remove_${pull_request.pull_request_id}" - name="remove_${pull_request.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()} - </div> - </li> - %endfor - %else: - <li><span class="empty_data">${_('Nothing here yet')}</span></li> - %endif -</ul> +${pullrequests.pullrequest_overview(c.my_pull_requests)} <div class="pullrequests_section_head" style="clear:both">${_('Pull Requests I Participate In')}</div> -<ul> - %if c.participate_in_pull_requests: - %for pull_request in c.participate_in_pull_requests: - <li class="${'closed' if pull_request.is_closed() else ''}"> - <div style="height: 12px"> - %if pull_request.last_review_status: - <i class="icon-circle changeset-status-${pull_request.last_review_status}" title="${_("Someone voted: %s") % pull_request.last_review_status}"></i> - %else: - <i class="icon-circle changeset-status-not_reviewed" title="${_("Nobody voted")}"></i> - %endif - <a href="${pull_request.url()}"> - ${pull_request.title or _("(no title)")} - </a> - ${_('from')} - <% org_ref_name=pull_request.org_ref.rsplit(':', 2)[-2] %> - <a href="${h.url('summary_home', repo_name=pull_request.org_repo.repo_name, anchor=org_ref_name)}"> - ${pull_request.org_repo.repo_name}#${org_ref_name} - </a> - ${_('created on %s') % (h.fmt_date(pull_request.created_on))} - %if pull_request.is_closed(): - (${_('Closed')}) - %endif - </div> - </li> - %endfor - %else: - <li><span class="empty_data">${_('Nothing here yet')}</span></li> - %endif -</ul> +${pullrequests.pullrequest_overview(c.participate_in_pull_requests)}