forked from mozilla/zamboni
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
500 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
apps/addons/templates/addons/includes/collection_add_widget.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="collection-add" | ||
data-listurl="{{ url('collections.ajax_list') }}" | ||
data-addurl="{{ url('collections.ajax_add') }}" | ||
data-removeurl="{{ url('collections.ajax_remove') }}" | ||
data-newurl="{{ url('collections.ajax_new') }}" | ||
> | ||
<span><a href="#">Add to collection</a></span> | ||
</div> | ||
<div class="collection-add-dropdown install-note"> | ||
{% if user.is_anonymous() %} | ||
<div class="collection-add-login"> | ||
<p> | ||
{% trans %} | ||
To create your own collections, you must have an add-ons | ||
account. | ||
{% endtrans %} | ||
</p> | ||
<p class="register-button"> | ||
<a class="button" href="{{ remora_url('users/register') }}">{{ _('Create an Add-ons Account') }}</a> | ||
</p> | ||
|
||
<p> | ||
{% trans login=login_link() %} | ||
or <a href="{{ login }}">log in to your current account</a> | ||
{% endtrans %} | ||
</p> | ||
</div> | ||
{% endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
ALTER TABLE `collections_users` CHANGE COLUMN `id` `id` int(11) NOT NULL; | ||
ALTER TABLE `collections_users` | ||
CHANGE COLUMN `id` `id` int(11) NOT NULL DEFAULT 0; | ||
|
||
ALTER TABLE `collections_users` DROP PRIMARY KEY, | ||
ADD PRIMARY KEY(`collection_id`, `user_id`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% if collections %} | ||
<ul id="ajax_collections_list" class="addon-collections"> | ||
{% for collection in collections %} | ||
<li {{ collection.has_addon|class_selected(True) }} | ||
data-id="{{ collection.id }}"> | ||
<span class="collectionitem">{{ collection.name }}</span> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
<p id="ajax_new_collection"><a href="#">{{ _('Start a new collection...') }}</a></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div id="collections-new"> | ||
<h3>{{ _('Start a New Collection') }}</h3> | ||
|
||
<form> | ||
<fieldset> | ||
{{ field(form.name, _('Name:')) }} | ||
<p id="collection-form-slug"> | ||
{{ form.errors['slug']|safe }} | ||
<label>{{ form.slug.label|safe }}</label> | ||
<span id="slug_edit"> | ||
{{ url('collections.user', user.get_profile().nickname)|absolutify -}} | ||
{{ form.slug|safe }} | ||
</span> | ||
<span id="slug_readonly"> | ||
{{ url('collections.user', user.get_profile().nickname)|absolutify -}}<span id="slug_value"></span> | ||
<a id="edit_slug" href="#">{{ _('Edit') }}</a> | ||
</span> | ||
</p> | ||
<p> | ||
<label for="id_description">{{ form.description.label|safe }}</label> {{ _('(optional)') }} | ||
{{ form.description|safe }} | ||
</p> | ||
<label>{{ form.listed.label }}</label> | ||
{{ form.listed|safe }} | ||
</fieldset> | ||
<p> | ||
<input type="submit" value="{{ _('Create Collection') }}"> | ||
{% trans %}or <a id="collections-new-cancel" href="#">Cancel</a>{% endtrans %} | ||
</p> | ||
</form> | ||
</div> |
Oops, something went wrong.