diff options
49 files changed, 208 insertions, 205 deletions
diff --git a/forum/models.py b/forum/models.py index 842121ac..c38ba30e 100644 --- a/forum/models.py +++ b/forum/models.py @@ -281,6 +281,16 @@ class Question(models.Model): class Meta: db_table = u'question' +class FavoriteQuestion(models.Model): + """A favorite Question of a User.""" + question = models.ForeignKey(Question) + user = models.ForeignKey(User, related_name='user_favorite_questions') + added_at = models.DateTimeField(default=datetime.datetime.now) + class Meta: + db_table = u'favorite_question' + def __unicode__(self): + return '[%s] favorited at %s' %(self.user, self.added_at) + class QuestionRevision(models.Model): """A revision of a Question.""" question = models.ForeignKey(Question, related_name='revisions') @@ -429,16 +439,6 @@ class AnswerRevision(models.Model): flat=True)[0] + 1 super(AnswerRevision, self).save(**kwargs) -class FavoriteQuestion(models.Model): - """A favorite Question of a User.""" - question = models.ForeignKey(Question) - user = models.ForeignKey(User, related_name='user_favorite_questions') - added_at = models.DateTimeField(default=datetime.datetime.now) - class Meta: - db_table = u'favorite_question' - def __unicode__(self): - return '[%s] favorited at %s' %(self.user, self.added_at) - class Badge(models.Model): """Awarded for notable actions performed on the site by Users.""" GOLD = 1 diff --git a/forum/templatetags/extra_filters.py b/forum/templatetags/extra_filters.py index cec97920..d8b8e61f 100644 --- a/forum/templatetags/extra_filters.py +++ b/forum/templatetags/extra_filters.py @@ -1,8 +1,13 @@ -from django import template +from django import template from forum import auth register = template.Library() +@template.defaultfilters.stringfilter +@register.filter +def collapse(input): + return ' '.join(input.split()) + @register.filter def can_vote_up(user): return auth.can_vote_up(user) @@ -80,4 +85,4 @@ def cnprog_intword(number): else: return number except: - return number
\ No newline at end of file + return number diff --git a/forum/templatetags/extra_tags.py b/forum/templatetags/extra_tags.py index ac4e6ca3..06a2d27c 100644 --- a/forum/templatetags/extra_tags.py +++ b/forum/templatetags/extra_tags.py @@ -14,7 +14,8 @@ register = template.Library() GRAVATAR_TEMPLATE = ('<img width="%(size)s" height="%(size)s" ' 'src="http://www.gravatar.com/avatar/%(gravatar_hash)s' - '?s=%(size)s&d=identicon&r=PG">') + '?s=%(size)s&d=identicon&r=PG" ' + 'alt="%(username)s\'s gravatar image" />') @register.simple_tag def gravatar(user, size): @@ -26,11 +27,14 @@ def gravatar(user, size): """ try: gravatar = user['gravatar'] + username = user['username'] except (TypeError, AttributeError, KeyError): gravatar = user.gravatar + username = user.username return mark_safe(GRAVATAR_TEMPLATE % { 'size': size, 'gravatar_hash': gravatar, + 'username': template.defaultfilters.urlencode(username), }) MAX_FONTSIZE = 18 diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 3dda9ce9..07532566 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -148,7 +148,7 @@ msgstr "" #: django_authopenid/views.py:417 django_authopenid/views.py:544 msgid "Welcome" -msgstr "Verification Email from Q&A forum" +msgstr "Verification Email from Q&A forum" #: django_authopenid/views.py:507 msgid "Password changed." @@ -812,7 +812,7 @@ msgid "must have valid %(email)s to post" msgstr "" "<span class='strong big'>Looks like your email address, %(email)s has not " "yet been validated.</span> To post messages you must verify your email, " -"please see <a href='/faq#validate'>more details here</a>.<br>You can submit " +"please see <a href='/faq#validate'>more details here</a>.<br/>You can submit " "your question now and validate email after that. Your question will saved as " "pending meanwhile. " @@ -1135,12 +1135,12 @@ msgstr "" "<form style='margin:0;padding:0;' action='/email/sendkey/'><p><span class=" "\"bigger strong\">How?</span> If you have just set or changed your email " "address - <strong>check your email and click the included link</strong>." -"<br>The link contains a key generated specifically for you. You can also " +"<br/>The link contains a key generated specifically for you. You can also " "<button style='display:inline' type='submit'><strong>get a new key</strong></" "button> and check your email again.</p></form><span class=\"bigger strong" "\">Why?</span> Email validation is required to make sure that <strong>only " "you can post messages</strong> on your behalf and to <strong>minimize spam</" -"strong> posts.<br>With email you can <strong>subscribe for updates</strong> " +"strong> posts.<br/>With email you can <strong>subscribe for updates</strong> " "on the most interesting questions. Also, when you sign up for the first time " "- create a unique <a href='/faq#gravatar'><strong>gravatar</strong></a> " "personal image.</p>" @@ -1716,12 +1716,12 @@ msgid_plural "" "\t\t\t" msgstr[0] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>question tagged</p><p><span " -"class=\"tag\">%(tagname)s</span></p>" +"<span class=\"questions-count\">%(q_num)s</span><br/>question tagged <span " +"class=\"tag\">%(tagname)s</span>" msgstr[1] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>questions tagged</p><div " -"class=\"tags\"><span class=\"tag\">%(tagname)s</span></div>" +"<span class=\"questions-count\">%(q_num)s</span><br/>questions tagged " +"<span class=\"tag\">%(tagname)s</span>" #: templates/questions.html:116 #, python-format @@ -1735,14 +1735,12 @@ msgid_plural "" "\t\t\t\t" msgstr[0] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>question with title " -"containing <strong><span class=\"darkred\">%(searchtitle)s</span></strong></" -"p>" +"<span class=\"questions-count\">%(q_num)s</span><br/>question with title " +"containing <span class=\"darkred strong\">%(searchtitle)s</span>" msgstr[1] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>questions with title " -"containing <strong><span class=\"darkred\">%(searchtitle)s</span></strong></" -"p>" +"<span class=\"questions-count\">%(q_num)s</span><br/>questions with title " +"containing <span class=\"darkred strong\">%(searchtitle)s</span></strong>" #: templates/questions.html:122 #, python-format @@ -1756,10 +1754,10 @@ msgid_plural "" "\t\t\t\t" msgstr[0] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>question</p>" +"<span class=\"questions-count\">%(q_num)s</span><br/>question" msgstr[1] "" "\n" -"<div class=\"questions-count\">%(q_num)s</div><p>questions</p>" +"<span class=\"questions-count\">%(q_num)s</span><br/>questions" #: templates/questions.html:131 msgid "latest questions info" @@ -1866,7 +1864,7 @@ msgstr "" #, python-format msgid "have %(num_q)s unanswered questions" msgstr "" -"<div class=\"questions-count\">%(num_q)s</div><strong>unanswered</strong> " +"<span class=\"questions-count\">%(num_q)s</span><br/><strong>unanswered</strong> " "questions" #: templates/unanswered.html:99 @@ -2197,7 +2195,7 @@ msgstr "New user signup" #, python-format msgid "register new %(provider)s account info" msgstr "" -"<p><span class=\"big strong\">You are here for the first time with your %" +"<span class=\"big strong\">You are here for the first time with your %" "(provider)s login.</span> Please create your <strong>screen name</strong> " "and save your <strong>email</strong> address. Saved email address will let " "you <strong>subscribe for the updates</strong> on the most interesting " @@ -2249,7 +2247,7 @@ msgstr "" #: templates/authopenid/confirm_email.txt:2 msgid "Thank you for registering at our Q&A forum!" -msgstr "" +msgstr "Thank you for registering at our Q&A forum!" #: templates/authopenid/confirm_email.txt:4 msgid "Your account details are:" @@ -2309,7 +2307,7 @@ msgstr "" #: templates/authopenid/email_validation.txt:2 msgid "Greetings from the Q&A forum" -msgstr "" +msgstr "Greetings from the Q&A forum" #: templates/authopenid/email_validation.txt:4 msgid "To make use of the Forum, please follow the link below:" @@ -2434,14 +2432,14 @@ msgid "Click to sign in through any of these services." msgstr "" "<p><span class=\"big strong\">We accept <a href=\"http://openid.net" "\">OpenID</a> login.</span> <font color=\"gray\">Instead of creating a new " -"password - log in through any of the services below.<p><span class=\"big " +"password - log in through any of the services below.</font></p><p><span class=\"big " "strong\">1. Select the login service by clicking one of the icons</span></p>" #: templates/authopenid/signin.html:103 msgid "Enter your <span id=\"enter_your_what\">Provider user name</span>" msgstr "" "<span class=\"big strong\">2. Enter your <span id=\"enter_your_what" -"\">Provider user name</span></span><br>(or select another OpenID provider " +"\">Provider user name</span></span><br/>(or select another OpenID provider " "above)" #: templates/authopenid/signin.html:110 @@ -2450,7 +2448,7 @@ msgid "" "web address" msgstr "" "<span class=\"big strong\">2. Enter your <a class=\"openid_logo\" href=" -"\"http://openid.net\">OpenID</a> web address</span><br>(or choose specific " +"\"http://openid.net\">OpenID</a> web address</span><br/>(or choose specific " "provider by clicking on one of the icons above)" #: templates/authopenid/signin.html:112 templates/authopenid/signin.html:139 diff --git a/locale/es/LC_MESSAGES/django.po b/locale/es/LC_MESSAGES/django.po index 9dbbfa0e..d8615b89 100644 --- a/locale/es/LC_MESSAGES/django.po +++ b/locale/es/LC_MESSAGES/django.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-09 20:15+0000\n" -"PO-Revision-Date: 2009-08-09 18:44-0600\n" +"POT-Creation-Date: 2009-08-05 22:28-0400\n" +"PO-Revision-Date: 2009-08-07 11:21-0600\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "MIME-Version: 1.0\n" @@ -1292,7 +1292,7 @@ msgstr "mi perfil" #: templates/header.html:42 msgid "ask a question" -msgstr "preguntar" +msgstr "hacer una pregunta" #: templates/header.html:57 msgid "search" diff --git a/templates/404.html b/templates/404.html index cd23a36b..7090156b 100644 --- a/templates/404.html +++ b/templates/404.html @@ -23,7 +23,7 @@ <div style="padding:5px 0px 10px 0;line-height:25px;"> <h3>{% trans "Sorry, could not find the page you requested." %}</h3> <div style="margin-top:5px"> - {% trans "This might have happened for the following reasons:" %}<br> + {% trans "This might have happened for the following reasons:" %}<br/> <ul> <li>{% trans "this question or answer has been deleted;" %}</li> <li>{% trans "url has error - please check it;" %}</li> diff --git a/templates/500.html b/templates/500.html index 52dcafae..313150fb 100644 --- a/templates/500.html +++ b/templates/500.html @@ -20,8 +20,8 @@ <div id="main-body" class="headNormal"> <div style="padding:5px 0px 10px 0;line-height:25px"> <h3>{% trans "sorry, system error" %}</h3> - <br> - {% trans "system error log is recorded, error will be fixed as soon as possible" %}<br> + <br/> + {% trans "system error log is recorded, error will be fixed as soon as possible" %}<br/> {% trans "please report the error to the site administrators if you wish" %} <ul> <li><a href="#" id="linkPrevious">{% trans "back to previous page" %}</li> diff --git a/templates/answer_edit.html b/templates/answer_edit.html index 9f0f1bec..8baa7c1e 100644 --- a/templates/answer_edit.html +++ b/templates/answer_edit.html @@ -49,31 +49,27 @@ <div id="main-body" class="ask-body"> <div id="askform"> <form id="fmedit" action="{% url edit_answer answer.id %}" method="post" > - <label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br> + <label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br/> {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %} <div style="vertical-align:middle"> {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision" value="{% trans "select revision" %}"> - </div><br> + </div> <div class="form-item"> <div id="wmd-button-bar" class="wmd-panel"></div> {{ form.text }} <span class="form-error"></span> <div class="preview-toggle"><span id="pre-collapse" - title="{% trans "Toggle the real time Markdown editor preview" %}打">{% trans "toggle preview" %}</span></div> + title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span></div> <div id="previewer" class="wmd-preview"></div> - <br> </div> - <strong>{{ form.summary.label_tag }}</strong> <br> + <strong>{{ form.summary.label_tag }}</strong> <br/> {{ form.summary }} {{ form.summary.errors }} <div class="title-desc"> {{ form.summary.help_text }} </div> - <br> <input type="submit" value="{% trans "Save edit" %}" class="submit" /> <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" /> - <br> - <br> </form> </div> </div> diff --git a/templates/answer_edit_tips.html b/templates/answer_edit_tips.html index 31f71e34..bf1cd516 100644 --- a/templates/answer_edit_tips.html +++ b/templates/answer_edit_tips.html @@ -17,7 +17,6 @@ </li> </ul> <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a> - <br> </div> </div> @@ -48,6 +47,5 @@ </li> </ul> <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">{% trans "learn more about Markdown" %} »</a> - <br> </div> <!-- end template answer_edit_tips.html --> diff --git a/templates/ask.html b/templates/ask.html index afef182b..447ee749 100644 --- a/templates/ask.html +++ b/templates/ask.html @@ -75,15 +75,15 @@ {% endif %} {% endifequal %} {% endif %} - <p class="form-item"> - <label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br> + <div class="form-item"> + <label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br/> {{ form.title }} {{ form.title.errors }} <div class="title-desc"> {{ form.title.help_text }} </div> - </p> + </div> - <p class="form-item"> + <div class="form-item"> <div id="wmd-button-bar" class="wmd-panel"></div> {{ form.text }} @@ -102,12 +102,11 @@ </div> <div id="previewer" class="wmd-preview"></div> <span class="form-error"></span> - <br> - </p> - <p class="form-item"> - <strong>{{ form.tags.label_tag }}:</strong> {% trans "(required)" %} <span class="form-error"></span><br> + </div> + <div class="form-item"> + <strong>{{ form.tags.label_tag }}:</strong> {% trans "(required)" %} <span class="form-error"></span><br/> {{ form.tags }} {{ form.tags.errors }} - </p> + </div> <p class="title-desc"> {{ form.tags.help_text }} </p> diff --git a/templates/authopenid/changeemail.html b/templates/authopenid/changeemail.html index d5acb6c9..09857d17 100644 --- a/templates/authopenid/changeemail.html +++ b/templates/authopenid/changeemail.html @@ -27,7 +27,7 @@ <div class="aligned"> <form action="." method="post" accept-charset="utf-8"> - <div class="form-row"><label for="id_email">{% trans "Your new Email" %}</label><br>{{ form.email }}</div> + <div class="form-row"><label for="id_email">{% trans "Your new Email" %}</label><br/>{{ form.email }}</div> <!--<div class="form-row"><label for="id_password">{% trans "Password" %}</label>{{ form.password }}</div>--> <div class="submit-row"> <input class="submit" type="submit" name="change_email" value="{% trans "Change email" %}"> diff --git a/templates/authopenid/complete.html b/templates/authopenid/complete.html index b9a14e16..f29b7670 100644 --- a/templates/authopenid/complete.html +++ b/templates/authopenid/complete.html @@ -7,16 +7,16 @@ <div id="main-bar" class="headNormal"> {% trans "Connect your OpenID with your account on this site" %} </div> - <p id="completetxt" > + <div id="completetxt" > <div class="message"> {% blocktrans %}register new {{provider}} account info{% endblocktrans %} </div> <p style="display:none">{% trans "This account already exists, please use another." %}</p> - </p> + </div> {% if form1.errors %} - <p class="errors"> - <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br> + <div class="errors"> + <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br/> <ul class="error-list"> {% if form1.username.errors %} <li><span class="error">{{ form1.username.errors|join:", " }}</span></li> @@ -25,11 +25,11 @@ <li><span class="error">{{ form1.email.errors|join:", " }}</span></li> {% endif %} </ul> - </p> + </div> {% endif %} {% if form2.errors %} - <p class="errors"> - <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br> + <div class="errors"> + <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br/> <ul class="error-list"> {% if form2.username.errors %} <li><span class="error">{{ form2.username.errors|join:", " }}</span></li> @@ -38,15 +38,15 @@ <li><span class="error">{{ form2.password.errors|join:", " }}</span></li> {% endif %} </ul> - </p> + </div> {% endif %} <div class="login"> <form name="fregister" action="{% url user_register %}" method="POST"> {{ form.next }} - <div class="form-row"><label for="id_username">{% trans "Screen name label" %}</label><br />{{ form1.username }}</div> - <div class="form-row"><label for="id_email">{% trans "Email address label" %}</label><br />{{ form1.email }}</div> - <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"></div> + <div class="form-row"><label for="id_username">{% trans "Screen name label" %}</label><br/>{{ form1.username }}</div> + <div class="form-row"><label for="id_email">{% trans "Email address label" %}</label><br/>{{ form1.email }}</div> + <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"/></div> </form> </div> <div class="login" style="display:none"> @@ -54,11 +54,11 @@ {{ form.next }} <fieldset style="padding:10px"> <legend class="big">{% trans "Existing account" %}</legend> - <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br />{{ form2.username }}</div> - <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br />{{ form2.password }}</div> + <div class="form-row"><label for="id_username">{% trans "user name" %}</label><br/>{{ form2.username }}</div> + <div class="form-row"><label for="id_passwordl">{% trans "password" %}</label><br/>{{ form2.password }}</div> <!--todo double check translation from chinese 确认 = "Register" --> <div class="submit-row"> - <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}"> + <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}"/> <a href="">{% trans "Forgot your password?" %}</a> </div> </fieldset> diff --git a/templates/authopenid/sendpw.html b/templates/authopenid/sendpw.html index 334c70bc..b02ee6e9 100644 --- a/templates/authopenid/sendpw.html +++ b/templates/authopenid/sendpw.html @@ -9,7 +9,7 @@ </div> <div class="paragraph"> -{% trans "Lost your password? No problem - here you can reset it." %}<br> +{% trans "Lost your password? No problem - here you can reset it." %}<br/> {% trans "Please enter your username below and new password will be sent to your registered e-mail" %} </div> {% if form.errors %} diff --git a/templates/authopenid/signin.html b/templates/authopenid/signin.html index 083d895a..7c234ff3 100644 --- a/templates/authopenid/signin.html +++ b/templates/authopenid/signin.html @@ -62,39 +62,39 @@ </div> </li> <li class="username first_tiny_li" title="MyOpenID user name"> - <img src="/content/jquery-openid/images/myopenid.ico" alt="icon" /> + <img src="/content/jquery-openid/images/myopenid-2.png" alt="icon" /> <span>http://<strong>username</strong>.myopenid.com/</span> </li> <li class="username" title="Flickr user name"> - <img src="/content/jquery-openid/images/flickr.ico" alt="icon" /> + <img src="/content/jquery-openid/images/flickr.png" alt="icon" /> <span>http://flickr.com/<strong>username</strong>/</span> </li> <li class="username" title="Technorati user name"> - <img src="/content/jquery-openid/images/technorati.ico" alt="icon" /> + <img src="/content/jquery-openid/images/technorati-1.png" alt="icon" /> <span>http://technorati.com/people/technorati/<strong>username</strong>/</span> </li> <li class="username" title="Wordpress blog name"> - <img src="/content/jquery-openid/images/wordpress.ico" alt="icon" /> + <img src="/content/jquery-openid/images/wordpress.png" alt="icon" /> <span>http://<strong>username</strong>.wordpress.com</span> </li> <li class="username" title="Blogger blog name"> - <img src="/content/jquery-openid/images/blogger.ico" alt="icon" /> + <img src="/content/jquery-openid/images/blogger-1.png" alt="icon" /> <span>http://<strong>username</strong>.blogspot.com/</span> </li> <li class="username" title="LiveJournal blog name"> - <img src="/content/jquery-openid/images/livejournal.ico" alt="icon" /> + <img src="/content/jquery-openid/images/livejournal-1.png" alt="icon" /> <span>http://<strong>username</strong>.livejournal.com</span> </li> <li class="username" title="ClaimID user name"> - <img src="/content/jquery-openid/images/claimid.ico" alt="icon" /> + <img src="/content/jquery-openid/images/claimid-0.png" alt="icon" /> <span>http://claimid.com/<strong>username</strong></span> </li> <li class="username" title="Vidoop user name"> - <img src="/content/jquery-openid/images/vidoop.ico" alt="icon" /> + <img src="/content/jquery-openid/images/vidoop.png" alt="icon" /> <span>http://<strong>username</strong>.myvidoop.com/</span> </li> <li class="username" title="Verisign user name"> - <img src="/content/jquery-openid/images/verisign.ico" alt="icon" /> + <img src="/content/jquery-openid/images/verisign-2.png" alt="icon" /> <span>http://<strong>username</strong>.pip.verisignlabs.com/</span> </li> </ul> @@ -118,7 +118,7 @@ <br> {% if form1.errors %} <p class="errors"> - <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br> + <span class="big">{% trans "Sorry, looks like we have some errors:" %}</span><br/> <ul class="error-list"> {% if form1.username.errors %} <li><span class="error">{{ form1.username.errors|join:", " }}</span></li> @@ -129,16 +129,21 @@ </ul> </p> {% endif %} - <br> <form name="fauth" action="{% url user_signin %}" method="post"> {{ form1.next }} <fieldset class="fieldset" > <legend class="big">{% trans "Use login name and password" %}</legend> <div class="form-row"><label for="id_username">{% trans "Login name" %}:</label><br />{{ form1.username }}</div> <div class="form-row"><label for="id_password">{% trans "Password" %}:</label><br />{{ form1.password }}</div> +<<<<<<< HEAD:templates/authopenid/signin.html <div class="submit-row"><input type="submit" class="submit" name="blogin" value="{% trans "Login" %}"> <a href="{%url sendpw%}">{% trans "Forgot your password?" %}</a> <a href="/registrarse">{% trans "Create new account" %}</a></div> +======= + <div class="submit-row"><input type="submit" class="submit" name="blogin" value="{% trans "Login" %}"/> + <a href="">{% trans "Forgot your password?" %}</a> + <a href="">{% trans "Create new account" %}</a></div> +>>>>>>> master:templates/authopenid/signin.html </fieldset> </form> </div> @@ -148,7 +153,6 @@ {% block sidebar %} <div class="boxC"> <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3> - <p> <ul class="list-item"> <li> {% trans "with openid it is easier" %} @@ -164,10 +168,10 @@ </li> </ul> - <a href="http://openid.net/what/" target="_blank" style="float:right;position:relative">{% trans "Find out more" %} »</a><br> + <p> + <a href="http://openid.net/what/" target="_blank" style="float:right;position:relative">{% trans "Find out more" %} »</a><br/> <a href="http://openid.net/get/" target="_blank" style="float:right;position:relative">{% trans "Get OpenID" %} »</a> </p> - <br> </div> {% endblock%} diff --git a/templates/authopenid/signup.html b/templates/authopenid/signup.html index a65dafdc..5e405d3f 100644 --- a/templates/authopenid/signup.html +++ b/templates/authopenid/signup.html @@ -14,7 +14,7 @@ {% if form.errors %} <p class="errors"> - <span class="big">{% trans "Sorry, looks like we have some errors" %}</span><br> + <span class="big">{% trans "Sorry, looks like we have some errors" %}</span><br/> <ul class="error-list"> {% if form.username.errors %} <li><span class="error">{{ form.username.errors|join:", " }}</span></li> @@ -33,17 +33,15 @@ <form action="{% url user_signup %}" method="post" accept-charset="utf-8"> <fieldset class="fieldset"> <legend class="big">{% trans "Conventional registration" %}</legend> - <div class="form-row"><label for="id_username">{% trans "choose a user name" %}:</label><br>{{ form.username }}</div> + <div class="form-row"><label for="id_username">{% trans "choose a user name" %}:</label><br/>{{ form.username }}</div> - <div class="form-row"><label for="id_email">{% trans "your email address" %}:</label><br>{{ form.email }}</div> + <div class="form-row"><label for="id_email">{% trans "your email address" %}:</label><br/>{{ form.email }}</div> <div class="form-row"><label for="id_password1">{% trans "choose password" %}:</label><br />{{ form.password1 }}</div> - <div class="form-row"><label for="id_password2">{% trans "retype password" %}:</label><br>{{ form.password2 }}</div> + <div class="form-row"><label for="id_password2">{% trans "retype password" %}:</label><br/>{{ form.password2 }}</div> <div class="submit-row"><input type="submit" class="submit" value="{% trans "login" %}" > <a href="{% url user_signin %}">{% trans "back to login" %}</a></div> </fieldset> - <br > </form> - <br > <div style="display:none"> <h2 class="signup">{% trans "Register with your OpenID" %}</h2> <form name="fopenid" action="{% url user_signin %}" method="post"> diff --git a/templates/badges.html b/templates/badges.html index 69ddc39f..4a1ba091 100644 --- a/templates/badges.html +++ b/templates/badges.html @@ -18,10 +18,9 @@ </div> <div class="badges" id="main-body" style="width:100%"> <p> - {% trans "Community gives you awards for your questions, answers and votes." %}<br> + {% trans "Community gives you awards for your questions, answers and votes." %}<br/> {% trans "Below is the list of available badges and number of times each type of badge has been awarded." %} </p> - <br> <div id="medalList"> {% for badge in badges %} <div style="clear:both;line-height:30px"> @@ -33,7 +32,7 @@ {% endfor %} </div> <div style="float:left;width:180px;"> - <a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} : {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">●</span> {{ badge.name }}</a><strong> × {{ badge.awarded_count|intcomma }}</strong> + <a href="{{badge.get_absolute_url}}" title="{{ badge.get_type_display }} : {{ badge.description }}" class="medal"><span class="badge{{ badge.type }}">●</span> {{ badge.name }}</a><strong> ✕ {{ badge.awarded_count|intcomma }}</strong> </div> <p style="float:left;width:350px;"> {{ badge.description }} diff --git a/templates/base.html b/templates/base.html index ae389255..0f568f73 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,12 +8,14 @@ {% spaceless %} {% block meta %}{% endblock %} {% endspaceless %} - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + {% if settings.GOOGLE_SITEMAP_CODE %} <meta name="verify-v1" content="{{settings.GOOGLE_SITEMAP_CODE}}" /> - <link rel="shortcut icon" href="/content/images/favicon.ico" > + {% endif %} + <link rel="shortcut icon" href="/content/images/favicon.ico" /> <link href="/content/style/style.css" rel="stylesheet" type="text/css" /> - <script src="http://www.google.com/jsapi"></script> - <script>google.load("jquery", "1.2.6");</script> + <script src="http://www.google.com/jsapi" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1.2.6");</script> <script type="text/javascript"> var i18nLang = '{{settings.LANGUAGE_CODE}}'; </script> diff --git a/templates/base_content.html b/templates/base_content.html index 4ee9675f..a05198f5 100644 --- a/templates/base_content.html +++ b/templates/base_content.html @@ -1,18 +1,18 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- base_content.html --> {% load i18n %} -<html> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE }}</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="verify-v1" content="{{ settings.GOOGLE_SITEMAP_CODE }}" /> - <link rel="shortcut icon" href="/content/images/favicon.ico" > + <link rel="shortcut icon" href="/content/images/favicon.ico" /> <link href="/content/style/style.css" rel="stylesheet" type="text/css" /> {% spaceless %} {% block forestyle %}{% endblock %} {% endspaceless %} - <script src="http://www.google.com/jsapi"></script> - <script>google.load("jquery", "1.2.6");</script> + <script src="http://www.google.com/jsapi" type="text/javascript"></script> + <script type="text/javascript">google.load("jquery", "1.2.6");</script> <script type="text/javascript"> var i18nLang = '{{ settings.LANGUAGE_CODE }}'; </script> diff --git a/templates/book.html b/templates/book.html index dddd13e6..23166cb7 100644 --- a/templates/book.html +++ b/templates/book.html @@ -118,7 +118,7 @@ </a> <div class="bookQuestionItem"> <h3> - <a title="{{question.summary}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a> + <a title="{{question.summary|collapse}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a> </h3> <div class="tags"> {% for tag in question.tagname_list %} diff --git a/templates/content/jquery-openid/images/blogger-1.png b/templates/content/jquery-openid/images/blogger-1.png Binary files differnew file mode 100644 index 00000000..8b360ea5 --- /dev/null +++ b/templates/content/jquery-openid/images/blogger-1.png diff --git a/templates/content/jquery-openid/images/claimid-0.png b/templates/content/jquery-openid/images/claimid-0.png Binary files differnew file mode 100644 index 00000000..4a0ea1b3 --- /dev/null +++ b/templates/content/jquery-openid/images/claimid-0.png diff --git a/templates/content/jquery-openid/images/flickr.png b/templates/content/jquery-openid/images/flickr.png Binary files differnew file mode 100644 index 00000000..142405a6 --- /dev/null +++ b/templates/content/jquery-openid/images/flickr.png diff --git a/templates/content/jquery-openid/images/livejournal-1.png b/templates/content/jquery-openid/images/livejournal-1.png Binary files differnew file mode 100644 index 00000000..e6436081 --- /dev/null +++ b/templates/content/jquery-openid/images/livejournal-1.png diff --git a/templates/content/jquery-openid/images/myopenid-2.png b/templates/content/jquery-openid/images/myopenid-2.png Binary files differnew file mode 100644 index 00000000..f64fb8e8 --- /dev/null +++ b/templates/content/jquery-openid/images/myopenid-2.png diff --git a/templates/content/jquery-openid/images/technorati-1.png b/templates/content/jquery-openid/images/technorati-1.png Binary files differnew file mode 100644 index 00000000..f7195240 --- /dev/null +++ b/templates/content/jquery-openid/images/technorati-1.png diff --git a/templates/content/jquery-openid/images/verisign-2.png b/templates/content/jquery-openid/images/verisign-2.png Binary files differnew file mode 100644 index 00000000..c1467008 --- /dev/null +++ b/templates/content/jquery-openid/images/verisign-2.png diff --git a/templates/content/jquery-openid/images/vidoop.png b/templates/content/jquery-openid/images/vidoop.png Binary files differnew file mode 100644 index 00000000..032c9e98 --- /dev/null +++ b/templates/content/jquery-openid/images/vidoop.png diff --git a/templates/content/jquery-openid/images/wordpress.png b/templates/content/jquery-openid/images/wordpress.png Binary files differnew file mode 100644 index 00000000..ee29f0cf --- /dev/null +++ b/templates/content/jquery-openid/images/wordpress.png diff --git a/templates/content/jquery-openid/openid.css b/templates/content/jquery-openid/openid.css index e53c1823..6c59192f 100644 --- a/templates/content/jquery-openid/openid.css +++ b/templates/content/jquery-openid/openid.css @@ -1,7 +1,7 @@ fieldset {border-style:none;} img {border-style:none;} -.logo_box {width:90px;height:40px;background:white;border:1px solid #dddddd;} +.logo_box {display:inline-block;width:90px;height:40px;background:white;border:1px solid #dddddd;} .openid_box img {margin-top:6px;} .aol_box img {margin-top:6px;} .yahoo_box img {margin-top:13px;} diff --git a/templates/content/style/style.css b/templates/content/style/style.css index fa20b014..e353dd47 100644 --- a/templates/content/style/style.css +++ b/templates/content/style/style.css @@ -97,7 +97,6 @@ blockquote right:0px; height:20px; text-align:right; - color:black; padding:3px; background-color:#ffffff; width:500px; diff --git a/templates/faq.html b/templates/faq.html index 78c433ae..7e99ae7f 100644 --- a/templates/faq.html +++ b/templates/faq.html @@ -19,7 +19,7 @@ </p> <h3 class="subtitle">{% trans "What questions should I avoid asking?" %}</h3> - <p>{% trans "Please avoid asking questions that are not relevant to this community, too subjective and argumentative." %}</p> + <p>{% trans "Please avoid asking questions that are not relevant to this community, too subjective and argumentative." %} </p> </div> diff --git a/templates/footer.html b/templates/footer.html index 66345cd6..08420563 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -13,13 +13,14 @@ </div> <!--<p style="margin-top:10px;"> <a href="http://code.google.com/p/cnprog/" target="_blank"> - <img src="/content/images/djangomade124x25_grey.gif" border="0" alt="Made with Django." title="Made with Django." > + <img src="/content/images/djangomade124x25_grey.gif" border="0" alt="Made with Django." title="Made with Django." /> </a> <div style="font-size:90%;color:#333">{% trans "current revision" %}: R-0120-20090406</div> </p>--> <p id="licenseLogo"><img src="/content/images/cc-wiki.png" title="Creative Commons: Attribution - Share Alike" alt="cc-wiki" width="50" height="68" /></p> </div> <!-- 页面底部结束: --> + {% if settings.GOOGLE_ANALYTICS_KEY %} <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); @@ -30,4 +31,5 @@ pageTracker._trackPageview(); } catch(err) {} </script> -<!-- end template footer.html --> + {% endif %} +<!-- end footer.html --> diff --git a/templates/header.html b/templates/header.html index 38e5ce4c..dcd908f9 100644 --- a/templates/header.html +++ b/templates/header.html @@ -18,12 +18,12 @@ <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="23%"> - <div id="logo"> - <a href="/"> - <img src="/content/images/logo.png" title="{% trans "back to home page" %}" /> - </a> - </div> - </td> + <div id="logo"> + <a href="/"> + <img src="/content/images/logo.png" title="{% trans "back to home page" %}" alt="{{settings.APP_TITLE}} logo"/> + </a> + </div> + </td> <td width="77%" valign="bottom"> <div class="nav"> <a id="nav_questions" href="/preguntas/" >{% trans "questions" %}</a> @@ -48,18 +48,19 @@ </table> </div> <div id="searchBar"> - <table width="100%" height="60" border="0" cellpadding="0" cellspacing="0" class="content"> + <table width="100%" border="0" cellpadding="0" cellspacing="0" class="content"> <tr> <td align="center" valign="middle"> <form action="/buscar/" method="GET"> <div> - <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" > - <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" > + <input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" /> + <input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" /> </div> <div class="options"> - <input id="type-question" type="radio" class="" value="question" name="t" checked >{% trans "questions" %} - <input id="type-tag" type="radio" class="" value="tag" name="t" >{% trans "tags" %} - <input id="type-user" type="radio" class="" value="user" name="t" >{% trans "users" %} + <input id="type-question" type="radio" value="question" name="t" + checked="checked" />{% trans "questions" %} + <input id="type-tag" type="radio" value="tag" name="t" />{% trans "tags" %} + <input id="type-user" type="radio" value="user" name="t" />{% trans "users" %} </div> </form> </td> diff --git a/templates/index.html b/templates/index.html index 9c8b7254..fe0206ab 100644 --- a/templates/index.html +++ b/templates/index.html @@ -32,7 +32,7 @@ {% for question in questions %} <div class="qstA"> <h2> - <a href="{{ question.get_absolute_url }}" title="{{ question.summary }}..."> + <a href="{{ question.get_absolute_url }}" title="{{ question.summary|collapse }}..."> {{ question.get_question_title }} </a> </h2> @@ -51,7 +51,7 @@ </table> </div> <div class="summary"> - {{ question.summary }}... + {{ question.summary}}... </div> {% if question.wiki %} <span class="from wiki">{% trans "community wiki" %}</span> @@ -79,7 +79,7 @@ <div class="boxA"> <h3>{% trans "welcome to website" %}</h3> <div class="body"> - {{ APP_INTRO|safe }} + {{settings.APP_INTRO|safe}} <div class="more"><a href="/sobre">{% trans "about" %} »</a></div> <div class="more"><a href="/faq">{% trans "faq" %} »</a></div> </div> @@ -88,15 +88,16 @@ <div class="boxB"> <h3>{% trans "Recent tags" %}</h3> <div class="body"> - <p class="tagsbox"> + <div class="tags"> {% for tag in tags %} <a rel="tag" title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a> {% endfor %} - </p> + </div> <div class="more"><a href="/tags">{% trans "popular tags" %} »</a> </div> </div> </div> +{% if awards %} <div class="boxB"> <h3>{% trans "Recent awards" %}</h3> <div class="body"> @@ -112,6 +113,7 @@ <div class="more"><a href="/badges/">{% trans "all awards" %} »</a> </div> </div> </div> +{% endif %} <div id="feeds"> <a href="/feeds/rss" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a> </div> diff --git a/templates/logout.html b/templates/logout.html index e05a4328..2cd935a0 100644 --- a/templates/logout.html +++ b/templates/logout.html @@ -19,7 +19,6 @@ <div id="main-body" style="width:100%"> <p>{% trans "As a registered user you can login with your OpenID, log out of the site or permanently remove your account." %}</p> <input id="btLogout" type="button" class="submit" value="{% trans "Logout now" %}"><!-- style="width:150px">--> - <br><br> </div> {% endblock %} <!-- end logout.html --> diff --git a/templates/privacy.html b/templates/privacy.html index d5d7dd43..e66086dd 100644 --- a/templates/privacy.html +++ b/templates/privacy.html @@ -37,7 +37,6 @@ <h3 class="subtitle">{% trans "Policy Changes" %}</h3> <p>{% trans "how privacy policies can be changed" %} </p> - <br><br> </div> {% endblock %} <!-- end privacy.html --> diff --git a/templates/question.html b/templates/question.html index a4c4da81..7078db02 100644 --- a/templates/question.html +++ b/templates/question.html @@ -69,38 +69,45 @@ {% if question_vote %} <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" src="/content/images/vote-arrow-up{% if question_vote.is_upvote %}-on{% endif %}.png" - title="{% trans "i like this post (click again to cancel)" %}" > + alt="{% trans "i like this post (click again to cancel)" %}" + title="{% trans "i like this post (click again to cancel)" %}" /> <div id="question-vote-number-{{ question.id }}" class="vote-number" title="{% trans "current number of votes" %}"> {{ question.score }} </div> <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" src="/content/images/vote-arrow-down{% if question_vote.is_downvote %}-on{% endif %}.png" - title="{% trans "i dont like this post (click again to cancel)" %}" > + alt="{% trans "i dont like this post (click again to cancel)" %}" + title="{% trans "i dont like this post (click again to cancel)" %}" /> {% else %} <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" + alt="{% trans "i like this post (click again to cancel)" %}" src="/content/images/vote-arrow-up.png" - title="{% trans "i like this post (click again to cancel)" %}" > + title="{% trans "i like this post (click again to cancel)" %}" /> <div id="question-vote-number-{{ question.id }}" class="vote-number" title="{% trans "current number of votes" %}"> {{ question.score }} </div> <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - src="/content/images/vote-arrow-down.png" title="{% trans "i dont like this post (click again to cancel)" %}" > + src="/content/images/vote-arrow-down.png" + alt="{% trans "i dont like this post (click again to cancel)" %}" + title="{% trans "i dont like this post (click again to cancel)" %}" /> {% endif %} - <br><br> {% if favorited %} <img class="question-img-favorite" src="/content/images/vote-favorite-on.png" - title="{% trans "mark this question as favorite (click again to cancel)" %}" > + alt="{% trans "mark this question as favorite (click again to cancel)" %}" + title="{% trans "mark this question as favorite (click again to cancel)" %}" /> <div id="favorite-number" class="favorite-number my-favorite-number"> {{ question.favourite_count }} </div> {% else %} <img class="question-img-favorite" src="/content/images/vote-favorite-off.png" - title="{% trans "remove favorite mark from this question (click again to restore mark)" %}" > - <div id="favorite-number" class="favorite-number">{% ifnotequal question.favourite_count 0 %}{{ question.favourite_count }}{% endifnotequal %} + alt="{% trans "remove favorite mark from this question (click again to restore mark)" %}" + title="{% trans "remove favorite mark from this question (click again to restore mark)" %}" /> + <div id="favorite-number" class="favorite-number"> + {% ifnotequal question.favourite_count 0 %}{{ question.favourite_count }}{% endifnotequal %} </div> {% endif %} @@ -276,24 +283,29 @@ <tr> <td style="width:30px;vertical-align:top"> <div class="vote-buttons"> - <img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" src="/content/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png" title="{% trans "i like this answer (click again to cancel)" %}"> + <img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" + src="/content/images/vote-arrow-up{% get_user_vote_image user_answer_votes answer.id 1 %}.png" + alt="{% trans "i like this answer (click again to cancel)" %}" + title="{% trans "i like this answer (click again to cancel)" %}"/> <div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans "current number of votes" %}"> {{ answer.score }} </div> <img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote" src="/content/images/vote-arrow-down{% get_user_vote_image user_answer_votes answer.id -1 %}.png" - title="{% trans "i dont like this answer (click again to cancel)" %}" > + alt="{% trans "i dont like this answer (click again to cancel)" %}" + title="{% trans "i dont like this answer (click again to cancel)" %}" /> - <br><br> {% ifequal request.user question.author %} <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" src="/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png" - title="{% trans "mark this answer as favorite (click again to undo)" %}" > + alt="{% trans "mark this answer as favorite (click again to undo)" %}" + title="{% trans "mark this answer as favorite (click again to undo)" %}" /> {% else %} {% if answer.accepted %} <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" src="/content/images/vote-accepted{% if answer.accepted %}-on{% endif %}.png" - title="{% trans "the author of the question has selected this answer as correct" %}" > + alt="{% trans "the author of the question has selected this answer as correct" %}" + title="{% trans "the author of the question has selected this answer as correct" %}" /> {% endif %} {% endifequal %} </div> @@ -465,15 +477,13 @@ <div id="previewer" class="wmd-preview"></div> {{ answer.text.errors }} </div> - <br> - <input type="submit" value="{% trans "Answer the question" %}" class="submit"><span class="form-error"></span> + <input type="submit" value="{% trans "Answer the question" %}" class="submit"/><span class="form-error"></span> {% if request.user.is_authenticated %} {{ answer.email_notify }} <label for="question-subscribe-updates">{% trans "Notify me daily if there are any new answers." %}</label> {% else %} - <input type="checkbox" disabled><label>{% trans "once you sign in you will be able to subscribe for any updates here" %}</label> + <input type="checkbox" disabled="disabled" /><label>{% trans "once you sign in you will be able to subscribe for any updates here" %}</label> {% endif %} {% endif %} - <br><br> </form> </div> </div> @@ -488,7 +498,7 @@ {% for tag in tags %} <a href="{% url forum.views.tag tag.name|urlencode %}" title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}" - rel="tag">{{ tag.name }}</a> <span class="tag-number">× {{ tag.used_count|intcomma }}</span><br> + rel="tag">{{ tag.name }}</a> <span class="tag-number">✕{{ tag.used_count|intcomma }}</span><br/> {% endfor %} </p> <p> @@ -511,7 +521,6 @@ </p> {% endfor %} </div> - <br> </div> {% endblock %} diff --git a/templates/question_edit.html b/templates/question_edit.html index e5fb6b97..a7460b65 100644 --- a/templates/question_edit.html +++ b/templates/question_edit.html @@ -67,14 +67,14 @@ <div id="main-body" class="ask-body"> <div id="askform"> <form id="fmedit" action="{% url edit_question question.id %}" method="post" > - <label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br> + <label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br/> {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %} <div style="vertical-align:middle"> {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision" value="{% trans "select revision"%}"> - </div><br> + </div> <div class="form-item"> - <label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br> + <label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br/> {{ form.title }} {{ form.title.errors }} <div class="title-desc"> {{ form.title.help_text }} @@ -98,17 +98,15 @@ </table> </div> <div id="previewer" class="wmd-preview"></div> - <br> </div> <div class="form-item"> - <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br> + <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br/> {{ form.tags }} {{ form.tags.errors }} <div class="title-desc"> {{ form.tags.help_text }} </div> </div> - <br> - <strong>{{ form.summary.label_tag }}</strong> <br> + <strong>{{ form.summary.label_tag }}</strong> <br/> {{ form.summary }} {{ form.summary.errors }} <div class="title-desc"> {{ form.summary.help_text }} @@ -119,12 +117,9 @@ <strong>{{ form.categories.label_tag }}:</strong> {% trans "(required)" %} <span class="form-error"></span><br> {{ form.categories }} {{ form.categories.errors }} </p> - <div class="error" ></div> <input type="submit" value="{% trans "Save edit" %}" class="submit" /> <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" /> - <br> - <br> </form> </div> </div> diff --git a/templates/question_edit_tips.html b/templates/question_edit_tips.html index 4ac666a6..ef6dca15 100644 --- a/templates/question_edit_tips.html +++ b/templates/question_edit_tips.html @@ -14,7 +14,6 @@ </li> </ul> <a href="/faq/" target="_blank" title="{% trans "see frequently asked questions" %}" style="float:right;position:relative">faq »</a> - <br> </div> </div> @@ -46,6 +45,5 @@ </li> </ul> <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank" style="float:right;position:relative">{% trans "learn more about Markdown" %} »</a> - <br> </div> <!-- end question_edit_tips.html --> diff --git a/templates/question_retag.html b/templates/question_retag.html index c7062e30..66e51c8c 100644 --- a/templates/question_retag.html +++ b/templates/question_retag.html @@ -63,19 +63,15 @@ <div class="form-item"> - <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br> + <strong>{{ form.tags.label_tag }}:</strong> <span class="form-error"></span><br/> {{ form.tags }} {{ form.tags.errors }} <div class="title-desc"> {{ form.tags.help_text }} </div> </div> - <br> - <div class="error" ></div> <input type="submit" value="{% trans "Save edit" %}" class="submit" /> <input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" /> - <br> - <br> </form> </div> </div> @@ -96,7 +92,6 @@ </li> </ul> <a href="{% url faq %}" style="float:right;position:relative">faq »</a> - <br> </div> {% endblock %} diff --git a/templates/questions.html b/templates/questions.html index 5aef1866..6121d876 100644 --- a/templates/questions.html +++ b/templates/questions.html @@ -127,24 +127,24 @@ {% endblocktrans %} {% endif %} {% endif %} - + <br/> {% ifequal tab_id "latest" %} - <p>{% trans "latest questions info" %}</p> + {% trans "latest questions info" %} {% endifequal %} {% ifequal tab_id "active" %} - <p>{% trans "Questions are sorted by the <strong>time of last update</strong>." %} - {% trans "Most recently answered ones are shown first." %}</p> + {% trans "Questions are sorted by the <strong>time of last update</strong>." %} + {% trans "Most recently answered ones are shown first." %} {% endifequal %} {% ifequal tab_id "hottest" %} - <p>{% trans "Questions sorted by <strong>number of responses</strong>." %} - {% trans "Most answered questions are shown first." %}</p> + {% trans "Questions sorted by <strong>number of responses</strong>." %} + {% trans "Most answered questions are shown first." %} {% endifequal %} {% ifequal tab_id "mostvoted" %} - <p>{% trans "Questions are sorted by the <strong>number of votes</strong>." %} - {% trans "Most voted questions are shown first." %}</p> + {% trans "Questions are sorted by the <strong>number of votes</strong>." %} + {% trans "Most voted questions are shown first." %} {% endifequal %} @@ -155,10 +155,10 @@ <div class="tags"> {% for tag in tags %} <a rel="tag" title="{% trans "see questions tagged" %}'{{ tag.name }}'{% trans "using tags" %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a> - <span class="tag-number">× {{ tag.used_count|intcomma }}</span> - <br> + <span class="tag-number">✕ {{ tag.used_count|intcomma }}</span> + <br /> {% endfor %} - <br> + <br /> </div> </div> diff --git a/templates/tags.html b/templates/tags.html index 6f9b3aed..65a7e4dd 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -6,6 +6,7 @@ {% block title %}{% spaceless %}{% trans "Tag list" %}{% endspaceless %}{% endblock %} {% block forejs %} <script type="text/javascript"> + /*<![CDATA[*/ $().ready(function(){ $("#nav_tags").attr('className',"on"); $("#ipSearchTag").focus(); @@ -20,7 +21,7 @@ Hilite.elementid = "searchtags"; Hilite.debug_referrer = location.href; }); - + /*]]>*/ </script> {% endblock %} {% block content %} @@ -41,6 +42,7 @@ <span>{% trans "Nothing found" %}</span> {% endif %} </p> +{% if tags.object_list %} <ul class="tagsList tags"> {% for tag in tags.object_list %} <li> @@ -48,11 +50,12 @@ {{ tag }} </a> <span class="tag-number">× {{ tag.used_count|intcomma }}</span> - <br> + <br/> </li> {% endfor %} </ul> +{% endif %} </div> {% endblock %} diff --git a/templates/unanswered.html b/templates/unanswered.html index 13b3a3b2..a56d3ae3 100644 --- a/templates/unanswered.html +++ b/templates/unanswered.html @@ -95,9 +95,6 @@ <div class="boxC"> <p> {% blocktrans with questions_count|intcomma as num_q %}have {{num_q}} unanswered questions{% endblocktrans %} - {% comment %} - {% trans "Have a total of" %}<br><div class="questions-count">{{ questions_count|intcomma }}</div> - {% endcomment %} <!---<p>问题按 <strong>问题创建时间</strong> 排序。最新加入的问题将显示在最前面。</p>--> </p> </div> @@ -107,14 +104,13 @@ <div class="tags"> {% for tag in tags %} <a rel="tag" title="{% trans "see questions tagged"%}'{{ tag.name }}'{% trans "using tags" %}" href="{% url forum.views.tag tag.name|urlencode %}">{{ tag.name }}</a> - <span class="tag-number">× {{ tag.used_count|intcomma }}</span> - <br> + <span class="tag-number"> ✕ {{ tag.used_count|intcomma }}</span> + <br/> {% endfor %} - <br> + <br/> </div> </div> </div> {% endblock %} - <!-- end unanswered.html --> diff --git a/templates/user_info.html b/templates/user_info.html index 8d35015c..86e36023 100644 --- a/templates/user_info.html +++ b/templates/user_info.html @@ -27,7 +27,7 @@ </td> <td width="360" style="vertical-align: top;"> <table class="user-details"> - <tr height="30px"> + <tr> <th width="130" align="left"><strong>{% trans "Registered user" %}</strong></th> <th width="230" align="right"> {% if request.user|can_view_user_edit:view_user %} diff --git a/templates/user_preferences.html b/templates/user_preferences.html index eb7c4761..00129c28 100644 --- a/templates/user_preferences.html +++ b/templates/user_preferences.html @@ -8,13 +8,14 @@ <div style="padding:5px;"> <fieldset> <legend><b>{% trans "Connect with Twitter" %}</b></legend> - <form> + <!-- todo: form action needs to be fixed --> + <form name="twittersync" action="/sdfgsdlgjkhsdfljh"> <label for="name">{% trans "Twitter account name:" %}</label> - <input id="name" /><br> + <input id="name" /><br/> <label for="password">{% trans "Twitter password:" %}</label> - <input id="password" type="password"/><br> - <input id="cbMessage" type="checkbox" />{% trans "Send my Questions to Twitter" %}<br> - <input id="cbReply" type="checkbox" />{% trans "Send my Answers to Twitter" %}<br> + <input id="password" type="password"/><br/> + <input id="cbMessage" type="checkbox" />{% trans "Send my Questions to Twitter" %}<br/> + <input id="cbReply" type="checkbox" />{% trans "Send my Answers to Twitter" %}<br/> <input type="submit" value="{% trans "Save" %}" /> </form> </fieldset> diff --git a/templates/user_responses.html b/templates/user_responses.html index d739395b..c4f4ffed 100644 --- a/templates/user_responses.html +++ b/templates/user_responses.html @@ -11,7 +11,7 @@ <div style="width:100px;float:left"><a href="{{ response.userlink }}">{{ response.username }}</a></div> <div style="float:left;overflow:hidden;width:680px"> <strong {% ifequal response.type "question_answered" %}class="user-action-2"{% endifequal %}{% ifequal response.type "answer_accepted" %}class="user-action-8"{% endifequal %}>{{ response.type }}</strong>: - <a href="{{ response.titlelink }}">{{ response.title }}</a><br> + <a href="{{ response.titlelink }}">{{ response.title }}</a><br/> {{ response.content|safe }} <div style="height:10px"></div> </div> diff --git a/templates/user_stats.html b/templates/user_stats.html index 432a5b34..2c2a7a72 100644 --- a/templates/user_stats.html +++ b/templates/user_stats.html @@ -2,6 +2,7 @@ <!-- user_stats.html --> {% load i18n %} {% load extra_tags %} +{% load extra_filters %} {% load humanize %} {% block usercontent %} @@ -32,7 +33,7 @@ <div class="user-stats-table"> {% for answered_question in answered_questions %} <div class="answer-summary"> - <a title="{{answered_question.summary}}" href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}"> + <a title="{{answered_question.summary|collapse}}" href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}"> <div class="answer-votes {% if answered_question.accepted %}answered-accepted{% endif %}" title="{% blocktrans with answered_question.vote_count as vote_count %}the answer has been voted for {{ vote_count }} times{% endblocktrans %} {% if answered_question.accepted %}{% trans "this answer has been selected as correct" %}{%endif%}"> {{ answered_question.vote_count }} @@ -40,7 +41,7 @@ </a> <div class="answer-link"> <a href="/questions/{{answered_question.id}}/{{answered_question.title}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> {% if answered_question.comment_count %}<span - title="{% blocktrans %}the answer has been commented {{ answered_question.comment_count }} times{% endblocktrans %}">({{answered_question.comment_count}})</span>{% endif %} + title="{% blocktrans with answered_question.comment_count as comment_count %}the answer has been commented {{ comment_count }} times{% endblocktrans %}">({{answered_question.comment_count}})</span>{% endif %} </div> </div> {% endfor %} @@ -92,7 +93,7 @@ {% for tag in tags%} <a rel="tag" title="{% blocktrans %}see other questions tagged '{{ tag }}' {% endblocktrans %}" - href="{% url forum.views.tag tag|urlencode %}">{{tag.name}}</a><span class="tag-number"> × {{ tag.used_count|intcomma }}</span><br> + href="{% url forum.views.tag tag|urlencode %}">{{tag.name}}</a><span class="tag-number"> × {{ tag.used_count|intcomma }}</span><br/> {% if forloop.counter|divisibleby:"10" %} </td> <td width="180" valign="top"> @@ -119,7 +120,7 @@ <tr> <td width="180" style="line-height:35px"> {% for award in awards %} - <a href="/badges/{{award.id}}/{{award.name}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">●</span> {{ award.name }}</a><span class="tag-number"> × {{ award.count|intcomma }}</span><br> + <a href="/badges/{{award.id}}/{{award.name}}" title="{{ award.description }}" class="medal"><span class="badge{{ award.type }}">●</span> {{ award.name }}</a><span class="tag-number"> × {{ award.count|intcomma }}</span><br/> {% if forloop.counter|divisibleby:"6" %} </td> <td width="180" style="line-height:35px"> diff --git a/templates/user_tabs.html b/templates/user_tabs.html index bcc12b8f..7800eb00 100644 --- a/templates/user_tabs.html +++ b/templates/user_tabs.html @@ -20,7 +20,7 @@ title="{% trans "user vote record" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a> {% endif %} <a id="favorites" {% ifequal tab_name "favorites" %}class="on"{% endifequal %} - title="{% trans "questions that user selected as his/her favorite" + title="{% trans "questions that user selected as his/her favorite" %}" href="/users/{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a> {% if request.user|can_view_user_preferences:view_user %} <a id="preferences" {% ifequal tab_name "preferences" %}class="on"{% endifequal %} diff --git a/templates/users_questions.html b/templates/users_questions.html index dfb87c8f..7b00fd3f 100644 --- a/templates/users_questions.html +++ b/templates/users_questions.html @@ -43,7 +43,7 @@ </a> <div class="summary"> <h3> - <a title="{{question.summary}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a> + <a title="{{question.summary|collapse}}" href="/questions/{{question.id}}/{{question.title}}">{{question.title}}</a> </h3> <div class="tags"> {% convert2tagname_list question %} |