diff --git a/r2/r2/config/routing.py b/r2/r2/config/routing.py index 4e196198c..245aa1e02 100644 --- a/r2/r2/config/routing.py +++ b/r2/r2/config/routing.py @@ -113,8 +113,10 @@ def make_map(): mc('/i18n', controller='redirect', action='redirect', dest='http://www.reddit.com/r/i18n') - mc('/feedback', controller='feedback', action='feedback') - mc('/ad_inq', controller='feedback', action='ad_inq') + mc('/feedback', controller='redirect', action='redirect', + dest='/contact') + mc('/contact', controller='front', action='contact_us') + mc('/ad_inq', controller='front', action='ad_inq') mc('/admin/awards', controller='awards') mc('/admin/awards/:awardcn/:action', controller='awards', diff --git a/r2/r2/controllers/__init__.py b/r2/r2/controllers/__init__.py index 4aa15e77f..85ce8f48a 100644 --- a/r2/r2/controllers/__init__.py +++ b/r2/r2/controllers/__init__.py @@ -54,7 +54,6 @@ def load_controllers(): from listingcontroller import MyredditsController - from feedback import FeedbackController from front import FormsController from front import FrontController from health import HealthController diff --git a/r2/r2/controllers/feedback.py b/r2/r2/controllers/feedback.py deleted file mode 100644 index 50db1cfcb..000000000 --- a/r2/r2/controllers/feedback.py +++ /dev/null @@ -1,38 +0,0 @@ -# The contents of this file are subject to the Common Public Attribution -# License Version 1.0. (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public -# License Version 1.1, but Sections 14 and 15 have been added to cover use of -# software over a computer network and provide for limited attribution for the -# Original Developer. In addition, Exhibit A has been modified to be consistent -# with Exhibit B. -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -# the specific language governing rights and limitations under the License. -# -# The Original Code is reddit. -# -# The Original Developer is the Initial Developer. The Initial Developer of -# the Original Code is reddit Inc. -# -# All portions of the code written by reddit are Copyright (c) 2006-2013 reddit -# Inc. All Rights Reserved. -############################################################################### - -from reddit_base import RedditController -from pylons import c, request -from pylons.i18n import _ -from r2.lib.pages import FormPage, Feedback, Captcha, PaneStack, SelfServeBlurb, FeedbackBlurb - -class FeedbackController(RedditController): - - def GET_ad_inq(self): - return FormPage('advertise', - content = SelfServeBlurb(), - loginbox = False).render() - - def GET_feedback(self): - return FormPage('feedback', - content = FeedbackBlurb(), - loginbox = False).render() diff --git a/r2/r2/controllers/front.py b/r2/r2/controllers/front.py index 238f3a80c..69b99d494 100755 --- a/r2/r2/controllers/front.py +++ b/r2/r2/controllers/front.py @@ -1096,6 +1096,16 @@ class FrontController(RedditController, OAuth2ResourceController): def GET_account_activity(self): return AccountActivityPage().render() + def GET_contact_us(self): + return BoringPage(_("contact us"), show_sidebar=False, + content=ContactUs(), page_classes=["contact-us-page"] + ).render() + + def GET_ad_inq(self): + return FormPage('advertise', + content = SelfServeBlurb(), + loginbox = False).render() + def GET_rules(self): return BoringPage(_("rules of reddit"), show_sidebar=False, content=RulesPage(), page_classes=["rulespage-body"] diff --git a/r2/r2/lib/menus.py b/r2/r2/lib/menus.py index da6d69831..0a9928bde 100644 --- a/r2/r2/lib/menus.py +++ b/r2/r2/lib/menus.py @@ -81,7 +81,7 @@ menu = MenuHandler(hot = _('hot'), logout = _("logout"), #reddit footer strings - feedback = _("contact us"), + contact = _("contact us"), buttons = _("buttons"), widget = _("widget"), code = _("source code"), diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 2c000c8d5..4d5474c70 100644 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -693,7 +693,7 @@ class RedditFooter(CachedTemplate): OffsiteButton(_("FAQ"), dest = "/wiki/faq", nocname=True), OffsiteButton(_("reddiquette"), nocname=True, dest = "/wiki/reddiquette"), NamedButton("rules", False, nocname=True), - NamedButton("feedback", False), + NamedButton("contact", False), ], title = _("help"), type = "flat_vert", @@ -2542,6 +2542,9 @@ class ButtonDemoPanel(Templated): class SelfServeBlurb(Templated): pass +class ContactUs(Templated): + pass + class FeedbackBlurb(Templated): pass diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index 395173538..e539106e0 100755 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -3196,25 +3196,66 @@ button.button[disabled] { padding-top: 10px; } -.feedback.instructions dl { - margin-left: 20px; +body.contact-us-page { + overflow-y: scroll; } -.feedback.instructions dt { - margin-top: 10px; - margin-bottom: 10px; +.contact-us-page .content { + width: 600px; + margin: 0px auto; } -.feedback.instructions dd:before { - background-image: url(../continue-thread.png); /* SPRITE */ - height: 15px; - width: 30px; +.contact-us-page h1 { + font-size: xx-large; + text-align: center; + margin: 20px 0px; +} + +.contact-us-page .info { + font-size: larger; + text-align: center; + margin-bottom: 20px; +} + +.contact-us-page h2.button { + background-color: #cee2f5; + font-size: x-large; + font-weight: bold; + color: #369; + text-align: center; + border-radius: 7px; + border: 2px solid #369; + line-height: 1.5em; + margin: 0px 10px 10px 10px; +} + +.contact-us-page h2.button:hover { + background-color: #daeaf8; + cursor: pointer; +} + +.contact-us-page .details{ + margin: 0; + display: none; +} + +.contact-us-page li:target .details { display: block; - content: " "; - float: left; - margin: 2px 5px 0 0; } +.contact-us-page .details li { + background-color: #fafafa; + font-size: small; + border: 1px solid #ccc; + margin: 0px 40px 10px 40px; + padding: 10px; + width: 500px; +} + +.contact-us-page img.space-snoo { + display: block; + margin: 50px auto 0 auto; +} .button-demo a.view-code, .button-demo a.hide-code { float: right; margin-bottom: 1em; } diff --git a/r2/r2/public/static/space-snoo.png b/r2/r2/public/static/space-snoo.png new file mode 100644 index 000000000..64a6eb516 Binary files /dev/null and b/r2/r2/public/static/space-snoo.png differ diff --git a/r2/r2/templates/contactus.html b/r2/r2/templates/contactus.html new file mode 100644 index 000000000..1b1d89cd4 --- /dev/null +++ b/r2/r2/templates/contactus.html @@ -0,0 +1,87 @@ +## The contents of this file are subject to the Common Public Attribution +## License Version 1.0. (the "License"); you may not use this file except in +## compliance with the License. You may obtain a copy of the License at +## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public +## License Version 1.1, but Sections 14 and 15 have been added to cover use of +## software over a computer network and provide for limited attribution for the +## Original Developer. In addition, Exhibit A has been modified to be +## consistent with Exhibit B. +## +## Software distributed under the License is distributed on an "AS IS" basis, +## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for +## the specific language governing rights and limitations under the License. +## +## The Original Code is reddit. +## +## The Original Developer is the Initial Developer. The Initial Developer of +## the Original Code is reddit Inc. +## +## All portions of the code written by reddit are Copyright (c) 2006-2013 +## reddit Inc. All Rights Reserved. +############################################################################### + +<%! +from r2.lib.template_helpers import static +%> + +
+ reddit is a community, and as such there are a lot of outlets to get help for what ails you. +
+ + + +
+
+
diff --git a/r2/r2/templates/feedbackblurb.html b/r2/r2/templates/feedbackblurb.html
deleted file mode 100644
index 052d7d3a6..000000000
--- a/r2/r2/templates/feedbackblurb.html
+++ /dev/null
@@ -1,72 +0,0 @@
-## The contents of this file are subject to the Common Public Attribution
-## License Version 1.0. (the "License"); you may not use this file except in
-## compliance with the License. You may obtain a copy of the License at
-## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
-## License Version 1.1, but Sections 14 and 15 have been added to cover use of
-## software over a computer network and provide for limited attribution for the
-## Original Developer. In addition, Exhibit A has been modified to be
-## consistent with Exhibit B.
-##
-## Software distributed under the License is distributed on an "AS IS" basis,
-## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
-## the specific language governing rights and limitations under the License.
-##
-## The Original Code is reddit.
-##
-## The Original Developer is the Initial Developer. The Initial Developer of
-## the Original Code is reddit Inc.
-##
-## All portions of the code written by reddit are Copyright (c) 2006-2013
-## reddit Inc. All Rights Reserved.
-###############################################################################
-
-<%!
- from r2.lib.pages import Feedback
- import random
- %>
-
-- reddit is a community, and as such there are a lot of outlets to get help for what ails you. -
- -- Or, if none of these solve your problem, - - send a message to our feedback. - -
- - -