]> git.openstreetmap.org Git - osqa.git/blob - osqa/forum/skins/default/templates/question_retag.html
3e073e836e704be0a208011906958686bb62b4ef
[osqa.git] / osqa / forum / skins / default / templates / question_retag.html
1 {% extends "base.html" %}
2 <!-- question_retag.html -->
3 {% load extra_tags %}
4 {% load i18n %}
5 {% block title %}{% spaceless %}{% trans "Change tags" %}{% endspaceless %}{% endblock %}
6 {% block forejs %}
7         <script type="text/javascript">
8         
9         $().ready(function(){
10             $("#nav_questions").attr('className',"on");
11             //Tags autocomplete action
12             var tags = {{ tags|safe }};
13                 $("#id_tags").autocomplete(tags, {
14                 minChars: 1,
15                         matchContains: true,
16                 max: 20,
17                 multiple: true,
18                 multipleSeparator: " ",
19                         formatItem: function(row, i, max) {
20                                 return row.n + " ("+ row.c +")";
21                         },
22                 formatResult: function(row, i, max){
23                     return row.n;
24                 }
25                 
26             });
27            
28              $("#fmretag").validate({
29                 rules: {
30                                 tags: {
31                                         required: true,
32                                         maxength: 105
33                                 }
34                         },
35                 messages: {
36                                 tags: {
37                         required: "{% trans "tags are required" %}",
38                         maxlength: "{% trans "up to 5 tags, less than 20 characters each" %}
39                     }
40                 }
41                 
42             });
43
44         });
45         </script>
46 {% endblock %}
47         
48 {% block content %}
49 <div id="main-bar" class="headNormal">
50     {% trans "Change tags" %} [<a href="{{ question.get_absolute_url }}">{% trans "back" %}</a>]
51 </div>
52 <div id="main-body" class="ask-body">
53     <div id="askform">
54         <form id="fmretag" action="{% url edit_question question.id %}" method="post" >
55             <h3>
56                 {{ question.get_question_title }}
57             </h3>
58             <div id="description" class="edit-content-html">
59                 {{ question.html|safe }}
60             </div>
61            
62             
63             <div class="form-item">
64                 <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br/>
65                 {{ form.tags }}  {{ form.tags.errors }}
66                 <div class="title-desc">
67                     {{ form.tags.help_text }}
68                 </div>
69             </div>
70             <div class="error" ></div>
71             <input type="submit" value="{% trans "Save edit" %}" class="submit" />
72             <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
73         </form>
74     </div>
75 </div>
76 {% endblock %}
77
78 {% block sidebar %}
79 <div class="boxC">
80     <p class="subtitle">{% trans "Why use and modify tags?" %}</p>
81     <ul class="list-item">
82         <li>
83             {% trans "tags help us keep Questions organized" %}
84         </li>
85         {% comment %}
86         <li>
87             修改完整问题需要用户的积分达到一定条件(比如:积分 >= 3000分,自己发布的问题除外),而用户积分达到比较低的时候,就可以修改问题的标签(比如:积分 >= 500, 这里指所有问题的标签)。
88         </li>
89         {% endcomment %}
90         <li>
91             {% trans "tag editors receive special awards from the community" %}
92         </li>
93     </ul>
94     <p class='info-box-follow-up-links'>
95         <a href="{% url faq %}">faq »</a>
96     </p>
97 </div>
98
99 {% endblock %}
100
101 {% block endjs %}
102 {% endblock %}
103 <!-- end question_retag.html -->