From: Jef van Schendel Date: Tue, 13 Dec 2011 14:15:57 +0000 (+0100) Subject: Merge jQuery branch, resolve conflicts X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bb3b9e4090706e1e9815c5132c01b9e706e31360;p=mediagoblin.git Merge jQuery branch, resolve conflicts --- bb3b9e4090706e1e9815c5132c01b9e706e31360 diff --cc mediagoblin/static/css/base.css index 961a51fc,c1239abb..2a78006d --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@@ -117,22 -118,21 +118,22 @@@ a.mediagoblin_logo /* common website elements */ - .button_action, .button_action_highlight{ + .button_action, .button_action_highlight { ++ display: inline-block; color: #c3c3c3; background-color: #363636; border: 1px solid; border-color: #464646 #2B2B2B #252525; border-radius: 4px; - margin: 8px; padding: 3px 8px; ++ font-size: 16px; text-decoration: none; font-style: normal; font-weight: bold; - font-size: 1em; - display: inline-block; - font-size: 16px; + cursor: pointer; } - .button_action_highlight{ + .button_action_highlight { background-color: #86D4B1; border-color: #A2DEC3 #6CAA8E #5C9179; color: #283F35; diff --cc mediagoblin/templates/mediagoblin/user_pages/media.html index d7d510d4,1a19443c..5760a68c --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@@ -22,140 -22,154 +22,156 @@@ {% block title %}{{ media.title }} — {{ super() }}{% endblock %} + {% block mediagoblin_head %} + + {% endblock mediagoblin_head %} + {% block mediagoblin_content %} - {% if media %} -
-
- {% block mediagoblin_media %} - {% set display_media = request.app.public_store.file_url( - media.get_display_media(media.media_files)) %} - - {# if there's a medium file size, that means the medium size - # isn't the original... so link to the original! - #} - {% if media['media_files'].has_key('medium') %} - - Image for {{ media.title }} - - {% else %} +
+
+ {% block mediagoblin_media %} + {% set display_media = request.app.public_store.file_url( + media.get_display_media(media.media_files)) %} - + {# if there's a medium file size, that means the medium size + # isn't the original... so link to the original! + #} + {% if media['media_files'].has_key('medium') %} + Image for {{ media.title }} + + {% else %} + Image for {{ media.title }} + {% endif %} + {% endblock %} +
- +

+ {{ media.title }} +

+ {% autoescape False %} +

{{ media.description_html }}

- {% endautoescape %} -

- {% trans date=media.created.strftime("%Y-%m-%d"), - user_url=request.urlgen( - 'mediagoblin.user_pages.user_home', - user=media.get_uploader().username), - username=media.get_uploader().username -%} - By {{ username }} on {{ date }} ++ {% endautoescape %} ++

++ {% trans date=media.created.strftime("%Y-%m-%d") -%} ++ Added on {{ date }}. Licensed under an X license. + {%- endtrans %} ++ {% if media['uploader'] == request.user._id or ++ request.user['is_admin'] %} ++ {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', ++ user= media.get_uploader().username, ++ media= media._id) %} ++ {% trans %}Edit{% endtrans %} ++ {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', ++ user= media.get_uploader().username, ++ media= media._id) %} ++ {% trans %}Delete{% endtrans %} ++ {% endif %} +

-

- {% if request.user and comments.count() %} -

{% trans %}Post a comment{% endtrans %}

- {% endif %} - {% if comments %} - {% for comment in comments %} - {% set comment_author = comment.author() %} - {% if pagination.active_id == comment._id %} -
- - {% else %} - - {% endfor %} - - {% endblock %} ++ class="button_action" id="button_addcomment" title="Add a comment"> ++ {% trans %}Add one{% endtrans %} ++ +
- -

- {{ media.title }} -

- {% autoescape False %} -

{{ media.description_html }}

- {% endautoescape %} -

- {% trans date=media.created.strftime("%Y-%m-%d") -%} - Added on {{ date }}. Licensed under an X license. - {%- endtrans %} - {% if media['uploader'] == request.user._id or - request.user['is_admin'] %} - {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', - user= media.get_uploader().username, - media= media._id) %} - {% trans %}Edit{% endtrans %} - {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', - user= media.get_uploader().username, - media= media._id) %} - {% trans %}Delete{% endtrans %} - {% endif %} -

-

{% trans %}23 comments{% endtrans %}

- {# 0 comments. Be the first to add one! #} ++ ++ {# 0 comments. Be the first to add one! #} {% if request.user %}
+ media=media._id) }}" method="POST" id="form_comment"> -

{% trans %}Type your comment here. You can use Markdown for formatting.{% endtrans %}

++

++ {% trans %}Type your comment here. You can use Markdown for formatting.{% endtrans %} ++

{{ wtforms_util.render_divs(comment_form) }}
- + {{ csrf_token }}
{% endif %} - + {% if comments %} + {% for comment in comments %} + {% set comment_author = comment.author() %} - {% if pagination.active_id == comment._id %} ++ {% if pagination.active_id == comment._id %} +
- ++ + {% else %} +
- {% endif %} - -
{% autoescape False %}{{ comment.content_html }} - {% endautoescape %} - - - {{ comment_author['username'] }} - {% trans %}at{% endtrans %} - - {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }} - -
-
++ {% endif %} ++
++ {% autoescape False %} ++ {{ comment.content_html }} ++ {% endautoescape %} ++ ++ ++ {{ comment_author.username }} ++ ++ {% trans %}at{% endtrans %} ++ ++ {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }} ++ ++
++
+ {% endfor %} - - {{ render_pagination(request, pagination, - request.urlgen('mediagoblin.user_pages.media_home', - user = media.get_uploader().username, - media = media._id)) }} -
+ {{ render_pagination(request, pagination, - request.urlgen('mediagoblin.user_pages.media_home', - user = media.get_uploader().username, - media = media._id)) }} -
- {% endif %} - ++ request.urlgen('mediagoblin.user_pages.media_home', ++ user = media.get_uploader().username, ++ media = media._id)) }} + {% endif %} - -
- {% trans user_url=request.urlgen( - 'mediagoblin.user_pages.user_home', - user=media.get_uploader().username), - username=media.get_uploader().username -%} ++
+
++ {% trans user_url=request.urlgen( ++ 'mediagoblin.user_pages.user_home', ++ user=media.get_uploader().username), ++ username=media.get_uploader().username -%} +

❖ Browsing media by {{ username }}

- {%- endtrans %} - - {% include "mediagoblin/utils/prev_next.html" %} - - {% if media.attachment_files|count %} -

Attachments

- - {% endif %} - - {% if app_config['allow_attachments'] - and (media['uploader'] == request.user._id - or request.user['is_admin']) %} -

- Add attachment -

- {% endif %} - - {% if media.tags %} - {% include "mediagoblin/utils/tags.html" %} - {% endif %} -
- {% else %} -

{% trans %}Sorry, no such media found.{% endtrans %}

- {% endif %} ++ {%- endtrans %} + {% include "mediagoblin/utils/prev_next.html" %} - - {% if media.uploader == request.user._id or - request.user.is_admin %} -

- {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', - user= media.get_uploader().username, - media= media.slug) %} - {% trans %}Edit{% endtrans %} -

-

- {% set delete_url = request.urlgen('mediagoblin.user_pages.media_confirm_delete', - user= media.get_uploader().username, - media= media._id) %} - {% trans %}Delete{% endtrans %} -

- {% endif %} - + {% if media.attachment_files|count %} +

Attachments

+ + {% endif %} - + {% if app_config['allow_attachments'] + and (media.uploader == request.user._id + or request.user.is_admin) %} +

+ Add attachment +

+ {% endif %} - + {% if media.tags %} + {% include "mediagoblin/utils/tags.html" %} + {% endif %} +
{% endblock %}