diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-15 02:23:35 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-15 02:23:35 -0400 |
commit | 7ebc10362bf662489a0eba6105bd6d0d897d9541 (patch) | |
tree | 4116e216011e65dabf235a3a5bbd5de5765ffe4b /askbot/templates | |
parent | 2ea1b1fcfa30d615054b407a4d38d053615a42e9 (diff) | |
download | askbot-7ebc10362bf662489a0eba6105bd6d0d897d9541.tar.gz askbot-7ebc10362bf662489a0eba6105bd6d0d897d9541.tar.bz2 askbot-7ebc10362bf662489a0eba6105bd6d0d897d9541.zip |
added frontent UI for the auto-tweeting setup in the user profile
Diffstat (limited to 'askbot/templates')
-rw-r--r-- | askbot/templates/user_profile/twitter_sharing_controls.html | 32 | ||||
-rw-r--r-- | askbot/templates/user_profile/user_info.html | 3 |
2 files changed, 35 insertions, 0 deletions
diff --git a/askbot/templates/user_profile/twitter_sharing_controls.html b/askbot/templates/user_profile/twitter_sharing_controls.html new file mode 100644 index 00000000..1e3c3879 --- /dev/null +++ b/askbot/templates/user_profile/twitter_sharing_controls.html @@ -0,0 +1,32 @@ +{% set auto_tweeting_status = view_user.get_social_sharing_status('twitter') %} +<tr class="auto-tweeting {{ auto_tweeting_status }}"> +{% if auto_tweeting_status == 'enabled' %} + {% set handle = view_user.twitter_handle|escape %} + <td>{% trans %}Auto-tweeting to @{{ handle }}{% endtrans %}</td> + <td> + <select class="select-mode"> + {% set mode = view_user.get_social_sharing_mode() %} + {% if mode == 'share-my-posts' %} + <option selected="selected" value="share-my-posts">{% trans %}my posts{% endtrans %}</option> + <option value="all-posts">{% trans %}all posts{% endtrans %}</option> + {% else %} + <option selected="selected" value="all-posts">{% trans %}all posts{% endtrans %}</option> + <option value="share-my-posts">{% trans %}my posts{% endtrans %}</option> + {% endif %} + <option value="share-nothing">{% trans %}stop tweeting{% endtrans %}</option> + </select> + </td> +{% elif auto_tweeting_status == 'inactive' %} + <td>{% trans %}Auto-tweeting is inactive{% endtrans %}</td> + <td> + <select class="select-account"> + <option selected="selected" value="select-account">{% trans %}Select twitter account{% endtrans %}</option> + <option value="existing-handle">{{ handle }}</option> + <option value="new-handle">{% trans %}use another account{% endtrans %}</option> + </select> + </td> +{% else %} + <td>{% trans %}Auto-tweeting is off{% endtrans %}</td> + <td><button class="submit start-tweeting">{% trans %}Start tweeting{% endtrans %}</button></td> +{% endif %} +</tr> diff --git a/askbot/templates/user_profile/user_info.html b/askbot/templates/user_profile/user_info.html index e6d24463..8f7a5006 100644 --- a/askbot/templates/user_profile/user_info.html +++ b/askbot/templates/user_profile/user_info.html @@ -88,6 +88,9 @@ <td>{{ macros.user_website_link(view_user, max_display_length = 30) }}</td> </tr> {% endif %} + {% if request.user == view_user and settings.ENABLE_SHARING_TWITTER %} + {% include "user_profile/twitter_sharing_controls.html" %} + {% endif %} {% if view_user.location or view_user.country %} <tr> <td>{% trans %}location{% endtrans %}</td> |