2 # GNU MediaGoblin -- federated, autonomous media hosting
3 # Copyright (C)
2011,
2012 MediaGoblin contributors. See AUTHORS.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version
3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with this program. If not, see
<http://www.gnu.org/licenses
/>.
18 {% extends
"mediagoblin/base.html" %}
20 {% import
"/mediagoblin/utils/wtforms.html" as wtforms_util %}
22 {% block mediagoblin_head %}
23 <script type=
"text/javascript"
24 src=
"{{ request.staticdirect('/js/collection_form_show.js') }}"></script>
27 {% block mediagoblin_content %}
29 <form action=
"{{ request.urlgen('mediagoblin.user_pages.media_collect',
30 user=media.get_uploader.username,
32 method=
"POST" enctype=
"multipart/form-data">
33 <div class=
"form_box">
35 {%- trans title=media.title -%}
36 Add {{ title }} to collection
40 <div style=
"text-align: center;" >
41 <img src=
"{{ media.thumb_url }}" />
46 <p class=
"form_field_label">
47 <label for=
"{{ (form.collection.name) }}">{{ _(form.collection.label.text) }}
</label>
49 <div class=
"form_field_input">
51 <a class=
"button_action" id=
"button_addcollection">{% trans %}+{% endtrans %}
</a>
54 <div id=
"new_collection" class=
"subform">
56 <h3>{% trans %}Add a new collection{% endtrans %}
</h3>
58 <p class=
"form_field_label">
59 <label for=
"{{ (form.collection_title.name) }}">{{ _(form.collection_title.label.text) }}
</label>
61 <div class=
"form_field_input">
62 {{ form.collection_title }}
64 <p class=
"form_field_label">
65 <label for=
"{{ (form.collection_description.name) }}">{{ _(form.collection_description.label.text) }}
</label>
67 <div class=
"form_field_input">
68 {{ form.collection_description }}
72 <p class=
"form_field_label">
73 <label for=
"{{ (form.note.name) }}">{{ _(form.note.label.text) }}
</label>
75 <div class=
"form_field_input">
79 <div class=
"form_submit_buttons">
80 {# TODO: This isn't a button really... might do unexpected things :) #}
81 <a class=
"button_action" href=
"{{ media.url_for_self(request.urlgen) }}">{% trans %}Cancel{% endtrans %}
</a>
82 <input type=
"submit" value=
"{% trans %}Add{% endtrans %}" class=
"button_form" />