summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/deps/django_authopenid/util.py6
-rw-r--r--askbot/skins/default/media/js/post.js18
-rwxr-xr-xaskbot/skins/default/media/style/style.css1
-rw-r--r--askbot/skins/default/templates/macros.html23
4 files changed, 21 insertions, 27 deletions
diff --git a/askbot/deps/django_authopenid/util.py b/askbot/deps/django_authopenid/util.py
index 43666566..67d3ba43 100644
--- a/askbot/deps/django_authopenid/util.py
+++ b/askbot/deps/django_authopenid/util.py
@@ -192,10 +192,12 @@ def get_major_login_providers():
data = SortedDict()
if use_password_login():
+ site_name = askbot_settings.APP_SHORT_NAME
+ prompt = _('%(site)s user name and password') % {'site': site_name}
data['local'] = {
'name': 'local',
- 'display_name': askbot_settings.APP_SHORT_NAME,
- 'extra_token_name': 'Askbot user name and password',
+ 'display_name': site_name,
+ 'extra_token_name': prompt,
'type': 'password',
'create_password_prompt': _('Create a password-protected account'),
'change_password_prompt': _('Change your password'),
diff --git a/askbot/skins/default/media/js/post.js b/askbot/skins/default/media/js/post.js
index 3cb031c1..59e245bc 100644
--- a/askbot/skins/default/media/js/post.js
+++ b/askbot/skins/default/media/js/post.js
@@ -1357,7 +1357,7 @@ PostCommentsWidget.prototype.decorate = function(element){
if (this._user_can_post == false){
setupButtonEventHandlers(
this._activate_button,
- this.getDenyHandler()
+ this.getReadOnlyLoadHandler()
);
}
else {
@@ -1425,19 +1425,13 @@ PostCommentsWidget.prototype.getActivateHandler = function(){
};
};
-PostCommentsWidget.prototype.getDenyHandler = function(){
+PostCommentsWidget.prototype.getReadOnlyLoadHandler = function(){
var me = this;
return function(){
- if (me._denied == false){
- var denial = $('<p id="denial" class="comment"></p>');
- denial.html($.i18n._('to comment, need') + ' ' +
- repNeededForComments + ' ' + $.i18n._('community karma points') +
- '<a href="' + scriptUrl + $.i18n._('faq/') + '" class="comment-user">' +
- $.i18n._('please see') + 'faq</a></span>'
- );
- me._controls.append(denial);
- }
- me._denied = true;
+ me.reloadAllComments(function(json){
+ me.reRenderComments(json);
+ me._activate_button.remove();
+ });
};
};
diff --git a/askbot/skins/default/media/style/style.css b/askbot/skins/default/media/style/style.css
index 1b3cb9e4..a761716a 100755
--- a/askbot/skins/default/media/style/style.css
+++ b/askbot/skins/default/media/style/style.css
@@ -1319,6 +1319,7 @@ a:hover.medal {
}
.comments textarea {
+ display: block;
height: 48px;
width: 664px;
margin: 0 0 4px 0;
diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html
index 0db6eb53..7de041be 100644
--- a/askbot/skins/default/templates/macros.html
+++ b/askbot/skins/default/templates/macros.html
@@ -288,22 +288,19 @@ poor design of the data or methods on data objects #}
truncated: {% if post.comment_count > max_comments %}true{% else %}false{% endif %}
};
</script>
- <input type="hidden" value="{{ can_post }}" />
- {% if can_post or post.comment_count > max_comments %}
+ {% 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 %}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 %}
- {% if post.comment_count > max_comments %}
- {% set remaining_comments = post.comment_count - max_comments %}
- {% if can_post %}/
- {% 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 %}
- {% endif %}
- </a>
+ </a>
+ {% elif can_post %}
+ <a class="button">{% trans %}add comment{% endtrans %}</a>
{% endif %}
</div>
</div>