Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:internetarchive/openlibrary

  • Loading branch information...
commit e2e2a994141ff2e6ec95aeb1d1fe05b3808649d1 2 parents 514d203 + fdf7717
@anandology anandology authored
View
41 openlibrary/plugins/openlibrary/support.py
@@ -37,29 +37,30 @@ def POST(self):
default_assignees = config.get("support_default_assignees",{})
topic_key = topic.replace(" ","_").lower()
if topic_key in default_assignees:
+ create_case = True
assignee = default_assignees.get(topic_key)
else:
+ create_case = False
assignee = default_assignees.get("default", "mary@openlibrary.org")
- print "Assignee is %s"%assignee
- c = support_db.create_case(creator_name = user and user.get_name() or "",
- creator_email = email,
- creator_useragent = useragent,
- creator_username = user and user.get_username() or "",
- subject = topic,
- description = description,
- url = url,
- assignee = assignee)
-
-
-
- stats.increment("support.all")
- # Send an email to the creator of the case
- subject = "Case #%s: %s"%(c.caseno, topic)
- message = render_template("email/support_case", c)
- web.sendmail(config.get("support_case_control_address","support@openlibrary.org"),
- email, subject, message)
-
- return render_template("email/case_created", c)
+ if create_case:
+ c = support_db.create_case(creator_name = user and user.get_name() or "",
+ creator_email = email,
+ creator_useragent = useragent,
+ creator_username = user and user.get_username() or "",
+ subject = topic,
+ description = description,
+ url = url,
+ assignee = assignee)
+ stats.increment("support.all")
+ else:
+ stats.increment("support.all")
+ subject = "Support case *%s*"%topic
+ message = "A new support case has been filed\n\nTopic: %s\n\nDescription:\n%s"%(topic, description)
+ web.sendmail(email, assignee, subject, message)
+
+ return render_template("email/case_created", assignee)
+
+
def setup():
View
4 openlibrary/plugins/openlibrary/templates/support.html
@@ -23,14 +23,12 @@
<div class="input">
<select class = "required" name="topic" id="topic">
<option value="">Select...</option>
- <option value="Bug Report">Bug Report</option>
<option value="Borrowing Books">Borrowing Books</option>
<option value="Buying Books">Buying Books</option>
<option value="Contact an Author">Contact an Author</option>
<option value="Deletion Request">Deletion Request</option>
- <option value="Developer/API/Covers Question">Developer/API/Covers Question</option>
+ <option value="Developer/API/Covers Question/Bug report">Developer/API/Covers/Bug report Question</option>
<option value="Editing Problem">Editing Problem</option>
- <option value="Image Upload">Image Upload</option>
<option value="Login Trouble">Login Trouble</option>
<option value="Spam Report">Spam Report</option>
<option value="Other">Other</option>
View
6 openlibrary/plugins/upstream/templates/email/case_created.html
@@ -1,4 +1,4 @@
-$def with (case)
+$def with (a)
$var title: Sent!
@@ -9,10 +9,10 @@
<div id="contentBody">
-<p>Thank you for your note. We've created Help Case #${case.caseno} to keep track of it.
-</p>
+<p>Thank you for your note. We'll get back to you as soon as possible.</p>
<p>It might take us a little while to read it because we receive lots of messages, but rest assured we will, and we'll get back to you if required.
</p>
+
</div>
View
4 openlibrary/plugins/upstream/templates/email/support_case.html
@@ -2,10 +2,10 @@
Hello,
- Thanks for sending in a support case. It has been filed as Case
-#${case.caseno}. We'll get back to you as soon as possible with an
+ Thanks for sending in a support case. We'll get back to you as soon as possible with an
answer, if a response is required.
+
Thanks!
The Open Library team
View
4 openlibrary/plugins/upstream/templates/lib/nav_foot.html
@@ -27,10 +27,10 @@
<a href="/recentchanges" title="View all recent changes">$:_("Around<br/>The Library")</a>
</h4>
$:render_template("site/around_the_library")
- <div id="abuse" title="$_('Report this page or content as spam')">
+ <div id="abuse" title="$_('Report a problem.')">
<a href="/contact?path=$request.path"><span></span>$_("Problem?")</a>
</div>
</div>
- </div>
+ </div>
Please sign in to comment.
Something went wrong with that request. Please try again.