-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1057 from ecds/feature/956-single-vol-search
Add UI components: collection grid and list views, static pages, single collection banner and modal, and minor aesthetic tweaks
- Loading branch information
Showing
40 changed files
with
1,110 additions
and
1,178 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,18 @@ class RelatedLinksInline(admin.TabularInline): | |
extra = 1 | ||
min_num = 0 | ||
|
||
class ManifestAdmin(ImportExportModelAdmin, SummernoteModelAdmin, admin.ModelAdmin): | ||
class SummernoteMixin(SummernoteModelAdmin): | ||
class Media: | ||
# NOTE: have to include these js and css dependencies for summernote when not using iframe | ||
js = ( | ||
"//code.jquery.com/jquery-3.7.1.min.js", | ||
"//cdn.jsdelivr.net/npm/[email protected]/jquery.ui.widget.min.js", | ||
) | ||
css = { | ||
"all": ["//cdn.jsdelivr.net/npm/[email protected]/dist/summernote-lite.min.css"], | ||
} | ||
|
||
class ManifestAdmin(ImportExportModelAdmin, SummernoteMixin, admin.ModelAdmin): | ||
"""Django admin configuration for manifests""" | ||
resource_class = ManifestResource | ||
exclude = ('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
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,20 @@ | ||
{# Adapted from django/forms/widgets/radio.html to use uk-navbar-dropdown #} | ||
|
||
{% with id=widget.attrs.id %} | ||
<a href="#">{{ selected_value_label|default_if_none:widget.optgroups.0.1.0.label }}</a> | ||
<div class="uk-navbar-dropdown" uk-dropdown="mode: click"> | ||
<ul class="uk-nav uk-navbar-dropdown-nav sort-dropdown"{% if id %} id="{{ id }}"{% endif %}> | ||
{% for group, options, index in widget.optgroups %} | ||
{% for option in options %} | ||
<li> | ||
<label {% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}> | ||
{# NOTE: Uses a tiny bit of inline JS to submit the form on change #} | ||
<input onclick="this.form.submit()" type="{{ option.type }}" name="{{ option.name }}" value="{{ option.value }}" {% include "django/forms/widgets/attrs.html" with widget=option %}> | ||
{{ option.label }} | ||
</label> | ||
</li> | ||
{% endfor %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endwith %} |
Oops, something went wrong.