-{% extends "user.html" %}\r
-<!-- user_subscriptions.html -->\r
-{% load i18n %}\r
-{% load extra_tags %}\r
-{% load humanize %}\r
-\r
-{% block usercontent %}\r
- <h2>{% trans "Notifications and subscription settings" %}</h2>\r
- <p class="message">\r
- {% blocktrans %}\r
- Here you can decide which types of notifications you wish to receive, and their frequency.<br />\r
- {% endblocktrans %}\r
- {% if notificatons_on %}\r
- {% blocktrans %}\r
- Currently you have notifications enabled. You can always stop all notifications without losing your settings and restart them afterwards.<br />\r
- {% endblocktrans %}\r
- {% else %}\r
- {% blocktrans %}\r
- Currently you have notifications disabled. You can enable them by clicking on the <strong>Start notifications</strong> button below.<br />\r
- {% endblocktrans %}\r
- {% endif %}\r
- </p>\r
- <div class='inline-block'>\r
- <form method="POST">\r
- {{ form.errors }}\r
- <table class="form-as-table">\r
- <tr>\r
- <td colspan="2">\r
- <strong>{% trans "Notify me when:" %}</strong>\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>{% trans "A new member joins" %}</td>\r
- <td>{{ form.member_joins }}</td>\r
- </tr>\r
- <tr>\r
- <td>{% trans "A new question is posted" %}</td>\r
- <td>{{ form.new_question }}</td>\r
- </tr>\r
- <tr>\r
- <td>{% trans "A new question matching my interesting tags is posted" %}</td>\r
- <td>{{ form.new_question_watched_tags }}</td>\r
- </tr>\r
- <tr>\r
- <td>{% trans "There's an update on one of my subscriptions" %}</td>\r
- <td >{{ form.subscribed_questions }}</td>\r
- </tr>\r
- </table>\r
- <p> </p>\r
- <table class="form-as-table check-table">\r
- <tr>\r
- <td colspan="3">\r
- <strong>{% trans "Auto subscribe me to:" %}</strong>\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- {{ form.questions_asked }}{% trans "Questions I ask" %}\r
- </td>\r
- <td>\r
- {{ form.questions_answered }}{% trans "Questions I answer" %}\r
- </td>\r
- <td>\r
- {{ form.questions_commented }}{% trans "Questions I comment" %}\r
- </td>\r
- </tr>\r
- <tr> \r
- <td>\r
- {{ form.questions_viewed }}{% trans "Questions I view" %}\r
- </td>\r
- <td>\r
- {{ form.all_questions_watched_tags }}{% trans "All questions matching my interesting tags" %}\r
- </td>\r
- <td>\r
- {{ form.all_questions }}{% trans "All questions" %}\r
- </td>\r
- </tr>\r
- </table>\r
- <p> </p>\r
- <table class="form-as-table check-table">\r
- <tr>\r
- <td colspan="2">\r
- <strong>{% trans "On my subscriptions, notify me when:" %}</strong>\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- {{ form.notify_answers }}{% trans "An answer is posted" %}\r
- </td>\r
- <td>\r
- {{ form.notify_comments_own_post }}{% trans "A comment on one of my posts is posted" %}\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- {{ form.notify_comments }}{% trans "A comment is posted" %}\r
- </td>\r
- <td>\r
- {{ form.notify_accepted }}{% trans "An answer is accepted" %}\r
- </td>\r
- </tr>\r
- </table>\r
- <p> </p>\r
- <table class="form-as-table check-table">\r
- <tr>\r
- <td>\r
- <strong>{% trans "More:" %}</strong>\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- {{ form.notify_reply_to_comments }}{% trans "Notify me when someone replies to one of my comments on any post using the <pre>@username</pre> notation" %}\r
- </td>\r
- </tr>\r
- <tr>\r
- <td>\r
- {{ form.send_digest }}{% trans "Send me the daily digest with information about the site activity" %}\r
- </td>\r
- </tr>\r
- </table>\r
- <div class="submit-row">\r
- <input type="submit" class="submit" name="save" value="{% trans "Update" %}"/>\r
- {% if notificatons_on %}\r
- <input type="submit" class="submit" name="notswitch" value="{% trans "Stop notifications" %}"/>\r
- {% else %}\r
- <input type="submit" class="submit" name="notswitch" value="{% trans "Start notifications" %}"/> \r
- {% endif %}\r
- </div>\r
- {{ form.user }}\r
- </form>\r
- </div>\r
-{% endblock %}\r
-<!-- end user_subscriptions.html -->\r
+{% extends "user.html" %}
+<!-- user_subscriptions.html -->
+{% load i18n %}
+{% load extra_tags %}
+{% load humanize %}
+
+{% block userjs %}
+ <script type="text/javascript">
+ function enableSettings() {
+ $("div#subscriptions_settings").show();
+ $("div#subscriptions_management").hide();
+
+ $("a#subscriptions_settings_button").addClass('on');
+ $("a#subscriptions_management_button").removeClass("on");
+
+ //location.reload(true);
+ }
+
+ function enableManagement() {
+ $("div#subscriptions_settings").hide();
+ $("div#subscriptions_management").show();
+
+ $("a#subscriptions_settings_button").removeClass('on');
+ $("a#subscriptions_management_button").addClass('on');
+
+ //location.reload(true);
+ }
+ </script>
+{% endblock %}
+
+{% block usercontent %}
+ <br/>
+
+ <div id="navBar"><div class="tabsA">
+ <a href='{{ view_user.get_user_subscriptions_url }}?tab=settings' id="subscriptions_settings_button" {% if not manage_open %}class="on"{% endif %}>Settings</a>
+ <a href='{{ view_user.get_user_subscriptions_url }}?tab=manage' id="subscriptions_management_button" {% if manage_open %}class="on"{% endif %}>Manage</a>
+ </div></div>
+
+ <br/>
+
+ {% if not manage_open %}
+ <div id="subscriptions_settings" >
+ {% include "users/subscriptions_settings.html" %}
+ </div>
+ {% endif %}
+
+ {% if manage_open %}
+ <div id="subscriptions_management" >
+ {% include "users/subscriptions_management.html" %}
+ </div>
+ {% endif %}
+{% endblock %}
+<!-- end user_subscriptions.html -->