-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add list view for metadata standard attribute mappings
- Loading branch information
1 parent
3d0c150
commit aad6f70
Showing
5 changed files
with
73 additions
and
10 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
41 changes: 41 additions & 0 deletions
41
ckanext/metadata/templates/metadata_standard/attr_maps.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 @@ | ||
{% extends "metadata_standard/edit_base.html" %} | ||
|
||
{% block subtitle %}{{ _('Attribute Mappings') }} - {{ c.metadata_standard.display_name }} - {{ _('Metadata Standards') }}{% endblock %} | ||
|
||
{% block page_primary_action %} | ||
{% link_for _('Create Attribute Mapping'), controller='ckanext.metadata.controllers.metadata_standard:MetadataStandardController', | ||
action='attr_map_new', id=c.metadata_standard.name, class_='btn btn-primary', icon='plus-square' %} | ||
{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<h3 class="page-heading">{{ _('{0} attribute mapping(s)'.format(c.attr_maps|length)) }}</h3> | ||
<table class="table table-header table-hover table-bordered" id="member-table"> | ||
<thead> | ||
<tr> | ||
<th>{{ _('Attribute') }}</th> | ||
<th>{{ _('JSON Path') }}</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for attr_map in c.attr_maps %} | ||
<tr> | ||
<td>{{ attr_map.record_attr }} {% if attr_map.is_key %}<i class="fa fa-key fa-rotate-90"></i>{% endif %}</td> | ||
<td>{{ attr_map.json_path }}</td> | ||
<td> | ||
<div class="btn-group pull-right"> | ||
<a class="btn btn-small" href="{% url_for controller='ckanext.metadata.controllers.metadata_standard:MetadataStandardController', | ||
action='attr_map_edit', id=c.metadata_standard.name, attr_map_id=attr_map.id %}" | ||
title="{{ _('Edit') }}"><i class="fa fa-wrench"></i> | ||
</a> | ||
<a class="btn btn-danger btn-small" href="{% url_for controller='ckanext.metadata.controllers.metadata_standard:MetadataStandardController', | ||
action='attr_map_delete', id=c.metadata_standard.name, attr_map_id=attr_map.id %}" | ||
data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this attribute mapping?') }}" | ||
title="{{ _('Delete') }}">{% block delete_button_text %}<i class="fa fa-times"></i>{% endblock %}</a> | ||
</div> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endblock %} |
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