Skip to content

Commit 3a68699

Browse files
committed
Merge pull request #1776 from squirrelo/sharing-portals-changes
Fix redundant URLs
2 parents b52311a + 291fb69 commit 3a68699

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

qiita_pet/handlers/analysis_handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@ def _get_shared_for_study(self, analysis, callback):
372372
@execute_as_transaction
373373
def _share(self, analysis, user, callback):
374374
user = User(user)
375-
add_message('Analysis <a href="/analysis/results/%d">\'%s\'</a> '
375+
add_message('Analysis <a href="%s/analysis/results/%d">\'%s\'</a> '
376376
'has been shared with you.' %
377-
(analysis.id, analysis.name), [user])
377+
(qiita_config.portal, analysis.id, analysis.name), [user])
378378
callback(analysis.share(user))
379379

380380
@execute_as_transaction

qiita_pet/handlers/study_handlers/listing_handlers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from qiita_db.util import get_pubmed_ids_from_dois, add_message
2727
from qiita_core.exceptions import IncompetentQiitaDeveloperError
2828
from qiita_core.util import execute_as_transaction
29+
from qiita_core.qiita_settings import qiita_config
2930
from qiita_pet.handlers.base_handlers import BaseHandler
3031
from qiita_pet.handlers.util import (
3132
study_person_linkifier, doi_linkifier, pubmed_linkifier, check_access,
@@ -250,9 +251,9 @@ def _get_shared_for_study(self, study, callback):
250251
@execute_as_transaction
251252
def _share(self, study, user, callback):
252253
user = User(user)
253-
add_message('Study <a href="/study/description/%d">\'%s\'</a> '
254+
add_message('Study <a href="%s/study/description/%d">\'%s\'</a> '
254255
'has been shared with you.' %
255-
(study.id, study.title), [user])
256+
(qiita_config.portal, study.id, study.title), [user])
256257
callback(study.share(user))
257258

258259
@execute_as_transaction

qiita_pet/templates/analysis_results.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<script type="text/javascript">
1010
$(document).ready(function () {
1111
init_sharing("{% raw qiita_config.portal_dir %}");
12-
update_share("{% raw qiita_config.portal_dir %}/analysis/sharing/");
12+
update_share();
1313
});
1414
</script>
1515
{%end%}

qiita_pet/templates/study_ajax/base_info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<script type="text/javascript">
77
$(document).ready(function () {
88
init_sharing("{% raw qiita_config.portal_dir %}");
9-
update_share('{% raw qiita_config.portal_dir %}/study/sharing/');
9+
update_share();
1010
});
1111
</script>
1212
<p style="font-weight:bold;">Abstract</p>

0 commit comments

Comments
 (0)