Changeset - 7b9d4f6bb04e
[Not reviewed]
beta
0 5 0
Marcin Kuzminski - 13 years ago 2013-03-24 20:24:17
marcin@python-works.com
show only open pull requests in the counter, and use repo context bar in pull requests view
5 files changed with 5 insertions and 7 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/base.py
Show inline comments
 
@@ -263,14 +263,13 @@ class BaseController(WSGIController):
 
        c.visual.show_public_icon = str2bool(rc_config.get('rhodecode_show_public_icon'))
 
        c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon'))
 
        c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags'))
 
        c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard'))
 
        c.visual.lightweight_dashboard_items = safe_int(config.get('dashboard_items', 100))
 
        c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields'))
 

	
 
        c.repo_name = get_repo_slug(request)
 
        c.repo_name = get_repo_slug(request)  # can be empty
 
        c.backends = BACKENDS.keys()
 
        c.unread_notifications = NotificationModel()\
 
                        .get_unread_cnt_for_user(c.rhodecode_user.user_id)
 
        self.cut_off_limit = int(config.get('cut_off_limit'))
 

	
 
        self.sa = meta.Session
rhodecode/model/scm.py
Show inline comments
 
@@ -390,13 +390,14 @@ class ScmModel(BaseModel):
 
        return self.sa.query(Repository)\
 
                .filter(Repository.fork == repo).count()
 

	
 
    def get_pull_requests(self, repo):
 
        repo = self._get_repo(repo)
 
        return self.sa.query(PullRequest)\
 
                .filter(PullRequest.other_repo == repo).count()
 
                .filter(PullRequest.other_repo == repo)\
 
                .filter(PullRequest.status != PullRequest.STATUS_CLOSED).count()
 

	
 
    def mark_as_fork(self, repo, fork, user):
 
        repo = self.__get_repo(repo)
 
        fork = self.__get_repo(fork)
 
        if fork and repo.repo_id == fork.repo_id:
 
            raise Exception("Cannot set repository as fork of itself")
rhodecode/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -10,13 +10,13 @@
 
    ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
 
    »
 
    ${_('new pull request')}
 
</%def>
 

	
 
<%def name="main()">
 

	
 
${self.context_bar('showpullrequest')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
    ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')}
rhodecode/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -10,13 +10,13 @@
 
    ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
 
    &raquo;
 
    ${_('Pull request #%s') % c.pull_request.pull_request_id}
 
</%def>
 

	
 
<%def name="main()">
 

	
 
${self.context_bar('showpullrequest')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
        %if c.pull_request.is_closed():
rhodecode/templates/pullrequests/pullrequest_show_all.html
Show inline comments
 
@@ -32,9 +32,7 @@ ${self.context_bar('showpullrequest')}
 
          <div style="border-bottom: 1px solid #DDD;margin:10px 20px;padding-bottom:10px"></div>
 
        </div>
 
    %endfor
 

	
 
</div>
 

	
 
<script type="text/javascript"></script>
 

	
 
</%def>
0 comments (0 inline, 0 general)