Skip to content

Commit

Permalink
Merge pull request #76 from golnazads/master
Browse files Browse the repository at this point in the history
added link at the top of the page to return back to abstract page and…
  • Loading branch information
golnazads committed Jun 29, 2021
2 parents 5f15b1a + a02b94d commit 5a778e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
REDIS_EXPIRATION_TIME = 604800

GATEWAY_SERVICE_REFERRED_DOMAIN = 'adsabs.harvard.edu'

GATEWAY_ADS_ABSTRACT_PAGE = '/abs/%s/abstract'
2 changes: 1 addition & 1 deletion resolverway/tests/unittests/stubdata/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<div class="main-container container-sm">
<h3 class="text-center"> links for <a href=><b>1987gady.book.....B</b></a></h3>
<h3 class="text-center"> links for <a href=/abs/1987gady.book.....B/abstract><b>1987gady.book.....B</b></a></h3>
<div class="list-group">
<div class="list-group-item">
Expand Down
4 changes: 2 additions & 2 deletions resolverway/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def process_resolver_response(self, the_json_response, log_the_click):
current_app.logger.debug('rendering template with data %s' %(records))
if log_the_click:
log_request(self.bibcode, self.user_id, self.link_type, self.url, self.referrer, self.client_id, self.real_ip, self.user_agent)
return render_template('list.html', url="", link_type=self.link_type.title(),
links=records, bibcode=self.bibcode), 200
return render_template('list.html', url=current_app.config['GATEWAY_ADS_ABSTRACT_PAGE']%self.bibcode,
link_type=self.link_type.title(), links=records, bibcode=self.bibcode), 200

# if we get here there is an error, so display error template
current_app.logger.debug('The requested resource does not exist.')
Expand Down

0 comments on commit 5a778e4

Please sign in to comment.