Make preview images' titles clickable, taking users straight to the document view.

This commit is contained in:
Roberto Rosario
2015-07-29 21:39:18 -04:00
parent bc71796571
commit 0b109920bb
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -127,7 +127,10 @@ def document_html_widget(document_page, click_view=None, click_view_arguments=No
)
if title:
title_template = 'title="%s"' % strip_tags(title)
preview_click_link = document.get_absolute_url()
title_template = 'data-caption="<a class=\'a-caption\' href=\'{url}\'>{title}</a>"'.format(
title=strip_tags(title), url=preview_click_link or '#'
)
else:
title_template = ''