Skip to content
Snippets Groups Projects
Commit a8cc2a85 authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Worked on key generation for organization extras

parent dde77732
No related branches found
No related tags found
1 merge request!50Upgraded to CKAN 2.10
......@@ -63,11 +63,12 @@
{# Add a max of 3 empty columns #}
{% set total_extras = data.extras|count %}
{% if total_extras <= (custom_extras|count) %}{% set total_extras = (custom_extras|count) %}{% endif %}
{% set empty_extras = (limit or 3) - total_extras %}
{% if empty_extras <= 0 %}{% set empty_extras = 1 %}{% endif %}
{% for extra in range(total_extras, total_extras + empty_extras) %}
{% set index = loop.index0 + (data.extras|count) + (custom_extras|count) %}
{% set index = loop.index0 + total_extras %}
{% set prefix = 'extras__%d__' % index %}
{{ form.custom(
names=(prefix ~ 'key', prefix ~ 'value', prefix ~ 'deleted'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment