Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added left hand nav to the edit/add resource pages to allow users to …
…move from editing each different resource easily
- Loading branch information
1 parent
ca5882a
commit ed37c63
Showing
8 changed files
with
65 additions
and
15 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
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 +1 @@ | ||
<li>{% link_for _('Back to dataset'), controller='package', action='read', id=pkg.name, class_='btn', icon='caret-left' %}</li> | ||
<li>{% link_for _('View dataset'), controller='package', action='read', id=pkg.name, class_='btn', icon='eye-open' %}</li> |
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,32 @@ | ||
{# | ||
Displays a sidebard module with information for given package | ||
|
||
pkg - The package dict that owns the resources. | ||
active - The active resource. | ||
action - The action that this is coming from. | ||
|
||
Example: | ||
|
||
{% snippet "package/snippets/info.html", pkg=pkg %} | ||
|
||
#} | ||
{% if pkg and h.check_access('package_update', {'id':pkg.id }) %} | ||
<section class="module module-narrow package-info"> | ||
<h2 class="module-heading"><i class="icon-sitemap"></i> {{ _("Edit Dataset") }}</h2> | ||
<ul class="unstyled nav nav-simple"> | ||
<li class="nav-item{% if action == 'package_edit' %} active{% endif %}"> | ||
{% link_for h.dataset_display_name(pkg)|truncate(30), controller='package', action='edit', id=pkg.name %} | ||
</li> | ||
</ul> | ||
{% set resources = pkg.resources or [] %} | ||
<h2 class="module-heading module-heading-secondary"><i class="icon-copy"></i> {{ _("Edit Resources") }}</h2> | ||
<ul class="unstyled nav nav-simple"> | ||
{% for resource in resources %} | ||
<li class="nav-item{{ ' active' if active == resource.id }}"> | ||
{% link_for h.resource_display_name(resource)|truncate(30), controller='package', action='resource_edit', id=pkg.name, resource_id=resource.id, inner_span=true %} | ||
</li> | ||
{% endfor %} | ||
<li><a href="{{ h.url_for(controller='package', action='new_resource', id=pkg.name) }}" class="btn{% if action == 'resource_new' %} disabled{% endif %}"><i class="icon-plus"></i> {{ _('Add new resource') }}</a></li> | ||
</ul> | ||
</section> | ||
{% endif %} |
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