Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
It's just a slightly edited version of https://github.com/okfn/ckan/blob/be06121/ckanext/featured/plugin.py as now the helpers are returning data and not data+html.
- Loading branch information
1 parent
c3c39ea
commit 6b1b6f0
Showing
3 changed files
with
73 additions
and
14 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
10 changes: 6 additions & 4 deletions
10
ckanext/homepage/theme/templates/home/snippets/featured_group.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{% set group = h.get_featured_group() %} | ||
{% set groups = h.get_featured_groups() %} | ||
|
||
<div class="box"> | ||
{% snippet 'snippets/group_item.html', group=group, truncate=50, truncate_title=35 %} | ||
</div> | ||
{% for group in groups %} | ||
<div class="box"> | ||
{% snippet 'snippets/group_item.html', group=group, truncate=50, truncate_title=35 %} | ||
</div> | ||
{% endfor %} |
10 changes: 6 additions & 4 deletions
10
ckanext/homepage/theme/templates/home/snippets/featured_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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{% set organization = h.get_featured_organization() %} | ||
{% set organizations = h.get_featured_organizations() %} | ||
|
||
<div class="box"> | ||
{% snippet 'snippets/organization_item.html', organization=organization, truncate=50, truncate_title=35 %} | ||
</div> | ||
{% for organization in organizations %} | ||
<div class="box"> | ||
{% snippet 'snippets/organization_item.html', organization=organization, truncate=50, truncate_title=35 %} | ||
</div> | ||
{% endfor %} |