mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Subreddit Rules: Update titles
This commit is contained in:
@@ -953,9 +953,14 @@ class FrontController(RedditController):
|
||||
"link": _("Posts only"),
|
||||
"comment": _("Comments only"),
|
||||
}
|
||||
content = Rules(kind_labels=kind_labels)
|
||||
title_string = _("Rules for r/%(subreddit)s") % { "subreddit" : c.site.name }
|
||||
content = Rules(
|
||||
title=title_string,
|
||||
kind_labels=kind_labels,
|
||||
)
|
||||
extra_js_config = {"kind_labels": kind_labels}
|
||||
return ModToolsPage(
|
||||
title=title_string,
|
||||
content=content,
|
||||
extra_js_config=extra_js_config,
|
||||
).render()
|
||||
|
||||
@@ -4013,7 +4013,8 @@ class ModToolsPage(Reddit):
|
||||
|
||||
class Rules(Templated):
|
||||
"""Show subreddit rules for everyone and add edit controls for mods."""
|
||||
def __init__(self, kind_labels):
|
||||
def __init__(self, title, kind_labels):
|
||||
self.title = title
|
||||
self.can_edit = c.user_is_loggedin and (c.user_is_admin or
|
||||
c.site.is_moderator_with_perms(c.user, 'config'))
|
||||
self.rules = SubredditRules.get_rules(c.site)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="subreddit-rules-page ${'editable' if thing.can_edit else ''}">
|
||||
<header class="md-container">
|
||||
<div class="md">
|
||||
<h2>Community Rules</h2>
|
||||
<h2>${thing.title}</h2>
|
||||
<p>
|
||||
Rules that visitors must follow to participate. May be used as
|
||||
reasons to report or ban.
|
||||
|
||||
Reference in New Issue
Block a user