forked from ckan/ckan
-
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.
Make the organization_item snippet overridable
- Loading branch information
1 parent
e0732b1
commit eb43d76
Showing
1 changed file
with
32 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
<section class="group-list module module-narrow module-shallow"> | ||
<header class="module-heading"> | ||
{% set url=h.url_for(controller='organization', action='read', id=organization.name) %} | ||
{% set truncate=truncate or 0 %} | ||
<a class="module-image" href="{{ url }}"> | ||
<img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" alt="{{ organization.name }}" /> | ||
</a> | ||
<h3 class="media-heading"><a href={{ url }}>{{ organization.title or organization.name }}</a></h3> | ||
{% if organization.description %} | ||
{% if truncate == 0 %} | ||
<p>{{ h.markdown_extract(organization.description)|urlize }}</p> | ||
{% else %} | ||
<p>{{ h.markdown_extract(organization.description, truncate)|urlize }}</p> | ||
{% endif %} | ||
{% endif %} | ||
</header> | ||
{% set list_class = "unstyled dataset-list" %} | ||
{% set item_class = "dataset-item module-content" %} | ||
{% snippet 'snippets/package_list.html', packages=organization.packages, list_class=list_class, item_class=item_class, truncate=120 %} | ||
</section> | ||
{% block organization_item %} | ||
<section class="group-list module module-narrow module-shallow"> | ||
{% block organization_item_header %} | ||
<header class="module-heading"> | ||
{% set url=h.url_for(controller='organization', action='read', id=organization.name) %} | ||
{% set truncate=truncate or 0 %} | ||
{% block organization_item_header_image %} | ||
<a class="module-image" href="{{ url }}"> | ||
<img src="{{ organization.image_display_url or h.url_for_static('/base/images/placeholder-organization.png') }}" alt="{{ organization.name }}" /> | ||
</a> | ||
{% endblock %} | ||
{% block organization_item_header_title %} | ||
<h3 class="media-heading"><a href={{ url }}>{{ organization.title or organization.name }}</a></h3> | ||
{% endblock %} | ||
{% block organization_item_header_description %} | ||
{% if organization.description %} | ||
{% if truncate == 0 %} | ||
<p>{{ h.markdown_extract(organization.description)|urlize }}</p> | ||
{% else %} | ||
<p>{{ h.markdown_extract(organization.description, truncate)|urlize }}</p> | ||
{% endif %} | ||
{% endif %} | ||
{% endblock %} | ||
</header> | ||
{% endblock %} | ||
{% block organization_item_content %} | ||
{% set list_class = "unstyled dataset-list" %} | ||
{% set item_class = "dataset-item module-content" %} | ||
{% snippet 'snippets/package_list.html', packages=organization.packages, list_class=list_class, item_class=item_class, truncate=120 %} | ||
{% endblock %} | ||
</section> | ||
{% endblock %} |