help_text = _("Do you want to show the welcome box when a user first visits your site."),
required=False))
+SHOW_INTERESTING_TAGS_BOX = Setting('SHOW_INTERESTING_TAGS_BOX', True, SIDEBAR_SET, dict(
+label = _("Show interesting tags in the sidebar"),
+help_text = _("Check this if you want to see the interesting tags container in the sidebar."),
+required=False))
+
APP_INTRO = Setting('APP_INTRO', u'<p>Ask and answer questions, make the world better!</p>', SIDEBAR_SET, dict(
label = _("Application intro"),
help_text = _("The introductory page that is visible in the sidebar for anonymous users."),
{% load i18n %}
{% load extra_tags %}
+{% if show_interesting_tags %}
{% if user_authenticated %}
<div id="tagSelector" class="boxC">
<h3 class="subtitle">{% trans "Interesting tags" %}</h3>
{% endcomment %}
</div>
{% endif %}
+{% endif %}
+++ /dev/null
-{% load i18n %}
-{% load extra_tags %}
-<div id="tagSelector" class="boxC">
- <h3 class="subtitle">{% trans "Interesting tags" %}</h3>
- <div class="tags interesting marked-tags">
- {% for tag_name in interesting_tag_names %}
- {% spaceless %}
- <span class="deletable-tag tag-link-{{ tag }}" id="interesting-tag-{{tag_name}}">
- <a rel="tag"
- title="{% blocktrans with tag as tagname %}see questions tagged '{{ tag_name }}'{% endblocktrans %}"
- href="{% url tag_questions tag_name|urlencode %}">{{tag_name}}</a>
- <img class="delete-icon"
- src="{% media "/media/images/close-small-dark.png" %}"
- title="{% blocktrans %}remove '{{tag_name}}' from the list of interesting tags{% endblocktrans %}"/>
- </span>
- {% endspaceless %}
- {% endfor %}
- </div>
- <input id="interestingTagInput" autocomplete="off" type="text"/>
- <input id="interestingTagAdd" type="submit" value="{% trans "Add" %}"/>
- <h3 class="subtitle">{% trans "Ignored tags" %}</h3>
- <div class="tags ignored marked-tags">
- {% for tag_name in ignored_tag_names %}
- {% spaceless %}
- <span class="deletable-tag tag-link-{{ tag }}" id="ignored-tag-{{tag_name}}">
- <a rel="tag"
- title="{% blocktrans with tag as tagname %}see questions tagged '{{ tag_name }}'{% endblocktrans %}"
- href="{% url tag_questions tag_name|urlencode %}">{{tag_name}}</a>
- <img class="delete-icon"
- src="{% media "/media/images/close-small-dark.png" %}"
- title="{% blocktrans %}remove '{{tag_name}}' from the list of ignored tags{% endblocktrans %}"/>
- </span>
- {% endspaceless %}
- {% endfor %}
- </div>
- <input id="ignoredTagInput" autocomplete="off" type="text"/>
- <input id="ignoredTagAdd" type="submit" value="{% trans "Add" %}"/>
- <p id="hideIgnoredTagsControl">
- <input id="hideIgnoredTagsCb" type="checkbox" {% if request.user.hide_ignored_questions %}checked="checked"{% endif %} />
- <label id="hideIgnoredTagsLabel" for="hideIgnoredTagsCb">{% trans "keep ignored questions hidden" %}</label>
- <p>
-</div>
@register.inclusion_tag('question_list/tag_selector.html', takes_context=True)\r
def tag_selector(context):\r
request = context['request']\r
+ show_interesting_tags = settings.SHOW_INTERESTING_TAGS_BOX\r
\r
if request.user.is_authenticated():\r
pt = MarkedTag.objects.filter(user=request.user)\r
"interesting_tag_names": pt.filter(reason='good').values_list('tag__name', flat=True),\r
'ignored_tag_names': pt.filter(reason='bad').values_list('tag__name', flat=True),\r
'user_authenticated': True,\r
+ 'show_interesting_tags' : show_interesting_tags,\r
}\r
else:\r
- return { 'request' : request, 'user_authenticated': False}\r
+ return { 'request' : request, 'user_authenticated': False, 'show_interesting_tags' : show_interesting_tags }\r