diff options
Diffstat (limited to 'askbot/skins/old/templates')
78 files changed, 0 insertions, 4799 deletions
diff --git a/askbot/skins/old/templates/404.html b/askbot/skins/old/templates/404.html deleted file mode 100644 index 158bfb94..00000000 --- a/askbot/skins/old/templates/404.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load extra_tags %} -{% include_jinja "404.jinja.html" request %} -{% comment %} -this one has to be a django template because of use of default hander404 -{% endcomment %} diff --git a/askbot/skins/old/templates/404.jinja.html b/askbot/skins/old/templates/404.jinja.html deleted file mode 100644 index 2da99646..00000000 --- a/askbot/skins/old/templates/404.jinja.html +++ /dev/null @@ -1,44 +0,0 @@ -{% extends "one_column_body.html" %} -<!-- template 404.jinja.html --> -{% block title %}{% spaceless %}{% trans %}Page not found{% endtrans %}{% endspaceless %}{% endblock %} -{% block forestyle%} -<style type="text/css"> - form input { margin-right: 5px; } -</style> -{% endblock %} -{% block content %} -<h1>{% trans %}Page not found{% endtrans %}</h1> -<div id="main-body"> - <div style="padding:5px 0px 10px 0;line-height:25px;"> - <h2>{% trans %}Sorry, could not find the page you requested.{% endtrans %}</h2> - <div style="margin-top:5px"> - {% trans %}This might have happened for the following reasons:{% endtrans %}<br/> - <ul> - <li>{% trans %}this question or answer has been deleted;{% endtrans %}</li> - <li>{% trans %}url has error - please check it;{% endtrans %}</li> - <li>{% trans %}the page you tried to visit is protected or you don't have sufficient points, see{% endtrans %} <a href="{% url faq %}">{% trans %}faq{% endtrans %}</a>;</li> - <li>{% trans %}if you believe this error 404 should not have occured, please{% endtrans %} - <a href="{{feedback_site_url}}" target="_blank">{% trans %}report this problem{% endtrans %}</a></li> - </u> - </div> - <script type="text/javascript"> - var GOOG_FIXURL_LANG = '{{settings.LANGUAGE_CODE}}'; - var GOOG_FIXURL_SITE = '{{site_url}}'; - </script> - <script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> - <ul> - <li><a href="#" id="linkPrevious">{% trans %}back to previous page{% endtrans %} »</li> - <li><a href="{% url questions %}">{% trans %}see all questions{% endtrans %} »</a></li> - <li><a href="{% url tags %}">{% trans %}see all tags{% endtrans %} »</a></li> - </u> - </div> -</div> -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - $().ready(function(){ - $("#linkPrevious").bind("click", back=function(){history.go(-1);}) - }); - </script> -{% endblock %} -<!-- end template 404.jinja.html --> diff --git a/askbot/skins/old/templates/500.html b/askbot/skins/old/templates/500.html deleted file mode 100644 index 8ec1bce4..00000000 --- a/askbot/skins/old/templates/500.html +++ /dev/null @@ -1,5 +0,0 @@ -{% load extra_tags %} -{% include_jinja "500.jinja.html" request %} -{% comment %}this template must be django -because of the use of default handler500 -{% endcomment %} diff --git a/askbot/skins/old/templates/500.jinja.html b/askbot/skins/old/templates/500.jinja.html deleted file mode 100644 index 297ae736..00000000 --- a/askbot/skins/old/templates/500.jinja.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- template 500.html --> -{% block title %}{% spaceless %}{% trans %}Internal server error{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Internal server error{% endtrans %}</h1> -<div id="main-body"> - <div style="padding:5px 0px 10px 0;line-height:25px"> - {% trans %}system error log is recorded, error will be fixed as soon as possible{% endtrans %}<br/> - {% trans %}please report the error to the site administrators if you wish{% endtrans %} - <ul> - <li><a href="#" id="linkPrevious">{% trans %}back to previous page{% endtrans %}</li> - <li><a href="{% url questions %}">{% trans %}see latest questions{% endtrans %}</a></li> - <li><a href="{% url tags %}">{% trans %}see tags{% endtrans %}</a></li> - </u> - </div> -</div> -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - $().ready(function(){ - $("#linkPrevious").bind("click", back=function(){history.go(-1);}) - }); - </script> -{% endblock %} -<!-- end template 500.html --> diff --git a/askbot/skins/old/templates/about.html b/askbot/skins/old/templates/about.html deleted file mode 100644 index fce4223e..00000000 --- a/askbot/skins/old/templates/about.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- template about.html --> -{% block title %}{% spaceless %}{% trans site_name=settings.APP_SHORT_NAME %}About {{site_name}}{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans site_name=settings.APP_SHORT_NAME %}About {{site_name}}{% endtrans %}</h1> -<div class="content"> - {{settings.FORUM_ABOUT}} -</div> -{% endblock %} -<!-- end template about.html --> diff --git a/askbot/skins/old/templates/answer_edit.html b/askbot/skins/old/templates/answer_edit.html deleted file mode 100644 index e8cbc7ae..00000000 --- a/askbot/skins/old/templates/answer_edit.html +++ /dev/null @@ -1,80 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- template answer_edit.html --> -{% block title %}{% spaceless %}{% trans %}Edit answer{% endtrans %}{% endspaceless %}{% endblock %} -{% block forestyle %} - <link rel="stylesheet" type="text/css" href="{{"/js/wmd/wmd.css"|media}}" /> -{% endblock %} -{% block content %} -<h1> - {% trans %}Edit answer{% endtrans %} [<a href="{{ answer.question.get_absolute_url() }}#{{ answer.id }}">{% trans %}back{% endtrans %}</a>] -</h1> -<div id="main-body" class="ask-body"> - <form id="fmedit" action="{% url edit_answer answer.id %}" method="post" >{% csrf_token %} - <label for="id_revision" ><strong>{% trans %}revision{% endtrans %}:</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{% endtrans %}"> - </div> - {{ macros.edit_post(form) }} - <div class="after-editor"> - <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> - <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> - </div> - {% if settings.WIKI_ON and answer.wiki == False %} - {{ macros.checkbox_in_div(form.wiki) }} - {% endif %} - </form> -</div> -{% endblock %} - -{% block sidebar %} - {% include "blocks/answer_edit_tips.html" %} -{% endblock %} - -{% block endjs %} - {% include "blocks/editor_data.html" %} - <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/jquery.validate.min.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/post.js"|media}}'></script> - <script type='text/javascript'> - {% if settings.ENABLE_MATHJAX or settings.MARKUP_CODE_FRIENDLY %} - var codeFriendlyMarkdown = true; - {% else %} - var codeFriendlyMarkdown = false; - {% endif %} - </script> - <script type='text/javascript' src='{{"/js/wmd/showdown.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/wmd/wmd.js"|media}}'></script> - <script type="text/javascript"> - $().ready(function(){ - $("#nav_questions").attr('className',"on"); - $('#editor').TextAreaResizer(); - - //highlight code synctax when editor has new text - $("#editor").typeWatch({highlight: false, wait: 3000, - captureLength: 5, callback: lanai.highlightSyntax}); - - //toggle preview of editor - var display = true; - var txt = "{% trans %}hide preview{% endtrans %}"; - $('#pre-collapse').text(txt); - $('#pre-collapse').bind('click', function(){ - txt = display ? "{% trans %}show preview{% endtrans %}" : "{% trans %}hide preview{% endtrans %}"; - display = !display; - $('#previewer').toggle(); - $('#pre-collapse').text(txt); - }); - - setupFormValidation($("#fmedit"), CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages()); - - $('#id_revision').unbind().change(function(){ - $("#select_revision").click(); - }); - - lanai.highlightSyntax(); - - }); - </script> -{% endblock %} -<!-- end template answer_edit.html --> diff --git a/askbot/skins/old/templates/ask.html b/askbot/skins/old/templates/ask.html deleted file mode 100644 index 9aaa7e8c..00000000 --- a/askbot/skins/old/templates/ask.html +++ /dev/null @@ -1,63 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- template ask.html --> -{% block title %}{% spaceless %}{% trans %}Ask a question{% endtrans %}{% endspaceless %}{% endblock %} -{% block forestyle %} - <link rel="stylesheet" type="text/css" href="{{"/js/wmd/wmd.css"|media}}" /> -{% endblock %} -{# main contents of ask form is in the template input_bar #} -{% block sidebar %} -{% include "blocks/question_edit_tips.html" %} -{% endblock %} -{% block endjs %} - <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/jquery.validate.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/post.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/wmd/showdown.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/wmd/wmd.js"|media}}'></script> - <script type='text/javascript'> - var sortMethod = undefined;//need for live_search - var minSearchWordLength = {{settings.MIN_SEARCH_WORD_LENGTH}}; - </script> - <script type='text/javascript' src='{{"/js/live_search.js"|media}}'></script> - {% include "blocks/editor_data.html" %} - {% if mandatory_tags %} - {% include "blocks/mandatory_tags_js.html" %} - {% endif %} - <script type='text/javascript'> - askbot['urls']['api_get_questions'] = '{% url api_get_questions %}'; - {% if settings.ENABLE_MATHJAX or settings.MARKUP_CODE_FRIENDLY %} - var codeFriendlyMarkdown = true; - {% else %} - var codeFriendlyMarkdown = false; - {% endif %} - $().ready(function(){ - liveSearch().init('ask_page'); - //set current module button style - $('#editor').TextAreaResizer(); - - //highlight code synctax when editor has new text - $("#editor").typeWatch({highlight: false, wait: 3000, - captureLength: 5, callback: lanai.highlightSyntax}); - - //toggle preview of editor - //todo remove copy-paste - var display = true; - var txt = "[{% trans %}hide preview{% endtrans %}]"; - $('#pre-collapse').text(txt); - $('#pre-collapse').bind('click', function(){ - txt = display ? "[{% trans %}show preview{% endtrans %}]" : "[{% trans %}hide preview{% endtrans %}]"; - display = !display; - $('#previewer').toggle(); - $('#pre-collapse').text(txt); - }); - //Tags autocomplete - - {{ macros.tag_autocomplete_js(id = '#id_tags') }} - - setupFormValidation($("#fmask"), CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages()); - lanai.highlightSyntax(); - }); - </script> -{% endblock %} -<!-- end template ask.html --> diff --git a/askbot/skins/old/templates/authopenid/changeemail.html b/askbot/skins/old/templates/authopenid/changeemail.html deleted file mode 100644 index 1316a048..00000000 --- a/askbot/skins/old/templates/authopenid/changeemail.html +++ /dev/null @@ -1,80 +0,0 @@ -{% extends "one_column_body.html" %} -{% block title %}{% spaceless %}{% trans %}Change email{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<!-- changeemail.html action_type={{action_type}}--> -{% if action_type=="change" %} - <h1> - {% if user.email %} - {% trans %}Change email{% endtrans %} - {% else %} - {% trans %}Save your email address{% endtrans %} - {% endif %} - </h1> - <p class="message"> - {% if user.email %} - {% trans %}change {{email}} info{% endtrans %} - {% else %} - {% trans %}here is why email is required, see {{gravatar_faq_url}}{% endtrans %} - {% endif %} - </p> - {% if msg %} - <p class="error">{{ msg }}</p> - {% endif %} - <div class="aligned"> - <form action="." method="post" accept-charset="utf-8">{% csrf_token %} - {% 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{% endtrans %}{% else %}{% trans %}Your Email{% endtrans %}{% 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{% endtrans %}{% else %}{% trans %}Save Email{% endtrans %}{% endif %}"> - {% if user.email %} - <input class="submit" type="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}"> - {% endif %} - </div> - </form> - </div> -{% elif action_type=="validate" %} - <div id="main-bar" class="headNormal"> - {% trans %}Validate email{% endtrans %} - </div> - <p class="message"> - {% trans %}validate {{email}} info or go to {{change_email_url}}{% endtrans %} - </p> -{% elif action_type=="keep" %} - <div id="main-bar" class="headNormal"> - {% trans %}Email not changed{% endtrans %} - </div> - <p class="message"> - {% trans %}old {{email}} kept, if you like go to {{change_email_url}}{% endtrans %} - </p> -{% elif action_type=="done_novalidate" %} - <div id="main-bar" class="headNormal"> - {% trans %}Email changed{% endtrans %} - </div> - <p class="message"> - {% trans %}your current {{email}} can be used for this{% endtrans %} - </p> -{% elif action_type=="validation_complete" %} - <div id="main-bar" class="headNormal"> - {% trans %}Email verified{% endtrans %} - </div> - <p class="message"> - {% trans %}thanks for verifying email{% endtrans %} - </p> -{% elif action_type=="key_not_sent" %} - <div id="main-bar" class="headNormal"> - {% trans %}email key not sent{% endtrans %} - </div> - <p class="message"> - {% trans %}email key not sent {{email}} change email here {{change_link}}{% endtrans %} - </p> -{% endif %} -{% endblock %} -<!-- end changeemail.html --> diff --git a/askbot/skins/old/templates/authopenid/complete.html b/askbot/skins/old/templates/authopenid/complete.html deleted file mode 100644 index 969a173f..00000000 --- a/askbot/skins/old/templates/authopenid/complete.html +++ /dev/null @@ -1,84 +0,0 @@ -{% extends "one_column_body.html" %} -<!-- complete.html --> -{# -views calling this template: -* django_authopenid.views.register with login_type='openid' -* django_authopenid.views.signin - with login_type='legacy' - -purpose of this template is to allow user enter his/her name -email and sign up for email alerts at the initial registratio - -parameters: -* provider -* login_type openid|legacy -* username (same as screen name or username in the models, and nickname in openid sreg) -* openid_register_form -* openid_verify_form - not clear what this form is supposed to do, not used for legacy -* email_feeds_form forum.forms.SimpleEmailSubscribeForm -* openid_username_exists -#} -{% block head %}{% endblock %} -{% block title %}{% spaceless %}{% trans %}Registration{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} - <h1>{% trans %}Registration{% endtrans %}</h1> - <div id="completetxt" > - <div class="message"> - {% if login_type=='openid' %} - {% trans %}register new {{provider}} account info, see {{gravatar_faq_url}}{% endtrans %} - {% elif login_type=='legacy' %} - {% if external_login_name_is_taken %} - {% trans %}{{username}} already exists, choose another name for - {{provider}}. Email is required too, see {{gravatar_faq_url}} - {% endtrans %} - {% else %} - {% trans %}register new external {{provider}} account info, see {{gravatar_faq_url}}{% endtrans %} - {% endif %} - {% else %} - {% trans %}register new Facebook connect account info, see {{gravatar_faq_url}}{% endtrans %} - {% endif %} - </div> - <p style="display:none">{% trans %}This account already exists, please use another.{% endtrans %}</p> - </div> - {% if openid_register_form.errors %} - <ul class="errorlist"> - {% for error in openid_register_form.non_field_errors() %} - <li>{{error}}</li> - {% endfor %} - </ul> - {% endif %} - <div class="login"> - {% if login_type=='openid' %} - <form name="fregister" action="{% url user_register %}" method="POST">{% csrf_token %} - {% elif login_type=='facebook' %} - <form name="fregister" action="" method="POST">{% csrf_token %} - {% else %} - <form name="fregister" action="{{ settings.LOGIN_URL }}" method="POST">{% csrf_token %} - {% endif %} - {{ openid_register_form.next }} - <div class="form-row-vertical"> - <label for="id_username">{% trans %}Screen name label{% endtrans %}</label> - {% if openid_register_form.username.errors %} - <p class="error">{{ openid_register_form.username.errors|join(", ") }}</p> - {% endif %} - {{ openid_register_form.username }} - </div> - <div class="form-row-vertical margin-bottom"> - <label for="id_email">{% trans %}Email address label{% endtrans %}</label> - {% if openid_register_form.email.errors %} - <p class="error">{{ openid_register_form.email.errors|join(", ") }}</p> - {% endif %} - {{ openid_register_form.email }} - </div> - <p>{% trans %}receive updates motivational blurb{% endtrans %}</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{% endtrans %}</p> - {% endif %} - </div> - <p class='space-above'>{% trans %}Tag filter tool will be your right panel, once you log in.{% endtrans %}</p> - <div class="submit-row"><input type="submit" class="submit" name="bnewaccount" value="{% trans %}create account{% endtrans %}"/></div> - </form> - </div> -{% endblock %} -<!-- end complete.html --> diff --git a/askbot/skins/old/templates/authopenid/confirm_email.txt b/askbot/skins/old/templates/authopenid/confirm_email.txt deleted file mode 100644 index 1a0f4e63..00000000 --- a/askbot/skins/old/templates/authopenid/confirm_email.txt +++ /dev/null @@ -1,12 +0,0 @@ -{% trans %}Thank you for registering at our Q&A forum!{% endtrans %} - -{% trans %}Your account details are:{% endtrans %} - -{% trans %}Username:{% endtrans %} {{ username }} -{% trans %}Password:{% endtrans %} {{ password }} - -{% trans %}Please sign in here:{% endtrans %} -{{signup_url}} - -{% trans %}Sincerely, -Forum Administrator{% endtrans %} diff --git a/askbot/skins/old/templates/authopenid/email_validation.txt b/askbot/skins/old/templates/authopenid/email_validation.txt deleted file mode 100644 index 087ce844..00000000 --- a/askbot/skins/old/templates/authopenid/email_validation.txt +++ /dev/null @@ -1,14 +0,0 @@ -{% trans %}Greetings from the Q&A forum{% endtrans %}, - -{% trans %}To make use of the Forum, please follow the link below:{% endtrans %} - -{{validation_link}} - -{% trans %}Following the link above will help us verify your email address.{% endtrans %} - -{% trans %}If you believe that this message was sent in mistake - -no further action is needed. Just ignore this email, we apologize -for any inconvenience.{% endtrans %} - -{% trans %}Sincerely, -Forum Administrator{% endtrans %} diff --git a/askbot/skins/old/templates/authopenid/logout.html b/askbot/skins/old/templates/authopenid/logout.html deleted file mode 100644 index a07b78d1..00000000 --- a/askbot/skins/old/templates/authopenid/logout.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends "one_column_body.html" %} -<!-- template logout.html --> -{% block title %}{% spaceless %}{% trans %}Logout{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}You have successfully logged out{% endtrans %}</h1> -{% if have_federated_login_methods %} - <p>{% trans %}However, you still may be logged in to your OpenID provider. Please logout of your provider if you wish to do so.{% endtrans %}</p> - {% if settings.FACEBOOK_KEY and settings.FACEBOOK_SECRET %} - <div id="fb-root"></div> - <script src="http://connect.facebook.net/en_US/all.js"></script> - <script> - FB.init({appId: '{{settings.FACEBOOK_KEY}}', status: true, cookie: true, xfbml: true}); - </script> - {% endif %} -{% endif %} -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - $(document).ready(function(){ - //logout user from facebook - if (typeof FB != 'undefined'){ - FB.getLoginStatus(function(response){ - if (response.session){ - FB.logout(); - } - }); - } - }); - </script> -{% endblock %} -<!-- end logout.html --> diff --git a/askbot/skins/old/templates/authopenid/macros.html b/askbot/skins/old/templates/authopenid/macros.html deleted file mode 100644 index 477d277c..00000000 --- a/askbot/skins/old/templates/authopenid/macros.html +++ /dev/null @@ -1,58 +0,0 @@ -{% macro login_provider_input(login_provider) %} - <input - name="{{login_provider.name}}" - type="image" - class="{{login_provider.type}}" - src="{{login_provider.icon_media_path|media}}" - alt="{{login_provider.tooltip_text}}" - title="{{login_provider.tooltip_text}}" - /> -{% endmacro %} - -{% macro provider_buttons( - login_form = None, - major_login_providers = None, - minor_login_providers = None, - hide_local_login = False, - settings = None, - logged_in = False - ) -%} - <div id="login-icons"> - <ul class="login-icons large"> - {% for login_provider in major_login_providers %} - {% if login_provider.name == 'local' and hide_local_login == True %} - {# do nothing here, left if statement this way for simplicity #} - {% else %} - {% if logged_in == True and login_provider.type == 'password' and login_provider.password_changeable == False %} - {% else %} - <li> - {{ login_provider_input(login_provider) }} - </li> - {% endif %} - {% endif %} - {% endfor %} - </ul> - <ul class="login-icons small"> - {% for login_provider in minor_login_providers %} - {% if logged_in == True and login_provider.type == 'password' and login_provider.password_changeable == False %} - {% else %} - <li> - {{ login_provider_input(login_provider) }} - </li> - {% endif %} - {% endfor %} - </ul> - </div> - <fieldset - id="openid-fs" - {% if not login_form.openid_login_token.errors %} - style="display:none;" - {% endif %} - > - <h2 id="openid-heading">{% trans %}Please enter your <span>user name</span>, then sign in{% endtrans %}</h2> - <p class="hint">{% trans %}(or select another login method above){% endtrans %}</p> - <input type="text" name="openid_login_token" /> - <input class="submit-b" type="submit" name="openid_login_with_extra_token" value="{% trans %}Sign in{% endtrans %}"/> - </fieldset> -{% endmacro %} diff --git a/askbot/skins/old/templates/authopenid/providers_javascript.html b/askbot/skins/old/templates/authopenid/providers_javascript.html deleted file mode 100644 index 0fe72eb3..00000000 --- a/askbot/skins/old/templates/authopenid/providers_javascript.html +++ /dev/null @@ -1,55 +0,0 @@ -<script type='text/javascript' src='{{"/js/jquery.validate.min.js"|media}}'></script> -<script type="text/javascript" src="{{"/jquery-openid/jquery.openid.js"|media}}"></script> -<script type="text/javascript"> - var extra_token_name = {}; - var create_pw_text = {}; - var change_pw_text = {}; - var authUrl = '/{% trans %}account/{% endtrans %}'; - var siteName = '{{settings.APP_SHORT_NAME}}'; - var provider_count = {{existing_login_methods|length}}; - {% for login_provider in major_login_providers %} - {%if settings['SIGNIN_' + login_provider.name.upper() + '_ENABLED'] == True %} - {% if login_provider.extra_token_name %} - extra_token_name['{{login_provider.name}}'] = '{{login_provider.extra_token_name}}'; - {% endif %} - {% if login_provider.type == 'password' %} - create_pw_text['{{login_provider.name}}'] = '{{login_provider.create_password_prompt}}'; - change_pw_text['{{login_provider.name}}'] = '{{login_provider.change_password_prompt}}'; - {% endif %} - {% endif %} - {% endfor %} - {% for login_provider in minor_login_providers %} - {% if settings['SIGNIN_' + login_provider.name.upper() + '_ENABLED'] == True %} - {% if login_provider.extra_token_name %} - extra_token_name['{{login_provider.name}}'] = '{{login_provider.extra_token_name}}'; - {% endif %} - {% if login_provider.type == 'password' %} - create_pw_text['{{login_provider.name}}'] = '{{login_provider.create_password_prompt}}'; - change_pw_text['{{login_provider.name}}'] = '{{login_provider.change_password_prompt}}'; - {% endif %} - {% endif %} - {% endfor %} - {% if user.is_authenticated() %} - var userIsAuthenticated = true; - {% else %} - var userIsAuthenticated = false; - {% endif %} - askbot['settings']['signin_always_show_local_login'] = {% if settings.SIGNIN_ALWAYS_SHOW_LOCAL_LOGIN %}true{% else %}false{% endif %}; - $("body").authenticator(); -</script> -{% if settings.FACEBOOK_KEY and settings.FACEBOOK_SECRET %} -<div id="fb-root"></div> -<script src="http://connect.facebook.net/en_US/all.js"></script> -<script> - $(document).ready(function(){ - if (typeof FB != 'undefined'){ - var ret = FB.init({appId: '{{settings.FACEBOOK_KEY}}', status: true, cookie: true, xfbml: true}); - FB.Event.subscribe('auth.sessionChange', function(response){ - if (response.session) { - $('#signin-form').submit(); - } - }); - }; - }); -</script> -{% endif %} diff --git a/askbot/skins/old/templates/authopenid/signin.html b/askbot/skins/old/templates/authopenid/signin.html deleted file mode 100644 index 49c447a1..00000000 --- a/askbot/skins/old/templates/authopenid/signin.html +++ /dev/null @@ -1,241 +0,0 @@ -{% extends "two_column_body.html" %}
-{% import "authopenid/macros.html" as login_macros %}
-<!-- signin.html -->
-{% block title %}{% spaceless %}{% trans %}User login{% endtrans %}{% endspaceless %}{% endblock %}
-{% block forestyle %}
- <link rel="stylesheet" type="text/css" media="screen" href="{{"/jquery-openid/openid.css"|media}}"/>
-{% endblock %}
-{% block content %}
-{% if have_buttons or view_subtype == 'email_sent' %}
- <h1>{{page_title}}</h1>
-{% endif %}
- {% if answer %}
- <div class="message">
- {% trans title=answer.question.title, summary=answer.summary %}
- Your answer to {{title}} {{summary}} will be posted once you log in
- {% endtrans %}
- </div>
- {% endif %}
- {% if question %}
- <div class="message">
- {% trans title=question.title, summary=question.summary %}Your question
- {{title}} {{summary}} will be posted once you log in
- {% endtrans %}
- </div>
- {% endif %}
- <p id='login-intro'>
- {% if view_subtype == 'default' and have_buttons %}
- {% trans %}Take a pick of your favorite service below to sign in using secure OpenID or similar technology. Your external service password always stays confidential and you don't have to rememeber or create another one.{% endtrans %}
- {% elif view_subtype == 'add_openid' and have_buttons %}
- {% if existing_login_methods %}
- {% trans %}It's a good idea to make sure that your existing login methods still work, or add a new one. Please click any of the icons below to check/change or add new login methods.{% endtrans %}
- {% else %}
- {% trans %}Please add a more permanent login method by clicking one of the icons below, to avoid logging in via email each time.{% endtrans %}
- {% endif %}
- {% elif view_subtype == 'change_openid' and have_buttons %}
- {% if existing_login_methods %}
- {% trans %}Click on one of the icons below to add a new login method or re-validate an existing one.{% endtrans %}
- {% else %}
- {% trans %}You don't have a method to log in right now, please add one or more by clicking any of the icons below.{% endtrans %}
- {% endif %}
- {% elif view_subtype == 'email_sent' %}
- {% trans %}Please check your email and visit the enclosed link to re-connect to your account{% endtrans %}
- {% endif %}
- </p>
- {% if openid_error_message %}
- <p class="warning">{{ openid_error_message }}</p>
- {% endif %}
- {% if view_subtype != 'email_sent' and view_subtype != 'bad_key' %}
- <form id="signin-form" method="post" action="{{ settings.LOGIN_URL }}">{% csrf_token %}
- {# in this branch - the real signin view we display the login icons
- here we hide the local login button only if admin
- wants to always show the password login form - then
- the button is useless.
- #}
- {{ login_form.login_provider_name }}
- {{ login_form.next }}
- {{
- login_macros.provider_buttons(
- login_form = login_form,
- major_login_providers = major_login_providers,
- minor_login_providers = minor_login_providers,
- hide_local_login = settings.SIGNIN_ALWAYS_SHOW_LOCAL_LOGIN,
- settings = settings,
- logged_in = user.is_authenticated()
- )
- }}
- {% if use_password_login == True %}
- <fieldset
- id="password-fs"
- {% if user.is_anonymous() %}
- {% if not login_form.username.errors and not login_form.password_login_failed %}
- {% if not settings.SIGNIN_ALWAYS_SHOW_LOCAL_LOGIN %}
- style="display:none;"
- {%endif%}
- {% endif %}
- {% else %}
- {% if not login_form.new_password.errors and not login_form.new_password_retyped.errors %}
- {% if not settings.SIGNIN_ALWAYS_SHOW_LOCAL_LOGIN %}
- style="display:none;"
- {% endif%}
- {% endif %}
- {% endif %}
- >
- {{login_form.password_action}}
- {% if user.is_anonymous() %}
- <h2 id="password-heading">
- {% trans %}Please enter your <span>user name and password</span>, then sign in{% endtrans %}
- </h2>
- {% if have_buttons %}
- <p class="hint">{% trans %}(or select another login method above){% endtrans %}</p>
- {% endif %}
- {% if login_form.password_login_failed %}
- <p class="error">{% trans %}Login failed, please try again{% endtrans %}</p>
- {% endif %}
- <table class="login">
- <tr>
- <td><label for="id_username">{% trans %}Login or email{% endtrans %}</label></td>
- <td>{{login_form.username}}</td>
- </tr>
- <tr>
- <td><label for="id_password">{% trans %}Password{% endtrans %}</label></td>
- <td>{{login_form.password}}</td>
- </tr>
- </table>
- <p id="local_login_buttons">
- <input class="submit-b" name="login_with_password" type="submit" value="{% trans %}Login{% endtrans %}" />
- {% if settings.USE_LDAP_FOR_PASSWORD_LOGIN == False %}
- <a class="create-password-account" style="vertical-align:middle" href="{% url user_signup_with_password %}?login_provider=local">{% trans %}Create a password-protected account{% endtrans %}</a>
- {% endif %}
- </p>
- {% elif settings.USE_LDAP_FOR_PASSWORD_LOGIN == False %}
- <h2 id="password-heading">
- {% trans %}To change your password - please enter the new one twice, then submit{% endtrans %}
- </h2>
- <table class="login">
- <tr>
- <td><label for="id_new_password">{% trans %}New password{% endtrans %}</label></td>
- <td>
- {{login_form.new_password}}
- <span class="error">{{login_form.new_password.errors[0]}}</span>
- </td>
- </tr>
- <tr>
- <td><label for="id_new_password_retyped">{% trans %}Please, retype{% endtrans %}</label></td>
- <td>
- {{login_form.new_password_retyped}}
- <span class="error">{{login_form.new_password_retyped.errors[0]}}</span>
- </td>
- </tr>
- </table>
- <p id="local_login_buttons">
- <input class="submit-b" name="change_password" type="submit" value="{% trans %}Change password{% endtrans %}" />
- </p>
- {% endif %}
- </fieldset>
- {% endif %}
- </form>
- {% if user.is_authenticated() and existing_login_methods and settings.ALLOW_ADD_REMOVE_LOGIN_METHODS %}
- <div
- id='existing-login-methods'
- {% if login_form.password_change_failed %}
- style="display:none";
- {% endif %}
- >
- <h2 id='ab-show-login-methods'>
- {% trans %}Here are your current login methods{% endtrans %}
- </h2>
- <table id='ab-existing-login-methods'>
- <tr>
- <th>{% trans %}provider{% endtrans %}</th>
- <th>{% trans %}last used{% endtrans %}</th>
- <th>{% trans %}delete, if you like{% endtrans %}</th>
- </tr>
- {% for login_method in existing_login_methods %}
- <tr class="ab-provider-row">
- <td class="ab-provider-name">
- {{login_method.provider_name}}
- </td>
- <td>
- {% if login_method.last_used_timestamp %}
- {{login_method.last_used_timestamp|diff_date}}
- {% endif %}
- </td>
- <td>
- {% if login_method.is_deletable %}
- <button>{% trans %}delete{% endtrans %}</button>
- {% else %}
- {% trans %}cannot be deleted{% endtrans %}
- {% endif %}
- </td>
- </tr>
- {% endfor %}
- </table>
- </div>
- {% endif %}
- {% endif %}
- {% if view_subtype != 'email_sent' or view_subtype == 'bad_key' %}
- {% if user.is_anonymous() and settings.ALLOW_ACCOUNT_RECOVERY_BY_EMAIL %}
- <form id="account-recovery-form" action="{% url user_account_recover %}" method="post">{% csrf_token %}
- {% if view_subtype != 'bad_key' %}
- <h2 id='account-recovery-heading'>{% trans %}Still have trouble signing in?{% endtrans %}</h2>
- {% endif %}
- <p class="hint">
- <span class="text">
- {% if view_subtype == 'bad_key' %}
- {% trans %}Please, enter your email address below and obtain a new key{% endtrans %}
- {% else %}
- {% trans %}Please, enter your email address below to recover your account{% endtrans %}
- {% endif %}
- </span>
- <span style="display:none" class="link"> - <a href="#">{% trans %}recover your account via email{% endtrans %}</a></span>
- </p>
- <fieldset id='email-input-fs'>
- {% if account_recovery_form.email.errors %}
- <p class="error">{{account_recovery_form.email.errors[0]}}</p>
- {% endif %}
- {{ account_recovery_form.email }}
- <input
- class="submit-b"
- type="submit"
- {% if view_subtype == 'bad_key' %}
- value="{% trans %}Send a new recovery key{% endtrans %}"
- {% else %}
- value="{% trans %}Recover your account via email{% endtrans %}"
- {% endif %}
- />
- </fieldset>
- </form>
- {% endif %}
- {% endif %}
-{% endblock %}
-
-{% block sidebar %}
- {% if have_buttons %}
- <div class="boxC">
- <h2>{% trans %}Why use OpenID?{% endtrans %}</h2>
- <ul>
- <li>
- {% trans %}with openid it is easier{% endtrans %}
- </li>
- <li>
- {% trans %}reuse openid{% endtrans %}
- </li>
- <li>
- {% trans %}openid is widely adopted{% endtrans %}
- </li>
- <li>
- {% trans %}openid is supported open standard{% endtrans %}
- </li>
- </ul>
- <p class="info-box-follow-up-links">
- <a href="http://openid.net/what/" target="_blank">{% trans %}Find out more{% endtrans %} »</a><br/>
- <a href="http://openid.net/get/" target="_blank">{% trans %}Get OpenID{% endtrans %} »</a>
- </p>
- </div>
- {% endif %}
-{% endblock%}
-{%block endjs%}
-{%include "authopenid/providers_javascript.html" %}
-{%endblock%}
-<!-- end signin.html -->
diff --git a/askbot/skins/old/templates/authopenid/signup_with_password.html b/askbot/skins/old/templates/authopenid/signup_with_password.html deleted file mode 100644 index 047ff076..00000000 --- a/askbot/skins/old/templates/authopenid/signup_with_password.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends "one_column_body.html" %} -{% import "authopenid/macros.html" as login_macros %} -<!--signup.html--> -{% block title %}{% spaceless %}{% trans %}Signup{% endtrans %}{% endspaceless %}{% endblock %} -{% block forestyle %} - <link rel="stylesheet" type="text/css" media="screen" href="{{"/jquery-openid/openid.css"|media}}"/> -{% endblock %} -{% block content %} -{% if settings.PASSWORD_REGISTER_SHOW_PROVIDER_BUTTONS == True %} - <h1>{% trans %}Please register by clicking on any of the icons below{% endtrans %}</h1> - <form id="signin-form" method="post" action="{{ settings.LOGIN_URL }}">{% csrf_token %} - {# hide_local_login == True because it is password reg form #} - {{ - login_macros.provider_buttons( - login_form = login_form, - major_login_providers = major_login_providers, - minor_login_providers = minor_login_providers, - hide_local_login = True, - settings = settings - ) - }} - </form> - <h2>{% trans %}or create a new user name and password here{% endtrans %}</h2> -{% else %} - <h1>{% trans %}Create login name and password{% endtrans %}</h1> - <p class="message">{% trans %}Traditional signup info{% endtrans %}</p> -{%endif%} -<form action="{% url user_signup_with_password %}" method="post" accept-charset="utf-8">{% csrf_token %} - {{form.login_provider}} - <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 style="margin-top: 10px">{% trans %}receive updates motivational blurb{% endtrans %}</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{% endtrans %}</p> - {% endif %} - </div> - {% if settings.USE_RECAPTCHA %} - <p class="signup_p">{% trans %}Please read and type in the two words below to help us prevent automated account creation.{% endtrans %}</p> - {{form.recaptcha}} - {% endif %} - <div class="submit-row"><input type="submit" class="submit" value="{% trans %}Create Account{% endtrans %}" /> - {% if settings.PASSWORD_REGISTER_SHOW_PROVIDER_BUTTONS == False %} - <strong>{% trans %}or{% endtrans %} - <a href="{{ settings.LOGIN_URL }}">{% trans %}return to OpenID login{% endtrans %}</a></strong> - {% endif %} - </div> -</form> -{% endblock %} -{%block endjs%} -{%include "authopenid/providers_javascript.html" %} -{%endblock%} -<!--end signup.html--> diff --git a/askbot/skins/old/templates/avatar/add.html b/askbot/skins/old/templates/avatar/add.html deleted file mode 100644 index 68a188ef..00000000 --- a/askbot/skins/old/templates/avatar/add.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "user_profile/user.html" %} -{% import "macros.html" as macros %} -{% block profilesection %}{% trans %}add avatar{% endtrans %}{% endblock %} -{% block usercontent %} - <h2>{% trans %}Change avatar{% endtrans %} - <p>{% trans %}Your current avatar: {% endtrans %}</p> - {{ macros.gravatar(user, 128) }} - {% if not avatars %} - <p>{% trans %}You haven't uploaded an avatar yet. Please upload one now.{% endtrans %}</p> - {% endif %} - <form enctype="multipart/form-data" method="POST" action="{% url avatar_add %}">{% csrf_token %} - {{ upload_avatar_form.as_p() }} - <p><input type="submit" value="{% trans %}Upload New Image{% endtrans %}" /></p> - </form> -{% endblock %} diff --git a/askbot/skins/old/templates/avatar/change.html b/askbot/skins/old/templates/avatar/change.html deleted file mode 100644 index 7921a662..00000000 --- a/askbot/skins/old/templates/avatar/change.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "user_profile/user.html" %} -{% import "macros.html" as macros %} -{% block profilesection %} - {% trans %}change avatar{% endtrans %} -{% endblock %} -{% block usercontent %} - <p>{% trans %}Your current avatar: {% endtrans %}<br/> - {{ macros.gravatar(user, 128) }} - </p> - {% if not avatars %} - <p>{% trans %}You haven't uploaded an avatar yet. Please upload one now.{% endtrans %}</p> - {% else %} - <form method="POST" action="{% url avatar_change %}">{% csrf_token %} - <ul> - {{ primary_avatar_form.as_ul() }} - </ul> - <p><input type="submit" value="{% trans %}Choose new Default{% endtrans %}" /></p> - </form> - {% endif %} - <form enctype="multipart/form-data" method="POST" action="{% url avatar_add %}">{% csrf_token %} - {{ upload_avatar_form.as_p() }} - <p><input type="submit" value="{% trans %}Upload{% endtrans %}" /></p> - </form> -{% endblock %} diff --git a/askbot/skins/old/templates/avatar/confirm_delete.html b/askbot/skins/old/templates/avatar/confirm_delete.html deleted file mode 100644 index 282d72fa..00000000 --- a/askbot/skins/old/templates/avatar/confirm_delete.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "user_profile/user.html" %} -{% import "macros.html" as macros %} -{% block profilesection %}{% trans %}delete avatar{% endtrans %}{% endblock %} -{% block usercontent %} - <p>{% trans %}Please select the avatars that you would like to delete.{% endtrans %}</p> - {% if not avatars %} - <p>{% trans avatar_change_url="avatar_change"|url %}You have no avatars to delete. Please <a href="{{ avatar_change_url }}">upload one</a> now.{% endtrans %}</p> - {% else %} - <form method="POST" action="{% url avatar_delete %}">{% csrf_token %} - <ul> - {{ delete_avatar_form.as_ul() }} - </ul> - <p><input type="submit" value="{% trans %}Delete These{% endtrans %}" /></p> - </form> - {% endif %} -{% endblock %} diff --git a/askbot/skins/old/templates/badge.html b/askbot/skins/old/templates/badge.html deleted file mode 100644 index ee7f5360..00000000 --- a/askbot/skins/old/templates/badge.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- template badge.html --> -{% block title %}{% spaceless %}{% trans name=badge.name %}{{name}}{% endtrans %} - {% trans %}Badge{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans name=badge.name %}Badge "{{name}}"{% endtrans %}</h1> - <p> - <a href="{{badge.get_absolute_url()}}" title="{{ badge.get_type_display() }} : {% trans description=badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ badge.css_class }}">●</span> {% trans name=badge.name%}{{name}}{% endtrans %}</a> {% trans description=badge.description %}{{description}}{% endtrans %} - </p> - <div> - {% if badge.awarded_count %} - <p style="float:left"><span class="count">{{ badge_recipients|length|intcomma }}</span> - <strong>{% trans num_awardees=badge_recipients|length %}user received this badge:{% pluralize %}users received this badge:{% endtrans %}</strong></p> - {% endif %} - </div> - <div id="award-list" style="clear:both;margin-left:20px;line-height:25px;"> - {% for recipient in badge_recipients %} - <p style="width:180px;float:left"><a href="{{ recipient.get_absolute_url() }}">{{ recipient.username }}</a> - {{ macros.user_score_and_badge_summary(recipient) }} - </p> - {% endfor %} - </div> -{% endblock %} -<!-- end template badge.html --> diff --git a/askbot/skins/old/templates/badges.html b/askbot/skins/old/templates/badges.html deleted file mode 100644 index bbd09951..00000000 --- a/askbot/skins/old/templates/badges.html +++ /dev/null @@ -1,60 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- template badges.html --> -{% block title %}{% spaceless %}{% trans %}Badges summary{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Badges{% endtrans %}</h1> -<p> -{% trans %}Community gives you awards for your questions, answers and votes.{% endtrans %}<br/> -{% trans %}Below is the list of available badges and number -of times each type of badge has been awarded. Give us feedback at {{feedback_faq_url}}. -{% endtrans %} -</p> -<div id="medalList"> - {% for badge in badges %} - <div style="clear:both;line-height:30px"> - <div style="float:left;min-width:30px;text-align:right;height:30px"> - {% for a in mybadges %} - {% if a.badge_id == badge.id %} - <span style="font-size:175%; padding-right:5px; color:#5B9058;">✔</span> - {% endif %} - {% endfor %} - </div> - <div style="float:left;width:230px;"> - <a href="{{badge.get_absolute_url()}}" - title="{{badge.get_type_display()}} : {{badge.description}}" - class="medal"><span class="{{ badge.css_class }}">●</span> {{badge.name}}</a><strong> - × {{ badge.awarded_count|intcomma }}</strong> - </div> - <p style="float:left;margin-top:8px;">{{badge.description}}</p> - </div> - {% endfor %} -</div> -{% endblock %} -{% block sidebar %} -<div class="boxC"> - <h2>{% trans %}Community badges{% endtrans %}</h2> - <p> - <a style="cursor:default;" title="{% trans %}gold badge: the highest honor and is very rare{% endtrans %}" class="medal"><span class="badge1">●</span> {% trans %}gold{% endtrans %}</a> - </p> - <p> - {% trans %}gold badge description{% endtrans %} - </p> - <p> - <a - style="cursor:default;" - title="{% trans %}silver badge: occasionally awarded for the very high quality contributions{% endtrans %}" - class="medal"><span class="badge2">●</span> {% trans %}silver{% endtrans %}</a> - </p> - <p> - {% trans %}silver badge description{% endtrans %} - </p> - <p> - <a style="cursor:default;" title="{% trans %}bronze badge: often given as a special honor{% endtrans %}" class="medal"> - <span class="badge3">●</span> {% trans %}bronze{% endtrans %}</a> - </p> - <p> - {% trans %}bronze badge description{% endtrans %} - </p> -</div> -{% endblock %} -<!-- end template badges.html --> diff --git a/askbot/skins/old/templates/base.html b/askbot/skins/old/templates/base.html deleted file mode 100644 index 9f779945..00000000 --- a/askbot/skins/old/templates/base.html +++ /dev/null @@ -1,70 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<!-- template base.html --> -<html xmlns="http://www.w3.org/1999/xhtml"> - {% spaceless %} - <head> - <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - {% block meta_description %} - <meta name="description" content="{{settings.APP_DESCRIPTION|escape}}" /> - {% endblock %} - <meta name="keywords" content="{%block keywords%}{%endblock%},{{settings.APP_KEYWORDS|escape}}" /> - {% if settings.GOOGLE_SITEMAP_CODE %} - <meta name="google-site-verification" content="{{settings.GOOGLE_SITEMAP_CODE}}" /> - {% endif %} - <link rel="shortcut icon" href="{{ settings.SITE_FAVICON|media }}" /> - <link href="{{"/style/style.css"|media }}" rel="stylesheet" type="text/css" /> - {{ skin.get_extra_css_link() }} - {% if settings.USE_CUSTOM_CSS %} - <link - href="{% url "custom_css" %}?v={{settings.MEDIA_RESOURCE_REVISION}}" - rel="stylesheet" - type="text/css" - /> - {% endif %} - {% block forestyle %}{% endblock %} - {% if user_messages %} - <style type="text/css"> - body { margin-top:2.4em; } - </style> - {% endif %} - {% if settings.USE_CUSTOM_HTML_HEAD %} - {{ settings.CUSTOM_HTML_HEAD }} - {% endif %} - <script type="text/javascript"> - var askbot = {}; - askbot['data'] = {}; - askbot['urls'] = {}; - askbot['settings'] = {}; - askbot['messages'] = {}; - </script> - {% block forejs %} - {% endblock %} - {# avoid adding javascript here so that pages load faster #} - </head> - {% endspaceless %} - <body class="{% block body_class %}{% endblock %}{% if page_class %} {{page_class}}{% endif %}"> - {% include "blocks/system_messages.html" %} - {% include "custom_header.html" ignore missing %} - {% include "blocks/header.html" %} - <div class="content-wrapper"> - {% block body %} - {% endblock %} - </div> - {% if settings.FOOTER_MODE == 'default' %} - {% include "blocks/footer.html" %} - {% elif settings.FOOTER_MODE == 'customize' %} - {{ settings.CUSTOM_FOOTER }} - {% endif %} - {% include "custom_footer.html" ignore missing %} - {% include "blocks/bottom_scripts.html" %} - {% block endjs %} - {% endblock %} - <script type="text/javascript"> - for (url_name in askbot['urls']){ - askbot['urls'][url_name] = cleanUrl(askbot['urls'][url_name]); - } - </script> - </body> -</html> -<!-- end template base.html --> diff --git a/askbot/skins/old/templates/blocks/README b/askbot/skins/old/templates/blocks/README deleted file mode 100644 index 88537d0a..00000000 --- a/askbot/skins/old/templates/blocks/README +++ /dev/null @@ -1,2 +0,0 @@ -this directory should contain block templates that -are included within other templates diff --git a/askbot/skins/old/templates/blocks/answer_edit_tips.html b/askbot/skins/old/templates/blocks/answer_edit_tips.html deleted file mode 100644 index 23e4df53..00000000 --- a/askbot/skins/old/templates/blocks/answer_edit_tips.html +++ /dev/null @@ -1,63 +0,0 @@ -<!-- template answer_edit_tips.html --> -<div class="boxC"> - <h2>{% trans %}answer tips{% endtrans %}</h2> - <div> - <ul> - <li> <b>{% trans %}please make your answer relevant to this community{% endtrans %}</b> - </li> - <li> - {% trans %}try to give an answer, rather than engage into a discussion{% endtrans %} - </li> - <li> - {% trans %}please try to provide details{% endtrans %} - </li> - <li> - {% trans %}be clear and concise{% endtrans %} - </li> - </ul> - <p class='info-box-follow-up-links'> - <a href="{% url faq %}" target="_blank" title="{% trans %}see frequently asked questions{% endtrans %}">faq »</a> - </p> - </div> -</div> - -<div class="boxC"> - <h2>{% trans %}Markdown tips{% endtrans %}</h2> - <ul> - {% if settings.MARKUP_CODE_FRIENDLY or settings.ENABLE_MATHJAX %} - <li> - {% trans %}*italic*{% endtrans %} - </li> - <li> - {% trans %}**bold**{% endtrans %} - </li> - {% else %} - <li> - {% trans %}*italic* or _italic_{% endtrans %} - </li> - <li> - {% trans %}**bold** or __bold__{% endtrans %} - </li> - {% endif %} - <li> - <b>{% trans %}link{% endtrans %}</b>:[{% trans %}text{% endtrans %}](http://url.com/ "{% trans %}title{% endtrans %}") - - </li> - <li> - <b>{% trans %}image{% endtrans %}</b>:![alt {% trans %}text{% endtrans %}](/path/img.jpg "{% trans %}title{% endtrans %}") - - </li> - <li> - {% trans %}numbered list:{% endtrans %} - 1. Foo - 2. Bar - </li> - <li> - {% trans %}basic HTML tags are also supported{% endtrans %} - </li> - </ul> - <p class='info-box-follow-up-links'> - <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">{% trans %}learn more about Markdown{% endtrans %} »</a> - </p> -</div> -<!-- end template answer_edit_tips.html --> diff --git a/askbot/skins/old/templates/blocks/ask_form.html b/askbot/skins/old/templates/blocks/ask_form.html deleted file mode 100644 index 606aef78..00000000 --- a/askbot/skins/old/templates/blocks/ask_form.html +++ /dev/null @@ -1,46 +0,0 @@ -{% import "macros.html" as macros %} -<form id="fmask" action="" method="post" >{% csrf_token %} - <div class="form-item"> - <div id="askFormBar"> - {% if not request.user.is_authenticated() %} - <p>{% trans %}login to post question info{% endtrans %}</p> - {% else %} - {% if settings.EMAIL_VALIDATION %} - {% if not request.user.email_isvalid %} - {% trans email=request.user.email %}must have valid {{email}} to post, - see {{email_validation_faq_url}} - {% endtrans %} - {% endif %} - {% endif %} - {% endif %} - <input id="id_title" class="questionTitleInput" name="title" autocomplete="off" - value="{% if form.initial.title %}{{form.initial.title}}{% endif %}"/> - <span class="form-error">{{ form.title.errors }}</span> - </div> - <div class="title-desc"> - {{ form.title.help_text }} - </div> - </div> - <div id='question-list'></div> - {{ - macros.edit_post( - form, - post_type = 'question', - edit_title = False, - mandatory_tags = mandatory_tags - ) - }} - {% if not request.user.is_authenticated() %} - <input type="submit" name="post_anon" value="{% trans %}Login/signup to post your question{% endtrans %}" class="submit" /> - {% else %} - <input type="submit" name="post" value="{% trans %}Ask your question{% endtrans %}" class="submit" /> - {% endif %} - <div class="question-options"> - {% if settings.WIKI_ON %} - {{ macros.checkbox_in_div(form.wiki) }} - {% endif %} - {% if settings.ALLOW_ASK_ANONYMOUSLY %} - {{ macros.checkbox_in_div(form.ask_anonymously) }} - {% endif %} - </div> -</form> diff --git a/askbot/skins/old/templates/blocks/bottom_scripts.html b/askbot/skins/old/templates/blocks/bottom_scripts.html deleted file mode 100644 index 771c13a4..00000000 --- a/askbot/skins/old/templates/blocks/bottom_scripts.html +++ /dev/null @@ -1,95 +0,0 @@ -{# most, if not all javascripts should go here - this template is included at the very bottow of the - main template "base.html" -#} -<div id="no-javascript"> - <noscript class="noscript"> - {% trans app_name = settings.APP_SHORT_NAME %}Please note: {{app_name}} requires javascript to work properly, please enable javascript in your browser, <a href="{{noscript_url}}">here is how</a>{% endtrans %} - </noscript> -</div> -<script type="text/javascript"> - var i18nLang = '{{settings.LANGUAGE_CODE}}'; - var scriptUrl = '/{{settings.ASKBOT_URL}}' - var askbotSkin = '{{settings.ASKBOT_DEFAULT_SKIN}}'; - var enableMathJax = {% if settings.ENABLE_MATHJAX %}true{% else %}false{% endif %}; - {% if request.user.is_authenticated() %} - askbot['data']['userIsAuthenticated'] = true; - askbot['data']['userId'] = {{request.user.id}}; - askbot['data']['userIsAdminOrMod'] = {% if - request.user.is_administrator() - or request.user.is_moderator() - %}true{% else %}false{% endif %}; - {% else %} - askbot['data']['userIsAuthenticated'] = false; - {% endif %} - askbot['urls']['mark_read_message'] = '{% url "read_message" %}'; - askbot['urls']['get_tags_by_wildcard'] = '{% url "get_tags_by_wildcard" %}'; - askbot['urls']['get_tag_list'] = '{% url "get_tag_list" %}'; - askbot['urls']['follow_user'] = scriptUrl + 'followit/follow/user/{{'{{'}}userId{{'}}'}}/'; - askbot['urls']['unfollow_user'] = scriptUrl + 'followit/unfollow/user/{{'{{'}}userId{{'}}'}}/'; - askbot['urls']['user_signin'] = '{{ settings.LOGIN_URL }}'; -</script> -<script - type="text/javascript" - {% if settings.DEBUG %} - src="{{"/js/jquery-1.4.3.js"|media}}" - {% else %} - src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" - {% endif %} -></script> -<script type='text/javascript' src="{{"/js/i18n.js"|media }}"></script> -<script type='text/javascript' src="{{"/js/jquery.i18n.js"|media }}"></script> -<script type='text/javascript' src="{% url "askbot_jsi18n" %}"></script> -<script type='text/javascript' src="{{"/js/utils.js"|media }}"></script> -{% if settings.ENABLE_MATHJAX %} - <script type='text/javascript' src="{{settings.MATHJAX_BASE_URL}}/MathJax.js"> - MathJax.Hub.Config({ - extensions: ["tex2jax.js"], - jax: ["input/TeX","output/HTML-CSS"], - tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]} - }); - </script> -{% endif %} -<script type="text/javascript"> -{% if active_tab != "tags" and active_tab != "users" %} -{# start asking question with title from search query #} - $(document).ready(function(){ - $('#nav_ask').click( - function(){ - var starting_title = $('#keywords').attr('value'); - var new_url = $(this).attr('href') + '?title=' + encodeURIComponent(starting_title); - window.location.href = new_url; - return false; - } - ); - //{# focus input on the search bar endcomment #} - {% if active_tab != "ask" %} - $('#keywords').focus(); - {% else %} - $('#id_title').focus(); - {% endif %} - }); -{% endif %} -{% if user_messages %} - $('#validate_email_alert').click(function(){notify.close(true)}) - notify.show(); -{% endif %} -</script> -{% if settings.USE_CUSTOM_JS %} -<script - src="{% url "custom_js"%}?{{ settings.MEDIA_RESOURCE_REVISION }}" - type="text/javascript" -></script> -{% endif %} -{% 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")); - </script> - <script type="text/javascript"> - try { - var pageTracker = _gat._getTracker('{{ settings.GOOGLE_ANALYTICS_KEY }}'); - pageTracker._trackPageview(); - } catch(err) {} -</script> -{% endif %} diff --git a/askbot/skins/old/templates/blocks/editor_data.html b/askbot/skins/old/templates/blocks/editor_data.html deleted file mode 100644 index 79ed96fb..00000000 --- a/askbot/skins/old/templates/blocks/editor_data.html +++ /dev/null @@ -1,10 +0,0 @@ -<script type="text/javascript"> - {# data necessary for the post editor, goes into endjs block #} - askbot['settings']['maxTagLength'] = {{settings.MAX_TAG_LENGTH}}; - 'each tag must be shorter than %(max_chars)d characters', - askbot['messages']['maxTagLength'] = '{% trans max_chars = settings.MAX_TAG_LENGTH %}each tag must be shorter that {{max_chars}} character{% pluralize %}each tag must be shorter than {{max_chars}} characters{% endtrans %}'; - askbot['settings']['maxTagsPerPost'] = {{settings.MAX_TAGS_PER_POST}}; - askbot['messages']['maxTagsPerPost'] = '{% trans tag_count = settings.MAX_TAGS_PER_POST %}please use {{tag_count}} tag{% pluralize %}please use {{tag_count}} tags or less{% endtrans %}'; - askbot['messages']['tagLimits'] = '{% trans tag_count=settings.MAX_TAGS_PER_POST, max_chars=settings.MAX_TAG_LENGTH %}please use up to {{tag_count}} tags, less than {{max_chars}} characters each{% endtrans %}'; - askbot['urls']['upload'] = '{% url "upload" %}'; -</script> diff --git a/askbot/skins/old/templates/blocks/footer.html b/askbot/skins/old/templates/blocks/footer.html deleted file mode 100644 index 94c409ef..00000000 --- a/askbot/skins/old/templates/blocks/footer.html +++ /dev/null @@ -1,53 +0,0 @@ -<!-- template footer.html --> -<div id="ground"> - <p class="footerLinks" > - <a href="{% url about %}">{% trans %}about{% endtrans %}</a><span class="link-separator"> |</span> - <a href="{% url faq %}">{% trans %}faq{% endtrans %}</a><span class="link-separator"> |</span> - <a href="{% url privacy %}">{% trans %}privacy policy{% endtrans %}</a><span class="link-separator"> |</span> - {% spaceless %} - <a href= - {% if settings.FEEDBACK_SITE_URL %} - "{{settings.FEEDBACK_SITE_URL}}" - target="_blank"> - {% else %} - "{% url feedback %}?next={{request.path}}"> - {% endif %} - {% trans %}give feedback{% endtrans %} - </a> - {% endspaceless %} - </p> - <p> - <a href="http://askbot.org" target="_blank"> - Powered by Askbot version {{settings.ASKBOT_VERSION}} - </a> - </p> - {% if settings.USE_LICENSE %}{# could be factored out into separate template #} - {% if settings.LICENSE_USE_URL %} - <p>{{settings.APP_COPYRIGHT}} {% trans - license_title=settings.LICENSE_TITLE, - license_url=settings.LICENSE_URL - %}Content on this site is licensed under a <a href="{{license_url}}">{{license_title}}</a> license.{% endtrans %}</p> - {% if settings.LICENSE_USE_LOGO %} - <a href="{{ settings.LICENSE_URL}}"> - <img - class="license-logo" - src="{{settings.LICENSE_LOGO_URL|media }}" - title="{{settings.LICENSE_ACRONYM}}" - alt="{{settings.LICENSE_ACRONYM}}" - /> - </a> - {% endif %} - {% else %} - <p>{{settings.APP_COPYRIGHT}} {% trans license=settings.LICENSE_TITLE %}Content on this site is licensed under a {{license}}{% endtrans %}</p> - {% if settings.LICENSE_USE_LOGO %} - <img - class="license-logo" - src="{{settings.LICENSE_LOGO_URL|media }}" - title="{{settings.LICENSE_ACRONYM}}" - alt="{{settings.LICENSE_ACRONYM}}" - /> - {% endif %} - {% endif %} - {% endif %} -</div> -<!-- end template footer.html --> diff --git a/askbot/skins/old/templates/blocks/forum_body.html b/askbot/skins/old/templates/blocks/forum_body.html deleted file mode 100644 index c36b48cd..00000000 --- a/askbot/skins/old/templates/blocks/forum_body.html +++ /dev/null @@ -1,14 +0,0 @@ -<div class="notify" style="display:none"> - {% if user_messages %} - {% for message in user_messages %} - <p class="darkred">{{ message }}</p> - {% endfor %} - {% endif %} - <a id="close-notify" onclick="notify.close(true)">×</a> -</div> -{% include "header.html" %} -{% block body %} -{% endblock %} -{% if settings.SHOW_FOOTER %} - {% include "footer.html" %} -{% endif %} diff --git a/askbot/skins/old/templates/blocks/header.html b/askbot/skins/old/templates/blocks/header.html deleted file mode 100644 index d7359007..00000000 --- a/askbot/skins/old/templates/blocks/header.html +++ /dev/null @@ -1,44 +0,0 @@ -<!-- template header.html --> -{% import "macros.html" as macros %} -<div id="ab-header"> - <div class="content-wrapper"> - {% if settings.SHOW_LOGO %} - <a id="ab-logo" href="{% url questions %}?start_over=true"><img - src="{{ settings.SITE_LOGO_URL|media }}" - title="{% trans %}back to home page{% endtrans %}" - alt="{% trans site=settings.APP_SHORT_NAME %}{{site}} logo{% endtrans %}"/></a> - {% endif %} - <div id="ab-meta-nav"> - {% include "blocks/header_meta_links.html" %} - {{settings.CUSTOM_HEADER}} - </div> - <div id="ab-main-nav"> - <a - id="nav_questions" - href="{% url questions %}" - {% if active_tab == 'questions' %}class="on"{% endif %} - >{% trans %}questions{% endtrans %}</a> - <a - id="nav_tags" - href="{% url tags %}" - {% if active_tab == 'tags' %}class="on"{% endif %} - >{% trans %}tags{% endtrans %}</a> - <a - id="nav_users" - href="{% url users %}" - {% if active_tab == 'users' %}class="on"{% endif %} - >{% trans %}users{% endtrans %}</a> - <a - id="nav_badges" - href="{% url badges %}" - {% if active_tab == 'badges' %}class="on"{% endif %} - >{% trans %}badges{% endtrans %}</a> - <a - id="nav_ask" - href="{% url ask %}" - class="{% if active_tab == 'ask' %}on{% else %}special{% endif %}" - >{% trans %}ask a question{% endtrans %}</a> - </div> - </div> -</div> -<!-- end template header.html --> diff --git a/askbot/skins/old/templates/blocks/header_meta_links.html b/askbot/skins/old/templates/blocks/header_meta_links.html deleted file mode 100644 index 83a5ed55..00000000 --- a/askbot/skins/old/templates/blocks/header_meta_links.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if request.user.is_authenticated() %} - <a href="{{ request.user.get_absolute_url() }}">{{ request.user.username }}</a> - <span class="user-info"> - {{ macros.inbox_link(request.user) }} - {{ macros.moderation_items_link(request.user, moderation_items) }} - ({{ macros.user_long_score_and_badge_summary(user) }}) - </span> - <a href="{{ settings.LOGOUT_URL }}?next={{ settings.LOGOUT_REDIRECT_URL }}">{% trans %}logout{% endtrans %}</a> -{% else %} - <a href="{{ settings.LOGIN_URL }}">{% trans %}login{% endtrans %}</a> -{% endif %} - <a href="{% url about %}">{% trans %}about{% endtrans %}</a> - <a href="{% url faq %}">{% trans %}faq{% endtrans %}</a> -{% if request.user.is_authenticated() and request.user.is_administrator() %} - <a href="{% url site_settings %}">{% trans %}settings{% endtrans %}</a> -{% endif %} diff --git a/askbot/skins/old/templates/blocks/input_bar.html b/askbot/skins/old/templates/blocks/input_bar.html deleted file mode 100644 index bed97eb4..00000000 --- a/askbot/skins/old/templates/blocks/input_bar.html +++ /dev/null @@ -1,47 +0,0 @@ -{% if active_tab != "ask" %} -{% spaceless %} -<div id="searchBar"> - {# url action depends on which tab is active #} - <form - {% if active_tab == "tags" %} - action="{% url tags %}" - {% elif active_tab == "users" %} - action="{% url users %}" - {% else %} - action="{% url questions %}" - {% endif %} - method="get"> - {# class was searchInput #} - <input - {% if query %} - class="searchInputCancelable" - {% else %} - class="searchInput" - {% endif %} - type="text" - autocomplete="off" - value="{{ query|default_if_none('') }}" - name="query" - id="keywords"/> - {% if query %}{# query is only defined by questions view #} - <input type="button" - value="x" - name="reset_query" - {# todo - make sure it works on Enter keypress #} - onclick="window.location.href='{% url questions %}?reset_query=true'" - class="cancelSearchBtn"/> - {% endif %} - <input type="submit" value="{% trans %}search{% endtrans %}" name="search" class="searchBtn" /> - {% if active_tab == "tags" %} - <input type="hidden" name="t" value="tag"/> - {% else %} - {% if active_tab == "users" %} - <input type="hidden" name="t" value="user"/> - {% endif %} - {% endif %} - </form> -</div> -{% endspaceless %} -{% else %} - {% include "blocks/ask_form.html" %} -{% endif %} diff --git a/askbot/skins/old/templates/blocks/mandatory_tags_js.html b/askbot/skins/old/templates/blocks/mandatory_tags_js.html deleted file mode 100644 index f04a6345..00000000 --- a/askbot/skins/old/templates/blocks/mandatory_tags_js.html +++ /dev/null @@ -1,25 +0,0 @@ -<script type="text/javascript"> - $(document).ready(function(){ - var fake_tag = new Tag(); - $('ul.tags .tag').each(function(idx, elem){ - var tag_input = $('input#id_tags'); - var callback = function(){ - var new_tag = fake_tag.decodeTagName($(elem).html()); - if (/\*$/.test(new_tag)){//strip the asterisk - new_tag = new_tag.substring(0, new_tag.length - 1); - } - if ($.trim(tag_input.val()) !== ''){ - var entered_tags = tag_input.val().split(/\s+/); - } else { - var entered_tags = []; - } - if ($.inArray(new_tag, entered_tags) === -1){ - entered_tags.push(new_tag); - tag_input.val(entered_tags.join(' ')); - tag_input.focus(); - } - }; - setupButtonEventHandlers($(elem), callback); - }); - }); -</script> diff --git a/askbot/skins/old/templates/blocks/paginator.html b/askbot/skins/old/templates/blocks/paginator.html deleted file mode 100644 index 9782407f..00000000 --- a/askbot/skins/old/templates/blocks/paginator.html +++ /dev/null @@ -1,4 +0,0 @@ -<!-- paginator.html --> -{% import "macros.html" as macros %} -{{ macros.paginator(paginator_context)}} -<!-- end paginator.html --> diff --git a/askbot/skins/old/templates/blocks/question_edit_tips.html b/askbot/skins/old/templates/blocks/question_edit_tips.html deleted file mode 100644 index 83c36840..00000000 --- a/askbot/skins/old/templates/blocks/question_edit_tips.html +++ /dev/null @@ -1,59 +0,0 @@ -<!-- question_edit_tips.html --> -<div class="boxC"> - <h2>{% trans %}question tips{% endtrans %}</h2> - <ul> - <li> <b>{% trans %}please ask a relevant question{% endtrans %}</b> - </li> - <li> - {% trans %}please try provide enough details{% endtrans %} - </li> - <li> - {% trans %}be clear and concise{% endtrans %} - </li> - </ul> - <p class='info-box-follow-up-links'> - <a href="{% url faq %}" target="_blank" title="{% trans %}see frequently asked questions{% endtrans %}">{% trans %}faq{% endtrans %} »</a> - </p> -</div> - -<div class="boxC"> - <h2>{% trans %}Markdown tips{% endtrans %}</h2> - <ul> - {% if settings.MARKDUP_CODE_FRIENDLY or settings.ENABLE_MATHJAX %} - <li> - {% trans %}*italic*{% endtrans %} - </li> - <li> - {% trans %}**bold**{% endtrans %} - </li> - {% else %} - <li> - {% trans %}*italic* or _italic_{% endtrans %} - </li> - <li> - {% trans %}**bold** or __bold__{% endtrans %} - </li> - {% endif %} - <li> - <b>{% trans %}link{% endtrans %}</b>:[{% trans %}text{% endtrans %}](http://url.com/ "{% trans %}title{% endtrans %}") - - </li> - - <li> - <b>{% trans %}image{% endtrans %}</b>:![alt {% trans %}text{% endtrans %}](/path/img.jpg "{% trans %}title{% endtrans %}") - - </li> - <li> - {% trans %}numbered list:{% endtrans %} - 1. Foo - 2. Bar - </li> - <li> - {% trans %}basic HTML tags are also supported{% endtrans %} - </li> - </ul> - <p class='info-box-follow-up-links'> - <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">{% trans %}learn more about Markdown{% endtrans %} »</a> - </p> -</div> -<!-- end question_edit_tips.html --> diff --git a/askbot/skins/old/templates/blocks/system_messages.html b/askbot/skins/old/templates/blocks/system_messages.html deleted file mode 100644 index 18ba03d7..00000000 --- a/askbot/skins/old/templates/blocks/system_messages.html +++ /dev/null @@ -1,8 +0,0 @@ -<div class="notify" style="display:none"> - {% if user_messages %} - {% for message in user_messages %} - <p class="darkred">{{ message }}</p> - {% endfor %} - {% endif %} - <a id="close-notify" onclick="notify.close(true)">×</a> -</div> diff --git a/askbot/skins/old/templates/blocks/tag_selector.html b/askbot/skins/old/templates/blocks/tag_selector.html deleted file mode 100644 index c3626be9..00000000 --- a/askbot/skins/old/templates/blocks/tag_selector.html +++ /dev/null @@ -1,46 +0,0 @@ -{# todo - maybe disable navigation from ignored tags here when "hide" is on - with js? #} -{% import "macros.html" as macros %} -<div id="tagSelector" class="boxC"> - <h2>{% trans %}Interesting tags{% endtrans %}</h2> - {{ - macros.tag_list_widget( - interesting_tag_names, - deletable = True, - css_class = 'interesting marked-tags' - ) - }} - {# todo - add this via js - "remove '%(tag_name)s' from the list of interesting tags"| - format(tag_name = tag_name) - #} - <div class="inputs"> - <input id="interestingTagInput" autocomplete="off" type="text"/> - <input id="interestingTagAdd" type="submit" value="{% trans %}Add{% endtrans %}"/> - </div> - <h2>{% trans %}Ignored tags{% endtrans %}</h2> - {{ - macros.tag_list_widget( - ignored_tag_names, - deletable = True, - css_class = 'ignored marked-tags' - ) - }} - {# todo: add this via javascript - "remove '%(tag_name)s' from the list of ignored tags"| - format(tag_name = tag_name) - #} - <div class="inputs"> - <input id="ignoredTagInput" autocomplete="off" type="text"/> - <input id="ignoredTagAdd" type="submit" value="{% trans %}Add{% endtrans%}"/> - </div> - <h3>{% trans %}Display tag filter{% endtrans%}</h3> - <div id="displayTagFilterControl"> - {{ - macros.radio_select( - name = "display_tag_filter_strategy", - value = request.user.display_tag_filter_strategy, - choices = tag_filter_strategy_choices - ) - }} - </div> -</div> diff --git a/askbot/skins/old/templates/close.html b/askbot/skins/old/templates/close.html deleted file mode 100644 index d8160865..00000000 --- a/askbot/skins/old/templates/close.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "one_column_body.html" %} -<!-- template close.html --> -{% block title %}{% spaceless %}{% trans %}Close question{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Close question{% endtrans %}</h1> - <p>{% trans %}Close the question{% endtrans %}: <a href="{{ question.get_absolute_url() }}"> - <strong>{{ question.get_question_title() }}</strong></a> - </p> - <form id="fmclose" action="{% url close question.id %}" method="post" >{% csrf_token %} - <p> - <strong>{% trans %}Reasons{% endtrans %}:</strong> - {{ form.reason }} - </p> - <p> - <input type="submit" value="{% trans %}OK to close{% endtrans %}" class="submit" /> - <input id="btBack" type="button" class="submit" value="{% trans %}Cancel{% endtrans %}" /> - </p> - </form> -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - $().ready(function(){ - $('#btBack').bind('click', function(){ history.back(); }); - }); - </script> -{% endblock %} -<!-- end template close.html --> diff --git a/askbot/skins/old/templates/faq.html b/askbot/skins/old/templates/faq.html deleted file mode 100644 index be25d2ee..00000000 --- a/askbot/skins/old/templates/faq.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- template faq.html --> -{% block title %}{% spaceless %}{% trans %}FAQ{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="content"> - {{forum_faq}} -</div> -{% endblock %} -<!-- end template faq.html --> diff --git a/askbot/skins/old/templates/faq_static.html b/askbot/skins/old/templates/faq_static.html deleted file mode 100644 index f1d34141..00000000 --- a/askbot/skins/old/templates/faq_static.html +++ /dev/null @@ -1,99 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- template faq.html --> -{% block title %}{% spaceless %}{% trans %}FAQ{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Frequently Asked Questions {% endtrans %}({% trans %}FAQ{% endtrans %})</h1> -<h2 class="first">{% trans %}What kinds of questions can I ask here?{% endtrans %}</h2> -<p>{% trans %}Most importanly - questions should be <strong>relevant</strong> to this community.{% endtrans %} -{% trans %}Before asking the question - please make sure to use search to see whether your question has alredy been answered.{% endtrans %} -</p> -<h2>{% trans %}What questions should I avoid asking?{% endtrans %}</h2> -<p>{% trans %}Please avoid asking questions that are not relevant to this community, too subjective and argumentative.{% endtrans %} -</p> -<h2>{% trans %}What should I avoid in my answers?{% endtrans %}</h2> -<p>{{ settings.APP_TITLE }} {% trans %}is a Q&A site, not a discussion group. Therefore - please avoid having discussions in your answers, comment facility allows some space for brief discussions.{% endtrans %}</p> -<h2>{% trans %}Who moderates this community?{% endtrans %}</h2> -<p>{% trans %}The short answer is: <strong>you</strong>.{% endtrans %} -{% trans %}This website is moderated by the users.{% endtrans %} -{% trans %}The reputation system allows users earn the authorization to perform a variety of moderation tasks.{% endtrans %} -</p> -<h2>{% trans %}How does reputation system work?{% endtrans %}</h2> -<p>{% trans %}Rep system summary{% endtrans %}</p> -<p>{% trans MAX_REP_GAIN_PER_USER_PER_DAY=settings.MAX_REP_GAIN_PER_USER_PER_DAY, REP_GAIN_FOR_RECEIVING_UPVOTE=settings.REP_GAIN_FOR_RECEIVING_UPVOTE, REP_LOSS_FOR_RECEIVING_DOWNVOTE=settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE|absolute_value %}For example, if you ask an interesting question or give a helpful answer, your input will be upvoted. On the other hand if the answer is misleading - it will be downvoted. Each vote in favor will generate <strong>{{REP_GAIN_FOR_RECEIVING_UPVOTE}}</strong> points, each vote against will subtract <strong>{{REP_LOSS_FOR_RECEIVING_DOWNVOTE}}</strong> points. There is a limit of <strong>{{MAX_REP_GAIN_PER_USER_PER_DAY}}</strong> points that can be accumulated for a question or answer per day. The table below explains reputation point requirements for each type of moderation task.{% endtrans %} -</p> - -<table cellspacing="3" cellpadding="3"> - <tr> - <th width="40px" style="text-align:right"></th> - <th width="300px"></th> - </tr> - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_VOTE_UP}}</strong></td> - <td>{% trans %}upvote{% endtrans %}</td> - </tr> - <!-- - <tr> - <td class="faq-rep-item"><strong>15</strong></td> - <td>{% trans %}use tags{% endtrans %}</td> - </tr> - --> - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_LEAVE_COMMENTS}}</strong></td> - <td>{% trans %}add comments{% endtrans %}</td> - </tr> - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_VOTE_DOWN}}</strong></td> - <td>{% trans %}downvote{% endtrans %}</td> - </tr><tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_ACCEPT_OWN_ANSWER}}</strong></td> - <td>{% trans %} accept own answer to own questions{% endtrans %}</td> - </tr> - </tr><tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_CLOSE_OWN_QUESTIONS}}</strong></td> - <td>{% trans %}open and close own questions{% endtrans %}</td> - </tr> - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_RETAG_OTHERS_QUESTIONS}}</strong></td> - <td>{% trans %}retag other's questions{% endtrans %}</td> - </tr> - {% if settings.WIKI_ON %} - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_EDIT_WIKI}}</strong></td> - <td>{% trans %}edit community wiki questions{% endtrans %}</td> - </tr> - {% endif %} - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_EDIT_OTHERS_POSTS}}</strong></td> - <td>{% trans %}"edit any answer{% endtrans %}</td> - </tr> - <tr> - <td class="faq-rep-item"><strong>{{settings.MIN_REP_TO_DELETE_OTHERS_COMMENTS}}</strong></td> - <td>{% trans %}"delete any comment{% endtrans %}</td> - </tr> -</table> -<a id='gravatar'></a><h2>{% trans %}what is gravatar{% endtrans %}</h2> -{% trans %}gravatar faq info{% endtrans %} -<h2>{% trans %}To register, do I need to create new password?{% endtrans %}</h2> -<p>{% trans %}No, you don't have to. You can login through any service that supports OpenID, e.g. Google, Yahoo, AOL, etc."{% endtrans %} -<strong><a href="{{ settings.LOGIN_URL }}">{% trans %}"Login now!"{% endtrans %}</a> »</strong> -</p> -<h2>{% trans %}Why other people can edit my questions/answers?{% endtrans %}</h2> -<p> {% trans %}Goal of this site is...{% endtrans %} {% trans %}So questions and answers can be edited like wiki pages by experienced users of this site and this improves the overall quality of the knowledge base content.{% endtrans %} -{% trans %}If this approach is not for you, we respect your choice.{% endtrans %} -</p> -<h2>{% trans %}Still have questions?{% endtrans %}</h2> -<p>{% trans %}Please ask your question at {{ask_question_url}}, help make our community better!{% endtrans %} -</p> -</div> -<script type="text/javascript"> - //highlihts section if url has matching #anchor_name - $(document).ready(function (){ - var hash = window.location.hash; - if (hash.length > 1){ - $(hash).parent().addClass('highlight'); - window.location.hash = hash; - } - }) -</script> -{% endblock %} -<!-- end template faq.html --> diff --git a/askbot/skins/old/templates/feedback.html b/askbot/skins/old/templates/feedback.html deleted file mode 100644 index d5e8b3a7..00000000 --- a/askbot/skins/old/templates/feedback.html +++ /dev/null @@ -1,46 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- template feedback.html --> -{% block title %}{% spaceless %}{% trans %}Feedback{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Give us your feedback!{% endtrans %}</h1> -<form method="post" action="{% url feedback %}" accept-charset="utf-8">{% csrf_token %} - {% if user.is_authenticated() %} - <p class="message"> - {% trans user_name=user.username %} - <span class='big strong'>Dear {{user_name}}</span>, we look forward to hearing your feedback. - Please type and send us your message below. - {% endtrans %} - <p> - {% else %} - <p class="message"> - {% trans %} - <span class='big strong'>Dear visitor</span>, we look forward to hearing your feedback. - Please type and send us your message below. - {% endtrans %} - </p> - <div class="form-row"><label>{{form.name.label}}</label><br/>{{form.name}}</div> - <div class="form-row"> - <label>{{form.email.label}} - {% if form.errors.email %} - <span class='error'>{% trans %}(please enter a valid email){% endtrans %}</span> - {% endif %} - </label><br/>{{form.email}} - </div> - {% endif %} - <div class="form-row"> - <label>{{form.message.label}} - {% if form.errors.message %} - <span class="error">{% trans %}(this field is required){% endtrans %}</span> - </label> - {% endif %} - <br/> - {{form.message}} - </div> - {{form.next}} - <div class="submit-row"> - <input type="submit" class="submit" value="{% trans %}Send Feedback{% endtrans %}"/> - <input type="submit" class="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}"/> - </div> -</form> -{% endblock %} -<!-- end template feedback.html --> diff --git a/askbot/skins/old/templates/feedback_email.txt b/askbot/skins/old/templates/feedback_email.txt deleted file mode 100644 index a729066a..00000000 --- a/askbot/skins/old/templates/feedback_email.txt +++ /dev/null @@ -1,13 +0,0 @@ -{% spaceless %} -{% trans site_title = settings.APP_SHORT_NAME|safe %} -Hello, this is a {{site_title}} forum feedback message. -{% endtrans %} -{% endspaceless %} -{% if user.is_authenticated() -%} - {{user.username|safe}} ({{user.email|safe}}, ip:{{request.META.REMOTE_ADDR}}) -{%- else %} - {%- if name %}{{name|safe}} {% else %}{% trans %}Anonymous{% endtrans %} {% endif -%} - ({%- if email %}, {% endif -%}ip:{{request.META.REMOTE_ADDR}}) -{%- endif %} wrote: - -{{message|safe}} diff --git a/askbot/skins/old/templates/import_data.html b/askbot/skins/old/templates/import_data.html deleted file mode 100644 index affeaa73..00000000 --- a/askbot/skins/old/templates/import_data.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends "two_column_body.html" %} -{% block title %}{% trans %}Import StackExchange data{% endtrans %}{% endblock %} -{% block content %} - <h1>{% trans %}Import StackExchange data{% endtrans %}</h1> - {% if need_configuration %} - <p><em>Note:</em> to import stackexchange data, first add - <code>'askbot.importers.stackexchange',</code> - to the <code>INSTALLED_APPS</code> setting in your <code>settings.py</code> - file, then run <code>python manage.py syncdb</code>, and restart the application. - After that, pleale return to here and try again. - </p> - {% else %} - <p class="message">{% trans %}<em>Warning:</em> if your database is not empty, please back it up - before attempting this operation.{% endtrans %} - </p> - <p>{% trans %}Upload your stackexchange dump .zip file, then wait until - the data import completes. This process may take several minutes. - Please note that feedback will be printed in plain text. - {% endtrans %} - </p> - <form id="load-dump-form" method="post" enctype="multipart/form-data">{% csrf_token %} - <table> - {{dump_upload_form.as_table()}} - </table> - <input type="submit" value="{% trans %}Import data{% endtrans %}" /> - </form> - <p>{% trans %}In the case you experience any difficulties in using this import tool, - please try importing your data via command line: <code>python manage.py load_stackexchange path/to/your-data.zip</code>{% endtrans %} - </p> - {% endif %} -{% endblock %} diff --git a/askbot/skins/old/templates/instant_notification.html b/askbot/skins/old/templates/instant_notification.html deleted file mode 100644 index 92799a96..00000000 --- a/askbot/skins/old/templates/instant_notification.html +++ /dev/null @@ -1,42 +0,0 @@ -{% trans %}<p>Dear {{receiving_user_name}},</p>{% endtrans %} - {% if update_type == 'question_comment' %} -{% trans %} -<p>{{update_author_name}} left a <a href="{{post_url}}">new comment</a>:</p> -{% endtrans %} - {% endif %} - {% if update_type == 'answer_comment' %} -{% trans %} -<p>{{update_author_name}} left a <a href="{{post_url}}">new comment</a></p> -{% endtrans %} - {% endif %} - {% if update_type == 'new_answer' %} -{% trans %} -<p>{{update_author_name}} answered a question -<a href="{{post_url}}">{{origin_post_title}}</a></p> -{% endtrans %} - {% endif %} - {% if update_type == 'new_question' %} -{% trans %} -<p>{{update_author_name}} posted a new question -<a href="{{post_url}}">{{origin_post_title}}</a></p> -{% endtrans %} - {% endif %} - {%if update_type == 'answer_update' %} -{% trans %} -<p>{{update_author_name}} updated an answer to the question -<a href="{{post_url}}">{{origin_post_title}}</a></p> -{% endtrans %} - {% endif %} - {% if update_type == 'question_update' %} -{% trans %} -<p>{{update_author_name}} updated a question -<a href="{{post_url}}">{{origin_post_title}}</a></p> -{% endtrans %} - {% endif %} -<p></p> -{% trans %} -<div>{{content_preview}}</div> -<p>Please note - you can easily <a href="{{user_subscriptions_url}}">change</a> -how often you receive these notifications or unsubscribe. Thank you for your interest in our forum!</p> -{% endtrans %} -{% trans %}<p>Sincerely,<br/>Forum Administrator</p>{% endtrans %} diff --git a/askbot/skins/old/templates/macros.html b/askbot/skins/old/templates/macros.html deleted file mode 100644 index 282e6987..00000000 --- a/askbot/skins/old/templates/macros.html +++ /dev/null @@ -1,757 +0,0 @@ -{%- macro user_score_and_badge_summary(user) -%} - <span class="reputation-score" - title="{{user.get_karma_summary}}" - >{{user.reputation}}</span> - {% if user.gold or user.silver or user.bronze %} - <span title="{{user.get_badge_summary}}"> - {% if user.gold %} - <span class='badge1'>●</span> - <span class="badgecount">{{user.gold}}</span> - {% endif %} - {% if user.silver %} - <span class='badge2'>●</span> - <span class="badgecount">{{user.silver}}</span> - {% endif %} - {% if user.bronze %} - <span class='badge3'>●</span> - <span class="badgecount">{{user.bronze}}</span> - {% endif %} - </span> - {% endif %} -{%- endmacro -%} - -{%- macro share(site = None, site_label = None, icon = False) -%} - <a class="{{ site }}-share{% if icon == True %} icon{% endif %}" - title="{% trans %}Share this question on {{site}}{% endtrans %}" - >{% if icon == False %}{% if site_label %}{{ site_label }}{% else %}{{ site }}{% endif %}{% endif %}</a> -{%- endmacro -%} - -{%- macro follow_toggle(follow, name, alias, id) -%} - {# follow - boolean; name - object type name; alias - e.g. users name; id - object id #} - <div - class="follow-toggle" - id="follow-{{ name }}-{{ id }}" - > - {% if follow %} - <div class="follow">{% trans %}follow {{alias}}{% endtrans %}</div> - {% else %} - <div class="unfollow"> - <div class="unfollow-red">{% trans %}unfollow {{alias}}{% endtrans %}</div> - <div class="unfollow-green">{% trans %}following {{alias}}{% endtrans %}</div> - </div> - {% endif %} - </div> -{%- endmacro -%} - -{%- macro follow_user_toggle(visitor = None, subject = None) -%} - {% if visitor.is_anonymous() %} - {{ follow_toggle(True, 'user', subject.username, subject.id) }} - {% else %} - {% if visitor != subject %} - {% if visitor.is_following(subject) %} - {{ follow_toggle(False, 'user', subject.username, subject.id) }} - {% else %} - {{ follow_toggle(True, 'user', subject.username, subject.id) }} - {% endif %} - {% endif %} - {% endif %} -{%- endmacro -%} - -{%- macro user_long_score_and_badge_summary(user) -%} - <a class="user-micro-info" - href="{{user.get_absolute_url()}}?sort=reputation" - >{% trans %}karma:{% endtrans %} {{user.reputation}}</a> - {%- if user.gold or user.silver or user.bronze %} - <a class="user-micro-info" - href="{{user.get_absolute_url()}}#badges" - ><span title="{{user.get_badge_summary}}">{% trans %}badges:{% endtrans %} - {% if user.gold %} - <span class='badge1'>●</span> - <span class="badgecount">{{user.gold}}</span> - {% endif %} - {% if user.silver %} - <span class='badge2'>●</span> - <span class="badgecount">{{user.silver}}</span> - {% endif %} - {% if user.bronze %} - <span class='badge3'>●</span> - <span class="badgecount">{{user.bronze}}</span> - {%- endif -%} - </span></a> - {%- endif -%} -{%- endmacro -%} - -{%- macro user_country_flag(user) -%} - {% if user.country and user.show_country %} - <img class="flag" - src="{{ ('/images/flags/' ~ user.country.code|lower ~ '.gif')|media }}" - alt="{% trans - country=user.country.name - %}flag of {{country}}{% - endtrans %}" - title="{% trans - country=user.country.name, - person=user.username %}{{person}} is from {{country}}{% - endtrans %}" - /> - {% endif %} -{%- endmacro -%} - -{%- macro user_country_name_and_flag(user) -%} - {% if user.country and user.show_country %} - {{ user.country.name }} - {{ user_country_flag(user) }} - {% endif %} -{%- endmacro -%} - -{%- macro user_full_location(user) -%} - {% if user.location %} - {{ user.location }}, - {% endif %} - {{ user_country_name_and_flag(user) }} -{%- endmacro -%} - -{%- macro user_list(users, profile_section = None) -%} -<div class="userList"> - <table class="list-table"> - <tr> - <td class="list-td"> - {% for user in users %} - <div class="user"> - <ul> - <li class="thumb">{{ gravatar(user, 32) }}</li> - <li><a href="{% url user_profile user.id, user.username|slugify %}{% if profile_section %}?sort={{profile_section}}{% endif %}">{{user.username}}</a>{{ user_country_flag(user) }}</li> - <li>{{ user_score_and_badge_summary(user) }}</li> - </ul> - </div> - {% if loop.index is divisibleby 7 %} - </td> - <td> - {% endif %} - {% endfor %} - </td> - </tr> - </table> -</div> -{%- endmacro -%} - -{%- macro paginator(p, position='left') -%}{# p is paginator context dictionary #} -{% spaceless %} - {% if p.is_paginated %} - <div class="paginator" style="float:{{position}}"> - {% if p.has_previous %} - <span class="prev"><a href="{{p.base_url}}page={{ p.previous }}{{ p.extend_url }}" title="{% trans %}previous{% endtrans %}"> - « {% trans %}previous{% endtrans %}</a></span> - {% endif %} - {% if not p.in_leading_range %} - {% for num in p.pages_outside_trailing_range %} - <span class="page"><a href="{{p.base_url}}page={{ num }}{{ p.extend_url }}" >{{ num }}</a></span> - {% endfor %} - ... - {% endif %} - - {% for num in p.page_numbers %} - {% if num == p.page and p.pages != 1%} - <span class="curr" title="{% trans %}current page{% endtrans %}">{{ num }}</span> - {% else %} - <span class="page"><a href="{{p.base_url}}page={{ num }}{{ p.extend_url }}" title="{% trans %}page number {{num}}{% endtrans %}">{{ num }}</a></span> - {% endif %} - {% endfor %} - - {% if not p.in_trailing_range %} - ... - {% for num in p.pages_outside_leading_range|reverse %} - <span class="page"><a href="{{p.base_url}}page={{ num }}{{ p.extend_url }}" title="{% trans %}page number {{ num }}{% endtrans %}">{{ num }}</a></span> - {% endfor %} - {% endif %} - {% if p.has_next %} - <span class="next"><a href="{{p.base_url}}page={{ p.next }}{{ p.extend_url }}" title="{% trans %}next page{% endtrans %}">{% trans %}next page{% endtrans %} »</a></span> - {% endif %} - </div> - {% endif %} -{% endspaceless %} -{%- endmacro -%} - -{%- macro pagesize_switch(p, position='left') -%}{# p is paginator context #} -{% spaceless %} -{% if p.is_paginated %} - <div class="paginator" style="float:{{position}}"> - <span class="text">{% trans %}posts per page{% endtrans %}</span> - {% if p.page_size == 10 %} - <span class="curr">10</span> - {% else %} - <span class="page"><a href="{{p.base_url}}page_size=10">10</a></span> - {% endif %} - - {% if p.page_size == 30 %} - <span class="curr">30</span> - {% else %} - <span class="page"><a href="{{p.base_url}}page_size=30">30</a></span> - {% endif %} - - {% if p.page_size == 50 %} - <span class="curr">50</span> - {% else %} - <span class="page"><a href="{{p.base_url}}page_size=50">50</a></span> - {% endif %} - </div> -{% endif %} -{% endspaceless %} -{%- endmacro -%} - -{#todo: rename this to avatar #} -{%- macro gravatar(user, size) -%} -{% spaceless %} -<a style="text-decoration:none" - href="{{ user.get_absolute_url() }}" -><img class="gravatar" - width="{{size}}" height="{{size}}" - src="{{ user.get_avatar_url(size) }}" - title="{{user.username}}" - alt="{% trans username=user.username %}{{username}} gravatar image{% endtrans %}" -/></a> -{% endspaceless %} -{%- endmacro -%} - -{%- macro user_website_link(user, max_display_length=25) -%} - {% if user.website %} - <a - href="{{user.website}}" - title="{% trans username=user.username|escape, url=user.website %}{{username}}'s website is {{url}}{% endtrans %}" - {% if user.can_have_strong_url() == False %} - rel="nofollow" - {% endif %} - > - {{user.website|truncate(length=max_display_length, killwords=True, end='...')}} - </a> - {% endif %} -{%- endmacro -%} - -{%- macro post_contributor_avatar_and_credentials(post, user) -%} - {% if post.is_anonymous %} - <img alt="{% trans %}anonymous user{% endtrans %}" src="{{ '/images/anon.png'|media }} " class="gravatar" width="32" height="32" /> - <p>{{ user.get_anonymous_name() }}</p> - {% else %} - {{ gravatar(user, 32) }} - {{ user.get_profile_link()}}{{ user_country_flag(user) }}<br/> - {{ user_score_and_badge_summary(user) }}<br/> - {{ user_website_link(user) }} - {% endif %} -{%- endmacro -%} - -{%- macro post_contributor_info(post, contributor_type, is_wiki, wiki_min_rep) -%} -{# there is a whole bunch of trickery here, probably indicative of -poor design of the data or methods on data objects #} -{% if contributor_type=="original_author" %} - <div class='post-update-info'> - {% if is_wiki %} - <p> - {%- if post.post_type == 'question' -%} - {%- trans %}asked{% endtrans %} - {% elif post.post_type == 'answer' %} - {%- trans %}answered{% endtrans %} - {% else %} - {%- trans %}posted{% endtrans %} - {% endif %} - <strong>{{post.added_at|diff_date}}</strong> - </p> - <img - src="{{'/images/wiki.png'|media}}" - alt="{% trans %}this post is marked as community wiki{% endtrans %}" - style="float:left" - /> - <p class="tip">{% trans %}This post is a wiki. - Anyone with karma >{{wiki_min_rep}} is welcome to improve it.{% endtrans %}</p> - {% else %} - <p style="line-height:12px;"> - {# todo: access to class names needs to be removed here #} - {% if post.post_type == 'question' %} - {% trans %}asked{% endtrans %} - {% elif post.post_type == 'answer' %} - {% trans %}answered{% endtrans %} - {% else %} - {% trans %}posted{% endtrans %} - {% endif %} - {% if post.__class__.__name__ in ('QuestionRevision', 'AnswerRevision') %} - <strong>{{post.revised_at|diff_date}}</strong> - {% else %} - <strong>{{post.added_at|diff_date}}</strong> - {% endif %} - </p> - {{ post_contributor_avatar_and_credentials(post, post.author) }} - {% endif %} - </div> -{% elif contributor_type=="last_updater" %} - {% if post.post_type in ('Question', 'Answer') %} - {% set last_edited_at = post.last_edited_at %} - {% set original_author = post.author %} - {% set update_author = post.last_edited_by %} - {% elif post.post_type in ('QuestionRevision', 'AnswerRevision') %} - {% set last_edited_at = post.revised_at %} - {% set original_author = None %}{# fake value to force display widget in the revision views #} - {% set update_author = post.author %} - {% endif %} - {% if last_edited_at %} - <div class='post-update-info'> - <p style="line-height:12px;"> - <a - {% if post.post_type == 'Question' %} - href="{% url question_revisions post.id %}" - {% else %} - href="{% url answer_revisions post.id %}" - {% endif %} - >{% trans %}updated{% endtrans %} <strong>{{ last_edited_at|diff_date }}</strong></a> - </p> - {% if original_author != update_author or is_wiki %} - {{ post_contributor_avatar_and_credentials(post, update_author) }} - {% endif %} - </div> - {% endif %} -{% endif %} -{%- endmacro -%} - -{%- macro if_else(condition, if_true, if_false) -%} - {%- if condition == True -%} - {{if_true}} - {%- else -%} - {{if_false}} - {%- endif -%} -{%- endmacro -%} - -{%- macro tag_cloud(tags = None, font_sizes = None) -%} - {% for tag in tags %} - <span class="tag-size-{{ font_sizes[tag.name] }}"> - <a class="link-typeA" title="Number of entries: {{ tag.used_count }}" href="{% url questions %}?tags={{ tag.name }}">{{ tag.name }}</a> - </span> - {% endfor %} -{%- endmacro -%} - -{%- macro tag_list_widget( - tags, - id = None, - deletable = False, - make_links = True, - url_params = None, - css_class = None - ) --%} -<ul {% if id %}id="{{ id }}"{% endif %} - class="tags{% if css_class %} {{css_class}}{% endif %}" -> - {% if tags %} - {% for tag in tags %} - {{ tag_widget( - tag, - deletable = deletable, - is_link = make_links, - url_params = url_params, - html_tag = 'li' - )}} - {% endfor %} - {% endif %} -</ul> -{%- endmacro -%} - -{# todo: remove the extra content argument to make its usage more explicit #} -{%- macro tag_widget( - tag, - deletable = False, - is_link = True, - delete_link_title = None, - css_class = None, - url_params = None, - html_tag = 'div', - extra_content = '' - ) --%} - {% spaceless %} - <{{ html_tag }} class="tag-left{% if deletable %} deletable-tag{% endif %}"> - <{% if not is_link or tag[-1] == '*' %}span{% else %}a{% endif %} - class="tag tag-right{% if css_class %} {{ css_class }}{% endif %}" - {% if is_link %} - href="{% url questions %}?tags={{tag|urlencode}}{{ - if_else( - url_params != None, - '&' ~ url_params, - '' - )|escape - }}" - title="{% trans %}see questions tagged '{{ tag }}'{% endtrans %}" - {% endif %} - rel="tag" - >{{ tag|replace('*', '✽') }}</{% if not is_link or tag[-1] == '*' %}span{% else %}a{% endif %}> - {% if deletable %} - <span class="delete-icon" - {% if delete_link_title %} - title="{{ delete_link_title }}" - {% endif %} - ></span> - {% endif %} - </{{ html_tag }}> - {{ extra_content }} - {% endspaceless %} -{%- endmacro -%} - -{%- macro radio_select(name = None, value = None, choices = None) -%} - {% for choice in choices %} - <p class="choice"> - {% set id = "id_" ~ name ~ "_" ~ choice[0] %} - <input - id="{{ id }}" - name="{{ name }}" - value="{{ choice[0] }}" - type="radio" - {% if value == choice[0] %} - checked="checked" - {% endif %} - /> - <label for="{{ id }}">{{ choice[1] }}</label> - </p> - {% endfor %} -{%- endmacro -%} - -{%- macro question_summary(question, extra_class=None) -%} - <div class="short-summary{% if extra_class %} {{extra_class}}{% endif %}"> - <div class="counts"> - <div class="views - {% if question.thread.view_count == 0 -%} - no-views - {% else -%} - some-views - {%- endif -%}"> - <span class="item-count">{{question.thread.view_count|humanize_counter}}</span> - <div> - {% trans cnt=question.thread.view_count %}view{% pluralize %}views{% endtrans %} - </div> - </div> - <div class="answers - {% if question.thread.answer_count == 0 -%} - no-answers - {% else -%} - {%- if question.thread.accepted_answer -%} - accepted - {%- else -%} - some-answers - {%- endif -%} - {%- endif -%}"> - <span - class="item-count" - >{{question.thread.answer_count|humanize_counter}}{% if question.thread.accepted_answer %}✓{% endif %}</span> - <div> - {% trans cnt=question.thread.answer_count %}answer{% pluralize %}answers{% endtrans %} - </div> - </div> - <div class="votes - {% if question.score == 0 -%} - no-votes - {% else -%} - some-votes - {%- endif -%}"> - <span class="item-count">{{question.score|humanize_counter}}</span> - <div> - {% trans cnt=question.score %}vote{% pluralize %}votes{% endtrans %} - </div> - </div> - - <div style="clear:both"></div> - <div class="userinfo"> - <span class="relativetime" title="{{question.last_activity_at}}">{{ question.last_activity_at|diff_date }}</span> - {% if question.is_anonymous %} - <span class="anonymous">{{ question.last_activity_by.get_anonymous_name() }}</span> - {% else %} - <a href="{% url user_profile question.last_activity_by.id, question.last_activity_by.username|slugify %}" >{{question.last_activity_by.username}}</a>{{ user_country_flag(question.last_activity_by) }} - {#{user_score_and_badge_summary(question.last_activity_by)}#} - {% endif %} - </div> - </div> - <h2><a href="{{ question.get_absolute_url() }}" onmouseover="load_question_body(this, {{question.id}})">{{question.get_question_title()|escape}}</a></h2> - {{ tag_list_widget(question.get_tag_names()) }} - </div> -{%- endmacro -%} - -{%- macro comment_votes(comment = None) -%} - <div class="comment-votes"> - {% if comment.score > 0 %} - <div class="upvote{% if comment.upvoted_by_user %} upvoted{% endif %}">{{comment.score}}</div> - {% else %} - <div class="upvote"></div> - {% endif %} - </div> -{%- endmacro -%} - -{# Warning! Any changes to the comment markup here must be duplicated in post.js -for the purposes of the AJAX comment editor #} - -{%- macro comment_list(comments = None, user = None) -%} - {% for comment in comments %} - <div class="comment" id="comment-{{comment.id}}"> - {{ comment_votes(comment = comment) }} - <div class="comment-delete"> - {% if user|can_delete_comment(comment) %} - <span class="delete-icon" title="{% trans %}delete this comment{% endtrans %}"></span> - {% endif %} - </div> - <div class="comment-body"> - {{comment.html}} - <a - class="author" - href="{{comment.user.get_profile_url()}}" - >{{comment.user.username}}</a> - <span class="age"> ({{comment.added_at|diff_date}})</span> - {% if user|can_edit_comment(comment) %} - <a class="edit">{% trans %}edit{% endtrans %}</a> - {% endif %} - </div> - </div> - {% endfor %} -{%- endmacro -%} - -{%- macro add_or_show_comments_button(post = None, can_post = None, max_comments = None, widget_id = None) -%} - <script type="text/javascript"> - askbot['data']['{{widget_id}}'] = { - can_post: {% if can_post %}true{% else %}false{% endif %}, - truncated: {% if post.comment_count > max_comments %}true{% else %}false{% endif %} - }; - </script> - {% if post.comment_count > max_comments %} - {% set remaining_comments = post.comment_count - max_comments %} - <a class="button"> - {% if can_post %} - {% trans %}add comment{% endtrans %} / - {% trans counter=remaining_comments %}see <strong>{{counter}}</strong> more{% pluralize %}see <strong>{{counter}}</strong> more{% endtrans %} - {% else %} - {% trans counter=remaining_comments %}see <strong>{{counter}}</strong> more comment{% pluralize %}see <strong>{{counter}}</strong> more comments - {% endtrans %} - {% endif %} - </a> - {% elif can_post %} - <a class="button">{% trans %}add comment{% endtrans %}</a> - {% endif %} -{%- endmacro -%} - -{%- macro post_comments_widget(post=None, show_post = None, show_comment = None, comment_order_number = None, user=None, max_comments=None) -%} - {% spaceless %} - {% set widget_id = 'comments-for-' + post.post_type + '-' + post.id|string %} - <div class="comments" id="{{widget_id}}"> - <div class="content"> - {% if show_post == post and show_comment %} - {% if comment_order_number > max_comments %} - {% set comments = post.get_comments(visitor = user)[:comment_order_number] %} - {{ comment_list(comments = comments, user = user) }} - {% else %} - {% set comments = post.get_comments(visitor = user)[:max_comments] %} - {{ comment_list(comments = comments, user = user) }} - {% endif %} - {% else %} - {% set comments = post.get_comments(visitor = user)[:max_comments] %} - {{ comment_list(comments = comments, user = user) }} - {% endif %} - </div> - <div class="controls"> - {% set can_post = user|can_post_comment(post) %} - {% if show_post == post and show_comment %} - {% if comment_order_number > max_comments %} - {{ - add_or_show_comments_button( - post = post, - can_post = can_post, - max_comments = comment_order_number, - widget_id = widget_id - ) - }} - {% else %} - {{ - add_or_show_comments_button( - post = post, - can_post = can_post, - max_comments = max_comments, - widget_id = widget_id - ) - }} - {% endif %} - {% else %} - {{ - add_or_show_comments_button( - post = post, - can_post = can_post, - max_comments = max_comments, - widget_id = widget_id - ) - }} - {% endif %} - </div> - </div> - {% endspaceless %} -{%- endmacro -%} - -{%- macro reversible_sort_button(button_sort_criterium=None, asc_tooltip=None, - desc_tooltip=None, label=None, current_sort_method=None) -%} -{# - sort button where descending sort is default - and the search method is togglable between ascending and descending - buttons are rendered as links with id constructed as - "by_" + button_sort_criterium - class "on" is added when current_sort_method is one of - button_sort_criterium + "asc" or "desc" -#} - {% set key_name = button_sort_criterium %} - {% set sort = current_sort_method %} - {% if sort == key_name + "-asc" %}{# "worst" first #} - <a id="by_{{key_name}}" - href="?sort={{key_name}}-desc" - class="rev on" - title="{{desc_tooltip}}"><span>{{label}} ▲</span></a> - {% elif sort == key_name + "-desc" %}{# "best first" #} - <a id="by_{{key_name}}" - href="?sort={{key_name}}-asc" - class="rev on" - title="{{asc_tooltip}}"><span>{{label}} ▼</span></a> - {% else %}{# default, when other button is active #} - <a id="by_{{key_name}}" - href="?sort={{key_name}}-desc" - class="off" - title="{{desc_tooltip}}"><span>{{label}}</span></a> - {% endif %} - <script type="text/javascript">{# need to pass on text translations to js #} - var sortButtonData = sortButtonData || {}; - sortButtonData["{{key_name}}"] = { - label: "{{label}}", - asc_tooltip: "{{asc_tooltip}}", - desc_tooltip: "{{desc_tooltip}}" - }; - </script> -{%- endmacro %} - -{%- macro checkbox_in_div(checkbox_field, class = 'checkbox') -%} - <div{% if class %} class="{{class}}"{% endif %} - title="{{checkbox_field.help_text}}"> - {{ checkbox_field }} - {{ checkbox_field.label_tag() }} - {{ checkbox_field.errors }} - </div> -{%- endmacro -%} - -{%- macro edit_post( - post_form, - post_type = None, - mandatory_tags = None, - edit_title = False - ) --%} - {% if edit_title %} - <div class="form-item"> - <label for="id_title" ><strong>{{ post_form.title.label_tag() }}:</strong></label> <span class="form-error"></span><br/> - {{ post_form.title }} {{ post_form.title.errors }} - <div class="title-desc"> - {{ post_form.title.help_text }} - </div> - </div> - {% endif %} - <div id="wmd-button-bar" class="wmd-panel"></div> - <div class="form-item"> - {{ post_form.text }}{# this element is resizable and will be wrapped by js #} - <label for="editor" class="form-error">{{ post_form.text.errors }}</label> - </div> - {# need label element for resizable input, b/c form validation won't find span #} - {% if post_type == 'question' %} - <div class="form-item"> - {% if mandatory_tags %} - <label for="id_tags"> - <strong>{% trans %}tags{% endtrans %},</strong> - {% trans %}one of these is required{% endtrans %} - </label> - {{ - tag_list_widget( - mandatory_tags, - make_links = False, - css_class = 'clearfix' - ) - }} - {% else %} - <label for="id_tags"> - <strong>{% trans %}tags{% endtrans %}:</strong> - {% trans %}(required){% endtrans %} - </label> - {% endif %} - <span class="form-error">{{ post_form.tags.errors }}</span><br/> - {{ post_form.tags }} - <div class="title-desc"> - {{ post_form.tags.help_text }} - </div> - </div> - {% endif %} - {% if 'summary' in post_form['fields'] %} - <div class="form-item"> - <strong>{{ post_form.summary.label_tag() }}</strong> <br/> - {{ post_form.summary }} - <div class="title-desc"> - {{ post_form.summary.help_text }} - </div> - <div class="form-error" >{{ post_form.summary.errors }}</div> - </div> - {% endif %} - <div class="preview-toggle"> - <span - id="pre-collapse" - title="{% trans %}Toggle the real time Markdown editor preview{% endtrans %}" - > - [{% trans %}hide preview{% endtrans %}] - </span> - </div> - <div id="previewer" class="wmd-preview"></div> -{%- endmacro -%} - -{%- macro inbox_link(user) -%} - {% if user.new_response_count > 0 or user.seen_response_count > 0 %} - <a id='ab-responses' href="{{user.get_absolute_url()}}?sort=inbox§ion=forum"> - <img - alt="{% trans username=user.username %}responses for {{username}}{% endtrans %}" - {% if user.new_response_count > 0 %} - src="{{ "/images/mail-envelope-full.png"|media }}" - title="{% trans response_count=user.new_response_count %}you have a new response{% pluralize %}you have {{response_count}} new responses{% endtrans %}" - {% elif user.seen_response_count > 0 %} - src="{{ "/images/mail-envelope-empty.png"|media }}" - title="{% trans %}no new responses yet{% endtrans %}" - {% endif %} - /> - </a> - {% endif %} -{%- endmacro -%} - -{%- macro moderation_items_link(user, moderation_items) -%} - {% if moderation_items %} - <a id="ab-responses" - href="{{user.get_absolute_url()}}?sort=inbox§ion=flags" - > - {% if moderation_items['new_count'] > 0 %} - <img src="{{'/images/dialog-warning.png'|media}}" - {% if moderation_items['seen_count'] > 0 %} - alt="{% trans new=moderation_items['new_count'], seen=moderation_items['seen_count']%}{{new}} new flagged posts and {{seen}} previous{% endtrans %}" - title="{% trans new=moderation_items['new_count'], seen=moderation_items['seen_count']%}{{new}} new flagged posts and {{seen}} previous{% endtrans %}" - {% else %} - alt="{% trans new=moderation_items['new_count'] %}{{new}} new flagged posts{% endtrans %}" - title="{% trans new=moderation_items['new_count'] %}{{new}} new flagged posts{% endtrans %}" - {% endif %} - /> - {% elif moderation_items['seen_count'] > 0 %} - <img src={{'/images/dialog-warning-off.png'|media}} - alt="{% trans seen=moderation_items['seen_count'] %}{{seen}} flagged posts{% endtrans %}" - title="{% trans seen=moderation_items['seen_count'] %}{{seen}} flagged posts{% endtrans %}" - /> - {% endif %} - </a> - {% endif %} -{%- endmacro -%} - -{%- macro tag_autocomplete_js(id = '#id_tags') -%} - var tagAc = new AutoCompleter({ - url: '{% url "get_tag_list" %}', - preloadData: true, - minChars: 1, - useCache: true, - matchInside: true, - maxCacheLength: 100, - delay: 10 - }); - tagAc.decorate($("{{ id }}")); -{%- endmacro -%} diff --git a/askbot/skins/old/templates/main_page.html b/askbot/skins/old/templates/main_page.html deleted file mode 100644 index d0cddc68..00000000 --- a/askbot/skins/old/templates/main_page.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "two_column_body.html" %} -{# - this template is split into several - blocks that are included here - the blocks are within directory templates/main_page - relative to the skin directory - - there is no html markup in this file -#} -<!-- questions.html --> -{% block title %}{% spaceless %}{% trans %}Questions{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} - {% include "main_page/tab_bar.html" %} - {% include "main_page/headline.html" %} - {% include "main_page/content.html" %} - {% include "main_page/paginator.html" %} -{% endblock %} -{% block sidebar %} - {% include "main_page/sidebar.html" %} -{% endblock %} -{% block endjs %} - {% include "main_page/javascript.html" %} -{% endblock %} -<!-- end questions.html --> diff --git a/askbot/skins/old/templates/main_page/content.html b/askbot/skins/old/templates/main_page/content.html deleted file mode 100644 index 72128cdc..00000000 --- a/askbot/skins/old/templates/main_page/content.html +++ /dev/null @@ -1,17 +0,0 @@ -{% import "macros.html" as macros %} -<div id="question-list"> -{% cache 0 "questions" questions search_tags scope sort query context.page context.page_size language_code %} - {% for question in questions.object_list %} - {{macros.question_summary(question)}} - {% endfor %} -{% endcache %} -{# comment todo: fix css here #} -{% if questions_count == 0 %} - {% include "main_page/nothing_found.html" %} -{% else %} - <p class="evenMore" style="padding-left:9px"> - {% trans %}Did not find what you were looking for?{% endtrans %} - <a href="{% url ask %}">{% trans %}Please, post your question!{% endtrans %}</a> - </p> -{% endif %} -</div> diff --git a/askbot/skins/old/templates/main_page/headline.html b/askbot/skins/old/templates/main_page/headline.html deleted file mode 100644 index 71d36fa5..00000000 --- a/askbot/skins/old/templates/main_page/headline.html +++ /dev/null @@ -1,52 +0,0 @@ -{% import "macros.html" as macros %} -{% if questions_count > 0 %} - <div style="clear:both"> - <p class="rss"> - (<a - {% if feed_url %} - href="{{settings.APP_URL}}{{feed_url}}" - {% else %} - href="{{settings.APP_URL}}/feeds/rss/" - {% endif %} - title="{% trans %}subscribe to the questions feed{% endtrans %}" - >{% trans %}rss feed{% endtrans %}</a>) - </p> - <h1 id="question-count" class="search-result-summary"> - {% if search_tags %} - {% trans cnt=questions_count, q_num=questions_count|intcomma %}{{q_num}} question, tagged{% pluralize %}{{q_num}} questions, tagged{% endtrans %} - {% else %} - {% trans cnt=questions_count, q_num=questions_count|intcomma %}{{q_num}} question{% pluralize %}{{q_num}} questions{% endtrans %} - {% endif %} - {% if author_name %} - {% trans %}with {{author_name}}'s contributions{% endtrans %} - {% endif %} - </h1> - {{ macros.tag_list_widget( - search_tags, - id = 'search-tags', - deletable = True, - make_links = False - ) - }} - {% if author_name or search_tags or query %} - <p class="search-tips">{% trans %}Search tips:{% endtrans %} - {% if reset_method_count > 1 %} - {% if author_name %} - <a href="{% url questions %}?reset_author=true">{% trans %}reset author{% endtrans %}</a> - {% endif %} - {% if search_tags %}{% if author_name and query %}, {% elif author_name %}{% trans %} or {% endtrans %}{% endif %} - <a href="{% url questions %}?reset_tags=true">{% trans %}reset tags{% endtrans %}</a> - {% endif %} - {% if query %}{% trans %} or {% endtrans %} - <a href="{% url questions %}?start_over=true">{% trans %}start over{% endtrans %}</a> - {% endif %} - {% else %} - <a href="{% url questions %}?start_over=true">{% trans %}start over{% endtrans %}</a> - {% endif %} - {% trans %} - to expand, or dig in by adding more tags and revising the query.{% endtrans %} - </p> - {% else %} - <p class="search-tips">{% trans %}Search tip:{% endtrans %} {% trans %}add tags and a query to focus your search{% endtrans %}</p> - {% endif %} - </div> -{% endif %} diff --git a/askbot/skins/old/templates/main_page/javascript.html b/askbot/skins/old/templates/main_page/javascript.html deleted file mode 100644 index 14dfe3cd..00000000 --- a/askbot/skins/old/templates/main_page/javascript.html +++ /dev/null @@ -1,30 +0,0 @@ -<script type="text/javascript"> - var sortMethod = '{{sort}}'; - var showSortByRelevance = {% if show_sort_by_relevance %}true{% else %}false{% endif %}; - var minSearchWordLength = {{settings.MIN_SEARCH_WORD_LENGTH}}; - $(document).ready(function(){ - /*var on_tab = '#nav_questions'; - $(on_tab).attr('className','on');*/ - liveSearch().init('main_page'); - Hilite.exact = false; - Hilite.elementid = "question-list"; - Hilite.debug_referrer = location.href; - {% if update_avatar_data == True %} - var today = new Date();{#add timestamp to prevent browser caching #} - $.getJSON('{% url user_update_has_custom_avatar %}?t=' + today.getTime()); - {% endif %} - }); - askbot['urls']['mark_interesting_tag'] = scriptUrl + '{% url mark_interesting_tag %}'; - askbot['urls']['mark_ignored_tag'] = scriptUrl + '{% url mark_ignored_tag %}'; - askbot['urls']['unmark_tag'] = scriptUrl + '{% url unmark_tag %}'; - askbot['urls']['set_tag_filter_strategy'] = '{% url "set_tag_filter_strategy" %}'; - askbot['urls']['questions'] = '{% url "questions" %}'; - askbot['urls']['question_url_template'] = scriptUrl + '{% trans %}question/{% endtrans %}{{ "{{QuestionID}}/" }}'; - askbot['urls']['user_url_template'] = scriptUrl + '{% trans %}users/{% endtrans %}{{ "{{user_id}}" }}/{{ "{{slug}}" }}/'; - askbot['messages']['name_of_anonymous_user'] = '{{ name_of_anonymous_user }}'; -</script> -<script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> -{% if request.user.is_authenticated() %} -<script type='text/javascript' src='{{"/js/tag_selector.js"|media}}'></script> -{% endif %} -<script type="text/javascript" src="{{"/js/live_search.js"|media}}"></script> diff --git a/askbot/skins/old/templates/main_page/nothing_found.html b/askbot/skins/old/templates/main_page/nothing_found.html deleted file mode 100644 index 50f2f340..00000000 --- a/askbot/skins/old/templates/main_page/nothing_found.html +++ /dev/null @@ -1,31 +0,0 @@ -{# todo: add tips to widen selection #} -<p class="evenMore" style="padding-top:30px;text-align:center;"> -{% if scope == "unanswered" %} - {% trans %}There are no unanswered questions here{% endtrans %} -{% endif %} -{% if scope == "favorite" %} - {% trans %}No questions here. {% endtrans %} - {% trans %}Please star (bookmark) some questions or follow some users.{% endtrans %} -{% endif %} -</p> -{% if query or search_tags or author_name %} -<p class="evenMore" style="text-align:center"> - {% trans %}You can expand your search by {% endtrans %} - {% if reset_method_count > 1 %} - {% if author_name %} - <a href="{% url questions %}?reset_author=true">{% trans %}resetting author{% endtrans %}</a> - {% endif %} - {% if search_tags %}{% if author_name and query %}, {% elif author_name %}{% trans %} or {% endtrans %}{% endif %} - <a href="{% url questions %}?reset_tags=true">{% trans %}resetting tags{% endtrans %}</a> - {% endif %} - {% if query %}{% trans %} or {% endtrans %} - <a href="{% url questions %}?start_over=true">{% trans %}starting over{% endtrans %}</a> - {% endif %} - {% else %} - <a href="{% url questions %}?start_over=true">{% trans %}starting over{% endtrans %}</a> - {% endif %} -</p> -{% endif %} -<p class="evenMore" style="text-align:center"> -<a href="{% url ask %}">{% trans %}Please always feel free to ask your question!{% endtrans %}</a> -</p> diff --git a/askbot/skins/old/templates/main_page/paginator.html b/askbot/skins/old/templates/main_page/paginator.html deleted file mode 100644 index 4a77060f..00000000 --- a/askbot/skins/old/templates/main_page/paginator.html +++ /dev/null @@ -1,7 +0,0 @@ -{% import "macros.html" as macros %} -{% if questions_count > 10 %}{# todo: remove magic number #} - <div id="pager" class="pager"> - {{ macros.paginator(context|setup_paginator, position='left') }} - {{ macros.pagesize_switch(context, position='right') }} - </div> -{% endif %} diff --git a/askbot/skins/old/templates/main_page/sidebar.html b/askbot/skins/old/templates/main_page/sidebar.html deleted file mode 100644 index 6abc0492..00000000 --- a/askbot/skins/old/templates/main_page/sidebar.html +++ /dev/null @@ -1,46 +0,0 @@ -{% import "macros.html" as macros %} - -{{ settings.SIDEBAR_MAIN_HEADER }} - -{% if contributors and settings.SIDEBAR_MAIN_SHOW_AVATARS %} - {% cache 600 "contributors" contributors search_tags scope sort query context.page context.page_size language_code %} - <div id="contrib-users" class="boxC"> - <h2>{% trans %}Contributors{% endtrans %}</h2> - {% spaceless %} - {% for person in contributors %} - {{ macros.gravatar(person,48) }} - {% endfor %} - {% endspaceless %} - </div> - {% endcache %} -{% endif %} - -{% if request.user.is_authenticated() and settings.SIDEBAR_MAIN_SHOW_TAG_SELECTOR %} - {% include "blocks/tag_selector.html" %} -{% endif %} - -{% if tags and settings.SIDEBAR_MAIN_SHOW_TAGS %} - {% cache 0 "tags" tags search_tags scope sort query context.page context.page_size language_code %} - <div class="boxC"> - <h2>{% trans %}Related tags{% endtrans %}</h2> - {% if tag_list_type == 'list' %} - <ul id="related-tags" class="tags"> - {% for tag in tags %} - <li> - {{ macros.tag_widget( - tag.name, - html_tag = 'div', - extra_content = '<span class="tag-number">× ' ~ - tag.local_used_count|intcomma ~ '</span>' - )}} - </li> - {% endfor %} - </ul> - {% else %} - {{ macros.tag_cloud(tags = tags, font_sizes = font_size) }} - {% endif %} - </div> - {% endcache %} -{% endif %} - -{{ settings.SIDEBAR_MAIN_FOOTER }} diff --git a/askbot/skins/old/templates/main_page/tab_bar.html b/askbot/skins/old/templates/main_page/tab_bar.html deleted file mode 100644 index 1b27ab3a..00000000 --- a/askbot/skins/old/templates/main_page/tab_bar.html +++ /dev/null @@ -1,86 +0,0 @@ -{% import "macros.html" as macros %} -{% cache 600 "scope_sort_tabs" search_tags request.user scope sort query context.page context.page_size language_code %} -<div class="tabBar"> - <div class="tabsC"> - <span class="label">{% trans %}In:{% endtrans %}</span> - <a id="all" - class="{% if scope == 'all' %}on{% else %}off{% endif %}" - href="?scope=all" - title="{% trans %}see all questions{% endtrans %}" - ><span>{% trans %}all{% endtrans %}</span></a> - <a id="unanswered" - class="{% if scope == 'unanswered' %}on{% else %}off{% endif %}" - href="?scope=unanswered&sort=answers-asc" - title="{% trans %}see unanswered questions{% endtrans %}" - ><span>{% trans %}unanswered{% endtrans %}</span></a> - {% if request.user.is_authenticated() %} - <a id="favorite" - class="{% if scope == 'favorite' %}on{% else %}off{% endif %}" - href="?scope=favorite" - title="{% trans %}see your followed questions{% endtrans %}" - ><span>{% trans %}followed{% endtrans %}</span></a> - {% endif %} - </div> - <div id="sort_tabs" class="tabsA"> - <span class="label">{% trans %}Sort by:{% endtrans %}</span> - {% if show_sort_by_relevance %} - {% set asc_relevance_tooltip = gettext('most relevant questions') %} - {% set desc_relevance_tooltip = gettext('click to see most relevant questions') %} - {% set relevance_label = gettext('relevance') %} - {% if query %} - <a id="by_relevance" - {% if sort == "relevance-desc" %} - href="?sort=relevance-desc" - class="on" - title="{{asc_relevance_tooltip}}"><span>{{relevance_label}} ▼</span> - {% else %} - href="?sort=relevance-desc" - class="off" - title="{{desc_relevance_tooltip}}"><span>{{relevance_label}}</span> - {% endif %} - </a> - {% endif %} - <script type="text/javascript"> - var sortButtonData = sortButtonData || {}; - sortButtonData['relevance'] = { - asc_tooltip: "{{asc_relevance_tooltip}}", - desc_tooltip: "{{desc_relevance_tooltip}}", - label: "{{relevance_label}}" - }; - </script> - {% endif %} - {{macros.reversible_sort_button( - button_sort_criterium = 'age', - label = gettext('by date'), - asc_tooltip = gettext('click to see the oldest questions'), - desc_tooltip = gettext('click to see the newest questions'), - current_sort_method = sort - ) - }} - {{macros.reversible_sort_button( - button_sort_criterium = 'activity', - label = gettext('by activity'), - asc_tooltip = gettext('click to see the least recently updated questions'), - desc_tooltip = gettext('click to see the most recently updated questions'), - current_sort_method = sort - ) - }} - {{macros.reversible_sort_button( - button_sort_criterium = 'answers', - label = gettext('by answers'), - asc_tooltip = gettext('click to see the least answered questions'), - desc_tooltip = gettext('click to see the most answered questions'), - current_sort_method = sort - ) - }} - {{macros.reversible_sort_button( - button_sort_criterium = 'votes', - label = gettext('by votes'), - asc_tooltip = gettext('click to see least voted questions'), - desc_tooltip = gettext('click to see most voted questions'), - current_sort_method = sort - ) - }} - </div> -</div> -{% endcache %} diff --git a/askbot/skins/old/templates/one_column_body.html b/askbot/skins/old/templates/one_column_body.html deleted file mode 100644 index e97de505..00000000 --- a/askbot/skins/old/templates/one_column_body.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base.html" %} -{% block body_class %}one-col{% endblock %} -{% block body %} -<div id="CAFull"> - {% include "blocks/input_bar.html" %} - {% block content%} - {% endblock%} -</div> -{% endblock %} diff --git a/askbot/skins/old/templates/privacy.html b/askbot/skins/old/templates/privacy.html deleted file mode 100644 index 61f4d945..00000000 --- a/askbot/skins/old/templates/privacy.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "one_column_body.html" %} -<!-- privacy.html --> -{% block title %}{% spaceless %}{% trans %}Privacy policy{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Privacy policy{% endtrans %}</h1> -{{settings.FORUM_PRIVACY}} -{% endblock %} -<!-- end privacy.html --> diff --git a/askbot/skins/old/templates/question.html b/askbot/skins/old/templates/question.html deleted file mode 100644 index 956ebc3a..00000000 --- a/askbot/skins/old/templates/question.html +++ /dev/null @@ -1,553 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- question.html --> -{% block title %}{% spaceless %}{{ question.get_question_title() }}{% endspaceless %}{% endblock %} -{% block meta_description %} - <meta name="description" content="{{question.summary|striptags|escape}}" /> -{% endblock %} -{% block keywords %}{{question.tagname_meta_generator()}}{% endblock %} -{% block forestyle %} - <link rel="canonical" href="{{settings.APP_URL}}{{question.get_absolute_url()}}" /> - <link rel="stylesheet" type="text/css" href="{{'/js/wmd/wmd.css'|media}}" /> -{% endblock %} -{% block content %} -<h1><a href="{{ question.get_absolute_url() }}">{{ question.get_question_title() }}</a></h1> -<table style="width:100%;" id="question-table" {% if question.deleted %}class="deleted"{%endif%}> - <tr> - <td style="width:30px;vertical-align:top"> - <div class="vote-buttons"> - {% if question_vote %} - <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" - {% if question_vote.is_upvote() %} - src="{{'/images/vote-arrow-up-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-up.png'|media}}" - {% endif %} - alt="{% trans %}i like this post (click again to cancel){% endtrans %}" - title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> - <div id="question-vote-number-{{ question.id }}" class="vote-number" - title="{% trans %}current number of votes{% endtrans %}"> - {{ question.score }} - </div> - <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - {% if question_vote.is_downvote() %} - src="{{'/images/vote-arrow-down-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-down.png'|media}}" - {% endif %} - alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> - {% else %} - <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" - alt="{% trans %}i like this post (click again to cancel){% endtrans %}" - src="{{'/images/vote-arrow-up.png'|media}}" - title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> - <div id="question-vote-number-{{ question.id }}" class="vote-number" - title="{% trans %}current number of votes{% endtrans %}"> - {{ question.score }} - </div> - <img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - src="{{'/images/vote-arrow-down.png'|media}}" - alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> - {% endif %} - - {% if settings.ENABLE_SHARING_TWITTER %}{{ macros.share(site = 'twitter', icon = True) }}{% endif %} - {% if settings.ENABLE_SHARING_FACEBOOK %}{{ macros.share(site = 'facebook', icon = True) }}{% endif %} - {% if settings.ENABLE_SHARING_LINKEDIN %}{{ macros.share(site = 'linkedin', icon = True) }}{% endif %} - {% if settings.ENABLE_SHARING_IDENTICA %}{{ macros.share(site = 'identica', icon = True) }}{% endif %} - {% if settings.ENABLE_SHARING_GOOGLE %}<g:plusone size="small" count="false"></g:plusone>{% endif %} - </div> - </td> - <td> - <div class="question-body"> - {{question.html}} - </div> - <ul id="question-tags" class="post-tags tags"> - {% for tag in question.get_tag_names() %} - {{ macros.tag_widget( - tag, - css_class = 'post-tag', - html_tag = 'li' - ) - }} - {% endfor %} - </ul> - <div id="question-controls" class="post-controls"> - {% set pipe=joiner('<span class="sep">|</span>') %} - {% if request.user|can_edit_post(question) %}{{ pipe() }} - <a href="{% url edit_question question.id %}">{% trans %}edit{% endtrans %}</a> - {% endif %} - {% if request.user|can_retag_question(question) %}{{ pipe() }} - <a id="retag" href="{% url retag_question question.id %}">{% trans %}retag{% endtrans %}</a> - <script type="text/javascript"> - var retagUrl = "{% url retag_question question.id %}"; - </script> - {% endif %} - {% if question.thread.closed %} - {% if request.user|can_reopen_question(question) %}{{ pipe() }} - <a href="{% url reopen question.id %}">{% trans %}reopen{% endtrans %}</a> - {% endif %} - {% else %} - {% if request.user|can_close_question(question) %}{{ pipe() }} - <a href="{% url close question.id %}">{% trans %}close{% endtrans %}</a> - {% endif %} - {% endif %} - {% if request.user|can_flag_offensive(question) %}{{ pipe() }} - <span id="question-offensive-flag-{{ question.id }}" class="offensive-flag" - title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}"> - <a>{% trans %}flag offensive{% endtrans %}</a> - {% if request.user|can_see_offensive_flags(question) %} - <span class="darkred">{% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %}</span> - {% endif %} - </span> - {% endif %} - {% if request.user|can_delete_post(question) %}{{ pipe() }} - <a id="question-delete-link-{{question.id}}">{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> - {% endif %} - </div> - <div class="post-update-info-container"> - {{ - macros.post_contributor_info( - question, - "original_author", - question.wiki, - settings.MIN_REP_TO_EDIT_WIKI - ) - }} - {{ - macros.post_contributor_info( - question, - "last_updater", - question.wiki, - settings.MIN_REP_TO_EDIT_WIKI, - ) - }} - </div> - {{ - macros.post_comments_widget( - post = question, - show_post = show_post, - show_comment = show_comment, - comment_order_number = comment_order_number, - user = request.user, - max_comments = settings.MAX_COMMENTS_TO_SHOW - ) - }} - <!--/div--> - </td> - </tr> -</table> -{% if question.thread.closed %} -<div class="question-status" style="margin-bottom:15px"> -<h3>{% trans close_reason=question.thread.get_close_reason_display() %}The question has been closed for the following reason "{{ close_reason }}" by{% endtrans %} -<a href="{{ question.thread.closed_by.get_profile_url() }}">{{ question.thread.closed_by.username }}</a> -{% trans closed_at=question.thread.closed_at %}close date {{closed_at}}{% endtrans %}</h3> -</div> -{% endif %} -{% if answers %} - <div class="tabBar"> - <h2 id="sort-top"> - {% trans counter=answers|length %} - {{counter}} Answer: - {% pluralize %} - {{counter}} Answers: - {% endtrans %} - </h2> - <div class="tabsA"> - <a id="oldest" href="{{ question.get_absolute_url() }}?sort=oldest#sort-top" - title="{% trans %}oldest answers will be shown first{% endtrans %}" - ><span>{% trans %}oldest answers{% endtrans %}</span></a> - <a id="latest" href="{{ question.get_absolute_url() }}?sort=latest#sort-top" - title="{% trans %}newest answers will be shown first{% endtrans %}" - ><span>{% trans %}newest answers{% endtrans %}</span></a> - <a id="votes" href="{{ question.get_absolute_url() }}?sort=votes#sort-top" - title="{% trans %}most voted answers will be shown first{% endtrans %}" - ><span>{% trans %}popular answers{% endtrans %}</span></a> - </div> - </div> - {{ macros.paginator(paginator_context) }} - - {% for answer in answers %} - <a name="{{ answer.id }}"></a> - <div id="answer-container-{{ answer.id }}" class="answer {% if answer.accepted() %}accepted-answer{% endif %} {% if answer.author_id==question.author_id %} answered-by-owner{% endif %} {% if answer.deleted %}deleted{% endif %}"> - <table style="width:100%;" class="answer-table"> - <tr> - <td style="width:30px;vertical-align:top"> - <div class="vote-buttons"> - <img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" - {% if user_answer_votes[answer.id] == 1 %} - src="{{'/images/vote-arrow-up-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-up.png'|media}}" - {% endif %} - alt="{% trans %}i like this answer (click again to cancel){% endtrans %}" - title="{% trans %}i like this answer (click again to cancel){% endtrans %}"/> - <div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans %}current number of votes{% endtrans %}"> - {{ answer.score }} - </div> - <img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote" - {% if user_answer_votes[answer.id] == -1 %} - src="{{'/images/vote-arrow-down-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-down.png'|media}}" - {% endif %} - alt="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" /> - {% if request.user == question.author %} - <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" - {% if answer.accepted() %} - src="{{'/images/vote-accepted-on.png'|media}}" - {% else %} - src="{{'/images/vote-accepted.png'|media}}" - {% endif %} - alt="{% trans %}mark this answer as favorite (click again to undo){% endtrans %}" - title="{% trans %}mark this answer as favorite (click again to undo){% endtrans %}" /> - {% else %} - {% if answer.accepted() %} - <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" - {% if answer.accepted() %} - src="{{'/images/vote-accepted-on.png'|media}}" - {% else %} - src="{{'/images/vote-accepted.png'|media}}" - {% endif %} - alt="{% trans question_author=question.author.username %}{{question_author}} has selected this answer as correct{% endtrans %}" - title="{% trans questsion_author=question.author.username%}{{question_author}} has selected this answer as correct{% endtrans %}" - {% endif %} - {% endif %} - </div> - </td> - <td> - <div class="item-right"> - <div class="answer-body"> - {{ answer.html }} - </div> - <div class="answer-controls post-controls"> - {% set pipe=joiner('<span class="sep">|</span>') %} - <span class="linksopt">{{ pipe() }} - <a - href="{{ answer.get_absolute_url() }}" - title="{% trans %}answer permanent link{% endtrans %}"> - {% trans %}permanent link{% endtrans %} - </a> - </span> - {% if request.user|can_edit_post(answer) %}{{ pipe() }} - <span class="action-link"><a href="{% url edit_answer answer.id %}">{% trans %}edit{% endtrans %}</a></span> - {% endif %} - {% if request.user|can_flag_offensive(answer) %}{{ pipe() }} - <span id="answer-offensive-flag-{{ answer.id }}" class="offensive-flag" - title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}"> - <a>{% trans %}flag offensive{% endtrans %}</a> - {% if request.user|can_see_offensive_flags(answer) %} - <span class="darkred">{% if answer.offensive_flag_count > 0 %}({{ answer.offensive_flag_count }}){% endif %}</span> - {% endif %} - </span> - {% endif %} - {% if request.user|can_delete_post(answer) %}{{ pipe() }} - {% spaceless %} - <span class="action-link"> - <a id="answer-delete-link-{{answer.id}}"> - {% if answer.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> - </span> - {% endspaceless %} - {% endif %} - {% if settings.ALLOW_SWAPPING_QUESTION_WITH_ANSWER and request.user.is_authenticated() and request.user.is_administrator_or_moderator() %}{{ pipe() }} - <span class="action-link"> - <a id="swap-question-with-answer-{{answer.id}}">{% trans %}swap with question{% endtrans %}</a> - </span> - {% endif %} - </div> - <div class="post-update-info-container"> - {{ - macros.post_contributor_info( - answer, - "original_author", - answer.wiki, - settings.MIN_REP_TO_EDIT_WIKI - ) - }} - {{ - macros.post_contributor_info( - answer, - "last_updater", - answer.wiki, - settings.MIN_REP_TO_EDIT_WIKI - ) - }} - </div> - {{ - macros.post_comments_widget( - post = answer, - show_post = show_post, - show_comment = show_comment, - comment_order_number = comment_order_number, - user = request.user, - max_comments = settings.MAX_COMMENTS_TO_SHOW - ) - }} - </div> - </td> - </tr> - </table> - </div> - {% endfor %} - {{ macros.paginator(paginator_context) }} -{% else %} - {% set question_url=settings.APP_URL+question.get_absolute_url()|urlencode %} - <h2 class="share-question">{% trans %}Know someone who can answer? Share a <a href="{{ question_url }}">link</a> to this question via{% endtrans %} - {% if settings.ENABLE_SHARING_TWITTER %}{{ macros.share(site = 'twitter', site_label = 'Twitter') }},{% endif %} - {% if settings.ENABLE_SHARING_FACEBOOK %}{{ macros.share(site = 'facebook', site_label = 'Facebook') }},{% endif %} - {% if settings.ENABLE_SHARING_LINKEDIN %}{{ macros.share(site = 'linkedin', site_label = 'LinkedIn') }},{% endif %} - {% if settings.ENABLE_SHARING_IDENTICA %}{{ macros.share(site = 'identica', site_label = 'Identi.ca') }},{% endif %} - {%- if settings.ENABLE_SHARING_TWITTER or settings.ENABLE_SHARING_FACEBOOK or settings.ENABLE_SHARING_LINKEDIN or settings.ENABLE_SHARING_IDENTICA -%} - {% trans %} or{% endtrans %} - {% endif %} - <a href="mailto:?subject={{ settings.APP_SHORT_NAME|urlencode }}&body={{ question_url }}">{% trans %}email{% endtrans %}</a>. - </h2> -{% endif %} -<form id="fmanswer" action="{% url answer question.id %}" method="post">{% csrf_token %} - {% if request.user.is_authenticated() %} - <p style="padding-left:3px"> - {{ answer.email_notify }} - <label for="question-subscribe-updates"> - {% set email_feed_frequency = request.user.get_followed_question_alert_frequency() %} - {% if email_feed_frequency =='n' %} - {% trans %}Notify me once a day when there are any new answers{% endtrans %} - {% elif email_feed_frequency =='d' %} - {% trans %}Notify me once a day when there are any new answers{% endtrans %} - {% elif email_feed_frequency =='w' %} - {% trans %}Notify me weekly when there are any new answers{% endtrans %} - {% elif email_feed_frequency =='i' %} - {% trans %}Notify me immediately when there are any new answers{% endtrans %} - {% endif %} - </label> - {% trans profile_url=request.user.get_profile_url() %}You can always adjust frequency of email updates from your {{profile_url}}{% endtrans %} - </p> - {% else %} - <p style="padding-left:3px"> - {{ answer.email_notify }} - <label>{% trans %}once you sign in you will be able to subscribe for any updates here{% endtrans %}</label> - </p> - {% endif %} - <div style="clear:both"> - </div> - {% if request.user.is_anonymous() and settings.ALLOW_POSTING_BEFORE_LOGGING_IN == False %} - {% if not question.thread.closed %} - <a - class="submit" - href="{{settings.LOGIN_URL}}?next={% url question question.id %}" - >{% trans %}Login/Signup to Answer{% endtrans %}</a> - {% endif %} - {% else %} - {% if not question.thread.closed %} - <div style="padding:10px 0 0 0;"> - {% spaceless %} - <h2> - {% if answers %} - {% trans %}Your answer{% endtrans %} - {% else %} - {% trans %}Be the first one to answer this question!{% endtrans %} - {% endif %} - </h2> - {% endspaceless %} - </div> - {% if request.user.is_anonymous() %} - <div class="message">{% trans %}you can answer anonymously and then login{% endtrans %}</div> - {% else %} - <p class="message"> - {% if request.user==question.author %} - {% trans %}answer your own question only to give an answer{% endtrans %} - {% else %} - {% trans %}please only give an answer, no discussions{% endtrans %} - {% endif %} - </p> - {% endif %} - {{ macros.edit_post(answer) }} - <input type="submit" - {% if user.is_anonymous() %} - value="{% trans %}Login/Signup to Post Your Answer{% endtrans %}" - {% else %} - {% if user == question.author %} - value="{% trans %}Answer Your Own Question{% endtrans %}" - {% else %} - value="{% trans %}Answer the question{% endtrans %}" - {% endif %} - {% endif %} - class="submit after-editor" style="float:left"/> - {% if settings.WIKI_ON %} - {{ macros.checkbox_in_div(answer.wiki) }} - {% endif %} - {% endif %} - {% endif %} - </form> -{% endblock %} - -{% block sidebar %} - -{{ settings.SIDEBAR_QUESTION_HEADER }} -<div class="boxC vote-buttons"> - <h2 style="font-size: 22px;margin-top: 11px; text-align: left;">{% trans %}Question tools{% endtrans %}</h2> - {% if favorited %} - <a class="button followed" - alt="{% trans %}click to unfollow this question{% endtrans %}"> - <div>{% trans %}Following{% endtrans %}</div> - <div class='unfollow'>{% trans %}Unfollow{% endtrans %}</div> - </a> - {% else %} - <a class="button follow" - alt="{% trans %}click to follow this question{% endtrans %}"> - {%trans %}Follow{%endtrans%} - </a> - {% endif %} - <div class="clearfix"></div> - <div id="favorite-number" class="favorite-number{% if favorited %} my-favorite-number{% endif %}"> - {% set follower_count = question.thread.favourite_count %} - {% if follower_count > 0 %} - {% trans count=follower_count %}{{count}} follower{% pluralize %}{{count}} followers{% endtrans %} - {% endif %} - </div> -<div class="notify-sidebar"> - {%if request.user.is_authenticated() %} - <input type="checkbox" id="question-subscribe-sidebar"/> - <label for="question-subscribe-sidebar">{% trans %}email the updates{% endtrans %}</label> - {%else%} - <input type="checkbox" id="question-subscribe-sidebar"/> - <label for="question-subscribe-sidebar">{% trans %}<strong>Here</strong> (once you log in) you will be able to sign up for the periodic email updates about this question.{% endtrans %}</label> - {%endif%} - </div> -</div> -{% cache 0 "questions_tags" questions_tags question.id language_code %} -{% if settings.SIDEBAR_QUESTION_SHOW_TAGS %} - <div class="boxC"> - <div class="clearfix"></div> - <h2> - {% trans %}Question tags{% endtrans %}: - </h2> - <ul id="related-tags" class="tags"> - {% for tag in tags %} - <li> - {{ macros.tag_widget( - tag, - html_tag = 'div', - url_params = 'start_over=true', - extra_content = '<span class="tag-number">× ' ~ - tag.used_count|intcomma ~ '</span>' - ) - }} - </li> - {% endfor %} - </ul> - </div> -{% endif %} - -{% if settings.SIDEBAR_QUESTION_SHOW_META %} -<div class="boxC"> - <div class="clearfix"></div> - <h2>{% trans %}Stats:{% endtrans %}</h2> - <p> - {% trans %}question asked{% endtrans %}: <strong title="{{ question.added_at }}">{{question.added_at|diff_date}}</strong> - </p> - <p> - {% trans %}question was seen{% endtrans %}: <strong>{{ question.thread.view_count|intcomma }} {% trans %}times{% endtrans %}</strong> - </p> - <p> - {% trans %}last updated{% endtrans %}: <strong title="{{ question.last_activity_at }}">{{question.last_activity_at|diff_date}}</strong> - </p> -</div> -{% endif %} -{% endcache %} - -{% if similar_questions.data and settings.SIDEBAR_QUESTION_SHOW_RELATED %} - {#% cache 1800 "related_questions" related_questions question.id language_code %#} - <div class="boxC"> - <h2>{% trans %}Related questions{% endtrans %}</h2> - <div class="questions-related"> - {% for question in similar_questions.data() %} - <p> - <a href="{{ question.get_absolute_url() }}">{{ question.get_question_title() }}</a> - </p> - {% endfor %} - </div> - </div> - {#% endcache %#} -{% endif %} - -{{ settings.SIDEBAR_QUESTION_FOOTER }} - -{% endblock %} -{% block endjs %} - {% if not question.thread.closed %} - <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> - <script type='text/javascript'> - {% if settings.ENABLE_MATHJAX or settings.MARKUP_CODE_FRIENDLY %} - var codeFriendlyMarkdown = true; - {% else %} - var codeFriendlyMarkdown = false; - {% endif %} - var maxCommentLength = {{settings.MAX_COMMENT_LENGTH}}; - askbot['urls']['postComments'] = '{% url post_comments %}'; - askbot['urls']['editComment'] = '{% url edit_comment %}'; - askbot['urls']['deleteComment'] = '{% url delete_comment %}'; - askbot['urls']['getComment'] = '{% url get_comment %}'; - askbot['urls']['question_url_template'] = scriptUrl + '{% trans %}question/{% endtrans %}{{ "{{QuestionID}}/{{questionSlug}}" }}';{# yes it needs to be that whacky #} - askbot['urls']['user_signin'] = '{{ settings.LOGIN_URL }}'; - askbot['urls']['vote_url_template'] = scriptUrl + '{% trans %}questions/{% endtrans %}{{ "{{QuestionID}}/" }}{% trans %}vote/{% endtrans %}'; - askbot['urls']['swap_question_with_answer'] = '{% url swap_question_with_answer %}'; - askbot['urls']['upvote_comment'] = '{% url upvote_comment %}'; - askbot['messages']['addComment'] = '{% trans %}add comment{% endtrans %}'; - {% if settings.SAVE_COMMENT_ON_ENTER %} - askbot['settings']['saveCommentOnEnter'] = true; - {% else %} - askbot['settings']['saveCommentOnEnter'] = false; - {% endif %} - </script> - <script type='text/javascript' src='{{"/js/wmd/showdown.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/wmd/wmd.js"|media}}'></script> - {% endif %} - <script type='text/javascript' src='{{"/js/jquery.validate.min.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/post.js"|media}}'></script> - <script type="text/javascript"> - // define reputation needs for comments - var repNeededForComments = 50; - $().ready(function(){ - {% if request.user.is_authenticated() %} - if ($('#question-subscribe-updates')[0].checked){ - $('#question-subscribe-sidebar').attr({'checked': 'checked'}); - } - {%endif%} - $("#nav_questions").attr('className',"on"); - var answer_sort_tab = "{{ tab_id }}"; - $("#" + answer_sort_tab).attr('className',"on"); - - Vote.init({{ question.id }}, '{{ question.title|slugify }}', '{{ question.author.id }}','{{ request.user.id }}'); - - {% if not question.thread.closed and request.user.is_authenticated %}initEditor();{% endif %} - - lanai.highlightSyntax(); - $('#btLogin').bind('click', function(){window.location.href='{{ settings.LOGIN_URL }}'; } ) - if (window.location.hash === 'fmanswer'){ - $('#fmanswer textarea').focus(); - } - {% if settings.ENABLE_SHARING_GOOGLE %}$.getScript("http://apis.google.com/js/plusone.js"){% endif %} - }); - - function initEditor(){ - $('#editor').TextAreaResizer(); - //highlight code synctax when editor has new text - $("#editor").typeWatch({highlight: false, wait: 3000, - captureLength: 5, callback: lanai.highlightSyntax}); - - var display = true; - var txt = "[{% trans %}hide preview{% endtrans %}]"; - $('#pre-collapse').text(txt); - $('#pre-collapse').bind('click', function(){ - txt = display ? "[{% trans %}show preview{% endtrans %}]" : "[{% trans %}hide preview{% endtrans %}]"; - display = !display; - $('#previewer').toggle(); - $('#pre-collapse').text(txt); - }); - setupFormValidation($("#fmanswer"), CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages()); - } - </script> - {% include "blocks/editor_data.html" %} -{% endblock %} diff --git a/askbot/skins/old/templates/question_edit.html b/askbot/skins/old/templates/question_edit.html deleted file mode 100644 index feee2521..00000000 --- a/askbot/skins/old/templates/question_edit.html +++ /dev/null @@ -1,97 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- question_edit.html --> -{% block title %}{% spaceless %}{% trans %}Edit question{% endtrans %}{% endspaceless %}{% endblock %} -{% block forestyle %} - <link rel="stylesheet" type="text/css" href="{{"/js/wmd/wmd.css"|media}}" /> -{% endblock %} -{% block content %} -<h1>{% trans %}Edit question{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]</h1> -<form id="fmedit" action="{% url edit_question question.id %}" method="post" >{% csrf_token %} - - {% 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{% endtrans %}"> - </div> - {{ - macros.edit_post( - form, - post_type='question', - edit_title=True, - mandatory_tags = mandatory_tags - ) - }} - <div class="after-editor"> - <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> - <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> - <div class="question-options"> - {% if settings.WIKI_ON and question.wiki == False %} - {{ macros.checkbox_in_div(form.wiki) }} - {% endif %} - {% if form.can_stay_anonymous() %} - {{ macros.checkbox_in_div(form.reveal_identity) }} - {% endif %} - </div> - </div> -</form> -{% endblock %} - -{% block sidebar %} -{% include "blocks/question_edit_tips.html" %} -{% endblock %} - -{% block endjs %} - {% include "blocks/editor_data.html" %} - <script type='text/javascript' src='{{"/js/editor.js"|media }}'></script> - {% if mandatory_tags %} - {% include "blocks/mandatory_tags_js.html" %} - {% endif %} - <script type='text/javascript' src='{{"/js/jquery.validate.min.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/post.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/wmd/showdown.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/wmd/wmd.js"|media}}'></script> - <script type="text/javascript"> - {% if settings.ENABLE_MATHJAX or settings.MARKUP_CODE_FRIENDLY %} - var codeFriendlyMarkdown = true; - {% else %} - var codeFriendlyMarkdown = false; - {% endif %} - //todo move javascript out - $().ready(function(){ - $("#nav_questions").attr('className',"on"); - $('#editor').TextAreaResizer(); - - //highlight code synctax when editor has new text - $("#editor").typeWatch({highlight: false, wait: 3000, - captureLength: 5, callback: lanai.highlightSyntax}); - - //toggle preview of editor - var display = true; - var txt = "[{% trans %}hide preview{% endtrans %}]"; - $('#pre-collapse').text(txt); - $('#pre-collapse').bind('click', function(){ - txt = display ? "[{% trans %}show preview{% endtrans %}]" : "[{% trans %}hide preview{% endtrans %}]"; - display = !display; - $('#previewer').toggle(); - $('#pre-collapse').text(txt); - }); - - {{ macros.tag_autocomplete_js(id = '#id_tags') }} - - setupFormValidation( - $("#fmedit"), - CPValidator.getQuestionFormRules(), - CPValidator.getQuestionFormMessages() - ); - - $('#id_revision').unbind().change(function(){ - $("#select_revision").click(); - }); - lanai.highlightSyntax(); - - }); - </script> -{% endblock %} -<!-- end question_edit.html --> diff --git a/askbot/skins/old/templates/question_retag.html b/askbot/skins/old/templates/question_retag.html deleted file mode 100644 index 883dc3aa..00000000 --- a/askbot/skins/old/templates/question_retag.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- question_retag.html --> -{% block title %}{% spaceless %}{% trans %}Change tags{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Change tags{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]</h1> -<form id="fmretag" action="{% url retag_question question.id %}" method="post" >{% csrf_token %} - <h2> - {{ question.get_question_title() }} - </h2> - <div id="description" class="edit-content-html"> - {{ question.html }} - </div> - <div class="form-item"> - <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> - <div class="error" ></div> - <input type="submit" value="{% trans %}Retag{% endtrans %}" class="submit" /> - <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> -</form> -{% endblock %} - -{% block sidebar %} -<div class="boxC"> - <h2>{% trans %}Why use and modify tags?{% endtrans %}</h2> - <ul> - <li>{% trans %}Tags help to keep the content better organized and searchable{% endtrans %}</li> - <li> - {% trans %}tag editors receive special awards from the community{% endtrans %} - </li> - </ul> - <p class='info-box-follow-up-links'> - <a href="{% url faq %}">faq »</a> - </p> -</div> -{% endblock %} -{% block endjs %} - <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/post.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/jquery.validate.min.js"|media}}'></script> - <script type="text/javascript"> - $().ready(function(){ - $("#nav_questions").attr('className',"on"); - {% import "macros.html" as macros %} - {{ macros.tag_autocomplete_js(id = '#id_tags') }} - $("#fmretag").validate({ - rules: { - tags: { - required: true, - maxength: 105 - } - }, - messages: { - tags: { - required: "{% trans %}tags are required{% endtrans %}", - maxlength: "{% trans %}up to 5 tags, less than 20 characters each{% endtrans %}" - } - } - - }); - lanai.highlightSyntax(); - }); - </script> -{% endblock %} -<!-- end question_retag.html --> diff --git a/askbot/skins/old/templates/reopen.html b/askbot/skins/old/templates/reopen.html deleted file mode 100644 index 46c86e8b..00000000 --- a/askbot/skins/old/templates/reopen.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- reopen.html --> -{% block title %}{% spaceless %}{% trans %}Reopen question{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1>{% trans %}Reopen question{% endtrans %}</h1> -<p>{% trans %}Title{% endtrans %}: - <a href="{{ question.get_absolute_url() }}"> - <span class="big">{{ question.get_question_title() }}</span> - </a> -</p> -<p>{% trans %}This question has been closed by - <a href="{{closed_by_profile_url}}">{{closed_by_username}}</a> -{% endtrans %} -</p> -<p> - {% trans %}Close reason:{% endtrans %} "<strong>{{question.thread.get_close_reason_display()}}</strong>". -</p> -<p> - {% trans %}When:{% endtrans %} {{question.thread.closed_at|diff_date}} -</p> -<p> - {% trans %}Reopen this question?{% endtrans %} -</p> -<form id="fmclose" action="{% url reopen question.id %}" method="post" >{% csrf_token %} - <div id="" style="padding:20px 0 20px 0"> - <input type="submit" value="{% trans %}Reopen this question{% endtrans %}" class="submit" /> - <input id="btBack" type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" /> - </div> -</form> -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - $().ready(function(){ - $('#btBack').bind('click', function(){ history.back(); }); - }); - </script> -{% endblock %} -<!-- end reopen.html --> diff --git a/askbot/skins/old/templates/revisions.html b/askbot/skins/old/templates/revisions.html deleted file mode 100644 index 0c10e6d4..00000000 --- a/askbot/skins/old/templates/revisions.html +++ /dev/null @@ -1,97 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- revisions.html --> -{% block title %}{% spaceless %}{% trans %}Revision history{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1> - {% trans %}Revision history{% endtrans %} [<a href="{{ post.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>] -</h1> -<div id="revisions"> -{% for revision in revisions %} - <div class="revision"> - <div - id="rev-header-{{ revision.revision }}" - class="header {% if post.author_id == revision.author_id %}author{% endif %}" - > - <div class="header-controls"> - <table width="100%"> - <tr> - <td width="20" style="vertical-align:middle"> - <img - id="rev-arrow-{{ revision.revision }}" - src="{{"/images/expander-arrow-show.gif"|media}}" - alt="{% trans %}click to hide/show revision{% endtrans %}" - /> - </td> - <td width="30px" style="vertical-align:middle"> - <span - class="revision-number" - title="{% trans number=revision.revision %}revision {{number}}{% endtrans %}">{{ revision.revision }}</span></td> - <td width="200px" style="vertical-align:middle"> - {% if revision.summary %} - <div class="summary"> - <span>{{ revision.summary }}</span> - </div> - {% endif %} - {% if request.user|can_edit_post(post) %} - <a href="{% url edit_answer post.id %}?revision={{ revision.revision }}">{% trans %}edit{% endtrans %}</a> - {% endif %} - </td> - <td align="right"> - <div class="revision-mark" > - {% if revision.revision == 1 %} - {% set contributor_type = "original_author" %} - {% else %} - {% set contributor_type = "last_updater" %} - {% endif %} - {{ macros.post_contributor_info( - revision, - contributor_type, - False, - 0 - ) - }} - </div> - </td> - </tr> - </table> - </div> - </div> - <div id="rev-body-{{ revision.revision }}" class="answerbody"> - {{ revision.diff }} - </div> - </div> -{% endfor %} -</div> -{% endblock %} - -{% block endjs %} - <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/post.js"|media}}'></script> - <script type="text/javascript"> - //todo - take this out into .js file - $(document).ready(function(){ - $("#nav_questions").attr('className',"on"); - $('div.revision div[id^=rev-header-]').bind('click', function(){ - var revId = this.id.substr(11); - toggleRev(revId); - - }); - lanai.highlightSyntax(); - }); - - function toggleRev(id) { - var arrow = $("#rev-arrow-" + id); - var visible = arrow.attr("src").indexOf("hide") > -1; - var path = mediaUrl( - "media/images/expander-arrow-" + - (visible ? "show" : "hide") + - ".gif" + - "?v={{settings.MEDIA_RESOURCE_REVISION}}" - ); - arrow.attr("src", path); - $("#rev-body-" + id).slideToggle("fast"); - } -</script> -{% endblock %} -<!-- end revisions.html --> diff --git a/askbot/skins/old/templates/subscribe_for_tags.html b/askbot/skins/old/templates/subscribe_for_tags.html deleted file mode 100644 index b436fb84..00000000 --- a/askbot/skins/old/templates/subscribe_for_tags.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -{% block title %}{% trans %}Subscribe for tags{% endtrans %}{% endblock %} -{% block content %} -<h1>{% trans %}Subscribe for tags{% endtrans %}</h1> -<p>{% trans %}Please, subscribe for the following tags:{% endtrans %}</p> -<ul class="tags" style="margin-left: 4px"> - {% for tag in tags %} - {{ macros.tag_widget(tag, html_tag = 'li', is_link = False) }} - {% endfor %} -</ul> -<div style="clear:both;padding-top: 5px"> - <form method="post" action="{% url subscribe_for_tags %}">{% csrf_token %} - <input type="hidden" name="tags" value="{{tags|join(' ')|escape}}" /> - <input type="submit" name="ok" value="{% trans %}Subscribe{% endtrans %}" /> - <input type="submit" name="nope" value="{% trans %}Cancel{% endtrans %}" /> - </form> -</div> -{% endblock %} diff --git a/askbot/skins/old/templates/tags.html b/askbot/skins/old/templates/tags.html deleted file mode 100644 index 7d9026af..00000000 --- a/askbot/skins/old/templates/tags.html +++ /dev/null @@ -1,75 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- tags.html --> -{% block title %}{% spaceless %}{% trans %}Tag list{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<!-- Tabs --> -<div class="tabBar"> - {% if stag %} - <h1>{% trans %}Tags, matching "{{ stag }}"{% endtrans %}</h1> - {% else %} - <h1>{% trans %}Tag list{% endtrans %}</h1> - {% endif %} - - <div class="tabsA"> - <a - id="sort_name" - href="{% url tags %}?sort=name" - {% if tab_id == 'name' %}class="on"{% endif %} - title="{% trans %}sorted alphabetically{% endtrans %}" - ><span>{% trans %}by name{% endtrans %}</span></a> - <a - id="sort_used" - href="{% url tags %}?sort=used" - {% if tab_id == 'used' %}class="on"{% endif %} - title="{% trans %}sorted by frequency of tag use{% endtrans %}" - ><span>{% trans %}by popularity{% endtrans %}</span></a> - </div> -</div> -{% if tag_list_type == 'list' %} - {% if not tags.object_list %} - <span>{% trans %}Nothing found{% endtrans %}</span> - {% endif %} - {% if tags.object_list %} - <div class='clearfix'></div> - <ul class='tags'> - {% for tag in tags.object_list %} - <li> - {{ macros.tag_widget( - tag = tag.name, - url_params = 'start_over=true', - html_tag = 'div', - extra_content = '<span class="tag-number">× ' ~ - tag.used_count|intcomma ~ '</span>' - ) - }} - </li> - {% endfor %} - </ul> - <div class="pager"> - {{macros.paginator(paginator_context)}} - </div> - {% endif %} -{% else %} - <div class="clearfix"></div> - {% if not tags %} - <span>{% trans %}Nothing found{% endtrans %}</span> - {% endif %} - {{ macros.tag_cloud(tags = tags, font_sizes = font_size) }} -{% endif %} - -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - /*<![CDATA[*/ - $().ready(function(){ - $("#ipSearchTag").focus(); - $("#type-tag").attr('checked',true); - Hilite.exact = false; - Hilite.elementid = "searchtags"; - Hilite.debug_referrer = location.href; - }); - /*]]>*/ - </script> -{% endblock %} -<!-- end tags.html --> diff --git a/askbot/skins/old/templates/two_column_body.html b/askbot/skins/old/templates/two_column_body.html deleted file mode 100644 index a284744e..00000000 --- a/askbot/skins/old/templates/two_column_body.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} -{% block body_class %}two-col{% endblock %} -{% block body %} -<div id="CALeft"> - {% include "blocks/input_bar.html" %} - {% block content%} - {% endblock%} -</div> -<div id="CARight"> - {% block sidebar%} - {% endblock%} -</div> -{% endblock %} diff --git a/askbot/skins/old/templates/user_profile/user.html b/askbot/skins/old/templates/user_profile/user.html deleted file mode 100644 index ad3d564b..00000000 --- a/askbot/skins/old/templates/user_profile/user.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends "two_column_body.html" %} -<!-- user.html --> -{% block title %}{% spaceless %}{{ page_title }}{% endspaceless %}{% endblock %} -{% block forestyle%} -<style type="text/css"> - .history-table td { padding: 5px; } -</style> -{% endblock %} -{% block content %} - <h1> - {% spaceless %} - <a href="{% url user_profile view_user.id, view_user.username|slugify %}"> - {% trans username=view_user.username %}{{username}}'s profile{% endtrans %} - {% block profilesection %}{% endblock %} - </a> - {% endspaceless %} - </h1> - <div style="margin-left: 5px;"> - {% include "user_profile/user_tabs.html" %} - {% block usercontent %} - {% endblock %} - </div> -{% endblock %}<!-- end user.html --> -{% block endjs %} - <script type="text/javascript"> - var viewUserID = {{view_user.id}}; - askbot['data']['viewUserName'] = '{{ view_user.username }}'; - </script> - {% if request.user|can_moderate_user(view_user) %} - <script type='text/javascript' src='{{"/js/jquery.form.js"|media}}'></script> - {% endif %} - <script type="text/javascript" src='{{"/js/user.js"|media}}'></script> - {% block userjs %} - {% endblock %} -{% endblock %} -{% block sidebar %} - -{{ settings.SIDEBAR_PROFILE_HEADER }} - -{{ settings.SIDEBAR_PROFILE_FOOTER }} - -{% endblock %} -<!-- end of user.html --> diff --git a/askbot/skins/old/templates/user_profile/user_edit.html b/askbot/skins/old/templates/user_profile/user_edit.html deleted file mode 100644 index 1e2fa2d6..00000000 --- a/askbot/skins/old/templates/user_profile/user_edit.html +++ /dev/null @@ -1,100 +0,0 @@ -{% extends "one_column_body.html" %} -{% import "macros.html" as macros %} -<!-- user_edit.html --> -{% block title %}{% spaceless %}{% trans %}Edit user profile{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<h1> - {{ request.user.username }} - {% trans %}edit profile{% endtrans %} -</h1> -<div id="main-body" style="width:100%;padding-top:10px"> - <form name="" action="{% url edit_user request.user.id %}" method="post">{% csrf_token %} - <div id="left" style="float:left;width:180px"> - {% if request.user.email %} - {{ macros.gravatar(request.user, 128) }} - {% else %} - <img src="{{"/images/nophoto.png"|media}}"> - {% endif %} - <h1><a href="{% url faq %}#gravatar">{% trans %}change picture{% endtrans %}</a><h1> - </div> - <div style="float:right;width:750px;text-align:left;"> - <h2>{% trans %}Registered user{% endtrans %}</h2> - <table class="user-details"> - <tr> - <th width="100px"></th> - <th></th> - </tr> - <tr> - <td>{% trans %}Screen Name{% endtrans %}:</td> - <td> - {% if settings.EDITABLE_SCREEN_NAME %} - {{ form.username }} - <span class="form-error"></span> {{ form.username.errors }} </td> - {% else %} - {{ request.user.username }} - {% endif %} - </td> - </tr> - <tr> - <td>{{ form.email.label_tag() }}:</td> - <td>{{ form.email }} <span class="form-error"></span> {{ form.email.errors }} </td> - </tr> - <tr> - <td></td> - <td class="title-desc">{{ form.email.help_text }}</td> - </tr> - <tr> - <td>{{ form.realname.label_tag() }}:</td> - <td>{{ form.realname }} <span class="form-error"></span> {{ form.realname.errors }} </td> - </tr> - <tr> - <td>{{ form.website.label_tag() }}:</td> - <td>{{ form.website }} <span class="form-error"></span> {{ form.website.errors }} </td> - </tr> - <tr> - <td>{{ form.city.label_tag() }}:</td> - <td>{{ form.city }} <span class="form-error"></span> {{ form.city.errors }} </td> - </tr> - <tr> - <td>{{ form.country.label_tag() }}:</td> - <td>{{ form.country }} <span class="form-error"></span> {{ form.country.errors }} </td> - </tr> - <tr> - <td>{{ form.show_country.label_tag() }}:</td> - <td>{{ form.show_country }} <span class="form-error"></span> {{ form.show_country.errors }} </td> - </tr> - <tr> - <td>{{ form.birthday.label_tag() }}:</td> - <td>{{ form.birthday }} <span class="form-error"></span> {{ form.birthday.errors }} </td> - </tr> - <tr> - <td></td> - <td class="title-desc">{{ form.birthday.help_text }}</td> - </tr> - <tr style="height:10px"> - <td colspan="2"> - </td> - </tr> - <tr> - <td style="vertical-align:top">{{ form.about.label_tag() }}:</td> - <td>{{ form.about }} <span class="form-error"></span> {{ form.about.errors }} </td> - </tr> - </table> - <div style="margin:30px 0 60px 0"> - <input type="submit" value="{% trans %}Update{% endtrans %}" class="submit" > - <input id="cancel" type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" > - </div> - </div> - </form> -</div> -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - $().ready(function(){ - $("#nav_profile").attr('className',"on"); - $("#cancel").bind('click', function(){history.go(-1);}) - }); - </script> - {% block userjs %} - {% endblock %} -{% endblock %} -<!-- end user_edit.html --> diff --git a/askbot/skins/old/templates/user_profile/user_email_subscriptions.html b/askbot/skins/old/templates/user_profile/user_email_subscriptions.html deleted file mode 100644 index e6a18dd3..00000000 --- a/askbot/skins/old/templates/user_profile/user_email_subscriptions.html +++ /dev/null @@ -1,27 +0,0 @@ -{% extends "user_profile/user.html" %} -<!-- user_email_subscriptions.html --> -{% block profilesection %} - {% trans %}subscriptions{% endtrans %} -{% endblock %} -{% block usercontent %} - <h2>{% trans %}Email subscription settings{% endtrans %}</h2> - <p class="message">{% trans %}email subscription settings info{% endtrans %}</p> - <div> - {% if action_status %} - <p class="action-status"><span>{{action_status}}</span></p> - {% endif %} - <form method="post" action="">{% csrf_token %} - <table class='form-as-table ab-subscr-form'> - {{email_feeds_form.as_table()}} - </table> - <table class='form-as-table ab-tag-filter-form'> - {{tag_filter_selection_form}} - </table> - <div class="submit-row text-align-right"> - <input type="submit" class="submit" name="save" value="{% trans %}Update{% endtrans %}"/> - <input type="submit" class="submit" name="stop_email" value="{% trans %}Stop sending email{% endtrans %}"/> - </div> - </form> - </div> -{% endblock %} -<!-- end user_email_subscriptions.html --> diff --git a/askbot/skins/old/templates/user_profile/user_favorites.html b/askbot/skins/old/templates/user_profile/user_favorites.html deleted file mode 100644 index bb019c90..00000000 --- a/askbot/skins/old/templates/user_profile/user_favorites.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "user_profile/user.html" %} -<!-- user_favorites.html --> -{% block profilesection %} - {% trans %}followed questions{% endtrans %} -{% endblock %} -{% block usercontent %} -{% include "user_profile/users_questions.html" %} -{% endblock %} -<!-- end user_favorites.html --> diff --git a/askbot/skins/old/templates/user_profile/user_inbox.html b/askbot/skins/old/templates/user_profile/user_inbox.html deleted file mode 100644 index e7e3dbfe..00000000 --- a/askbot/skins/old/templates/user_profile/user_inbox.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "user_profile/user.html" %} -{% import "macros.html" as macros %} -<!-- user_responses.html --> -{# -This template accepts a list of response list -they are a generalized form of any response and - -The following properties of response object are used: -timestamp - when it happened -user - user who gave response (database object) -response_type - type of response -response_url - link to the question -response_title - title of the question -response_snippet - abbreviated content of the response -inbox_section - forum|flags -#} -{% block profilesection %} - {% trans %}inbox{% endtrans %} -{% endblock %} -{% block usercontent %} - <div style="padding-top:5px;font-size:13px;"> - {% set re_count = request.user.new_response_count + - request.user.seen_response_count - %} - {% if moderation_items %} - {% set flag_count = moderation_items['new_count'] + - moderation_items['seen_count'] - %} - {% else %} - {% set flag_count = 0 %} - {% endif %} - {% if re_count > 0 and flag_count > 0 %} - <div id="re_sections"> - {% trans %}Sections:{% endtrans %} - <a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=forum" - {% if inbox_section == 'forum' %}class="on"{% endif %} - > - {% trans %}forum responses ({{re_count}}){% endtrans -%} - </a> | - <a href="{{request.user.get_absolute_url()}}?sort=inbox§ion=flags" - {% if inbox_section == 'flags' %}class="on"{% endif %} - > - {% trans %}flagged items ({{flag_count}}){% endtrans %} - </a> - </div> - {% endif %} - {% if inbox_section == 'forum' %} - <div id="re_tools"> - <strong>{% trans %}select:{% endtrans %}</strong> - <a id="sel_all">{% trans %}all{% endtrans %}</a> | - <a id="sel_seen">{% trans %}seen{% endtrans %}</a> | - <a id="sel_new">{% trans %}new{% endtrans %}</a> | - <a id="sel_none">{% trans %}none{% endtrans %}</a><br /> - <button id="re_mark_seen">{% trans %}mark as seen{% endtrans %}</button> - <button id="re_mark_new">{% trans %}mark as new{% endtrans %}</button> - <button id="re_dismiss">{% trans %}dismiss{% endtrans %}</button> - </div> - {% endif %} - <div id="responses"> - {% for response in responses %} - <div class="response-parent"> - <p class="headline"> - <strong>"{{ response.response_title.strip()|escape}}"</strong> - </p> - <div id="re_{{response.id}}" class="re{% if response.is_new %} new highlight{% else %} seen{% endif %}"> - {% if inbox_section == 'forum' %}<input type="checkbox" />{% endif %} - <div class="face"> - {{ macros.gravatar(response.user, 48) }} - </div> - <a style="font-size:12px" href="{{ response.user.get_absolute_url() }}">{{ response.user.username }}</a> - <a style="text-decoration:none;" href="{{ response.response_url }}"> - {{ response.response_type }} - ({{ response.timestamp|diff_date(True) }}):<br/> - {{ response.response_snippet}} - </a> - </div> - {% if response.nested_responses %} - {%for nested_response in response.nested_responses %} - <div id="re_{{nested_response.id}}" class="re{% if nested_response.is_new %} new highlight{% else %} seen{% endif %}"> - {% if inbox_section == 'forum' %}<input type="checkbox" />{% endif %} - <div class="face"> - {{ macros.gravatar(nested_response.user, 48) }} - </div> - <a style="font-size:12px" href="{{ nested_response.user.get_absolute_url() }}">{{ nested_response.user.username }}</a> - <a style="text-decoration:none;" href="{{ nested_response.response_url }}"> - {{ nested_response.response_type }} - ({{ nested_response.timestamp|diff_date(True) }}):<br/> - {{ nested_response.response_snippet}} - </a> - </div> - {%endfor%} - {%endif%} - </div> - {% endfor %} - </div> - </div> -{% endblock %} -{% block userjs %} - <script type="text/javascript" src="{{'/js/user.js'|media}}"></script> - <script type="text/javascript"> - var askbot = askbot || {}; - askbot['urls'] = askbot['urls'] || {}; - askbot['urls']['manageInbox'] = '{% url manage_inbox %}'; - </script> -<!-- end user_responses.html --> -{% endblock %} diff --git a/askbot/skins/old/templates/user_profile/user_info.html b/askbot/skins/old/templates/user_profile/user_info.html deleted file mode 100644 index 36b782e5..00000000 --- a/askbot/skins/old/templates/user_profile/user_info.html +++ /dev/null @@ -1,107 +0,0 @@ -<!-- user_info.html --> -{% import "macros.html" as macros %} -<table class="user-info-table"> - <tr> - <td style="vertical-align:top;text-align:center;"> - <div class='avatar'> - {{ macros.gravatar(view_user, 128) }} - {% if request.user == view_user %} - <p><a - {% if support_custom_avatars %} - href="{% url avatar_change %}" - {% else %} - href="{% url faq %}#gravatar" - {% endif %} - >{% trans %}change picture{% endtrans %}</a></p> - {% if support_custom_avatars %} - <p><a - href="{% url avatar_delete %}" - >{% trans %}remove{% endtrans %}</a> - </p> - {% endif %} - {% endif %} - </div> - <div class="scoreNumber">{{view_user.reputation|intcomma}}</div> - <p><b style="color:#777;">{% trans %}reputation{% endtrans %}</b></p> - {% if user_follow_feature_on %} - {{ macros.follow_user_toggle(visitor = request.user, subject = view_user) }} - {% endif %} - </td> - <td width="360" style="padding-left:5px;vertical-align: top;"> - <table class="user-details"> - {% if request.user == view_user %} - <tr> - <td class="user-profile-tool-links" align="left" colspan="2"> - <a href="{% url edit_user view_user.id %}"> - {% trans %}update profile{% endtrans %} - </a> - {% if request.user == view_user and settings.ALLOW_ADD_REMOVE_LOGIN_METHODS %} - | <a href="{{ settings.LOGIN_URL }}?next={{ settings.LOGIN_URL }}"> - {% trans %}manage login methods{% endtrans %} - </a> - {% endif %} - </td> - </tr> - {% endif %} - <tr> - <th colspan="2" align="left"> - <h3>{{user_status_for_display}}</h3> - </th> - </tr> - {% if view_user.real_name %} - <tr> - <td>{% trans %}real name{% endtrans %}</td> - <td><b>{{view_user.real_name}}</b></td> - </tr> - {% endif %} - <tr> - <td>{% trans %}member for{% endtrans %}</td> - <td><strong>{{ view_user.date_joined|diff_date }}</strong></td> - </tr> - {% if view_user.last_seen %} - <tr> - <td>{% trans %}last seen{% endtrans %}</td> - <td><strong title="{{ view_user.last_seen }}">{{view_user.last_seen|diff_date}}</strong></td> - </tr> - {% endif %} - {% if view_user.website %} - <tr> - <td>{% trans %}user website{% endtrans %}</td> - <td>{{ macros.user_website_link(view_user, max_display_length = 30) }}</td> - </tr> - {% endif %} - {% if view_user.location or view_user.country %} - <tr> - <td>{% trans %}location{% endtrans %}</td> - <td>{{ macros.user_full_location(view_user) }}</td> - </tr> - {% endif %} - {% if view_user.date_of_birth%} - <tr> - <!--todo - redo this with whole sentence translation --> - <td>{% trans %}age{% endtrans %}</td> - <td>{{view_user.date_of_birth|get_age}} {% trans %}age unit{% endtrans %}</td> - </tr> - {% endif %} - {# - <!-- - {% if votes_today_left %} - <tr> - <td>{% trans "todays unused votes" %}</td> - <td><strong class="darkred">{{ votes_today_left }}</strong> {% trans "votes left" %}</td> - </tr> - {% endif %} - --> - #} - </table> - </td> - <td width="380"> - <div class="user-about"> - {% if view_user.about %} - {{view_user.about|linebreaks}} - {% endif %} - </div> - </td> - </tr> -</table> -<!-- end user_info.html --> diff --git a/askbot/skins/old/templates/user_profile/user_moderate.html b/askbot/skins/old/templates/user_profile/user_moderate.html deleted file mode 100644 index b2f350df..00000000 --- a/askbot/skins/old/templates/user_profile/user_moderate.html +++ /dev/null @@ -1,94 +0,0 @@ -{% extends "user_profile/user.html" %} -<!-- user_moderate.html --> -{% block profilesection %} - {% trans %}moderation{% endtrans %} -{% endblock %} -{% block usercontent %} -{% if request.user != view_user %} - <h3>{% trans username=view_user.username, status=view_user.get_status_display() %}{{username}}'s current status is "{{status}}"{% endtrans %} - </h3> - {% if user_status_changed %} - <p class="action-status"><span>{% trans %}User status changed{% endtrans %}</span></p> - {% endif %} - <form method="post">{% csrf_token %} - <input type="hidden" name="sort" value="moderate"/> - <table class="form-as-table"> - {{ change_user_status_form.as_table() }} - </table> - <p id="id_user_status_info"> - </p> - <input type="submit" class="submit" name="change_status" value="{% trans %}Save{% endtrans %}" /> - </form> -{% endif %} -<hr/> -<h3> -{% if request.user == view_user %} - {% trans reputation=view_user.reputation %}Your current reputation is {{reputation}} points{% endtrans %} -{% else %} - {% trans reputation=view_user.reputation %}User's current reputation is {{reputation}} points{% endtrans %} -{% endif %} -</h3> -{% if user_rep_changed %} - <p class="action-status"><span>{% trans %}User reputation changed{% endtrans %}</span></p> -{% endif %} -<form method="post">{% csrf_token %} - <input type="hidden" name="sort" value="moderate"/> - <table class="form-as-table"> - {{ change_user_reputation_form.as_table() }} - </table> - <input type="submit" class="submit" name="subtract_reputation" value="{% trans %}Subtract{% endtrans %}" /> - <input type="submit" class="submit" name="add_reputation" value="{% trans %}Add{% endtrans %}" /> -</form> -{% if request.user != view_user %} -<hr/> -<h3>{% trans username=view_user.username %}Send message to {{username}}{% endtrans %}</h3> -<p>{% trans %}An email will be sent to the user with 'reply-to' field set to your email address. Please make sure that your address is entered correctly.{% endtrans %}</p> - {% if message_sent %} - <p class="action-status"><span>{% trans %}Message sent{% endtrans %}</span></p> - {% endif %} -<form method="post">{% csrf_token %} - <input type="hidden" name="sort" value="moderate"/> - <div class="form-row-vertical"> - <label for="id_subject_line">{{ send_message_form.subject_line.label}}</label> - {% if send_message_form.subject_line.errors %} - <p class="error">{{send_message_form.subject_line.errors|join(', ')}}</p> - {% endif %} - {{ send_message_form.subject_line}} - </div> - <div class="form-row-vertical"> - <label for="id_body_text">{{ send_message_form.body_text.label}}</label> - {% if send_message_form.body_text.errors %} - <p class="error">{{send_message_form.body_text.errors|join(', ')}}</p> - {% endif %} - {{ send_message_form.body_text}} - </div> - <input type="submit" class="submit" name="send_message" value="{% trans %}Send message{% endtrans %}" /> -</form> -{% endif %} -{% endblock %} -{% block endjs %} - <script type="text/javascript" > - $("#id_user_status_info").hide(); - $("#id_user_status").change(function () { - var optionValue = $(this).attr('value'); - if (optionValue == "d") { - $('#id_user_status_info').html("{% trans %}Administrators have privileges of normal users, but in addition they can assign/revoke any status to any user, and are exempt from the reputation limits.{% endtrans %}"); - $('#id_user_status_info').show('slow'); - } else if (optionValue == "m"){ - $('#id_user_status_info').html("{% trans %}Moderators have the same privileges as administrators, but cannot add or remove user status of 'moderator' or 'administrator'.{% endtrans %}"); - $('#id_user_status_info').show('slow'); - } else if (optionValue == "a"){ - $('#id_user_status_info').html("{% trans %}'Approved' status means the same as regular user.{% endtrans %}"); - $('#id_user_status_info').show('slow'); - } else if (optionValue == "s"){ - $('#id_user_status_info').html("{% trans %}Suspended users can only edit or delete their own posts.{% endtrans %}"); - $('#id_user_status_info').show('slow'); - } else if (optionValue == "b"){ - $('#id_user_status_info').html("{% trans %}Blocked users can only login and send feedback to the site administrators.{% endtrans %}"); - $('#id_user_status_info').show('slow'); - } else { - $('#id_user_status_info').hide('slow'); - } - }) - </script> -{% endblock %} diff --git a/askbot/skins/old/templates/user_profile/user_network.html b/askbot/skins/old/templates/user_profile/user_network.html deleted file mode 100644 index 1fd2e06a..00000000 --- a/askbot/skins/old/templates/user_profile/user_network.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "user_profile/user.html" %} -{% import "macros.html" as macros %} -<!-- user_network.html --> -{% block profileseciton %} - {% trans %}network{% endtrans %} -{% endblock %} -{% block usercontent %} - {% if followed_users or followers %} - {% if followers %} - <h2>{% trans count=followers|length %}Followed by {{count}} person{% pluralize count %}Followed by {{count}} people{% endtrans %}</h2> - {{ macros.user_list(followers, profile_section = 'network') }} - {% endif %} - {% if followed_users %} - <h2>{% trans count=followed_users|length %}Following {{count}} person{% pluralize count %}Following {{count}} people{% endtrans %}</h2> - {{ macros.user_list(followed_users, profile_section = 'network') }} - {% endif %} - {% else %} - {% if request.user == view_user %} - <p>{% trans %}Your network is empty. Would you like to follow someone? - Just visit their profiles and click "follow"{% endtrans %}</p> - {% else %} - <p>{% trans username = view_user.username %}{{username}}'s network is empty{% endtrans %}</p> - {% endif %} - {% endif %} -{% endblock %} -<!-- end user_network.html --> diff --git a/askbot/skins/old/templates/user_profile/user_recent.html b/askbot/skins/old/templates/user_profile/user_recent.html deleted file mode 100644 index cbd59202..00000000 --- a/askbot/skins/old/templates/user_profile/user_recent.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends "user_profile/user.html" %} -<!-- user_recent.html --> -{% block profilesection %} - {% trans %}activity{% endtrans %} -{% endblock %} -{% block usercontent %} - <div style="padding-top:5px;font-size:13px;"> - {% for act in activities %} - <div style="clear:both;line-height:20px" > - <div style="width:180px;float:left">{{ act.time|diff_date(True) }}</div> - <div style="width:150px;float:left"> - <span class="user-action-{{ act.type_id }}">{{ act.type }}</span> - </div> - <div style="float:left;overflow:hidden;"> - {% if act.is_badge %} - <a href="{{act.badge.get_absolute_url()}}" title="{{ act.badge.get_type_display() }} : {% trans description=act.badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ act.badge.css_class }}">●</span> {% trans name=act.badge.name %}{{name}}{% endtrans %}</a> - {% if act.related_object_type == 'question' %}{# question #} - {% for question in questions %}{# could also create a new dict #} - {% if question.question_id == act.obj %} - (<a title="{{question.summary|collapse}}" - href="{% url question question.question_id %}{{question.title|slugify}}">{% trans %}source{% endtrans %}</a>) - {% endif %} - {% endfor %} - {% elif act.related_object_type == 'answer' %}{# answer #} - {% for answer in answers %}{# could also create a new dict #} - {% if answer.answer_id == act.obj %} - (<a title="{{answer.text|collapse}}" - href="{% url question answer.question_id %}{{answer.question_title|slugify}}#{{answer.answer_id}}">{% trans %}source{% endtrans %}</a>) - {% endif %} - {% endfor %} - {% endif %} - {% else %} - <span class="post-type-{{ act.type_id }}"><a href="{{ act.title_link }}">{{ act.title|escape }}</a></span> - {% if act.summary %}<span class="revision-summary">{{ act.summary|escape }}</span>{% endif %} - {% endif %} - <div style="height:5px"></div> - </div> - </div> - {% endfor %} - </div> -{% endblock %} -<!-- end user_recent.html --> diff --git a/askbot/skins/old/templates/user_profile/user_reputation.html b/askbot/skins/old/templates/user_profile/user_reputation.html deleted file mode 100644 index 99b304d2..00000000 --- a/askbot/skins/old/templates/user_profile/user_reputation.html +++ /dev/null @@ -1,40 +0,0 @@ -{% extends "user_profile/user.html" %} -<!-- user_reputation.html --> -{% block profilesection %} - {% trans %}karma{% endtrans %} -{% endblock %} -{% block usercontent %} - <div class="karma-summary"> - <div id="diagram" class="karma-diagram"></div> - <div class="karma-details"> - {% if view_user.id == user.id %} - <h3>{% trans %}Your karma change log.{% endtrans %}</h3> - {% else %} - <h3>{% trans user_name=view_user.username %}{{user_name}}'s karma change log{% endtrans %}</h3> - {% endif %} - {% for rep in reputation %} - <p> - <span class="karma-gained">{{ rep.positive }}</span> - <span class="karma-lost">{{ rep.negative }}</span> - {{ rep.get_explanation_snippet() }} - <span class="small">({{rep.reputed_at|diff_date}})</span> - </p> - {% endfor %} - </div> - </div> -{% endblock %} -{% block userjs %} - <script type='text/javascript' src='{{"/js/excanvas.min.js"|media}}'></script> - <script type='text/javascript' src='{{"/js/jquery.flot.min.js"|media}}'></script> - <script type="text/javascript"> - $().ready(function(){ - var d = {{ reps }}; - var placeholder = $("#diagram"); - var plot = $.plot(placeholder, [d], { - xaxis: { mode: "time" }, - points: { show: true }, - lines: { show: true } - }); - }); - </script> -{% endblock %}<!-- end user_reputation.html --> diff --git a/askbot/skins/old/templates/user_profile/user_stats.html b/askbot/skins/old/templates/user_profile/user_stats.html deleted file mode 100644 index 0fdbe746..00000000 --- a/askbot/skins/old/templates/user_profile/user_stats.html +++ /dev/null @@ -1,159 +0,0 @@ -{% extends "user_profile/user.html" %} -{% import "macros.html" as macros %} -<!-- user_stats.html --> -{% block profilesection %} - {% trans %}overview{% endtrans %} -{% endblock %} - {% block usercontent %} - {% include "user_profile/user_info.html" %} - <a name="questions"></a> - {% spaceless %} - <h2>{% trans counter=questions|length %}<span class="count">{{counter}}</span> Question{% pluralize %}<span class="count">{{counter}}</span> Questions{% endtrans %}</h2> - {% endspaceless %} - {% include "user_profile/users_questions.html" %} - <a name="answers"></a> - {% spaceless %} - <h2 style="clear:both;">{% trans counter=answered_questions|length %}<span class="count">{{counter}}</span> Answer{% pluralize %}<span class="count">{{counter}}</span> Answers{% endtrans %}</h2> - {% endspaceless %} - <div class="user-stats-table"> - {% for answered_question in answered_questions %} - <div class="answer-summary"> - <a title="{{answered_question.summary|collapse}}" - href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}"> - <span class="answer-votes {% if answered_question.answer_accepted %}answered-accepted{% endif %}" - title="{% trans answer_score=answered_question.answer_score %}the answer has been voted for {{ answer_score }} times{% endtrans %} {% if answered_question.answer_accepted %}{% trans %}this answer has been selected as correct{% endtrans %}{%endif%}"> - {{ answered_question.answer_score }} - </span> - </a> - <div class="answer-link"> - {% spaceless %} - <a href="{% url question answered_question.id %}{{answered_question.title|slugify}}#{{answered_question.answer_id}}">{{answered_question.title}}</a> - {% endspaceless %} - {% if answered_question.comment_count %} - <span> - {% trans comment_count=answered_question.comment_count %}({{comment_count}} comment){% pluralize %}the answer has been commented {{comment_count}} times{% endtrans %} - </span> - {% endif %} - </div> - </div> - {% endfor %} - </div> - <br/> - <a name="votes"></a> - {% spaceless %} - <h2>{% trans cnt=total_votes %}<span class="count">{{cnt}}</span> Vote{% pluralize %}<span class="count">{{cnt}}</span> Votes {% endtrans %}</h2> - {% endspaceless %} - <div class="user-stats-table"> - <table> - <tr> - <td width="60"> - <img style="cursor: default;" src="{{"/images/vote-arrow-up-on.png"|media}}" alt="{% trans %}thumb up{% endtrans %}" /> - <span title="{% trans %}user has voted up this many times{% endtrans %}" class="vote-count">{{up_votes}}</span> - </td> - <td width="60"> - <img style="cursor: default;" src="{{"/images/vote-arrow-down-on.png"|media}}" alt="{% trans %}thumb down{% endtrans %}" /> - <span title="{% trans %}user voted down this many times{% endtrans %}" class="vote-count">{{down_votes}}</span> - - </td> - </tr> - </table> - </div> - <a name="tags"></a> - {% spaceless %} - <h2>{% trans counter=user_tags|length %}<span class="count">{{counter}}</span> Tag{% pluralize %}<span class="count">{{counter}}</span> Tags{% endtrans %}</h2> - {% endspaceless %} - <div class="user-stats-table"> - <table class="tags"> - <tr> - <td valign="top"> - <ul id="ab-user-tags" class="tags"> - {% for tag in user_tags %} - <li> - {{ macros.tag_widget( - tag.name, - html_tag = 'div', - url_params = - "author=" ~ view_user.id ~ - "&start_over=true", - extra_content = - '<span class="tag-number">× ' ~ - tag.user_tag_usage_count|intcomma ~ - '</span>' - ) - }} - </li> - {# - {% if loop.index is divisibleby 10 %} - </td> - <td width="180" valign="top"> - {% endif %} - #} - {% endfor %} - </ul> - </td> - </tr> - </table> - </div> - <a name="badges"></a> - {% spaceless %} - <h2>{% trans counter=total_awards %}<span class="count">{{counter}}</span> Badge{% pluralize %}<span class="count">{{counter}}</span> Badges{% endtrans %}</h2> - {% endspaceless %} - <div class="user-stats-table badges"> - <table> - <tr> - <td style="line-height:35px"> - {% for badge in badges %}{# todo: translate badge name properly #} - <a - href="{{badge.get_absolute_url()}}" - title="{% trans description=badge.description %}{{description}}{% endtrans %}" - class="medal" - ><span class="{{ badge.css_class }}">●</span> {% trans name=badge.name %}{{name}}{% endtrans %} - </a> - <span class="tag-number">× - <span class="badge-context-toggle">{{ badge.award_badge.count()|intcomma }}</span> - </span> - <ul id="badge-context-{{ badge.id }}" class="badge-context-list" style="display:none"> - {% for award in badge.award_badge.filter(user = view_user) %} - {% if award.content_type in (question_type, answer_type) %} - <li> - <a - title="{{ award.content_object.get_snippet()|collapse }}" - href="{{ award.content_object.get_absolute_url() }}" - >{% if award.content_type == answer_type %}{% trans %}Answer to:{% endtrans %}{% endif %} {{ award.content_object.get_origin_post().title }}</a> - </li> - {% endif %} - {% endfor %} - </ul> - {% if loop.index is divisibleby 3 %} - </td></tr> - <tr><td style="line-height:35px"> - {% endif %} - {% endfor %} - </td> - </tr> - </table> - </div> -{% endblock %} -{% block endjs %} - {{ super() }} - <script type="text/javascript"> - $(document).ready(function(){ - $('.badge-context-toggle').each(function(idx, elem){ - var context_list = $(elem).parent().next('ul'); - if (context_list.children().length > 0){ - $(elem).addClass('active'); - var toggle_display = function(){ - if (context_list.css('display') == 'none'){ - $('.badge-context-list').hide();{# hide all context lists #} - context_list.show(); - } else { - context_list.hide(); - } - }; - $(elem).click(toggle_display); - } - }); - }); - </script> -{% endblock %} -<!-- end user_stats.html --> diff --git a/askbot/skins/old/templates/user_profile/user_tabs.html b/askbot/skins/old/templates/user_profile/user_tabs.html deleted file mode 100644 index ad24a303..00000000 --- a/askbot/skins/old/templates/user_profile/user_tabs.html +++ /dev/null @@ -1,52 +0,0 @@ -<!-- user_tabs.html --> -<div class="tabBar"> - <div class="tabsC"> - <a id="stats" {% if tab_name=="stats" %}class="on"{% endif %} - title="{% trans %}User profile{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=stats" - ><span>{% trans %}overview{% endtrans %}</span></a> - {% if request.user == view_user or request.user|can_moderate_user(view_user) %} - <a id="inbox" {% if tab_name=="inbox" %}class="on"{% endif %} - title="{% trans %}comments and answers to others questions{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=inbox" - ><span>{% trans %}inbox{% endtrans %}</span></a> - {% endif %} - {% if user_follow_feature_on %} - <a id="network" {% if tab_name=="network" %}class="on"{% endif %} - title="{% trans %}followers and followed users{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=network" - ><span>{% trans %}network{% endtrans %}</span></a> - {% endif %} - <a id="reputation" {% if tab_name=="reputation" %}class="on"{% endif %} - title="{% trans %}graph of user reputation{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=reputation" - ><span>{% trans %}reputation history{% endtrans %}</span></a> - <a id="favorites" {% if tab_name=="favorites" %}class="on"{% endif %} - title="{% trans %}questions that user is following{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=favorites" - ><span>{% trans %}followed questions{% endtrans %}</span></a> - <a id="recent" {% if tab_name=="recent" %}class="on"{% endif %} - title="{% trans %}recent activity{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=recent" - ><span>{% trans %}activity{% endtrans %}</span></a> - {% if request.user == view_user or request.user|can_moderate_user(view_user) %} - <a id="votes" {% if tab_name=="votes" %}class="on"{% endif %} - title="{% trans %}user vote record{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=votes" - ><span>{% trans %}casted votes{% endtrans %}</span></a> - {% endif %} - {% if request.user == view_user or request.user|can_moderate_user(view_user) %} - <a id="email_subscriptions" {% if tab_name=="email_subscriptions" %}class="on"{% endif %} - title="{% trans %}email subscription settings{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=email_subscriptions" - ><span>{% trans %}subscriptions{% endtrans %}</span></a> - {% endif %} - {% if request.user|can_moderate_user(view_user) %} - <a id="moderation" {% if tab_name=="moderation" %}class="on"{% endif %} - title="{% trans %}moderate this user{% endtrans %}" - href="{% url user_profile view_user.id, view_user.username|slugify %}?sort=moderation" - ><span>{% trans %}moderation{% endtrans %}</span></a> - {% endif %} - </div> -</div> -<!-- end user_tabs.html --> diff --git a/askbot/skins/old/templates/user_profile/user_votes.html b/askbot/skins/old/templates/user_profile/user_votes.html deleted file mode 100644 index d5e469ae..00000000 --- a/askbot/skins/old/templates/user_profile/user_votes.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "user_profile/user.html" %} -<!-- user_votes.html --> -{% block profilesection %} - {% trans %}votes{% endtrans %} -{% endblock %} -{% block usercontent %} - <div style="padding-top:5px;font-size:13px;"> - {% for vote in votes %} - <div style="clear:both;line-height:20px" > - <div style="width:150px;float:left">{{vote.voted_at|diff_date(True)}}</div> - <div style="width:30px;float:left"> - {% if vote.vote==1 %} - <img src="{{"/images/vote-arrow-up-on.png"|media}}" title="{% trans %}upvote{% endtrans %}"> - {% else %} - <img src="{{"/images/vote-arrow-down-on.png"|media}}" title="{% trans %}downvote{% endtrans %}"> - {% endif %} - </div> - <div style="float:left;overflow:hidden;width:750px"> - {% if vote.answer_id==0 %} - <span class="question-title-link"><a href="{% url question vote.question_id %}{{ vote.title|slugify }}">{{ vote.title|escape }}</a></span> - {% else %} - <span class="answer-title-link" ><a href="{% url question vote.question_id %}{{ vote.title|slugify }}#{{ vote.answer_id }}">{{ vote.title|escape}}</a></span> - {% endif %} - <div style="height:5px"></div> - </div> - </div> - {% endfor %} - </div> -{% endblock %} -<!-- end user_votes.html --> diff --git a/askbot/skins/old/templates/user_profile/users_questions.html b/askbot/skins/old/templates/user_profile/users_questions.html deleted file mode 100644 index 41809a62..00000000 --- a/askbot/skins/old/templates/user_profile/users_questions.html +++ /dev/null @@ -1,8 +0,0 @@ -<!-- users_questions.html --> -{% import "macros.html" as macros %} -<div class="user-stats-table"> - {% for question in questions %} - {{macros.question_summary(question, extra_class='narrow')}} - {% endfor %} -</div> -<!-- end users_questions.html --> diff --git a/askbot/skins/old/templates/users.html b/askbot/skins/old/templates/users.html deleted file mode 100644 index 750b3abb..00000000 --- a/askbot/skins/old/templates/users.html +++ /dev/null @@ -1,58 +0,0 @@ -{% extends "two_column_body.html" %} -{% import "macros.html" as macros %} -<!-- users.html --> -{% block title %}{% spaceless %}{% trans %}Users{% endtrans %}{% endspaceless %}{% endblock %} -{% block content %} -<div class="tabBar"> - <h1>{% trans %}Users{% endtrans %}</h1> - <div class="tabsA"> - <a - id="sort_reputation" - href="{% url users %}?sort=reputation" - {% if tab_id == 'reputation' %}class="on"{% endif %} - title="{% trans %}reputation{% endtrans %}" - ><span>{% trans %}reputation{% endtrans %}</span></a> - <a - id="sort_newest" - href="{% url users %}?sort=newest" - {% if tab_id == 'newest' %}class="on"{% endif %} - class="off" title="{% trans %}recent{% endtrans %}" - ><span>{% trans %}recent{% endtrans %}</span></a> - <a - id="sort_last" - href="{% url users %}?sort=last" - {% if tab_id == 'last' %}class="on"{% endif %} - class="off" title="{% trans %}oldest{% endtrans %}" - ><span>{% trans %}oldest{% endtrans %}<span></a> - <a - id="sort_user" - href="{% url users %}?sort=user" - {% if tab_id == 'user' %}class="on"{% endif %} - title="{% trans %}by username{% endtrans %}" - ><span>{% trans %}by username{% endtrans %}</span></a> - </div> -</div> -<p> - {% if suser %} - {% trans %}users matching query {{suser}}:{% endtrans %} - {% endif %} - {% if not users.object_list %} - <span>{% trans %}Nothing found.{% endtrans %}</span> - {% endif %} -</p> -{{ macros.user_list(users.object_list) }} -<div class="pager"> - {{ macros.paginator(paginator_context) }} -</div> -{% endblock %} -{% block endjs %} - <script type="text/javascript"> - //todo move javascript out - $().ready(function(){ - Hilite.exact = false; - Hilite.elementid = "main-body"; - Hilite.debug_referrer = location.href; - }); - </script> -{% endblock %} -<!-- end users.html --> |