diff options
author | lora <lorochka85@gmail.com> | 2011-11-19 17:01:40 -0600 |
---|---|---|
committer | lora <lorochka85@gmail.com> | 2011-11-19 17:01:40 -0600 |
commit | 707001950a42c7adfd6657f227a2c2dbbd09afce (patch) | |
tree | 9a7215448098b8681b2b45fe636eb8af6c3ea8ba /mediagoblin/templates | |
parent | 2d62e9efd210becd30982e65e06a6ef97029b391 (diff) | |
parent | aea6d577cbf4d937427dea173f74fb17ad45bd75 (diff) | |
download | mediagoblin-707001950a42c7adfd6657f227a2c2dbbd09afce.tar.lz mediagoblin-707001950a42c7adfd6657f227a2c2dbbd09afce.tar.xz mediagoblin-707001950a42c7adfd6657f227a2c2dbbd09afce.zip |
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
Diffstat (limited to 'mediagoblin/templates')
12 files changed, 101 insertions, 109 deletions
diff --git a/mediagoblin/templates/mediagoblin/auth/forgot_password.html b/mediagoblin/templates/mediagoblin/auth/forgot_password.html index b95a4dcb..9b821426 100644 --- a/mediagoblin/templates/mediagoblin/auth/forgot_password.html +++ b/mediagoblin/templates/mediagoblin/auth/forgot_password.html @@ -20,20 +20,15 @@ {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {% block mediagoblin_content %} - <form action="{{ request.urlgen('mediagoblin.auth.forgot_password') }}" method="POST" enctype="multipart/form-data"> {{ csrf_token }} - <div class="grid_6 prefix_1 suffix_1 form_box"> - <h1>{% trans %}Enter your username or email{% endtrans %}</h1> - + <h1>{% trans %}Recover password{% endtrans %}</h1> {{ wtforms_util.render_divs(fp_form) }} <div class="form_submit_buttons"> - <input type="submit" value="submit" class="button"/> + <input type="submit" value="{% trans %}Send instructions{% endtrans %}" class="button"/> </div> - </div> </form> {% endblock %} - diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html index 61c5a203..756f67c0 100644 --- a/mediagoblin/templates/mediagoblin/auth/login.html +++ b/mediagoblin/templates/mediagoblin/auth/login.html @@ -30,27 +30,23 @@ {% trans %}Logging in failed!{% endtrans %} </div> {% endif %} - {{ wtforms_util.render_divs(login_form) }} - <div class="form_submit_buttons"> - <input type="submit" value="{% trans %}Log in{% endtrans %}" class="button"/> - </div> - {% if next %} - <input type="hidden" name="next" value="{{ next }}" class="button" - style="display: none;"/> - {% endif %} {% if allow_registration %} <p> - {% trans %}Don't have an account yet?{% endtrans %} - <br /> - <a href="{{ request.urlgen('mediagoblin.auth.register') }}"> + {% trans %}Don't have an account yet?{% endtrans %} <a href="{{ request.urlgen('mediagoblin.auth.register') }}"> {%- trans %}Create one here!{% endtrans %}</a> </p> + {% endif %} + {{ wtforms_util.render_divs(login_form) }} <p> - {% trans %}Forgot your password?{% endtrans %} - <br /> <a href="{{ request.urlgen('mediagoblin.auth.forgot_password') }}"> - {%- trans %}Change it!{% endtrans %}</a> + {% trans %}Forgot your password?{% endtrans %}</a> </p> + <div class="form_submit_buttons"> + <input type="submit" value="{% trans %}Log in{% endtrans %}" class="button"/> + </div> + {% if next %} + <input type="hidden" name="next" value="{{ next }}" class="button" + style="display: none;"/> {% endif %} </div> </form> diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index b4c4dcf3..64fafb73 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -19,7 +19,7 @@ <html> <head> <meta charset="utf-8"> - <title>{% block title %}{% trans %}GNU MediaGoblin{% endtrans %}{% endblock title %}</title> + <title>{% block title %}{{ app_config['html_title'] }}{% endblock %}</title> <link rel="stylesheet" type="text/css" href="{{ request.staticdirect('/css/extlib/reset.css') }}"/> <link rel="stylesheet" type="text/css" @@ -67,7 +67,7 @@ user= request.user['username']) }}"> {{ request.user['username'] }}</a> - (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">log out</a>) + (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>) {% else %} <a href="{{ request.urlgen('mediagoblin.auth.login') }}"> {% trans %}Log in{% endtrans %}</a> diff --git a/mediagoblin/templates/mediagoblin/listings/tag.html b/mediagoblin/templates/mediagoblin/listings/tag.html index 58863015..f797f72f 100644 --- a/mediagoblin/templates/mediagoblin/listings/tag.html +++ b/mediagoblin/templates/mediagoblin/listings/tag.html @@ -26,9 +26,13 @@ tag=tag_slug) }}"> {% endblock mediagoblin_head %} +{% block title %} + {% trans %}Media tagged with: {{ tag_name }}{% endtrans %} — {{ super() }} +{% endblock %} + {% block mediagoblin_content -%} <h1> - {% trans %}Media tagged with:{% endtrans %} {{ tag_name }} + {% trans %}Media tagged with: {{ tag_name }}{% endtrans %} </h1> <div class="container_16 media_gallery"> diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index e3ca9726..43d973d1 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -24,30 +24,21 @@ <h1>{% trans %}Explore{% endtrans %}</h1> {% else %} <div class="grid_11 alpha"> - <h1>{% trans %}Hi there, media lover! MediaGoblin is...{% endtrans %}</h1> - <ul> - <li>{% trans %}The perfect place for your media!{% endtrans %}</li> - <li>{% trans %}A place for people to collaborate and show off original and derived creations!{% endtrans %}</li> - <li>{% trans %}Free, as in freedom. (We’re a <a href="http://gnu.org">GNU</a> project, after all.){% endtrans %}</li> - <li>{% trans %}Aiming to make the world a better place through decentralization and (eventually, coming soon!) federation!{% endtrans %}</li> - <li>{% trans %}Built for extensibility. (Multiple media types coming soon to the software, including video support!){% endtrans %}</li> - <li>{% trans %}Powered by people like you. (<a href="http://mediagoblin.org/pages/join.html">You can help us improve this software!</a>){% endtrans %}</li> - </ul> - + <h1>{% trans %}Hi there, welcome to this MediaGoblin site!{% endtrans %}</h1> + <p>{% trans %}Your finest source for all goblin-related media.{% endtrans %}</p> + <p>{% trans %}To add your own media, place comments, save your favourites and more, you can log in with your MediaGoblin account.{% endtrans %}</p> {% if allow_registration %} - <p>{% trans %}Excited to join us?{% endtrans %}<p> + <p>{% trans %}Don't have one yet? It's easy!{% endtrans %}</p> {% trans register_url=request.urlgen('mediagoblin.auth.register') -%} - <a class="header_submit_highlight" href="{{ register_url }}">Create a free account</a> + <a class="header_submit_highlight" href="{{ register_url }}">Create an account at this site</a> or <a class="header_submit" href="http://wiki.mediagoblin.org/HackingHowto">Set up MediaGoblin on your own server</a> {%- endtrans %} {% endif %} </div> - <div class="grid_5 omega"> <img src="{{ request.staticdirect('/images/frontpage_image.png') }}" /> </div> - <div class="clear"></div> {% endif %} <h2>{% trans %}Most recent media{% endtrans %}</h2> diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html index df931d9c..b066dd71 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html +++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html @@ -26,29 +26,30 @@ user=user.username) }}"> {% endblock mediagoblin_head %} +{% block title %} + {%- trans username=user.username -%} + {{ username }}'s media + {%- endtrans %} — {{ super() }} +{% endblock %} + {% block mediagoblin_content -%} - {% if user %} - <h1> - {%- trans username=user.username, - user_url=request.urlgen( - 'mediagoblin.user_pages.user_home', - user=user.username) -%} - <a href="{{ user_url }}">{{ username }}</a>'s media - {%- endtrans %} - </h1> + <h1> + {%- trans username=user.username, + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=user.username) -%} + <a href="{{ user_url }}">{{ username }}</a>'s media + {%- endtrans %} + </h1> - <div class="container_16 media_gallery"> - {{ object_gallery(request, media_entries, pagination) }} - </div> + <div class="container_16 media_gallery"> + {{ object_gallery(request, media_entries, pagination) }} + </div> - <div class="grid_16"> - {% set feed_url = request.urlgen( - 'mediagoblin.user_pages.atom_feed', - user=user.username) %} - {% include "mediagoblin/utils/feed_link.html" %} - </div> - {% else %} - {# This *should* not occur as the view makes sure we pass in a user. #} - <p>{% trans %}Sorry, no such user found.{% endtrans %}<p/> - {% endif %} + <div class="grid_16"> + {% set feed_url = request.urlgen( + 'mediagoblin.user_pages.atom_feed', + user=user.username) %} + {% include "mediagoblin/utils/feed_link.html" %} + </div> {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 5e1b73de..de5db815 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -20,6 +20,8 @@ {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {% from "mediagoblin/utils/pagination.html" import render_pagination %} +{% block title %}{{ media.title }} — {{ super() }}{% endblock %} + {% block mediagoblin_content %} {% if media %} <div class="grid_11 alpha"> @@ -47,67 +49,61 @@ <h2 class="media_title"> {{ media.title }} </h2> - + {% autoescape False %} + <p>{{ media.description_html }}</p> + {% endautoescape %} <p class="media_uploader"> {% trans date=media.created.strftime("%Y-%m-%d"), user_url=request.urlgen( 'mediagoblin.user_pages.user_home', user=media.uploader().username), username=media.uploader().username -%} - Uploaded on {{ date }} by <a href="{{ user_url }}">{{ username }}</a> + By <a href="{{ user_url }}">{{ username }}</a> on {{ date }} {%- endtrans %} </p> - - {% autoescape False %} - <p>{{ media.description_html }}</p> - {% endautoescape %} - - <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> + <h3></h3> + {% if request.user and comments.count() %} + <p><a href="#comment_form">{% trans %}Post a comment{% endtrans %}</a></p> {% endif %} - {% if comments %} {% for comment in comments %} {% set comment_author = comment.author() %} {% if pagination.active_id == comment._id %} - <div class="comment_wrapper comment_active" id="comment-{{ 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'] }}"> + <div class="comment_wrapper" id="comment-{{ comment._id }}"> {% endif %} - <div class="comment_content"> - {% autoescape False %} - {{ comment.content_html }} + <div class="comment_content">{% autoescape False %}{{ comment.content_html }} {% endautoescape %} - </div> - - <div class="comment_author">— - <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', + <img src="{{ request.staticdirect('/images/icon_comment.png') }}" /> + <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', user = comment_author['username']) }}"> {{ comment_author['username'] }}</a> {% trans %}at{% endtrans %} <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment', - comment = comment['_id'], + comment = comment._id, user = media.uploader().username, media = media._id) }}#comment"> - {{ comment.created.strftime("%Y-%m-%d %I:%M%p") }} + {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }} </a> </div> </div> {% endfor %} + {% 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 %} + {{ render_pagination(request, pagination, request.urlgen('mediagoblin.user_pages.media_home', user = media.uploader().username, @@ -118,9 +114,9 @@ <div class="grid_5 omega"> {% include "mediagoblin/utils/prev_next.html" %} - {% if media['uploader'] == request.user['_id'] or + {% if media['uploader'] == request.user._id or request.user['is_admin'] %} - <h3>Temporary button holder</h3> + <h3>{% trans %}Actions{% endtrans %}</h3> <p> {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', user= media.uploader().username, @@ -155,7 +151,7 @@ {% endif %} {% if app_config['allow_attachments'] - and (media['uploader'] == request.user['_id'] + and (media['uploader'] == request.user._id or request.user['is_admin']) %} <p> <a href="{{ request.urlgen('mediagoblin.edit.attachments', diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html index f62082bd..0f650ab6 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/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index c5beeaaa..d6a9fe1f 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -26,6 +26,17 @@ user=user.username) }}"> {% endblock mediagoblin_head %} +{% block title %} + {%- if user -%} + {%- trans username=user.username -%} + {{ username }}'s profile + {%- endtrans %} — {{ super() }} + {%- else -%} + {{ super() }} + {%- endif -%} +{% endblock %} + + {% block mediagoblin_content -%} {# If no user... #} {% if not user %} @@ -78,8 +89,8 @@ {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} </h1> - {% if not user['url'] and not user['profile'] %} - {% if request.user['_id'] == user['_id'] %} + {% if not user['url'] and not user['bio'] %} + {% if request.user._id == user._id %} <div class="grid_6 alpha empty_space"> <p> {% trans %}Here's a spot to tell others about yourself.{% endtrans %} @@ -102,7 +113,7 @@ {% else %} <div class="grid_6 alpha"> {% include "mediagoblin/utils/profile.html" %} - {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %} + {% if request.user._id == user._id or request.user['is_admin'] %} <a href="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ user.username }}"> {%- trans %}Edit profile{% endtrans -%} @@ -129,7 +140,7 @@ {% include "mediagoblin/utils/feed_link.html" %} </div> {% else %} - {% if request.user['_id'] == user['_id'] %} + {% if request.user._id == user._id %} <div class="grid_10 omega empty_space"> <p> {% trans -%} diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html index 0df3bfea..84336103 100644 --- a/mediagoblin/templates/mediagoblin/utils/pagination.html +++ b/mediagoblin/templates/mediagoblin/utils/pagination.html @@ -21,7 +21,7 @@ {# only display if {{pagination}} is defined #} {% if pagination and pagination.pages > 1 %} {% if not base_url %} - {% set base_url = request.path_info %} + {% set base_url = request.full_path %} {% endif %} {% if preserve_get_params %} diff --git a/mediagoblin/templates/mediagoblin/utils/tags.html b/mediagoblin/templates/mediagoblin/utils/tags.html index 87e6a85f..b3211bd9 100644 --- a/mediagoblin/templates/mediagoblin/utils/tags.html +++ b/mediagoblin/templates/mediagoblin/utils/tags.html @@ -23,7 +23,7 @@ <li class="tag"> <a href="{{ request.urlgen( 'mediagoblin.listings.tags_listing', - tag=tag['slug']) }}">{{ tag['name'] }}</li> + tag=tag['slug']) }}">{{ tag['name'] }}</a></li> {% endfor %} </ul> {% endblock %} diff --git a/mediagoblin/templates/mediagoblin/utils/wtforms.html b/mediagoblin/templates/mediagoblin/utils/wtforms.html index 6a86fd24..39dca7cc 100644 --- a/mediagoblin/templates/mediagoblin/utils/wtforms.html +++ b/mediagoblin/templates/mediagoblin/utils/wtforms.html @@ -18,18 +18,16 @@ {# Generically render a field #} {% macro render_field_div(field) %} - <div class="form_field_box"> - <div class="form_field_label">{{ _(field.label.text) }}</div> - <div class="form_field_input">{{ field }}</div> + <p class="form_field_label"><label for="{{ field.name }}">{{ _(field.label.text) }}</label></p> + <div class="form_field_input"> + {{ field }} {%- if field.errors -%} {% for error in field.errors %} - <div class="form_field_error"> - {{ error }} - </div> + <p class="form_field_error">{{ error }}</p> {% endfor %} {%- endif %} {% if field.description -%} - <div class="form_field_description">{{ _(field.description) }}</div> + <p class="form_field_description">{{ _(field.description) }}</p> {%- endif %} </div> {%- endmacro %} |