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