diff options
Diffstat (limited to 'mediagoblin/templates')
10 files changed, 79 insertions, 117 deletions
diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html index 2303ce5c..e25783ea 100644 --- a/mediagoblin/templates/mediagoblin/auth/login.html +++ b/mediagoblin/templates/mediagoblin/auth/login.html @@ -35,7 +35,9 @@ <input type="hidden" name="next" value="{{ next }}" class="button" style="display: none;"/> {% endif %} - <p>Don't have an account yet?<br /><a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p> + {% if allow_registration %} + <p>Don't have an account yet?<br /><a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p> + {% endif %} </div> </form> {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/auth/verify_email.html b/mediagoblin/templates/mediagoblin/auth/verify_email.html deleted file mode 100644 index b6e6d1f8..00000000 --- a/mediagoblin/templates/mediagoblin/auth/verify_email.html +++ /dev/null @@ -1,28 +0,0 @@ -{# -# 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> - {% if verification_successful %} - Your email address has been verified! - {% else %} - The verification key or user id is incorrect - {% endif %} -</p> -{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index b71fca24..40bb085e 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -38,8 +38,12 @@ <div class="container_16"> <div class="grid_16"> {% block mediagoblin_logo %} - <a class="mediagoblin_logo" href="{{ request.urlgen('index') }}"></a> - {% endblock %}{% block mediagoblin_header_title %}{% endblock %} + <a class="mediagoblin_logo" href="{{ request.urlgen('index') }}"><img src="{{ request.staticdirect('/images/logo.png') }}" alt="Mediagoblin logo" /></a> + {% endblock %} + {% if request.user %} + <a class="header_submit" href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit media</a> + {% endif %} + {% block mediagoblin_header_title %}{% endblock %} <div class="mediagoblin_header_right"> {% if request.user %} <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index 5b744999..bae033c4 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -29,10 +29,12 @@ 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> + {% if allow_registration %} + <p> + If you don't have an account, please + <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Register</a>. + </p> + {% endif %} {% endif %} {# temporarily, an "image gallery" that isn't one really ;) #} diff --git a/mediagoblin/templates/mediagoblin/submit/success.html b/mediagoblin/templates/mediagoblin/submit/success.html deleted file mode 100644 index afc9f9d1..00000000 --- a/mediagoblin/templates/mediagoblin/submit/success.html +++ /dev/null @@ -1,22 +0,0 @@ -{# -# 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 %} - Woohoo! Submitted! -{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 0383277b..3f4dce3b 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -48,14 +48,14 @@ user= media.uploader().username) }}"> {{- media.uploader().username }}</a> </p> - <br /><br /> + <br /> <h3>Comments</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_field_div(comment_form.comment) }} + {{ wtforms_util.render_field_div(comment_form.comment_content) }} <div class="form_submit_buttons"> <input type="submit" value="Post comment!" class="button" /> </div> @@ -65,7 +65,12 @@ {% if comments %} {% for comment in comments %} {% set comment_author = comment.author() %} - <div class="comment_wrapper" id="comment-{{ comment['_id'] }}"> + {% if pagination.active_id == comment._id %} + <div class="comment_wrapper comment_active" id="comment-{{ comment['_id'] }}"> + <a name="comment" id="comment"></a> + {% else %} + <div class="comment_wrapper" id="comment-{{ comment['_id'] }}"> + {% endif %} <div class="comment_content"> {% autoescape False %} {{ comment.content_html }} @@ -77,7 +82,10 @@ {{ comment_author['username'] }}</a> at <!--</div> <div class="comment_datetime">--> - <a href="#comment-{{ comment['_id'] }}"> + <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment', + comment = comment['_id'], + user = media.uploader().username, + media = media._id) }}#comment"> {{ "%4d-%02d-%02d %02d:%02d"|format(comment.created.year, comment.created.month, comment.created.day, @@ -88,7 +96,10 @@ </div> {% endfor %} - {{ render_pagination(request, pagination) }} + {{ render_pagination(request, pagination, + request.urlgen('mediagoblin.user_pages.media_home', + user = media.uploader().username, + media = media._id)) }} </div> {% endif %} <div class="grid_5 omega"> diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index aed330c8..9d99ac53 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -26,33 +26,25 @@ {% block mediagoblin_content -%} {% if user %} - <h1>{{ user.username }}'s profile</h1> - - {% include "mediagoblin/utils/profile.html" %} - - {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %} - <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ - user.username }}">Edit profile</a> - {% endif %} - - {% if request.user['_id'] == user['_id'] %} - <p> - <a href="{{ request.urlgen('mediagoblin.submit.start') }}">Submit an item</a> - </p> - {% endif %} - - {% set pagination_base_url = user_gallery_url %} - {% include "mediagoblin/utils/object_gallery.html" %} - - <div class="clear"></div> - - <p><a href="{{ user_gallery_url }}">View all of {{ user.username }}'s media</a></p> - - <a href={{ request.urlgen( - 'mediagoblin.user_pages.atom_feed', - user=user.username) }}>atom feed</a> - {% else %} - {# This *should* not occur as the view makes sure we pass in a user. #} - <p>Sorry, no such user found.<p/> + <h1>{{ user.username }}'s profile</h1> + <div class="grid_6 alpha"> + {% include "mediagoblin/utils/profile.html" %} + {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %} + <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ + user.username }}">Edit profile</a> + {% endif %} + </div> + <div class="grid_10 omega"> + {% set pagination_base_url = user_gallery_url %} + {% include "mediagoblin/utils/object_gallery.html" %} + <div class="clear"></div> + <p><a href="{{ user_gallery_url }}">View all of {{ user.username }}'s media</a></p> + <a href={{ request.urlgen( + 'mediagoblin.user_pages.atom_feed', + user=user.username) }}>atom feed</a> + {% else %} + {# This *should* not occur as the view makes sure we pass in a user. #} + <p>Sorry, no such user found.<p/> + </div> {% endif %} {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html index aae50d22..23d49463 100644 --- a/mediagoblin/templates/mediagoblin/utils/pagination.html +++ b/mediagoblin/templates/mediagoblin/utils/pagination.html @@ -34,9 +34,16 @@ {% if pagination.has_prev %} <a href="{{ pagination.get_page_url_explicit( base_url, get_params, - pagination.page - 1) }}">« Prev</a> + pagination.page - 1) }}"><img class="pagination_arrow" src="/mgoblin_static/images/pagination_left.png" alt="Previous page" />Newer</a> {% endif %} - + {% if pagination.has_next %} + <a href="{{ pagination.get_page_url_explicit( + base_url, get_params, + pagination.page + 1) }}">Older<img class="pagination_arrow" src="/mgoblin_static/images/pagination_right.png" alt="Next page" /> + </a> + {% endif %} + <br /> + Go to page: {%- for page in pagination.iter_pages() %} {% if page %} {% if page != pagination.page %} @@ -50,12 +57,6 @@ <span class="ellipsis">…</span> {% endif %} {%- endfor %} - - {% if pagination.has_next %} - <a href="{{ pagination.get_page_url_explicit( - base_url, get_params, - pagination.page + 1) }}">Next »</a> - {% endif %} </p> </div> {% endif %} diff --git a/mediagoblin/templates/mediagoblin/utils/prev_next.html b/mediagoblin/templates/mediagoblin/utils/prev_next.html index 8908c298..7cf8d2a4 100644 --- a/mediagoblin/templates/mediagoblin/utils/prev_next.html +++ b/mediagoblin/templates/mediagoblin/utils/prev_next.html @@ -24,20 +24,23 @@ {# There are no previous entries for the very first media entry #} {% if prev_entry_url %} <a class="navigation_button navigation_left" href="{{ prev_entry_url }}"> - < + <img src="/mgoblin_static/images/navigation_left.png" alt="Previous image" /> </a> {% else %} {# This is the first entry. display greyed-out 'previous' image #} - <p class="navigation_button">X</p> + <p class="navigation_button navigation_left"> + <img src="/mgoblin_static/images/navigation_end.png" alt="No previous images" /> + </p> {% endif %} - {# Likewise, this could be the very last media entry #} {% if next_entry_url %} <a class="navigation_button" href="{{ next_entry_url }}"> - > + <img src="/mgoblin_static/images/navigation_right.png" alt="Next image" /> </a> {% else %} {# This is the last entry. display greyed-out 'next' image #} - <p class="navigation_button">X</p> + <p class="navigation_button"> + <img src="/mgoblin_static/images/navigation_end.png" alt="No following images" /> + </p> {% endif %} </div> diff --git a/mediagoblin/templates/mediagoblin/utils/profile.html b/mediagoblin/templates/mediagoblin/utils/profile.html index 72a285d2..f44defa5 100644 --- a/mediagoblin/templates/mediagoblin/utils/profile.html +++ b/mediagoblin/templates/mediagoblin/utils/profile.html @@ -17,17 +17,14 @@ #} {% block profile_content -%} - <div class="profile_content"> - {% if user.url %} - <p class="profile_homepage"> - <a href="{{ user.url }}">homepage</a> - </p> - {% endif %} - - {% if user.bio %} - <p class="profile_bio"> - {{ user.bio }} - </p> - {% endif %} - </div> -{% endblock %} + {% if user.bio %} + <p> + {{ user.bio }} + </p> + {% endif %} + {% if user.url %} + <p> + <a href="{{ user.url }}">{{ user.url }}</a> + </p> + {% endif %} +{% endblock %} |