diff options
Diffstat (limited to 'forum/skins')
36 files changed, 214 insertions, 863 deletions
diff --git a/forum/skins/default/media/images/favicon.ico b/forum/skins/default/media/images/favicon.ico Binary files differnew file mode 100644 index 00000000..35c9e149 --- /dev/null +++ b/forum/skins/default/media/images/favicon.ico diff --git a/forum/skins/default/media/style/style.css b/forum/skins/default/media/style/style.css index 02148ab0..4f6b366b 100755 --- a/forum/skins/default/media/style/style.css +++ b/forum/skins/default/media/style/style.css @@ -1,8 +1,5 @@ @import url(jquery.autocomplete.css); -@import url(openid.css); -@import url(prettify.css); -/* 公用 */ body { background: #FFF; font-size: 12px; diff --git a/forum/skins/default/templates/auth/auth_settings.html b/forum/skins/default/templates/auth/auth_settings.html new file mode 100755 index 00000000..051fb6ba --- /dev/null +++ b/forum/skins/default/templates/auth/auth_settings.html @@ -0,0 +1,35 @@ +{% extends "base.html" %} +<!-- changepw.html --> +{% load i18n %} +{% block head %}{% endblock %} +{% block title %}{% spaceless %}{% trans "Authentication settings" %}{% endspaceless %}{% endblock %} +{% block content %} +<div class="headNormal">{% trans "Authentication settings" %}</div> +{% if auth_keys %} + <p class="message">{% blocktrans %}These are the external authentication providers currently associated with your account.{% endblocktrans %}</p> + <div> + {% for key in auth_keys %} + <p>{{ key.name }} (<a href="{% url user_remove_external_provider id=key.id %}">{% trans "remove" %}</a>)</p> + {% endfor %} + </div> +{% endif %} +{% if not auth_keys %} + <p class="message">{% blocktrans %}You currently have no external authentication provider associated with your account.{% endblocktrans %}</p> +{% endif %} +<input type="button" class="submit" value="{% trans "Add new provider" %}" onclick="window.location='{% url user_add_external_provider %}'" /> +{% if has_password %} + <p class="message">{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p> +{% endif %} +{% if not has_password %} + <p class="message">{% blocktrans %}You can set up a password for your account, so you can login using standard username and password!{% endblocktrans %}</p> +{% endif %} +<div class="aligned"> + <form action="" method="post" accept-charset="utf-8"> + <ul id="changepw-form" class="form-horizontal-rows"> + {{form.as_ul}} + </ul> + <div class="submit-row"><input type="submit" class="submit" value="{% if has_password %}{% trans "Change password" %}{% endif %}{% if not has_password %}{% trans "Create password" %}{% endif %}" /></div> + </form> + </div> +{% endblock %} +<!-- end changepw.html --> diff --git a/forum/skins/default/templates/auth/email_validation.html b/forum/skins/default/templates/auth/email_validation.html new file mode 100755 index 00000000..a4126a69 --- /dev/null +++ b/forum/skins/default/templates/auth/email_validation.html @@ -0,0 +1,20 @@ +{% extends "email_base.html" %}
+{% load i18n %}
+{% load extra_tags %}
+
+{% block content %}
+ <p>{% trans "Greetings from the Q&A forum" %},</p>
+
+ <p>{% trans "To make use of the Forum, please follow the link below:" %}</p>
+
+ <a href="{% fullurl auth_validate_email user=user.id,code=validation_code %}">{% fullurl auth_validate_email user=user.id,code=validation_code %}</a>
+
+ <p>{% trans "Following the link above will help us verify your email address." %}</p>
+
+ <p>{% blocktrans %}If you beleive that this message was sent in mistake -
+ no further action is needed. Just ingore this email, we apologize
+ for any inconvenience{% endblocktrans %}</p>
+
+ <p>{% blocktrans %}Sincerely,<br />
+ Forum Administrator{% endblocktrans %}</p>
+{% endblock %}
diff --git a/forum/skins/default/templates/auth/signin.html b/forum/skins/default/templates/auth/signin.html index d4ee9fc1..78e6c76d 100755 --- a/forum/skins/default/templates/auth/signin.html +++ b/forum/skins/default/templates/auth/signin.html @@ -31,7 +31,7 @@ {% if request.user.is_anonymous %}
<div style="width:600px;float:left;margin-bottom:5px;">
<input type="checkbox" checked="checked" id="validate_email" />
- {% trans "Take the opurtunity to validate my email next to the external provider I choose." %}
+ {% trans "Take the oppurtunity to validate my email next to the external provider I choose." %}
</div>
{% endif %}
<div id="bigicon_providers">
@@ -73,12 +73,16 @@ <input type="hidden" class="validate_email" name="validate_email" value="yes" />
</form>
{% for provider in stackitem_providers %}
- <h3 class="or_label">Or...</h3>
+ <h3 class="or_label">{% trans 'Or...' %}</h3>
<form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}">
{% include provider.stack_item_template %}
<input type="hidden" class="validate_email" name="validate_email" value="yes" />
</form>
{% endfor %}
+ <h3 class="or_label">{% trans 'Or...' %}</h3>
+ <fieldset>
+ {% trans 'Click' %} <a href="{% url auth_request_tempsignin %}">here</a> {% trans "if you're having troubles signing in." %}
+ </fieldset>
<script type="text/html" id="simple_form_template">
<fieldset id="slot_form">
<p id="provider_name_slot">{% trans 'Enter your ' %}%%YOUR_WHAT%%</p>
diff --git a/forum/skins/default/templates/auth/temp_login_email.html b/forum/skins/default/templates/auth/temp_login_email.html new file mode 100755 index 00000000..063608fe --- /dev/null +++ b/forum/skins/default/templates/auth/temp_login_email.html @@ -0,0 +1,20 @@ +{% extends "email_base.html" %}
+{% load i18n %}
+{% load extra_tags %}
+
+{% block content %}
+ <p>{% trans "Greetings from the Q&A forum" %},</p>
+
+ <p>{% trans "You're seeing this because someone requested a temporary login link" %}</p>
+
+ <a href="{% fullurl auth_tempsignin user=user.id,code=temp_login_code %}">{% fullurl auth_tempsignin user=user.id,code=temp_login_code %}</a>
+
+ <p>{% trans "Following the link above will give you access to your account." %}</p>
+
+ <p>{% blocktrans %}If you beleive that this message was sent in mistake -
+ no further action is needed. Just ingore this email, we apologize
+ for any inconvenience{% endblocktrans %}</p>
+
+ <p>{% blocktrans %}Sincerely,<br />
+ Forum Administrator{% endblocktrans %}</p>
+{% endblock %}
diff --git a/forum/skins/default/templates/auth/temp_login_request.html b/forum/skins/default/templates/auth/temp_login_request.html new file mode 100755 index 00000000..772f18fb --- /dev/null +++ b/forum/skins/default/templates/auth/temp_login_request.html @@ -0,0 +1,28 @@ +{% extends "base.html" %}
+
+{% load i18n %}
+{% block head %}{% endblock %}
+{% block title %}{% spaceless %}{% trans "Request temporary login key" %}{% endspaceless %}{% endblock %}
+{% block content %}
+<div class="headNormal">{% trans "Account: request temporary login key" %}</div>
+<p class="message">{% blocktrans %}
+ If you're experiencing problems accessing your account, or if you forgot your password,
+ here you can request a temporary login key. Fill out your account email and we'll send you a temporary access link that
+ will enable you to access your account. This token is valid only once and for a limited period of time.
+ {% endblocktrans %}</p>
+<div class="aligned">
+ {% if form.errors %}
+ <ul class="errorlist">
+ {% for error in form.errors %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ <form action="" method="post" accept-charset="utf-8">
+ <ul id="changepw-form" class="form-horizontal-rows">
+ {{form.as_ul}}
+ </ul>
+ <div class="submit-row"><input type="submit" class="submit" value="{% trans "Send link" %}" /></div>
+ </form>
+ </div>
+{% endblock %}
\ No newline at end of file diff --git a/forum/skins/default/templates/authopenid/changeemail.html b/forum/skins/default/templates/authopenid/changeemail.html deleted file mode 100644 index 94d1881c..00000000 --- a/forum/skins/default/templates/authopenid/changeemail.html +++ /dev/null @@ -1,88 +0,0 @@ -{% extends "base_content.html" %} -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Change email" %}{% endspaceless %}{% endblock %} -{% block content %} -<!-- changeemail.html action_type={{action_type}}--> -{% ifequal action_type "change" %} - <div id="main-bar" class="headNormal"> - {% if user.email %} - {% trans "Change email" %} - {% else %} - {% trans "Save your email address" %} - {% endif %} - </div> - <p class="message"> - {% if user.email %} - {% blocktrans %}change {{email}} info{% endblocktrans %} - {% else %} - {% blocktrans %}here is why email is required, see {{gravatar_faq_url}}{% endblocktrans %} - {% endif %} - </p> - {% if msg %} - <p class="error">{{ msg }}</p> - {% endif %} - - <div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - {% if next %} - <input type="hidden" name="next" value="{{next}}"/> - {% endif %} - <div class="form-row-vertical"> - <label for="id_email">{% if user.email %}{% trans "Your new Email" %}{% else %}{% trans "Your Email" %}{% endif %}</label> - {% if form.email.errors %} - <p class="error">{{form.email.errors|join:", "}}</p> - {% endif %} - {{ form.email }} - </div> - <div class="submit-row"> - <input class="submit" type="submit" name="change_email" value="{% if user.email %}{% trans "Change email" %}{% else %}{% trans "Save Email" %}{% endif %}"> - {% if user.email %} - <input class="submit" type="submit" name="cancel" value="{% trans "Cancel" %}"> - {% endif %} - </div> - - </form> - </div> -{% endifequal %} -{% ifequal action_type "validate" %} - <div id="main-bar" class="headNormal"> - {% trans "Validate email" %} - </div> - <p class="message"> - {% blocktrans %}validate {{email}} info or go to {{change_email_url}}{% endblocktrans %} - </p> -{% endifequal %} -{% ifequal action_type "keep" %} - <div id="main-bar" class="headNormal"> - {% trans "Email not changed" %} - </div> - <p class="message"> - {% blocktrans %}old {{email}} kept, if you like go to {{change_email_url}}{% endblocktrans %} - </p> -{% endifequal %} -{% ifequal action_type "done_novalidate" %} - <div id="main-bar" class="headNormal"> - {% trans "Email changed" %} - </div> - <p class="message"> - {% blocktrans %}your current {{email}} can be used for this{% endblocktrans %} - </p> -{% endifequal %} -{% ifequal action_type "validation_complete" %} - <div id="main-bar" class="headNormal"> - {% trans "Email verified" %} - </div> - <p class="message"> - {% trans "thanks for verifying email" %} - </p> -{% endifequal %} -{% ifequal action_type "key_not_sent" %} - <div id="main-bar" class="headNormal"> - {% trans "email key not sent" %} - </div> - <p class="message"> - {% blocktrans %}email key not sent {{email}} change email here {{change_link}}{% endblocktrans %} - </p> -{% endifequal %} -{% endblock %} -<!-- end changeemail.html --> diff --git a/forum/skins/default/templates/authopenid/changeopenid.html b/forum/skins/default/templates/authopenid/changeopenid.html deleted file mode 100644 index d01788fb..00000000 --- a/forum/skins/default/templates/authopenid/changeopenid.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "base.html" %} -<!-- changeopenid.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Change OpenID" %}{% endspaceless %}{% endblock %} -{% block content %} -<div id="main-bar" class=""> - <h3> - {% trans "Account: change OpenID URL" %} - </h3> -</div> - -<p>{% blocktrans %}This is where you can change your OpenID URL. Make sure you remember it!{% endblocktrans %}</p> -{% if form.errors %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - {% if form.openid_url.errors %} - <span class="error">{{ form.openid_url.errors|join:", " }}</span> - {% endif %} - - -</p> -{% endif %} -{% if msg %} - <p class="errors">{{ msg }}</p> -{% endif %} - -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - - <div id="form-row"><label for="id_openid_url">{% trans "OpenID URL:" %}</label>{{ form.openid_url }}</div> - <p><input type="submit" value="{% trans "Change OpenID" %}"></p> - - </form> - </div> -{% endblock %} -<!-- end changeopenid.html --> diff --git a/forum/skins/default/templates/authopenid/changepw.html b/forum/skins/default/templates/authopenid/changepw.html deleted file mode 100644 index 8b059544..00000000 --- a/forum/skins/default/templates/authopenid/changepw.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} -<!-- changepw.html --> -{% load i18n %} -{% block head %}{% endblock %} -{% block title %}{% spaceless %}{% trans "Change password" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal">{% trans "Account: change password" %}</div> -<p class="message">{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p> -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - <ul id="changepw-form" class="form-horizontal-rows"> - {{form.as_ul}} - </ul> - <div class="submit-row"><input type="submit" class="submit" value="{% trans "Change password" %}" /></div> - </form> - </div> -{% endblock %} -<!-- end changepw.html --> diff --git a/forum/skins/default/templates/authopenid/complete.html b/forum/skins/default/templates/authopenid/complete.html deleted file mode 100644 index 62970e38..00000000 --- a/forum/skins/default/templates/authopenid/complete.html +++ /dev/null @@ -1,130 +0,0 @@ -{% extends "base_content.html" %} -<!-- complete.html --> -{% comment %} -views calling this template: -* django_authopenid.views.register with login_type='openid' -* django_authopenid.views.signin - with login_type='legacy' - -parameters: -* provider -* login_type openid|legacy -* username (same as screen name or username in the models, and nickname in openid sreg) -* form1 - OpenidRegisterForm -* form2 - OpenidVerifyForm not clear what this form is supposed to do, not used for legacy -* email_feeds_form forum.forms.SimpleEmailSubscribeForm -* openid_username_exists -{% endcomment %} -{% load i18n %} -{% block head %}{% endblock %} -{% block title %}{% spaceless %}{% trans "Connect your OpenID with this site" %}{% endspaceless %}{% endblock %} -{% block content %} - <div id="main-bar" class="headNormal"> - {% trans "Connect your OpenID with your account on this site" %} - </div> - <div id="completetxt" > - <div class="message"> - {% ifequal login_type 'openid' %} - {% blocktrans %}register new {{provider}} account info, see {{gravatar_faq_url}}{% endblocktrans %} - {% else %} - {% ifequal login_type 'legacy' %} - {% if external_login_name_is_taken %} - {% blocktrans %}{{username}} already exists, choose another name for - {{provider}}. Email is required too, see {{gravatar_faq_url}} - {% endblocktrans %} - {% else %} - {% blocktrans %}register new external {{provider}} account info, see {{gravatar_faq_url}}{% endblocktrans %} - {% endif %} - {% else %} - {% blocktrans %}register new Facebook connect account info, see {{gravatar_faq_url}}{% endblocktrans %} - {% endifequal %} - {% endifequal %} - </div> - <p style="display:none">{% trans "This account already exists, please use another." %}</p> - </div> - - {% if form1.errors %} - <ul class="errorlist"> - {% if form1.non_field_errors %} - {% for error in form1.non_field_errors %} - <li>{{error}}</li> - {% endfor %} - {% endif %} - </ul> - {% endif %} - {% comment %} - {% if form2.errors %}<!--form2 is dysfunctional so commented out --> - <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> - {% endif %} - {% if form2.password.errors %} - <li><span class="error">{{ form2.password.errors|join:", " }}</span></li> - {% endif %} - </ul> - </div> - {% endif %} - {% endcomment %} - - <div class="login"> - {% ifequal login_type 'openid' %} - <form name="fregister" action="{% url user_register %}" method="POST"> - {% else %} - {% ifequal login_type 'facebook' %} - <form name="fregister" action="" method="POST"> - {% else %} - <form name="fregister" action="{% url user_signin %}" method="POST"> - {% endifequal %} - {% endifequal %} - {{ form1.next }} - <div class="form-row-vertical"> - <label for="id_username">{% trans "Screen name label" %}</label> - {% if form1.username.errors %} - <p class="error">{{ form1.username.errors|join:", " }}</p> - {% endif %} - {{ form1.username }} - </div> - <div class="form-row-vertical margin-bottom"> - <label for="id_email">{% trans "Email address label" %}</label> - {% if form1.email.errors %} - <p class="error">{{ form1.email.errors|join:", " }}</p> - {% endif %} - {{ form1.email }} - </div> - <p>{% trans "receive updates motivational blurb" %}</p> - <div class='simple-subscribe-options'> - {{email_feeds_form.subscribe}} - {% if email_feeds_form.errors %} - <p class="error">{% trans "please select one of the options above" %}</p> - {% endif %} - </div> - <p class='space-above'>{% trans "Tag filter tool will be your right panel, once you log in." %}</p> - <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans "create account" %}"/></div> - </form> - </div> - {% comment %}<!-- this form associates openID with an existing password-protected account, not yet functional --> - {% if form2 %} - <div class="login" style="display:none"> - <form name="fverify" action="{% url user_register %}" method="POST"> - {{ form2.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> - <p><span class='big strong'>(Optional) receive updates by email</span> - only sent when there are any.</p> - <div class='simple-subscribe-options'> - {{email_feeds_form.subscribe}} - </div> - <!--todo double check translation from chinese 确认 = "Register" --> - <div class="submit-row"> - <input type="submit" class="submit" name="bverify" value="{% trans "Register" %}"/> - <a href="{% url user_sendpw %}">{% trans "Forgot your password?" %}</a> - </div> - </fieldset> - </form> - </div> - {% endif %} - {% endcomment %} -{% endblock %} -<!-- end complete.html --> diff --git a/forum/skins/default/templates/authopenid/confirm_email.txt b/forum/skins/default/templates/authopenid/confirm_email.txt deleted file mode 100644 index 3a01f146..00000000 --- a/forum/skins/default/templates/authopenid/confirm_email.txt +++ /dev/null @@ -1,13 +0,0 @@ -{% load i18n %} -{% trans "Thank you for registering at our Q&A forum!" %} - -{% trans "Your account details are:" %} - -{% trans "Username:" %} {{ username }} -{% trans "Password:" %} {{ password }} - -{% trans "Please sign in here:" %} -{{signup_url}} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} diff --git a/forum/skins/default/templates/authopenid/delete.html b/forum/skins/default/templates/authopenid/delete.html deleted file mode 100644 index 0f9f1c60..00000000 --- a/forum/skins/default/templates/authopenid/delete.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends "base.html" %} -<!-- delete.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Delete account" %}{% endspaceless %}{% endblock %} -{% block content %} -<div id="main-bar" class=""> - <h3> - {% trans "Account: delete account" %} - </h3> -</div> - -<p class="settings-descr">{% blocktrans %}Note: After deleting your account, anyone will be able to register this username.{% endblocktrans %}</p> -{% if form.errors %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - {% if form.confirm.errors %} - <span class="error">{% trans "Check confirm box, if you want delete your account." %}</span><br /> - {% endif %} - {% if form.password.errors %} - <span class="error">{% trans "Password:" %} {{ form.password.errors|join:", " }}</span> - {% endif %} -</p> -{% endif %} -{% if msg %} -<p class="errors">{% trans "Please correct errors below:" %}<br /> - <span class="error">{{ msg }}</span> - </p> -{% endif %} -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - - <div id="form-row"> {{ form.confirm }} {% trans "I am sure I want to delete my account." %}</div> - <div id="form-row"><label for="id_password">{% trans "Password/OpenID URL" %}</label>{{ form.password }} {% trans "(required for your security)" %}</div> - - <p><input type="submit" value="{% trans "Delete account permanently" %}"></p> - - </form> - </div> -{% endblock %} -<!-- end delete.html --> diff --git a/forum/skins/default/templates/authopenid/email_validation.txt b/forum/skins/default/templates/authopenid/email_validation.txt deleted file mode 100644 index 5b166a9b..00000000 --- a/forum/skins/default/templates/authopenid/email_validation.txt +++ /dev/null @@ -1,15 +0,0 @@ -{% load i18n %} -{% trans "Greetings from the Q&A forum" %}, - -{% trans "To make use of the Forum, please follow the link below:" %} - -{{validation_link}} - -{% trans "Following the link above will help us verify your email address." %} - -{% blocktrans %}If you beleive that this message was sent in mistake - -no further action is needed. Just ingore this email, we apologize -for any inconvenience{% endblocktrans %} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} diff --git a/forum/skins/default/templates/authopenid/external_legacy_login_info.html b/forum/skins/default/templates/authopenid/external_legacy_login_info.html deleted file mode 100644 index 3318499c..00000000 --- a/forum/skins/default/templates/authopenid/external_legacy_login_info.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base_content.html" %} -<!--customize this template--> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Traditional login information" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal"> - {% trans "Traditional login information" %} -</div> -{% spaceless %} -<div class="message"> -<!--add info about your external login site here--> -{% blocktrans %}how to login with password through external login website or use {{feedback_url}}{% endblocktrans %} -</div> -{% endspaceless %} -{% endblock %} diff --git a/forum/skins/default/templates/authopenid/failure.html b/forum/skins/default/templates/authopenid/failure.html deleted file mode 100644 index d075d6b0..00000000 --- a/forum/skins/default/templates/authopenid/failure.html +++ /dev/null @@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" - "http://www.w3.org/TR/html4/strict.dtd"> -<!-- failure.html --> -<html> -<head> - <title>OpenID failed</title> -</head> -<body> -<h1>OpenID failed</h1> - -<p>{{ message|escape }}</p> - -</body> -</html><!-- end failure.html --> diff --git a/forum/skins/default/templates/authopenid/sendpw.html b/forum/skins/default/templates/authopenid/sendpw.html deleted file mode 100644 index 6241c811..00000000 --- a/forum/skins/default/templates/authopenid/sendpw.html +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "base.html" %} -<!-- sendpw.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Send new password" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal"> - {% trans "Send new password" %} -</div> -<p class="message"> -{% trans "password recovery information" %} -</p> -{% if msg %} - <p class="action-status"><span>{{msg}}</span><p> -{% endif %} - -<div class="aligned"> - <form action="." method="post" accept-charset="utf-8"> - <ul id="emailpw-form" class="form-horizontal-rows"> - {{form.as_ul}} - </ul> - <p style="padding-top:10px"><input type="submit" class="submit" value="{% trans "Reset password" %}" /> - <a href="{% url user_signin %}"><span class="strong">{% trans "return to login" %}</span></a></p> - </form> -</div> -{% endblock %} -<!-- end sendpw.html --> diff --git a/forum/skins/default/templates/authopenid/sendpw_email.txt b/forum/skins/default/templates/authopenid/sendpw_email.txt deleted file mode 100644 index f044ca45..00000000 --- a/forum/skins/default/templates/authopenid/sendpw_email.txt +++ /dev/null @@ -1,9 +0,0 @@ -{% load i18n %} -{% blocktrans%}Someone has requested to reset your password on {{site_url}}. -If it were not you, it is safe to ignore this email.{% endblocktrans %} - -{% blocktrans %}email explanation how to use new {{password}} for {{username}} -with the {{key_link}}{% endblocktrans %} - -{% blocktrans %}Sincerely, -Forum Administrator{% endblocktrans %} diff --git a/forum/skins/default/templates/authopenid/settings.html b/forum/skins/default/templates/authopenid/settings.html deleted file mode 100644 index 66ea5953..00000000 --- a/forum/skins/default/templates/authopenid/settings.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base_content.html" %} -<!-- settings.html --> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Account functions" %}{% endspaceless %}{% endblock %} -{% block head %} -<style type="text/css" media="screen"> - h4 {font-size:12pt;} - dt, dd { padding:0 0 0.35em 0; } - dt { float: left; width: 21ex; } - dd { margin-left: 23ex; } - - #settings-options, #settings-intro { padding: 4em 1.5em;} - #settings-options { min-height: 300px; border-left: 1px solid #333;} - - #settings-options h5 { font-weight: bold;} -</style> -{% endblock %} - -{% block content %} -<div id="main-bar"> - <h3><strong>{{ request.user.username }} {% trans "Profile" %}</strong></h3> -</div> -<div id="settings-options"> - {% if msg %} - <p class="error">{{ msg }}</p> - {% endif %} - - <dl class="list-item"> - <dt>» <a href="{% url user_changepw %}">{% trans "Change password" %}</a></dt> - <dd>{% trans "Give your account a new password." %}</dd> - <dt>» <a href="{% url user_changeemail %}">{% trans "Change email " %}</a></dt> - <dd>{% trans "Add or update the email address associated with your account." %}</dd> - {% if is_openid %} - <dt>» <a href="{% url user_changeopenid %}">{% trans "Change OpenID" %}</a></dt> - <dd>{% trans "Change openid associated to your account" %}</dd> - {% endif %} - - <dt>» <a href="{% url user_delete %}">{% trans "Delete account" %}</a></dt> - <dd>{% trans "Erase your username and all your data from website" %}</dd> - </dl> -</div> -{% endblock %} -<!-- end settings.html --> diff --git a/forum/skins/default/templates/authopenid/signin.html b/forum/skins/default/templates/authopenid/signin.html deleted file mode 100755 index 4e060d0f..00000000 --- a/forum/skins/default/templates/authopenid/signin.html +++ /dev/null @@ -1,186 +0,0 @@ -{% extends "base.html" %}
-<!-- signin.html -->
-{% load i18n %}
-{% load extra_tags %}
-{% block title %}{% spaceless %}{% trans "User login" %}{% endspaceless %}{% endblock %}
-{% block forejs %}
- <script type='text/javascript' src='{% media "/media/js/jquery.validate.pack.js" %}'></script>
-
- <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/jquery-openid/openid.css" %}"/>
- <script type="text/javascript" src="{% media "/media/jquery-openid/jquery.openid.js" %}"></script>
- <script type="text/javascript"> $().ready( function() { $("form.openid:eq(0)").openid(); })</script>
- <!--<script type="text/javascript">
- $().ready(function(){
- openid.init('id_openid_url');
- setupFormValidation("#openid_form", {bsignin:{required: true}});
- });
- </script>-->
-{% endblock %}
-{% block content %}
-<div class="headNormal">
- {% trans "User login" %}
-</div>
- {% if msg %}
- <p class="warning">{{ msg }}</p>
- {% endif %}
- {% if answer %}
- <div class="message">
- {% blocktrans with answer.question.title as title and answer.summary as summary %}
- Your answer to {{title}} {{summary}} will be posted once you log in
- {% endblocktrans %}
- </div>
- {% endif %}
- {% if question %}
- <div class="message">
- {% blocktrans with question.title as title and question.summary as summary %}Your question
- {{title}} {{summary}} will be posted once you log in
- {% endblocktrans %}
- </div>
- {% endif %}
- <form id="openid_form" name="openid_form" class="openid" method="post" action="{% url user_signin %}">
- <div style="width:600px;float:left;margin-bottom:5px;">
- {% trans "Click to sign in through any of these services." %}
- </div>
- <ul class="providers">
- <li class="local" title="Local login">
- <div class="logo_box local_login_box">
- <img src="{% media "/media/jquery-openid/images/local-login.png" %}" alt="your icon here" />
- </div>
- <span></span>
- </li>
- <li class="direct" title="Google">
- <div class="logo_box google_box">
- <img src="{% media "/media/jquery-openid/images/google.gif" %}" alt="icon" /><span>https://www.google.com/accounts/o8/id</span>
- </div>
- </li>
- <li class="direct" title="Yahoo">
- <div class="logo_box yahoo_box">
- <img src="{% media "/media/jquery-openid/images/yahoo.gif" %}" alt="icon" /><span>http://yahoo.com/</span>
- </div>
- </li>
- <li class="username" title="AOL screen name">
- <div class="logo_box aol_box">
- <img src="{% media "/media/jquery-openid/images/aol.gif" %}" alt="icon" /><span>http://openid.aol.com/<strong>username</strong></span>
- </div>
- </li>
- </ul>
- <ul id="openid_small_providers" class="providers">
- <!--<li class="openid" title="OpenID">
- <div class="logo_box openid_box">
- <img src="/media/jquery-openid/images/openid.gif" alt="icon" />
- </div>
- <span><strong>http://{your-openid-url}</strong></span>
- </li>-->
- <li class="first_tiny_li facebook" title="Facebook Connect">
- {% if question %}
- <fb:login-button onlogin="window.location = '{% url fb_signin_new_question %}'"></fb:login-button>
- {% else %}
- {% if answer %}
- <fb:login-button onlogin="window.location = '{% url fb_signin_new_answer %}'"></fb:login-button>
- {% else %}
- <fb:login-button onlogin="window.location = '{% url fb_signin %}'"></fb:login-button>
- {% endif %}
- {% endif %}
- </li>
- <li class="openid" title="OpenID URL">
- <img src="{% media "/media/jquery-openid/images/openidico16.png" %}" alt="icon" />
- <span>http://{your-openid-url}</span>
- </li>
- <li class="username" title="MyOpenID user name">
- <img src="{% media "/media/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="{% media "/media/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="{% media "/media/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="{% media "/media/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="{% media "/media/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="{% media "/media/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="{% media "/media/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="{% media "/media/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="{% media "/media/jquery-openid/images/verisign-2.png" %}" alt="icon" />
- <span>http://<strong>username</strong>.pip.verisignlabs.com/</span>
- </li>
- </ul>
- {{ form2.next }}
- <fieldset>
- <p id="provider_name_slot">{% trans 'Enter your <span id="enter_your_what">Provider user name</span>' %}</p>
- <div><p><span></span>
- <input id="openid_username" type="text" name="openid_username" /><span></span>
- <input type="submit" value="Login" />
- </p></div>
- </fieldset>
- <fieldset>
- <p>{% trans 'Enter your <a class="openid_logo" href="http://openid.net">OpenID</a> web address' %}</p>
- <div><p><input id="openid_url" type="text" value="http://" name="openid_url" />
- <input id="bsignin" name="bsignin" type="submit" value="{% trans "Login" %}" /></p></div>
- </fieldset>
- <fieldset id='local_login_fs'>
- <p>{% trans 'Enter your login name and password' %}</p>
- {% if form1.errors %}
- {{form1.non_field_errors.as_ul}}
- {% endif %}
- <div><p class="login"><label for="id_username">{% trans "Login name" %}</label>
- {{form1.username}}</p>
- <p class="login"><label for="id_password">{% trans "Password" %}</label>
- {{form1.password}}</p>
- <p id="local_login_buttons">
- <input id="blogin" name="blogin" type="submit" value="{% trans "Login" %}" />
- <a href="{% url user_signup %}">{% trans "Create account" %}</a><br/>
- <a href="{% url user_sendpw %}">{% trans "Forgot your password?" %}</a>
- </p>
- </div>
- </fieldset>
- </form>
-{% endblock %}
-
-{% block sidebar %}
-<div class="boxC">
- <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
- <ul class="list-item">
- <li>
- {% trans "with openid it is easier" %}
- </li>
- <li>
- {% trans "reuse openid" %}
- </li>
- <li>
- {% trans "openid is widely adopted" %}
- </li>
- <li>
- {% trans "openid is supported open standard" %}
- </li>
-
- </ul>
- <p class="info-box-follow-up-links">
- <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} »</a><br/>
- <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} »</a>
- </p>
-</div>
-<script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"></script>
-<script type="text/javascript"> FB.init("{{ fb_api_key }}","{% url xd_receiver %}");</script>
-{% endblock%}
-
- <script type="text/javascript"> $( function() { $("form.openid:eq(0)").openid(); })</script>
-<!-- end signin.html -->
diff --git a/forum/skins/default/templates/authopenid/signup.html b/forum/skins/default/templates/authopenid/signup.html deleted file mode 100644 index fdb236c2..00000000 --- a/forum/skins/default/templates/authopenid/signup.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "base_content.html" %} -<!--signup.html--> -{% load i18n %} -{% block title %}{% spaceless %}{% trans "Signup" %}{% endspaceless %}{% endblock %} - -{% block content %} -<div class="headNormal"> - {% trans "Create login name and password" %} -</div> -<p class="message">{% trans "Traditional signup info" %}</p> -<form action="{% url user_signup %}" method="post" accept-charset="utf-8"> - <ul class="form-horizontal-rows"> - <li><label for="usename_id">{{form.username.label}}</label>{{form.username}}{{form.username.errors}}</li> - <li><label for="email_id">{{form.email.label}}</label>{{form.email}}{{form.email.errors}}</li> - <li><label for="password1_id">{{form.password1.label}}</label>{{form.password1}}{{form.password1.errors}}</li> - <li><label for="password2_id">{{form.password2.label}}</label>{{form.password2}}{{form.password2.errors}}</li> - </ul> - <p class="margin-top">{% trans "receive updates motivational blurb" %}</p> - <div class='simple-subscribe-options'> - {{email_feeds_form.subscribe}} - {% if email_feeds_form.errors %} - <p class="error">{% trans "please select one of the options above" %}</p> - {% endif %} - </div> - <p class="signup_p">{% trans "Please read and type in the two words below to help us prevent automated account creation." %}</p> - {{form.recaptcha}} - <div class="submit-row"><input type="submit" class="submit" value="{% trans "Create Account" %}" /> - <strong>{% trans "or" %} - <a href="{% url user_signin %}">{% trans "return to OpenID login" %}</a></strong></div> -</form> -{% endblock %} -<!--end signup.html--> diff --git a/forum/skins/default/templates/authopenid/yadis.xrdf b/forum/skins/default/templates/authopenid/yadis.xrdf deleted file mode 100644 index a9ed44fe..00000000 --- a/forum/skins/default/templates/authopenid/yadis.xrdf +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<xrds:XRDS - xmlns:xrds='xri://$xrds' - xmlns:openid='http://openid.net/xmlns/1.0' - xmlns='xri://$xrd*($v*2.0)'> - <XRD> - <Service> - <Type>http://specs.openid.net/auth/2.0/return_to</Type> - {% for uri in return_to %} - <URI>{{ uri }}</URI> - {% endfor %} - </Service> - </XRD> -</xrds:XRDS>
\ No newline at end of file diff --git a/forum/skins/default/templates/base.html b/forum/skins/default/templates/base.html index 3a1848ef..884551e3 100755 --- a/forum/skins/default/templates/base.html +++ b/forum/skins/default/templates/base.html @@ -3,7 +3,7 @@ {% load extra_filters %} {% load extra_tags %} {% load i18n %} -<html xmlns="http://www.w3.org/1999/xhtml"{% if fb_api_key %} xmlns:fb="http://www.facebook.com/2008/fbml"{% endif %}> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE }}</title> {% spaceless %} diff --git a/forum/skins/default/templates/changepw.html b/forum/skins/default/templates/changepw.html deleted file mode 100755 index 7b4cf801..00000000 --- a/forum/skins/default/templates/changepw.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends "base.html" %} -<!-- changepw.html --> -{% load i18n %} -{% block head %}{% endblock %} -{% block title %}{% spaceless %}{% trans "Change password" %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="headNormal">{% trans "Account: change password" %}</div> -<p class="message">{% blocktrans %}This is where you can change your password. Make sure you remember it!{% endblocktrans %}</p> -<div class="aligned"> - <form action="" method="post" accept-charset="utf-8"> - <ul id="changepw-form" class="form-horizontal-rows"> - {{form.as_ul}} - </ul> - <div class="submit-row"><input type="submit" class="submit" value="{% trans "Change password" %}" /></div> - </form> - </div> -{% endblock %} -<!-- end changepw.html --> diff --git a/forum/skins/default/templates/email_base.html b/forum/skins/default/templates/email_base.html new file mode 100755 index 00000000..b74741e3 --- /dev/null +++ b/forum/skins/default/templates/email_base.html @@ -0,0 +1,26 @@ +{% load extra_filters %}
+{% load extra_tags %}
+{% load i18n %}
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link href="{% fullmedia "/media/style/style.css" %}" rel="stylesheet" type="text/css" />
+ </head>
+ <body>
+ <a href="{% fullurl index %}">
+ <img src="{% fullmedia "/media/images/logo.png" %}" title="{% trans "home" %}" alt="{{settings.APP_TITLE}} logo"/>
+ </a>
+ <br />
+ <p>{{ settings.APP_TITLE }}</p>
+ <br /><br />
+ <div id="wrapper">
+ <div id="room">
+ <div id="CALeft">
+ {% block content%}
+ {% endblock%}
+ </div>
+ </div>
+ <div class="spacer3"></div>
+ </div>
+ </body>
+</html>
\ No newline at end of file diff --git a/forum/skins/default/templates/footer.html b/forum/skins/default/templates/footer.html index 2f95921d..66ea2bc5 100755 --- a/forum/skins/default/templates/footer.html +++ b/forum/skins/default/templates/footer.html @@ -21,7 +21,7 @@ {% endspaceless %} </div> <p> - <a href="http://github.com/cnprog/CNPROG/network" target="_blank"> + <a href="http://osqa.net" target="_blank"> powered by OSQA </a> </p> diff --git a/forum/skins/default/templates/header.html b/forum/skins/default/templates/header.html index cb12bb97..e65ac73a 100755 --- a/forum/skins/default/templates/header.html +++ b/forum/skins/default/templates/header.html @@ -5,7 +5,7 @@ <div id="navBar"> <div id="top"> {% if request.user.is_authenticated %} - <a href="{% url users %}{{ request.user.id }}/{{ request.user.username }}/">{{ request.user.username }}</a> {% get_score_badge request.user %} + <a href="{% url user_profile id=request.user.id,slug=request.user.username|slugify %}">{{ request.user.username }}</a> {% get_score_badge request.user %} <a href="{% url logout %}">{% trans "logout" %}</a> {% else %} <a href="{% url auth_signin %}">{% trans "login" %}</a> diff --git a/forum/skins/default/templates/index.html b/forum/skins/default/templates/index.html index 5bbb192b..61a5e6b3 100755 --- a/forum/skins/default/templates/index.html +++ b/forum/skins/default/templates/index.html @@ -5,6 +5,7 @@ {% load humanize %}
{% load extra_filters %}
{% load smart_if %}
+{% load cache %}
{% block title %}{% spaceless %}{% trans "Home" %}{% endspaceless %}{% endblock %}
{% block meta %}<meta name="keywords" content="{{ settings.APP_KEYWORDS }}" />
<meta name="description" content="{{ settings.APP_DESCRIPTION }}" />{% endblock %}
@@ -31,41 +32,7 @@ </div>
</div>
<!-- ???? -->
-<div id="listA">
- {% for question in questions.object_list %}
- <div class="short-summary">
- <div class="counts">
- <div class="votes">
- <div class="item-count">{{question.score|intcomma}}</div>
- <div>{% trans "votes" %}</div>
- </div >
- <div {% if question.answer_accepted %}title="{% trans "this answer has been accepted to be correct" %}"{% endif %} class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
- <div class="item-count">{{question.answer_count|intcomma}}</div>
- <div>{% trans "answers" %}</div>
- </div>
- <div class="views">
- <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>
- <div>{% trans "views" %}</div>
- </div>
- </div>
-
- <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
-
- <div class="userinfo">
- <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
- {% if question.last_activity_by %}
- <a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}
- {% endif %}
- </div>
-
- <div class="tags">
- {% for tag in question.tagname_list %}
- <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
- {% endfor %}
- </div>
- </div>
- {% endfor %}
-</div>
+{% include "question_list.html" %}
{% endblock %}
{% block sidebar %}
@@ -85,10 +52,12 @@ <h3>{% trans "Recent tags" %}</h3>
<div class="body">
<div class="tags">
+ {% cache 60 recent_tags %}
{% for tag in tags %}
<a rel="tag"
title="{% blocktrans with tag.name as tagname %}see questions tagged '{{tagname}}'{% endblocktrans %}" href="{% url tag_questions tag.name|urlencode %}">{{ tag.name }}</a>
{% endfor %}
+ {% endcache %}
</div>
<div class="more"><a href="{% url tags %}">{% trans "popular tags" %} </a> </div>
</div>
@@ -98,20 +67,22 @@ <h3>{% trans "Recent awards" %}</h3>
<div class="body">
<ul class="badge-list">
+ {% cache 60 recent_awards %}
{% for award in awards %}
<li>
<a href="{% url badges %}{{award.badge_id}}/{{award.badge_name}}" title="{{ award.badge_description }}" class="medal">
- <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a> {% trans "given to" %}
- <a href="{% url users %}{{award.user_id}}/{{award.user_name}}">{{ award.user_name }}</a>
+ <span class="badge{{ award.badge_type }}">●</span> {{ award.badge_name }}</a>
+ <a href="/users/{{ award.user_id }}/{{ award.user_name|slugify }}/">{{ award.user_name }}</a>
</li>
{% endfor %}
+ {% endcache %}
</ul>
<div class="more"><a href="{% url badges %}">{% trans "all awards" %} </a> </div>
</div>
</div>
{% endif %}
<div id="feeds">
-<a href="{% media "/feeds/rss" %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a>
+<a href="{% url latest_questions_feed %}" title="{% trans "subscribe to last 30 questions by RSS" %}">{% trans "subscribe to the questions feed" %}</a>
</div>
{% endblock %}
{% block tail %}
diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index 23c24113..3df778dc 100755 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -5,6 +5,7 @@ {% load smart_if %}
{% load humanize %}
{% load i18n %}
+{% load cache %}
{% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %}
{% block forejs %}
<meta name="description" content="{{question.summary}}" />
@@ -164,8 +165,8 @@ {% endjoinitems %}
</div>
<div class="post-update-info-container">
- {% post_contributor_info question "original_author" %}
- {% post_contributor_info question "last_updater" %}
+ {% post_contributor_info question "original_author" %}
+ {% post_contributor_info question "last_updater" %}
</div>
<div class="comments-container" id="comments-container-question-{{question.id}}">
{% for comment in question.get_comments|slice:":5" %}
@@ -313,8 +314,8 @@ {% endjoinitems %}
</div>
<div class="post-update-info-container">
- {% post_contributor_info answer "original_author" %}
- {% post_contributor_info answer "last_updater" %}
+ {% post_contributor_info answer "original_author" %}
+ {% post_contributor_info answer "last_updater" %}
</div>
<div class="comments-container" id="comments-container-answer-{{answer.id}}">
{% for comment in answer.get_comments|slice:":5" %}
@@ -468,6 +469,7 @@ {% endblock %}
{% block sidebar %}
+{% cache 600 questions_tags question.id %}
<div class="boxC">
<p>
{% trans "Question tags" %}:
@@ -489,17 +491,21 @@ {% trans "last updated" %}: <strong title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</strong>
</p>
</div>
-
+{% endcache %}
+{% cache 1800 related_questions question.id %}
<div class="boxC">
<h3 class="subtitle">{% trans "Related questions" %}</h3>
<div class="questions-related">
- {% for question in similar_questions %}
+
+ {% for question in similar_questions.data %}
<p>
<a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a>
</p>
{% endfor %}
+
</div>
</div>
+{% endcache %}
{% endblock %}
diff --git a/forum/skins/default/templates/question_list.html b/forum/skins/default/templates/question_list.html new file mode 100755 index 00000000..cf69d133 --- /dev/null +++ b/forum/skins/default/templates/question_list.html @@ -0,0 +1,42 @@ +{% load cache %}
+{% load i18n %}
+{% load humanize %}
+{% load extra_filters %}
+{% load extra_tags %}
+
+<div id="listA">
+ {% for question in questions.object_list %}
+ {% cache 60 question_in_list question.id %}
+ <div class="short-summary">
+ <div class="counts">
+ <div class="votes">
+ <div class="item-count">{{question.score|intcomma}}</div>
+ <div>{% trans "votes" %}</div>
+ </div >
+ <div {% if question.answer_accepted %}title="{% trans "this answer has been accepted to be correct" %}"{% endif %} class="status {% if question.answer_accepted %}answered-accepted{% endif %} {% ifequal question.answer_count 0 %}unanswered{% endifequal %}{% ifnotequal question.answer_count 0 %}answered{% endifnotequal %}">
+ <div class="item-count">{{question.answer_count|intcomma}}</div>
+ <div>{% trans "answers" %}</div>
+ </div>
+ <div class="views">
+ <div class="item-count">{{question.view_count|cnprog_intword|safe}}</div>
+ <div>{% trans "views" %}</div>
+ </div>
+ </div>
+
+ <h2><a title="{{question.summary}}" href="{% url question id=question.id %}{{question.title|slugify}}">{{question.title}}</a></h2>
+ <div class="userinfo">
+ <span class="relativetime" title="{{question.last_activity_at}}">{% diff_date question.last_activity_at %}</span>
+ {% if question.last_activity_by %}
+ <a href="/users/{{ question.last_activity_by.id }}/{{ question.last_activity_by.username|slugify }}/">{{ question.last_activity_by }}</a> {% get_score_badge question.last_activity_by %}
+ {% endif %}
+ </div>
+
+ <div class="tags">
+ {% for tag in question.tagname_list %}
+ <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %} '{{ tag }}' {% trans "using tags" %}" rel="tag">{{ tag }}</a>
+ {% endfor %}
+ </div>
+ </div>
+ {% endcache %}
+ {% endfor %}
+</div>
\ No newline at end of file diff --git a/forum/skins/default/templates/questions.html b/forum/skins/default/templates/questions.html index c2d74eca..de6076ac 100755 --- a/forum/skins/default/templates/questions.html +++ b/forum/skins/default/templates/questions.html @@ -50,106 +50,7 @@ <a id="mostvoted" href="{% if is_search %}{{ search_uri }}&{% else %}?{% endif %}sort=mostvoted" class="off" title="{% trans "most voted questions" %}">{% trans "most voted" %}</a>
</div>
</div>
-<div id="listA">
- {% for question in questions.object_list %}
- <div class="qstA"
- {% if request.user.is_authenticated %}
- {% if question.interesting_score > 0 %}
- style="background:#ffff99;"
- {% else %}
- {% if not request.user.hide_ignored_questions %}
- {% if question.ignored_score > 0 %}
- style="background:#f3f3f3;"
- {% endif %}
- {% endif %}
- {% endif %}
- {% endif %}
- >
- <h2>
- <a href="{{ question.get_absolute_url }}">{{ question.get_question_title }}</a>
- </h2>
- <div class="stat">
- <table>
- <tr>
- <td><span class="num">{{ question.answer_count|intcomma }}</span> </td>
- <td><span class="num">{{ question.score|intcomma }}</span> </td>
- <td><span class="num">{{ question.view_count|cnprog_intword|safe }}</span> </td>
- </tr>
- <tr>
- <td><span class="unit">{% trans "answers" %}</span></td>
- <td><span class="unit">{% trans "votes" %}</span></td>
- <td><span class="unit">{% trans "views" %}</span></td>
- </tr>
- </table>
- </div>
-
- <div class="summary">
- {{ question.summary }}...
- </div>
-
- {% ifequal tab_id 'active'%}
- {% if question.wiki and settings.WIKI_ON %}
- <span class="from wiki">{% trans "community wiki" %}</span>
- <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
- {% else %}
- <div class="from">
- {% comment %}{% gravatar question.last_activity_by 24 %}{% endcomment %}
- <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
- <span class="score">{% get_score_badge question.last_activity_by %} </span>
- <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
- </div>
- {% endif %}
- {% else %}
- {% if question.wiki and settings.WIKI_ON %}
- <span class="from wiki">{% trans "community wiki" %}</span>
- <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
- {% else %}
- <div class="from">
- {% comment %}{% gravatar question.author 24 %}{% endcomment %}
- {% if question.last_activity_at != question.added_at %}
- {% if question.author.id != question.last_activity_by.id %}
- {% trans "Posted:" %}
- <span class="author"><a href="{{ question.author.get_profile_url }}">{{ question.author }}</a></span>
- <span class="score">{% get_score_badge question.author %} </span>
- / {% trans "Updated:" %}
- <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
- <span class="score">{% get_score_badge question.last_activity_by %} </span>
- <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
- {% else %}
- {% trans "Updated:" %}
- <span class="author"><a href="{{ question.last_activity_by.get_profile_url }}">{{ question.last_activity_by }}</a></span>
- <span class="score">{% get_score_badge question.last_activity_by %} </span>
- <span class="date" title="{{ question.last_activity_at }}">{% diff_date question.last_activity_at %}</span>
- {% endif %}
- {% else %}
- {% trans "Posted:" %}
- <span class="author"><a href="{{ question.author.get_profile_url }}">{{ question.author }}</a></span>
- <span class="score">{% get_score_badge question.author %} </span>
- <span class="date" title="{{ question.added_at }}">{% diff_date question.added_at %}</span>
- {% endif %}
- </div>
- {% endif %}
- {% endifequal %}
-
- <div class="tags">
- {% for tag in question.tagname_list %}
- <a href="{% url tag_questions tag|urlencode %}" title="{% trans "see questions tagged" %}'{{ tag }}'{% trans "using tags" %}" rel="tag">{{ tag }}</a>
- {% endfor %}
- </div>
- </div>
- {% endfor %}
- {% if searchtitle %}
- {% if questions_count == 0 %}
- <p class="evenMore" style="padding-top:30px;text-align:center;">
- {% trans "Did not find anything?" %}
- {% else %}
- <p class="evenMore" style="padding-left:9px">
- {% trans "Did not find what you were looking for?" %}
- {% endif %}
- <a href="{% url ask %}">{% trans "Please, post your question!" %}</a>
- </p>
- {% endif %}
-</div>
+{% include "question_list.html" %}
{% endblock %}
{% block tail %}
diff --git a/forum/skins/default/templates/tag_selector.html b/forum/skins/default/templates/tag_selector.html index 7686d717..5e3e2ad8 100755 --- a/forum/skins/default/templates/tag_selector.html +++ b/forum/skins/default/templates/tag_selector.html @@ -37,6 +37,6 @@ <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 ingored questions hidden" %}</label> + <label id="hideIgnoredTagsLabel" for="hideIgnoredTagsCb">{% trans "keep ignored questions hidden" %}</label> <p> </div> diff --git a/forum/skins/default/templates/user_info.html b/forum/skins/default/templates/user_info.html index 0ce4e77a..b0fd246a 100755 --- a/forum/skins/default/templates/user_info.html +++ b/forum/skins/default/templates/user_info.html @@ -46,12 +46,8 @@ {% endif %} {% separator %} {% ifequal request.user view_user %} - <a href="{% url auth_signin %}">add authentication method</a> + <a href="{% url user_authsettings %}">authentication settings</a> {% endifequal %} - {% separator %} - {% if request.user.has_usable_password %} - <a href="{% url user_changepw %}">change password</a> - {% endif %} {% endjoinitems %} </td> </tr> diff --git a/forum/skins/default/templates/user_stats.html b/forum/skins/default/templates/user_stats.html index a3f88131..5ad1d71b 100755 --- a/forum/skins/default/templates/user_stats.html +++ b/forum/skins/default/templates/user_stats.html @@ -124,7 +124,7 @@ <tr> <td width="180" style="line-height:35px"> {% for award in awards %} - <a href="{% url 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="{% url 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/forum/skins/default/templates/user_tabs.html b/forum/skins/default/templates/user_tabs.html index 908e8430..136a1eaa 100755 --- a/forum/skins/default/templates/user_tabs.html +++ b/forum/skins/default/templates/user_tabs.html @@ -4,28 +4,28 @@ <div class="tabBar"> <div class="tabsA"> <a id="stats" {% ifequal tab_name "stats" %}class="on"{% endifequal %} - title="{% trans "User profile" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=stats">{% trans "overview" %}</a> + title="{% trans "User profile" %}" href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}/?sort=stats">{% trans "overview" %}</a> <a id="recent" {% ifequal tab_name "recent" %}class="on"{% endifequal %} - title="{% trans "recent activity" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=recent">{% trans "recent activity" %}</a> + title="{% trans "recent activity" %}" href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}?sort=recent">{% trans "recent activity" %}</a> {% if request.user|is_user_self:view_user %} <a id="responses" {% ifequal tab_name "responses" %}class="on"{% endifequal %} title="{% trans "comments and answers to others questions" %}" - href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=responses">{% trans "responses" %}</a> + href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}?sort=responses">{% trans "responses" %}</a> {% endif %} <a id="reputation" {% ifequal tab_name "reputation" %}class="on"{% endifequal %} title="{% trans "graph of user reputation" %}" - href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=reputation">{% trans "reputation history" %}</a> + href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}?sort=reputation">{% trans "reputation history" %}</a> {% if request.user|can_view_user_votes:view_user %} <a id="votes" {% ifequal tab_name "votes" %}class="on"{% endifequal %} - title="{% trans "user vote record" %}" href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=votes">{% trans "casted votes" %}</a> + title="{% trans "user vote record" %}" href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}?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" %}" - href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=favorites">{% trans "favorites" %}</a> + href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}?sort=favorites">{% trans "favorites" %}</a> {% if request.user|can_view_user_preferences:view_user %} <a id="email_subscriptions" {% ifequal tab_name "email_subscriptions" %}class="on"{% endifequal %} title="{% trans "email subscription settings" %}" - href="{% url users %}{{view_user.id}}/{{view_user.username}}?sort=email_subscriptions">{% trans "email subscriptions" %}</a> + href="/users/{{ view_user.id }}/{{ view_user.username|slugify }}?sort=email_subscriptions">{% trans "email subscriptions" %}</a> {% endif %} </div> </div> diff --git a/forum/skins/default/templates/users.html b/forum/skins/default/templates/users.html index 3a59b0c0..f24b60a1 100755 --- a/forum/skins/default/templates/users.html +++ b/forum/skins/default/templates/users.html @@ -47,8 +47,8 @@ <div class="user"> <ul> - <li class="thumb"><a href="{{ user.get_profile_url }}">{% gravatar user 32 %}</a></li> - <li><a href="{{ user.get_profile_url }}">{{user.username}}</a></li> + <li class="thumb"><a href="/users/{{ user.id }}/{{ user.username|slugify }}/">{% gravatar user 32 %}</a></li> + <li><a href="/users/{{ user.id }}/{{ user.username|slugify }}/">{{user.username}}</a></li> <li>{% get_score_badge user %}</li> </ul> </div> |