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.
add-on dependencies front-end (bug 678650)
- Loading branch information
Chris Van
committed
Sep 26, 2011
1 parent
ef871b0
commit eefbe4f
Showing
18 changed files
with
615 additions
and
82 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
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
41 changes: 41 additions & 0 deletions
41
apps/devhub/templates/devhub/addons/edit/technical_dependencies.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,41 @@ | ||
{% macro dp(form) %} | ||
<li {% if form.initial %} | ||
data-addonid="{{ form.instance.dependent_addon.id }}" | ||
{% endif %}> | ||
<label class="js-hidden"> | ||
{{ form.DELETE.label }} {{ form.DELETE }} | ||
</label> | ||
<a href="#" class="remove" | ||
title="{{ _('Remove this dependent add-on') }}">x</a> | ||
{% if form.initial %} | ||
{% with dep = form.instance.dependent_addon %} | ||
<div style="background-image:url({{ dep.icon_url }})"> | ||
<a href="{{ dep.get_url_path() }}" target="_blank">{{ dep.name }}</a> | ||
</div> | ||
{% endwith %} | ||
{{ form.id }} | ||
{% else %} | ||
<div style="background-image:url({{ '{icon}' }})"> | ||
<a href="{{ '{url}' }}" target="_blank">{{ '{name}' }}</a> | ||
</div> | ||
{% endif %} | ||
{{ form.non_field_errors() }} | ||
{{ form.dependent_addon }} | ||
{{ form.dependent_addon.errors }} | ||
{{ form.DELETE.errors }} | ||
</li> | ||
{% endmacro %} | ||
|
||
{{ dependency_form.management_form }} | ||
{{ dependency_form.non_form_errors() }} | ||
|
||
<ul class="dependencies"> | ||
{% for form in dependency_form.initial_forms %} | ||
{{ dp(form) }} | ||
{% endfor %} | ||
</ul> | ||
<ul class="extra-form"> | ||
{{ dp(dependency_form.empty_form) }} | ||
</ul> | ||
<input type="text" class="autocomplete" | ||
placeholder="{{ _('Enter the name of an add-on') }}"> |
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
Oops, something went wrong.