##// END OF EJS Templates
pull-requests: add link to switch base based on the target.
marcink -
r2469:da49a829 default
parent child Browse files
Show More
@@ -1320,6 +1320,7 b' class PullRequestModel(BaseModel):'
1320
1320
1321 def generate_repo_data(self, repo, commit_id=None, branch=None,
1321 def generate_repo_data(self, repo, commit_id=None, branch=None,
1322 bookmark=None, translator=None):
1322 bookmark=None, translator=None):
1323 from rhodecode.model.repo import RepoModel
1323
1324
1324 all_refs, selected_ref = \
1325 all_refs, selected_ref = \
1325 self._get_repo_pullrequest_sources(
1326 self._get_repo_pullrequest_sources(
@@ -1339,6 +1340,8 b' class PullRequestModel(BaseModel):'
1339 'lastname': repo.user.last_name,
1340 'lastname': repo.user.last_name,
1340 'gravatar_link': h.gravatar_url(repo.user.email, 14),
1341 'gravatar_link': h.gravatar_url(repo.user.email, 14),
1341 },
1342 },
1343 'name': repo.repo_name,
1344 'link': RepoModel().get_url(repo),
1342 'description': h.chop_at_smart(repo.description_safe, '\n'),
1345 'description': h.chop_at_smart(repo.description_safe, '\n'),
1343 'refs': {
1346 'refs': {
1344 'all_refs': all_refs,
1347 'all_refs': all_refs,
@@ -427,8 +427,9 b''
427
427
428 var targetRepoChanged = function(repoData) {
428 var targetRepoChanged = function(repoData) {
429 // generate new DESC of target repo displayed next to select
429 // generate new DESC of target repo displayed next to select
430 var prLink = pyroutes.url('pullrequest_new', {'repo_name': repoData['name']});
430 $('#target_repo_desc').html(
431 $('#target_repo_desc').html(
431 "<strong>${_('Target repository')}</strong>: {0}".format(repoData['description'])
432 "<strong>${_('Target repository')}</strong>: {0}. <a href=\"{1}\">Use as source</a>".format(repoData['description'], prLink)
432 );
433 );
433
434
434 // generate dynamic select2 for refs.
435 // generate dynamic select2 for refs.
General Comments 0
You need to be logged in to leave comments. Login now