summaryrefslogtreecommitdiffstats
path: root/askbot/skins/default/templates
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-06-15 05:18:22 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-06-15 05:18:22 -0400
commit7cafe4b7a02c79f574862f7abbb56c194734fee0 (patch)
tree47cfcef762c69a50f0f2adefc878c41b56294473 /askbot/skins/default/templates
parentbf636541db4640234ddbdf8d8b7aafa6cbc17bc9 (diff)
parent22f7d075f24b338b5ca2b95df98198b193db5a8c (diff)
downloadaskbot-7cafe4b7a02c79f574862f7abbb56c194734fee0.tar.gz
askbot-7cafe4b7a02c79f574862f7abbb56c194734fee0.tar.bz2
askbot-7cafe4b7a02c79f574862f7abbb56c194734fee0.zip
merged feature 157 by Paul Backhouse
Diffstat (limited to 'askbot/skins/default/templates')
-rw-r--r--askbot/skins/default/templates/main_page/javascript.html2
-rw-r--r--askbot/skins/default/templates/user_profile/macros.html24
-rw-r--r--askbot/skins/default/templates/user_profile/user_edit.html8
-rw-r--r--askbot/skins/default/templates/user_profile/user_stats.html14
4 files changed, 47 insertions, 1 deletions
diff --git a/askbot/skins/default/templates/main_page/javascript.html b/askbot/skins/default/templates/main_page/javascript.html
index d968dcd5..10f8ede2 100644
--- a/askbot/skins/default/templates/main_page/javascript.html
+++ b/askbot/skins/default/templates/main_page/javascript.html
@@ -27,4 +27,4 @@
{% if request.user.is_authenticated() %}
<script type='text/javascript' src='{{"/js/tag_selector.js"|media}}'></script>
{% endif %}
-<script type="text/javascript" src="{{"/js/live_search.js"|media}}"></script>
+<script type="text/javascript" src='{{"/js/live_search.js"|media}}'></script>
diff --git a/askbot/skins/default/templates/user_profile/macros.html b/askbot/skins/default/templates/user_profile/macros.html
new file mode 100644
index 00000000..ac573553
--- /dev/null
+++ b/askbot/skins/default/templates/user_profile/macros.html
@@ -0,0 +1,24 @@
+{% import "macros.html" as macros %}
+
+{% macro tag_selection(tag_names, selection_type) %}
+ <a name="{{selection_type}}-tags"></a>
+ {% spaceless %}
+ <h2>{%
+ trans counter=tag_names|length, type=gettext(selection_type)|capitalize
+ %}<span class="count">{{counter}}</span> {{type}} Tag{%
+ pluralize
+ %}<span class="count">{{counter}}</span> {{type}} Tags{%
+ endtrans
+ %}
+ </h2>
+ {% endspaceless %}
+ <div class="user-stats-table">
+ <table class="tags">
+ <tr>
+ <td valign="top">
+ {{ macros.tag_list_widget(tag_names, deletable = False) }}
+ </td>
+ </tr>
+ </table>
+ </div>
+{% endmacro %}
diff --git a/askbot/skins/default/templates/user_profile/user_edit.html b/askbot/skins/default/templates/user_profile/user_edit.html
index 7735ba93..88a21e9f 100644
--- a/askbot/skins/default/templates/user_profile/user_edit.html
+++ b/askbot/skins/default/templates/user_profile/user_edit.html
@@ -96,6 +96,14 @@
<td style="vertical-align:top">{{ form.about.label_tag() }}:</td>
<td>{{ form.about }} <span class="form-error"> {{ form.about.errors }} </span></td>
</tr>
+ {% if marked_tags_setting == 'when-user-wants' %}
+ <tr>
+ <td>{{ form.show_marked_tags.label_tag() }}:</td>
+ <td>{{ form.show_marked_tags }}
+ <span class="form-error">{{ form.show_marked_tags.errors }}</span>
+ </td>
+ </tr>
+ {% endif %}
</table>
<div style="margin:30px 0 60px 0">
<input type="submit" value="{% trans %}Update{% endtrans %}" class="submit" >&nbsp;
diff --git a/askbot/skins/default/templates/user_profile/user_stats.html b/askbot/skins/default/templates/user_profile/user_stats.html
index 177df214..5e0e7426 100644
--- a/askbot/skins/default/templates/user_profile/user_stats.html
+++ b/askbot/skins/default/templates/user_profile/user_stats.html
@@ -1,5 +1,6 @@
{% extends "user_profile/user.html" %}
{% import "macros.html" as macros %}
+{% import "user_profile/macros.html" as user_profile_macros %}
<!-- user_stats.html -->
{% block profilesection %}
{% trans %}overview{% endtrans %}
@@ -110,6 +111,15 @@
</tr>
</table>
</div>
+ {% if interesting_tag_names %}
+ {{ user_profile_macros.tag_selection(interesting_tag_names, 'interesting') }}
+ {% endif %}
+ {% if ignored_tag_names %}
+ {{ user_profile_macros.tag_selection(ignored_tag_names, 'ignored') }}
+ {% endif %}
+ {% if subscribed_tag_names %}
+ {{ user_profile_macros.tag_selection(subscribed_tag_names, 'subscribed') }}
+ {% endif %}
{% if settings.BADGES_MODE == 'public' %}
<a name="badges"></a>
{% spaceless %}
@@ -164,5 +174,9 @@
});
});
</script>
+ <script type='text/javascript' src='{{"/js/tag_selector.js"|media}}'></script>
+ <script type="text/javascript">
+ askbot['urls']['questions'] = '{% url "questions" %}';
+ </script>
{% endblock %}
<!-- end user_stats.html -->