aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po70
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html25
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html2
-rw-r--r--mediagoblin/user_pages/views.py15
4 files changed, 62 insertions, 50 deletions
diff --git a/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
index 16a235a2..c6ed08d7 100644
--- a/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
+++ b/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2011-09-25 20:26-0500\n"
+"POT-Creation-Date: 2011-10-03 21:29-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -41,75 +41,75 @@ msgstr ""
msgid "Email address"
msgstr ""
-#: mediagoblin/auth/views.py:42
+#: mediagoblin/auth/views.py:55
msgid "Sorry, registration is disabled on this instance."
msgstr ""
-#: mediagoblin/auth/views.py:60
+#: mediagoblin/auth/views.py:73
msgid "Sorry, a user with that name already exists."
msgstr ""
-#: mediagoblin/auth/views.py:64
+#: mediagoblin/auth/views.py:77
msgid "Sorry, that email address has already been taken."
msgstr ""
-#: mediagoblin/auth/views.py:165
+#: mediagoblin/auth/views.py:179
msgid ""
"Your email address has been verified. You may now login, edit your "
"profile, and submit images!"
msgstr ""
-#: mediagoblin/auth/views.py:171
+#: mediagoblin/auth/views.py:185
msgid "The verification key or user id is incorrect"
msgstr ""
-#: mediagoblin/auth/views.py:192
+#: mediagoblin/auth/views.py:207
msgid "Resent your verification email."
msgstr ""
-#: mediagoblin/auth/views.py:228
+#: mediagoblin/auth/views.py:248
msgid ""
"Could not send password recovery email as your username is inactive or "
"your account's email address has not been verified."
msgstr ""
-#: mediagoblin/edit/forms.py:26 mediagoblin/submit/forms.py:27
+#: mediagoblin/edit/forms.py:24 mediagoblin/submit/forms.py:27
msgid "Title"
msgstr ""
-#: mediagoblin/edit/forms.py:30 mediagoblin/submit/forms.py:32
+#: mediagoblin/edit/forms.py:28 mediagoblin/submit/forms.py:32
msgid "Tags"
msgstr ""
-#: mediagoblin/edit/forms.py:33
+#: mediagoblin/edit/forms.py:31
msgid "Slug"
msgstr ""
-#: mediagoblin/edit/forms.py:34
+#: mediagoblin/edit/forms.py:32
msgid "The slug can't be empty"
msgstr ""
-#: mediagoblin/edit/forms.py:35
+#: mediagoblin/edit/forms.py:33
msgid "The title part of this media's URL. You usually don't need to change this."
msgstr ""
-#: mediagoblin/edit/forms.py:42
+#: mediagoblin/edit/forms.py:40
msgid "Bio"
msgstr ""
-#: mediagoblin/edit/forms.py:45
+#: mediagoblin/edit/forms.py:43
msgid "Website"
msgstr ""
-#: mediagoblin/edit/views.py:63
+#: mediagoblin/edit/views.py:64
msgid "An entry with that slug already exists for this user."
msgstr ""
-#: mediagoblin/edit/views.py:84
+#: mediagoblin/edit/views.py:85
msgid "You are editing another user's media. Proceed with caution."
msgstr ""
-#: mediagoblin/edit/views.py:154
+#: mediagoblin/edit/views.py:155
msgid "You are editing a user's profile. Proceed with caution."
msgstr ""
@@ -125,15 +125,15 @@ msgstr ""
msgid "Description of this work"
msgstr ""
-#: mediagoblin/submit/views.py:47
+#: mediagoblin/submit/views.py:46
msgid "You must provide a file."
msgstr ""
-#: mediagoblin/submit/views.py:50
+#: mediagoblin/submit/views.py:49
msgid "The file doesn't seem to be an image!"
msgstr ""
-#: mediagoblin/submit/views.py:122
+#: mediagoblin/submit/views.py:121
msgid "Woohoo! Submitted!"
msgstr ""
@@ -172,8 +172,8 @@ msgid "verify your email!"
msgstr ""
#: mediagoblin/templates/mediagoblin/base.html:73
-#: mediagoblin/templates/mediagoblin/auth/login.html:26
-#: mediagoblin/templates/mediagoblin/auth/login.html:34
+#: mediagoblin/templates/mediagoblin/auth/login.html:27
+#: mediagoblin/templates/mediagoblin/auth/login.html:35
msgid "Log in"
msgstr ""
@@ -245,11 +245,11 @@ msgstr ""
msgid "Most recent media"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/change_fp.html:27
+#: mediagoblin/templates/mediagoblin/auth/change_fp.html:29
msgid "Enter your new password"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/forgot_password.html:27
+#: mediagoblin/templates/mediagoblin/auth/forgot_password.html:29
msgid "Enter your username or email"
msgstr ""
@@ -275,23 +275,23 @@ msgid ""
"a happy goblin!"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/login.html:29
+#: mediagoblin/templates/mediagoblin/auth/login.html:30
msgid "Logging in failed!"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/login.html:42
+#: mediagoblin/templates/mediagoblin/auth/login.html:43
msgid "Don't have an account yet?"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/login.html:45
+#: mediagoblin/templates/mediagoblin/auth/login.html:46
msgid "Create one here!"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/login.html:48
+#: mediagoblin/templates/mediagoblin/auth/login.html:49
msgid "Forgot your password?"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/login.html:51
+#: mediagoblin/templates/mediagoblin/auth/login.html:52
msgid "Change it!"
msgstr ""
@@ -299,7 +299,7 @@ msgstr ""
msgid "Create an account!"
msgstr ""
-#: mediagoblin/templates/mediagoblin/auth/register.html:30
+#: mediagoblin/templates/mediagoblin/auth/register.html:31
msgid "Create"
msgstr ""
@@ -342,7 +342,7 @@ msgstr ""
msgid "Submit yer media"
msgstr ""
-#: mediagoblin/templates/mediagoblin/submit/start.html:29
+#: mediagoblin/templates/mediagoblin/submit/start.html:30
msgid "Submit"
msgstr ""
@@ -480,7 +480,11 @@ msgstr ""
msgid "I am sure I want to delete this"
msgstr ""
-#: mediagoblin/user_pages/views.py:175
+#: mediagoblin/user_pages/views.py:142
+msgid "Empty comments are not allowed."
+msgstr ""
+
+#: mediagoblin/user_pages/views.py:181
msgid "You are about to delete another user's media. Proceed with caution."
msgstr ""
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 433f74dc..2c1b7c82 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -65,17 +65,7 @@
<br />
<h3>{% trans %}Comments{% endtrans %}</h3>
- {% if request.user %}
- <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
- user= media.uploader().username,
- media=media._id) }}" method="POST">
- {{ wtforms_util.render_divs(comment_form) }}
- <div class="form_submit_buttons">
- <input type="submit" value="{% trans %}Post comment!{% endtrans %}" class="button" />
- {{ csrf_token }}
- </div>
- </form>
- {% endif %}
+ <p><a href="#comment_form">{% trans %}Post a comment{% endtrans %}</a></p>
{% if comments %}
{% for comment in comments %}
@@ -108,6 +98,19 @@
</div>
{% endfor %}
+ {% if request.user %}
+ <a name="comment_form"></a>
+ <form action="{{ request.urlgen('mediagoblin.user_pages.media_post_comment',
+ user= media.uploader().username,
+ media=media._id) }}" method="POST">
+ {{ wtforms_util.render_divs(comment_form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="{% trans %}Post comment!{% endtrans %}" class="button" />
+ {{ csrf_token }}
+ </div>
+ </form>
+ {% endif %}
+
{{ render_pagination(request, pagination,
request.urlgen('mediagoblin.user_pages.media_home',
user = media.uploader().username,
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
index dd6923a9..8da90f79 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html
@@ -41,7 +41,7 @@
<p class="delete_checkbox_box">
{{ form.confirm }}
- {{ _(form.confirm.label.text) }}
+ <label for="{{ (form.confirm.name) }}">{{ _(form.confirm.label.text) }}</label>
</p>
<div class="form_submit_buttons">
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index 9cec74dc..4cd56b75 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -133,14 +133,19 @@ def media_post_comment(request):
comment['media_entry'] = ObjectId(request.matchdict['media'])
comment['author'] = request.user['_id']
comment['content'] = unicode(request.POST['comment_content'])
-
comment['content_html'] = cleaned_markdown_conversion(comment['content'])
- comment.save()
+ if not comment['content'].strip():
+ messages.add_message(
+ request,
+ messages.ERROR,
+ _("Empty comments are not allowed."))
+ else:
+ comment.save()
- messages.add_message(
- request, messages.SUCCESS,
- 'Comment posted!')
+ messages.add_message(
+ request, messages.SUCCESS,
+ _('Comment posted!'))
return redirect(request, 'mediagoblin.user_pages.media_home',
media = request.matchdict['media'],