-
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.
feature: add dashboard_organization fix
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
ckanext/core_fix/template_fix/dashboard_organization/user/dashboard_organization.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,28 @@ | ||
{% extends "user/dashboard.html" %} | ||
|
||
{% set org_type = h.default_group_type('organization') %} | ||
|
||
{% block page_primary_action %} | ||
{% if h.check_access('organization_create') %} | ||
{% link_for h.humanize_entity_type('organization', org_type, 'add link') or _('Add Organization'), named_route=org_type ~ '.new', class_="btn btn-primary", icon="plus-square" %} | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<h2 class="hide-heading">{{ h.humanize_entity_type('organization', org_type, 'my label') or _('My Organizations') }}</h2> | ||
{% set organizations = h.organizations_available(permission='manage_group', | ||
include_dataset_count=True, | ||
include_member_count=True) %} | ||
{% if organizations %} | ||
<div class="wide"> | ||
{% snippet "organization/snippets/organization_list.html", organizations=organizations, show_capacity=True %} | ||
</div> | ||
{% else %} | ||
<p class="empty"> | ||
{{ h.humanize_entity_type('organization', org_type, 'you not member') or _('You are not a member of any organizations.') }} | ||
{% if h.check_access('organization_create') %} | ||
{% link_for _('Create one now?'), named_route=org_type ~ '.new' %} | ||
{% endif %} | ||
</p> | ||
{% endif %} | ||
{% endblock %} |