##// END OF EJS Templates
show only open pull requests in the counter, and use repo context bar in pull requests view
marcink -
r3580:7b9d4f6b beta
parent child Browse files
Show More
@@ -266,8 +266,7 b' class BaseController(WSGIController):'
266 c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard'))
266 c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard'))
267 c.visual.lightweight_dashboard_items = safe_int(config.get('dashboard_items', 100))
267 c.visual.lightweight_dashboard_items = safe_int(config.get('dashboard_items', 100))
268 c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields'))
268 c.visual.repository_fields = str2bool(rc_config.get('rhodecode_repository_fields'))
269
269 c.repo_name = get_repo_slug(request) # can be empty
270 c.repo_name = get_repo_slug(request)
271 c.backends = BACKENDS.keys()
270 c.backends = BACKENDS.keys()
272 c.unread_notifications = NotificationModel()\
271 c.unread_notifications = NotificationModel()\
273 .get_unread_cnt_for_user(c.rhodecode_user.user_id)
272 .get_unread_cnt_for_user(c.rhodecode_user.user_id)
@@ -393,7 +393,8 b' class ScmModel(BaseModel):'
393 def get_pull_requests(self, repo):
393 def get_pull_requests(self, repo):
394 repo = self._get_repo(repo)
394 repo = self._get_repo(repo)
395 return self.sa.query(PullRequest)\
395 return self.sa.query(PullRequest)\
396 .filter(PullRequest.other_repo == repo).count()
396 .filter(PullRequest.other_repo == repo)\
397 .filter(PullRequest.status != PullRequest.STATUS_CLOSED).count()
397
398
398 def mark_as_fork(self, repo, fork, user):
399 def mark_as_fork(self, repo, fork, user):
399 repo = self.__get_repo(repo)
400 repo = self.__get_repo(repo)
@@ -13,7 +13,7 b''
13 </%def>
13 </%def>
14
14
15 <%def name="main()">
15 <%def name="main()">
16
16 ${self.context_bar('showpullrequest')}
17 <div class="box">
17 <div class="box">
18 <!-- box / title -->
18 <!-- box / title -->
19 <div class="title">
19 <div class="title">
@@ -13,7 +13,7 b''
13 </%def>
13 </%def>
14
14
15 <%def name="main()">
15 <%def name="main()">
16
16 ${self.context_bar('showpullrequest')}
17 <div class="box">
17 <div class="box">
18 <!-- box / title -->
18 <!-- box / title -->
19 <div class="title">
19 <div class="title">
@@ -35,6 +35,4 b''
35
35
36 </div>
36 </div>
37
37
38 <script type="text/javascript"></script>
39
40 </%def>
38 </%def>
General Comments 0
You need to be logged in to leave comments. Login now