mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Add data attributes to sidebox morelink
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user