diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-12-12 18:53:03 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2011-12-12 18:53:03 +0100 |
commit | d44140a212fddab3301cbf3a97d3197f8879277b (patch) | |
tree | edc8f09b0e476fc78472b469fdda6adda33b4dc2 /mediagoblin/templates | |
parent | 6ae878e730e006ab674f12c581af8447a0994a9f (diff) | |
parent | ddc1cae9ea4c80415557ec0408a56a3a1c60423b (diff) | |
download | mediagoblin-d44140a212fddab3301cbf3a97d3197f8879277b.tar.lz mediagoblin-d44140a212fddab3301cbf3a97d3197f8879277b.tar.xz mediagoblin-d44140a212fddab3301cbf3a97d3197f8879277b.zip |
Merge branch 'sql/dot-notation'
* sql/dot-notation:
Dot-Notation for MediaEntry.media_data
Dot-Notation for MediaEntry.media_type
Dot-Notation for MediaEntry.description(_html)
Dot-Notation for MediaEntry.slug
Dot-Notation for MediaEntry.title
Dot-Notation for MediaEntry.uploader
Dot-Notation for MediaEntry.created
Dot-Notation: tests/test_edit.py
Dot-Notation for Users.fp_token_expire
Dot-Notation for Users.fp_verification_key
Dot-Notation for Users.bio and .bio_html
Dot-Notation for Users.url
Dot-Notation for Users.is_admin
Dot-Notation for Users.verification_key
Dot-Notation for Users.status
Dot-Notation for Users.email_verified
Dot-Notation for Users.pw_hash
Dot-Notation for Users.email
Dot-Notation for Users.username
Diffstat (limited to 'mediagoblin/templates')
7 files changed, 20 insertions, 20 deletions
diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 29639026..16569f03 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -48,7 +48,7 @@ ><img src="{{ request.staticdirect('/images/logo.png') }}" alt="{% trans %}MediaGoblin logo{% endtrans %}" /></a> {% endblock %} - {% if request.user and request.user['status'] == 'active' %} + {% if request.user and request.user.status == 'active' %} <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}"> {% trans %}Submit media{% endtrans %} @@ -60,14 +60,14 @@ {# the following link should only appear when verification is needed #} {% if request.user.status == "needs_email_verification" %} <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', - user=request.user['username']) }}" + user=request.user.username) }}" class="button_action_highlight"> {% trans %}Verify your email!{% endtrans %}</a> {% endif %} <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', - user= request.user['username']) }}"> - {{ request.user['username'] }}</a> + user= request.user.username) }}"> + {{ request.user.username }}</a> (<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>) {% else %} diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html index bf8fe5c1..2d5daa95 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html @@ -22,11 +22,11 @@ {% block mediagoblin_content %} <form action="{{ request.urlgen('mediagoblin.edit.profile') }}?username={{ - user['username'] }}" + user.username }}" method="POST" enctype="multipart/form-data"> <div class="grid_8 prefix_1 suffix_1 edit_box form_box"> <h1> - {%- trans username=user['username'] -%} + {%- trans username=user.username -%} Editing {{ username }}'s profile {%- endtrans %} </h1> diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index b811d161..d7d510d4 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -80,8 +80,8 @@ {% endautoescape %} <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> + 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, @@ -115,8 +115,8 @@ <div class="grid_5 omega"> {% include "mediagoblin/utils/prev_next.html" %} - {% if media['uploader'] == request.user._id or - request.user['is_admin'] %} + {% if media.uploader == request.user._id or + request.user.is_admin %} <p> {% set edit_url = request.urlgen('mediagoblin.edit.edit_media', user= media.get_uploader().username, @@ -145,8 +145,8 @@ {% endif %} {% if app_config['allow_attachments'] - and (media['uploader'] == request.user._id - or request.user['is_admin']) %} + and (media.uploader == request.user._id + or request.user.is_admin) %} <p> <a href="{{ request.urlgen('mediagoblin.edit.attachments', user=media.get_uploader().username, diff --git a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html index 058351a5..7c7218ae 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media_confirm_delete.html @@ -27,7 +27,7 @@ method="POST" enctype="multipart/form-data"> <div class="grid_8 prefix_1 suffix_1 edit_box form_box"> <h1> - {%- trans title=media['title'] -%} + {%- trans title=media.title -%} Really delete {{ title }}? {%- endtrans %} </h1> diff --git a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html index 9b4adeb5..a14b0123 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html +++ b/mediagoblin/templates/mediagoblin/user_pages/processing_panel.html @@ -36,8 +36,8 @@ </tr> {% for media_entry in processing_entries %} <tr> - <td>{{ media_entry['title'] }}</td> - <td>{{ media_entry['created'].strftime("%m-%d-%Y %I:%M %p") }}</td> + <td>{{ media_entry.title }}</td> + <td>{{ media_entry.created.strftime("%m-%d-%Y %I:%M %p") }}</td> <td></td> </tr> {% endfor %} @@ -57,7 +57,7 @@ </tr> {% for media_entry in failed_entries %} <tr> - <td>{{ media_entry['title'] }}</td> + <td>{{ media_entry.title }}</td> <td>{{ media_entry['created'].strftime("%m-%d-%Y %I:%M %p") }}</td> <td>{{ media_entry.get_fail_exception().general_message }}</td> </tr> diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index 5a39aaa5..b952e88c 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -89,7 +89,7 @@ {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} </h1> - {% if not user['url'] and not user['bio'] %} + {% if not user.url and not user.bio %} {% if request.user._id == user._id %} <div class="grid_6 alpha empty_space"> <p> @@ -113,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 -%} diff --git a/mediagoblin/templates/mediagoblin/utils/object_gallery.html b/mediagoblin/templates/mediagoblin/utils/object_gallery.html index e1b8cc9b..65ff09a4 100644 --- a/mediagoblin/templates/mediagoblin/utils/object_gallery.html +++ b/mediagoblin/templates/mediagoblin/utils/object_gallery.html @@ -33,9 +33,9 @@ <img src="{{ request.app.public_store.file_url( entry['media_files']['thumb']) }}" /> </a> - {% if entry['title'] %} + {% if entry.title %} <br /> - <a href="{{ entry_url }}">{{ entry['title'] }}</a> + <a href="{{ entry_url }}">{{ entry.title }}</a> {% endif %} </td> {% endfor %} |