aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/templates
diff options
context:
space:
mode:
authorChris Moylan <chris@chrismoylan.com>2011-06-22 21:40:17 -0500
committerChris Moylan <chris@chrismoylan.com>2011-06-22 21:40:17 -0500
commitdcebe4b032453b31db93e0796c84de7dc8bdb005 (patch)
tree7608cd77fafd6ffb6179e8d7bd1c50bfcd9cdfb5 /mediagoblin/templates
parent1975b5dd1fdae5ddb2819b8c67a29f9c374fce40 (diff)
parent54de443a6a6cd673cfef0efa73a9d5e6fc6cde7c (diff)
downloadmediagoblin-dcebe4b032453b31db93e0796c84de7dc8bdb005.tar.lz
mediagoblin-dcebe4b032453b31db93e0796c84de7dc8bdb005.tar.xz
mediagoblin-dcebe4b032453b31db93e0796c84de7dc8bdb005.zip
Merge branch 'master' into test_submission_views_365
Diffstat (limited to 'mediagoblin/templates')
-rw-r--r--mediagoblin/templates/mediagoblin/base.html2
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit.html12
-rw-r--r--mediagoblin/templates/mediagoblin/edit/edit_profile.html35
-rw-r--r--mediagoblin/templates/mediagoblin/root.html25
-rw-r--r--mediagoblin/templates/mediagoblin/submit/start.html2
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html10
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/user.html2
-rw-r--r--mediagoblin/templates/mediagoblin/utils/object_gallery.html2
-rw-r--r--mediagoblin/templates/mediagoblin/utils/profile.html35
9 files changed, 101 insertions, 24 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html
index c7313173..8e5fd55b 100644
--- a/mediagoblin/templates/mediagoblin/base.html
+++ b/mediagoblin/templates/mediagoblin/base.html
@@ -35,6 +35,8 @@
<div class="mediagoblin_header_right">
{% if request.user %}
{{ request.user['username'] }}'s account
+ <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
+ user= request.user['username']) }}">home</a>
<a href="{{ request.urlgen('mediagoblin.user_pages.user_gallery',
user= request.user['username']) }}">gallery</a>
(<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">logout</a>)
diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html
index 295d57eb..51d0341d 100644
--- a/mediagoblin/templates/mediagoblin/edit/edit.html
+++ b/mediagoblin/templates/mediagoblin/edit/edit.html
@@ -20,19 +20,21 @@
{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block mediagoblin_content %}
- <h1>Edit details for {{ media.title }}</h1>
<form action="{{ request.urlgen('mediagoblin.edit.edit_media',
user= media.uploader().username,
media= media._id) }}"
method="POST" enctype="multipart/form-data">
- <div class="submit_box form_box">
+ <div class="edit_box form_box">
+ <h1>Editing {{ media.title }}</h1>
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button" />
+ <a href="{{ media.url_for_self(request.urlgen) }}">Cancel</a>
+ <input type="submit" value="Save changes" class="button" />
</div>
+ <img src="{{ request.app.public_store.file_url(
+ media['media_files']['thumb']) }}" />
</div>
</form>
- <img src="{{ request.app.public_store.file_url(
- media['media_files']['thumb']) }}" />
+
{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html
new file mode 100644
index 00000000..8ce474f0
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html
@@ -0,0 +1,35 @@
+{#
+# 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" %}
+
+{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
+
+{% block mediagoblin_content %}
+
+ <form action="{{ request.urlgen('mediagoblin.edit.profile',
+ user=user.username) }}"
+ method="POST" enctype="multipart/form-data">
+ <div class="edit_box form_box">
+ <h1>Editing {{ user['username'] }}'s profile</h1>
+ {{ wtforms_util.render_divs(form) }}
+ <div class="form_submit_buttons">
+ <input type="submit" value="submit" class="button" />
+ </div>
+ </div>
+ </form>
+{% endblock %}
diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html
index e5344e08..7261f4fc 100644
--- a/mediagoblin/templates/mediagoblin/root.html
+++ b/mediagoblin/templates/mediagoblin/root.html
@@ -22,20 +22,19 @@
<h1>{% trans %}Welcome to GNU MediaGoblin!{% endtrans %}</h1>
{% if request.user %}
- <p>
- <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a>.
- </p>
-
+ <p>
+ <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a>
+ <a href="{{ request.urlgen('mediagoblin.edit.profile') }}">Edit profile</a>
+ </p>
{% else %}
- <p>
- If you have an account, you can
- <a href="{{ request.urlgen('mediagoblin.auth.login') }}">Login</a>.
- </p>
- <p>
- If you don't have an account, please
- <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Register</a>.
- </p>
-
+ <p>
+ If you have an account, you can
+ <a href="{{ request.urlgen('mediagoblin.auth.login') }}">Login</a>.
+ </p>
+ <p>
+ If you don't have an account, please
+ <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Register</a>.
+ </p>
{% endif %}
{# temporarily, an "image gallery" that isn't one really ;) #}
diff --git a/mediagoblin/templates/mediagoblin/submit/start.html b/mediagoblin/templates/mediagoblin/submit/start.html
index 75c31df4..fe1f3369 100644
--- a/mediagoblin/templates/mediagoblin/submit/start.html
+++ b/mediagoblin/templates/mediagoblin/submit/start.html
@@ -27,7 +27,7 @@
<h1>Submit yer media</h1>
{{ wtforms_util.render_divs(submit_form) }}
<div class="form_submit_buttons">
- <input type="submit" value="submit" class="button" />
+ <input type="submit" value="Submit" class="button" />
</div>
</div>
</form>
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index 44bc38b8..d221f61e 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -34,10 +34,12 @@
by
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
user= media.uploader().username) }}">
- {{- media.uploader().username }}</a></p>
- <p><a href="{{ request.urlgen('mediagoblin.edit.edit_media',
- user= media.uploader().username,
- media= media._id) }}">Edit</a></p>
+ {{- media.uploader().username }}</a></p>
+ {% if media['uploader'] == request.user['_id'] %}
+ <p><a href="{{ request.urlgen('mediagoblin.edit.edit_media',
+ user= media.uploader().username,
+ media= media._id) }}">Edit</a></p>
+ {% endif %}
{% else %}
<p>Sorry, no such media found.<p/>
{% endif %}
diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html
index b3708c85..f7a9f3c9 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/user.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/user.html
@@ -27,6 +27,8 @@
{% block mediagoblin_content -%}
{% if user %}
<h1>User page for '{{ user.username }}'</h1>
+
+ {% include "mediagoblin/utils/profile.html" %}
{% include "mediagoblin/utils/object_gallery.html" %}
diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
index c9c3e0db..8c88c174 100644
--- a/mediagoblin/templates/mediagoblin/utils/object_gallery.html
+++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
@@ -19,7 +19,7 @@
{% block object_gallery_content -%}
<div>
{% if media_entries %}
- <ul>
+ <ul class="media_thumbnail">
{% for entry in media_entries %}
<li class="media_thumbnail">
<a href="{{ entry.url_for_self(request.urlgen) }}">
diff --git a/mediagoblin/templates/mediagoblin/utils/profile.html b/mediagoblin/templates/mediagoblin/utils/profile.html
new file mode 100644
index 00000000..b3f5f0f8
--- /dev/null
+++ b/mediagoblin/templates/mediagoblin/utils/profile.html
@@ -0,0 +1,35 @@
+{#
+# 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/>.
+#}
+
+{% block profile_content -%}
+ <div>
+ <ul>
+ {% if user.url %}
+ <li>
+ <a href="{{ user.url }}">homepage</a>
+ </li>
+ {% endif %}
+
+ {% if user.bio %}
+ <li>
+ {{ user.bio }}
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+{% endblock %}