text-align: center;
}
-.vote-notification {
- background-color: darkred;
- color: White;
- cursor: pointer;
- display: none;
- padding: 15px;
- position: absolute;
- text-align: center;
- z-index: 1;
-}
-
-.vote-notification a {
- color: White;
- text-decoration: underline;
-}
-
span.form-error {
color: #990000;
font-weight: normal;
padding-bottom: 10px;
}
-.post-controls {
+.post-controls, .tags-container {
font-size: 11px;
line-height: 12px;
margin-bottom: 5px;
min-width: 200px;
}
+.tags-container {
+ margin: 0 0 16px 0;
+}
+
+.post-controls {
+ float: left;
+}
+
#question-controls .tags { margin: 0 0 3px; }
.post-update-info {
a.accept-answer { background: url("../images/vote-accepted.png") no-repeat scroll center center transparent; }
a.accept-answer.on,a.accept-answer:hover { background: url("../images/vote-accepted-on.png") no-repeat scroll center center transparent; }
+.community-wiki {
+ font-size: 11px;
+ color: #333;
+ background: url("../images/wiki.png") no-repeat left center;
+ padding-left: 46px;
+ margin: 12px 0 32px 0;
+ min-height: 32px;
+ line-height: 14px;
+}
+
.post-score, .comments-char-left-count {
color: #777777;
font-family: Arial;
-{% extends "base.html" %}
+{% extends "base_content.html" %}
{% load extra_tags %}
{% load humanize %}
{% load i18n %}
--- /dev/null
+{% load i18n extra_tags %}
+{% spaceless %}
+{% if is_wiki %}
+ <div class="community-wiki">
+ {% blocktrans %}This {{ post_type }} is marked "community wiki".{% endblocktrans %}
+ {% if can_edit %}
+ <br />{% blocktrans %}Feel free to <a href="{{ edit_url }}">edit it</a>.{% endblocktrans %}
+ {% endif %}
+ </div>
+{% endif %}
+{% endspaceless %}
\ No newline at end of file
<div class="question-body">\r
{{ question.html|safe }}\r
</div>\r
- <div id="question-controls" class="post-controls">\r
- <div id="question-tags" class="tags">\r
- {% for tag in question.tagname_list %}\r
- <a href="{% url tag_questions tag|urlencode %}" class="post-tag"\r
- title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>\r
- {% endfor %}\r
- </div>\r
+ <div id="question-tags" class="tags-container tags">\r
+ {% for tag in question.tagname_list %}\r
+ <a href="{% url tag_questions tag|urlencode %}" class="post-tag"\r
+ title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>\r
+ {% endfor %}\r
+ </div>\r
+ <div id="question-controls" class="post-controls"> \r
{% post_controls question request.user %}\r
+ {% wiki_symbol request.user question %}\r
</div>\r
<div class="post-update-info-container">\r
{% contributors_info question %}\r
'user': user\r
}\r
\r
+@register.inclusion_tag('node/wiki_symbol.html')\r
+def wiki_symbol(user, post):\r
+ context = {\r
+ 'is_wiki': post.nis.wiki,\r
+ 'post_type': post.friendly_name\r
+ }\r
+\r
+ if post.nis.wiki:\r
+ if user.can_edit_post(post):\r
+ context['can_edit'] = True\r
+ context['edit_url'] = reverse('edit_' + post.node_type, kwargs={'id': post.id})\r
+ context['by'] = post.nstate.wiki.by.username\r
+ context['at'] = post.nstate.wiki.at\r
+\r
+ return context\r
+\r
@register.inclusion_tag('node/favorite_mark.html')\r
def favorite_mark(question, user):\r
try:\r
menu = []\r
\r
if user.is_authenticated():\r
- post_type = (post.__class__ is Question) and 'question' or 'answer'\r
+ post_type = post.node_type\r
\r
if post_type == "answer":\r
controls.append(post_control(_('permanent link'), '#%d' % post.id, title=_("answer permanent link")))\r