aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-06-02 14:33:26 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-06-02 14:41:50 +0200
commit7fd6f623f1cb558360c940a6dd1dc6c1e74fe31b (patch)
tree89c29354c416cbcbf2eb0827e61c7084a80fdf22 /mediagoblin/templates
parentc849e690925cb656b8c00ccbeda12aeab22c2fdd (diff)
parent4d4b49a84e2791da6b12ef580565251c379264b6 (diff)
downloadmediagoblin-7fd6f623f1cb558360c940a6dd1dc6c1e74fe31b.tar.lz
mediagoblin-7fd6f623f1cb558360c940a6dd1dc6c1e74fe31b.tar.xz
mediagoblin-7fd6f623f1cb558360c940a6dd1dc6c1e74fe31b.zip
Merge remote branch 'upstream/master'
Conflicts: mediagoblin/templates/mediagoblin/user_pages/media.html
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/auth/login.html31
-rw-r--r--mediagoblin/templates/mediagoblin/auth/register.html15
-rw-r--r--mediagoblin/templates/mediagoblin/auth/resent_verification_email.html24
-rw-r--r--mediagoblin/templates/mediagoblin/auth/verification_needed.html29
-rw-r--r--mediagoblin/templates/mediagoblin/base.html11
-rw-r--r--mediagoblin/templates/mediagoblin/root.html10
-rw-r--r--mediagoblin/templates/mediagoblin/submit/start.html15
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html30
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html5
-rw-r--r--mediagoblin/templates/mediagoblin/utils/object_gallery.html2
-rw-r--r--mediagoblin/templates/mediagoblin/utils/wtforms.html22
11 files changed, 122 insertions, 72 deletions
diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html
index 02bfb91f..22a57b70 100644
--- a/mediagoblin/templates/mediagoblin/auth/login.html
+++ b/mediagoblin/templates/mediagoblin/auth/login.html
@@ -20,25 +20,22 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_content %}
- <h1>Login:</h1>
<form action="{{ request.urlgen('mediagoblin.auth.login') }}"
method="POST" enctype="multipart/form-data">
-
- {% if login_failed %}
- <p><i>Login failed!</i></p>
- {% endif %}
-
- <table>
- {{ wtforms_util.render_table(login_form) }}
- <tr>
- <td></td>
- <td><input type="submit" value="submit" class="button"/></td>
- </tr>
- </table>
-
- {% if next %}
- <input type="hidden" name="next" value="{{ next }}" class="button" />
- {% endif %}
+ <div class="login_box form_box">
+ <h1>Log in</h1>
+ {% if login_failed %}
+ <div class="form_field_error">Login failed!</div>
+ {% endif %}
+ {{ wtforms_util.render_divs(login_form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="submit" class="button"/>
+ </div>
+ {% if next %}
+ <input type="hidden" name="next" value="{{ next }}" class="button" />
+ {% endif %}
+ <p>Don't have an account yet? <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p>
+ </div>
</form>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/register.html b/mediagoblin/templates/mediagoblin/auth/register.html
index 610c7cc4..730d684d 100644
--- a/mediagoblin/templates/mediagoblin/auth/register.html
+++ b/mediagoblin/templates/mediagoblin/auth/register.html
@@ -20,14 +20,15 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_content %}
+
<form action="{{ request.urlgen('mediagoblin.auth.register') }}"
method="POST" enctype="multipart/form-data">
- <table>
- {{ wtforms_util.render_table(register_form) }}
- <tr>
- <td></td>
- <td><input type="submit" value="submit" class="button" /></td>
- </tr>
- </table>
+ <div class="register_box form_box">
+ <h1>Create an account!</h1>
+ {{ wtforms_util.render_divs(register_form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="submit" class="button" />
+ </div>
+ </div>
</form>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html b/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html
new file mode 100644
index 00000000..da3a9e99
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html
@@ -0,0 +1,24 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 Free Software Foundation, Inc
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#}
+{% extends "mediagoblin/base.html" %}
+
+{% block mediagoblin_content %}
+ <p>
+ Resent your verification email.
+ </p>
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/auth/verification_needed.html b/mediagoblin/templates/mediagoblin/auth/verification_needed.html
new file mode 100644
index 00000000..4104da19
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/auth/verification_needed.html
@@ -0,0 +1,29 @@
+{#
+# GNU MediaGoblin -- federated, autonomous media hosting
+# Copyright (C) 2011 Free Software Foundation, Inc
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#}
+{% extends "mediagoblin/base.html" %}
+
+{% block mediagoblin_content %}
+ <p>
+ Verfication needed!<br />
+ Please check your email to verify your account.
+ </p>
+
+ <p>
+ Still haven't received an email? <a href="{{ request.urlgen('mediagoblin.auth.resend_verification') }}">Click here to resend it.</a>
+ </p>
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index b0c88a13..704e5aa7 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -17,7 +17,7 @@
#}
<html>
<head>
- <title>{% block title %}MediaGoblin{% endblock title %}</title>
+ <title>{% block title %}GNU MediaGoblin{% endblock title %}</title>
<link rel="stylesheet" type="text/css"
href="{{ request.staticdirect('/css/base.css') }}"/>
{% block mediagoblin_head %}
@@ -30,13 +30,12 @@
<div class="mediagoblin_header">
<div class="mediagoblin_container">
{% block mediagoblin_logo %}
- <a href="{{ request.urlgen('index') }}"><img src="{{ request.staticdirect('/images/icon.png') }}" class="icon" /></a>
- {% endblock %}{% block mediagoblin_header_title %}GNU MediaGoblin Home{% endblock %}
+ <a class="mediagoblin_logo" href="{{ request.urlgen('index') }}"></a>
+ {% endblock %}{% block mediagoblin_header_title %}{% endblock %}
<div class="mediagoblin_header_right">
{% if request.user %}
- Welcome {{ request.user['username'] }}! --
- <a href="{{ request.urlgen('mediagoblin.auth.logout') }}">
- Logout</a>
+ {{ request.user['username'] }}'s account
+ (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
{% else %}
<a href="{{ request.urlgen('mediagoblin.auth.login') }}">
Login</a>
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html
index 05926687..e5344e08 100644
--- a/mediagoblin/templates/mediagoblin/root.html
+++ b/mediagoblin/templates/mediagoblin/root.html
@@ -41,15 +41,7 @@
{# temporarily, an "image gallery" that isn't one really ;) #}
<div>
- <ul>
- {% for entry in media_entries %}
- <li>
- <a href="{{ entry.url_for_self(request.urlgen) }}">
- <img src="{{ request.app.public_store.file_url(
- entry['media_files']['thumb']) }}" /></a>
- </li>
- {% endfor %}
- </ul>
+ {% include "mediagoblin/utils/object_gallery.html" %}
</div>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/submit/start.html b/mediagoblin/templates/mediagoblin/submit/start.html
index 8fdbe4ed..75c31df4 100644
--- a/mediagoblin/templates/mediagoblin/submit/start.html
+++ b/mediagoblin/templates/mediagoblin/submit/start.html
@@ -20,16 +20,15 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_content %}
- <h1>Submit yer media</h1>
<form action="{{ request.urlgen('mediagoblin.submit.start') }}"
method="POST" enctype="multipart/form-data">
- <table>
- {{ wtforms_util.render_table(submit_form) }}
- <tr>
- <td></td>
- <td><input type="submit" value="submit" class="button" /></td>
- </tr>
- </table>
+ <div class="submit_box form_box">
+ <h1>Submit yer media</h1>
+ {{ wtforms_util.render_divs(submit_form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="submit" class="button" />
+ </div>
+ </div>
</form>
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index f13c32e3..b26e2514 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -20,32 +20,22 @@
{# temporarily, an "image gallery" that isn't one really ;) #}
{% if media %}
- <h1>
- Media details for
- <a href="{{ request.urlgen(
- 'mediagoblin.user_pages.user_home',
- user=media.uploader().username) }}">
- {{- media.uploader().username }}</a>
- / {{media.title}}
- </h1>
- <div>
- <img src="{{ request.app.public_store.file_url(
+ <img class="media_image" src="{{ request.app.public_store.file_url(
media.media_files.main) }}" />
- <br />
- Uploaded on
+ <h1>
+ {{media.title}}
+ </h1>
+ <p>{{ media.description }}</p>
+ <p>Uploaded on
{{ "%4d-%02d-%02d"|format(media.created.year,
media.created.month, media.created.day) }}
by
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
user= media.uploader().username) }}">
- {{- media.uploader().username }}</a>
- <br />
- Description: {{ media.description }}
- <br />
- <a href="{{ request.urlgen('mediagoblin.edit.edit_media',
- media= media._id) }}">Edit</a>
- </div>
+ {{- media.uploader().username }}</a></p>
+ <p><a href="{{ request.urlgen('mediagoblin.edit.edit_media',
+ media= media._id) }}">Edit</a></p>
{% else %}
<p>Sorry, no such media found.<p/>
{% endif %}
-{% endblock %}
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index 2d09f685..b3708c85 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -28,11 +28,8 @@
{% if user %}
<h1>User page for '{{ user.username }}'</h1>
- <ul>
-
- {% include "mediagoblin/utils/object_gallery.html" %}
+ {% include "mediagoblin/utils/object_gallery.html" %}
- </ul>
<a href={{ request.urlgen(
'mediagoblin.user_pages.atom_feed',
user=user.username) }}> atom feed</a>
diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
index 30497f47..c9c3e0db 100644
--- a/mediagoblin/templates/mediagoblin/utils/object_gallery.html
+++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
@@ -21,7 +21,7 @@
{% if media_entries %}
<ul>
{% for entry in media_entries %}
- <li>
+ <li class="media_thumbnail">
<a href="{{ entry.url_for_self(request.urlgen) }}">
<img src="{{ request.app.public_store.file_url(
entry['media_files']['thumb']) }}" /></a>
diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html
index 15556936..9adf8e53 100644
--- a/mediagoblin/templates/mediagoblin/utils/wtforms.html
+++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html
@@ -15,6 +15,28 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
+
+{# Auto-render a form as a series of divs #}
+{% macro render_divs(form) -%}
+ {% for field in form %}
+ <div class="form_field_box">
+ <div class="form_field_label">{{ field.label }}</div>
+ {% if field.description -%}
+ <div class="form_field_description">{{ field.description }}</div>
+ {%- endif %}
+ <div class="form_field_input">{{ field }}</div>
+ {%- if field.errors -%}
+ {% for error in field.errors %}
+ <div class="form_field_error">
+ {{ error }}
+ </div>
+ {% endfor %}
+ {%- endif %}
+ </div>
+ {% endfor %}
+{%- endmacro %}
+
+{# Auto-render a form as a table #}
{% macro render_table(form) -%}
{% for field in form %}
<tr>