# HG changeset patch # User Mads Kiilerich # Date 1371220118 -7200 # Node ID 99997d8f31eb0b07330854f20648cd67201a3e70 # Parent 6564d82e1469a17c3dd5ff1904bc5175ed8dba52 pull requests: remove old 'my pull requests' code from the secret place under 'My Account' diff -r 6564d82e1469 -r 99997d8f31eb kallithea/config/routing.py --- a/kallithea/config/routing.py Fri Jul 18 18:44:54 2014 +0200 +++ b/kallithea/config/routing.py Fri Jun 14 16:28:38 2013 +0200 @@ -367,9 +367,6 @@ m.connect("my_account_watched", "/my_account/watched", action="my_account_watched", conditions=dict(method=["GET"])) - m.connect("my_account_pullrequests", "/my_account/pull_requests", - action="my_account_pullrequests", conditions=dict(method=["GET"])) - m.connect("my_account_perms", "/my_account/perms", action="my_account_perms", conditions=dict(method=["GET"])) diff -r 6564d82e1469 -r 99997d8f31eb kallithea/controllers/admin/my_account.py --- a/kallithea/controllers/admin/my_account.py Fri Jul 18 18:44:54 2014 +0200 +++ b/kallithea/controllers/admin/my_account.py Fri Jun 14 16:28:38 2013 +0200 @@ -230,27 +230,6 @@ h.flash(_("Removed email from user"), category='success') return redirect(url('my_account_emails')) - def my_account_pullrequests(self): - c.active = 'pullrequests' - self.__load_data() - c.show_closed = request.GET.get('pr_show_closed') - - def _filter(pr): - s = sorted(pr, key=lambda o: o.created_on, reverse=True) - if not c.show_closed: - s = filter(lambda p: p.status != PullRequest.STATUS_CLOSED, s) - return s - - c.my_pull_requests = _filter(PullRequest.query()\ - .filter(PullRequest.user_id == - self.authuser.user_id)\ - .all()) - my_prs = [x.pull_request for x in PullRequestReviewers.query() - .filter(PullRequestReviewers.user_id == - self.authuser.user_id).all()] - c.participate_in_pull_requests = _filter(my_prs) - return render('admin/my_account/my_account.html') - def my_account_api_keys(self): c.active = 'api_keys' self.__load_data() diff -r 6564d82e1469 -r 99997d8f31eb kallithea/templates/admin/my_account/my_account.html --- a/kallithea/templates/admin/my_account/my_account.html Fri Jul 18 18:44:54 2014 +0200 +++ b/kallithea/templates/admin/my_account/my_account.html Fri Jun 14 16:28:38 2013 +0200 @@ -41,7 +41,6 @@
  • ${_('My Emails')}
  • ${_('My Repositories')}
  • ${_('Watched')}
  • -
  • ${_('Pull requests')}
  • ${_('My permissions')}
  • diff -r 6564d82e1469 -r 99997d8f31eb kallithea/templates/admin/my_account/my_account_pullrequests.html --- a/kallithea/templates/admin/my_account/my_account_pullrequests.html Fri Jul 18 18:44:54 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -%if c.show_closed: - ${h.checkbox('show_closed',checked="checked", label=_('Show closed pull requests'))} -%else: - ${h.checkbox('show_closed',label=_('Show closed pull requests'))} -%endif -
    ${_('Opened by me')}
    - - -
    ${_('I participate in')}
    - - - diff -r 6564d82e1469 -r 99997d8f31eb kallithea/tests/functional/test_my_account.py --- a/kallithea/tests/functional/test_my_account.py Fri Jul 18 18:44:54 2014 +0200 +++ b/kallithea/tests/functional/test_my_account.py Fri Jun 14 16:28:38 2013 +0200 @@ -40,12 +40,6 @@ User.get_by_username(TEST_USER_ADMIN_LOGIN)).count() response.mustcontain('"totalRecords": %s' % cnt) - def test_my_account_my_pullrequests(self): - self.log_user() - response = self.app.get(url('my_account_pullrequests')) - - response.mustcontain('Nothing here yet') - def test_my_account_my_emails(self): self.log_user() response = self.app.get(url('my_account_emails'))