mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-14 17:38:04 -05:00
Private subreddit page: add link to message mods
This commit is contained in:
@@ -1681,6 +1681,7 @@ class RedditController(OAuth2ResourceController):
|
||||
strings.private_subreddit_message,
|
||||
image="subreddit-private.png",
|
||||
sr_description=public_description,
|
||||
include_message_mods_link=True,
|
||||
)
|
||||
request.environ['usable_error_content'] = errpage.render()
|
||||
self.abort403()
|
||||
|
||||
@@ -2412,14 +2412,18 @@ class SidebarMessage(Templated):
|
||||
class RedditError(BoringPage):
|
||||
site_tracking = False
|
||||
def __init__(self, title, message, image=None, sr_description=None,
|
||||
explanation=None):
|
||||
include_message_mods_link=False, explanation=None):
|
||||
content = ErrorPage(
|
||||
title=title,
|
||||
message=message,
|
||||
image=image,
|
||||
sr_description=sr_description,
|
||||
include_message_mods_link=include_message_mods_link,
|
||||
explanation=explanation,
|
||||
)
|
||||
BoringPage.__init__(self, title, loginbox=False,
|
||||
show_sidebar = False,
|
||||
content=ErrorPage(title=title,
|
||||
message=message,
|
||||
image=image,
|
||||
sr_description=sr_description,
|
||||
explanation=explanation))
|
||||
content=content)
|
||||
|
||||
class ErrorPage(Templated):
|
||||
"""Wrapper for an error message"""
|
||||
|
||||
@@ -9027,7 +9027,7 @@ form#banned textarea {
|
||||
}
|
||||
|
||||
.errorpage-message.sr-description {
|
||||
border-top: 2px solid black;
|
||||
border-top: 1px solid black;
|
||||
margin-top: 2em;
|
||||
padding-top: 2em;
|
||||
}
|
||||
@@ -9043,6 +9043,13 @@ form#banned textarea {
|
||||
margin: .75em 0;
|
||||
}
|
||||
|
||||
#private-subreddit-message-link {
|
||||
border-top: 1px solid black;
|
||||
margin-top: 1em;
|
||||
padding-top: 2em;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
/** one-time password stuff **/
|
||||
#pref-otp .roundfield {
|
||||
margin: 1em 0;
|
||||
|
||||
@@ -42,4 +42,10 @@ from r2.lib.filters import unsafe, safemarkdown
|
||||
${unsafe(safemarkdown(thing.sr_description, wrap=False))}
|
||||
</div>
|
||||
% endif
|
||||
|
||||
% if thing.include_message_mods_link:
|
||||
<div id="private-subreddit-message-link" class="errorpage-message">
|
||||
<a href="/message/compose/?to=/r/${c.site.name}">${_("send a message to the moderators to request access")}</a>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user