Add data attributes to sidebox morelink

This commit is contained in:
Florence Yeun
2015-11-08 15:08:24 -08:00
parent 01f1a4ee9c
commit 6d5a69ca2d
2 changed files with 7 additions and 6 deletions

View File

@@ -1132,12 +1132,13 @@ class SideBox(CachedTemplate):
"""
def __init__(self, title, link=None, css_class='', subtitles = [],
show_cover = False, nocname=False, sr_path = False,
disabled=False, show_icon=True, target='_top'):
disabled=False, show_icon=True, target='_top', data_attrs={}):
CachedTemplate.__init__(self, link = link, target = target,
title = title, css_class = css_class,
sr_path = sr_path, subtitles = subtitles,
show_cover = show_cover, nocname=nocname,
disabled=disabled, show_icon=show_icon)
title = title, css_class = css_class,
sr_path = sr_path, subtitles = subtitles,
show_cover = show_cover, nocname=nocname,
disabled=disabled, show_icon=show_icon,
data_attrs=data_attrs)
class PrefsPage(Reddit):

View File

@@ -26,7 +26,7 @@
<div class="morelink">
${plain_link(thing.title, thing.link, _sr_path=thing.sr_path,
_class='login-required access-required' if thing.show_cover else None, nocname=thing.nocname,
target=thing.target)}
target=thing.target, data=thing.data_attrs)}
<div class="nub"> </div>
</div>