Skip to content

Commit

Permalink
New variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
ggcatu committed Aug 25, 2017
1 parent 9639ed6 commit e8a8fb6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ckanext/datastore/templates/datastore/dictionary.html
Expand Up @@ -12,8 +12,8 @@

<form method="post" action="{{ action }}" >
{% block dictionary_form %}
{% for f in fields %}
{% snippet "datastore/snippets/dictionary_form.html", f=f, position=loop.index, form=form %}
{% for field in fields %}
{% snippet "datastore/snippets/dictionary_form.html", field=field, position=loop.index %}
{% endfor %}
{% endblock %}
<button class="btn btn-primary" name="save" type="submit">
Expand Down
@@ -1,14 +1,16 @@
<h3>{{ _( "Field {num}.").format(num=position) }} {{ f.id }} ({{ f.type }})</h3>
{% import 'macros/form.html' as form %}

<h3>{{ _( "Field {num}.").format(num=position) }} {{ field.id }} ({{ field.type }})</h3>
{{ form.select('info__' ~ position ~ '__type_override',
label=_('Type Override'), options=[
{'name': '', 'value': ''},
{'name': 'text', 'value': 'text'},
{'name': 'numeric', 'value': 'numeric'},
{'name': 'timestamp', 'value': 'timestamp'},
], selected=f.get('info', {}).get('type_override', '')) }}
], selected=field.get('info', {}).get('type_override', '')) }}
{{ form.input('info__' ~ position ~ '__label',
label=_('Label'), id='field-f' ~ position ~ 'label',
value=f.get('info', {}).get('label', ''), classes=['control-full']) }}
value=field.get('info', {}).get('label', ''), classes=['control-full']) }}
{{ form.markdown('info__' ~ position ~ '__notes',
label=_('Description'), id='field-d' ~ position ~ 'notes',
value=f.get('info', {}).get('notes', '')) }}
value=field.get('info', {}).get('notes', '')) }}
6 changes: 3 additions & 3 deletions ckanext/datastore/templates/package/resource_read.html
Expand Up @@ -24,9 +24,9 @@ <h2>{{ _('Data Dictionary') }}</h2>
{% endblock %}
</thead>
{% block resource_data_dictionary_data %}
{% set ddict=h.datastore_dictionary(res.id) %}
{% for f in ddict %}
{% snippet "package/snippets/dictionary_table.html", f=f, h=h %}
{% set dict=h.datastore_dictionary(res.id) %}
{% for field in dict %}
{% snippet "package/snippets/dictionary_table.html", field=field, h=h %}
{% endfor %}
{% endblock %}
</table>
Expand Down
@@ -1,7 +1,7 @@
<tr>
<td>sdfasdf {{ f.id }}</td>
<td>{{ f.type }}</td>
<td>{{ h.get_translated(f.get('info', {}), 'label') }}</td>
<td>{{ field.id }}</td>
<td>{{ field.type }}</td>
<td>{{ h.get_translated(field.get('info', {}), 'label') }}</td>
<td>{{ h.render_markdown(
h.get_translated(f.get('info', {}), 'notes')) }}</td>
h.get_translated(field.get('info', {}), 'notes')) }}</td>
</tr>

0 comments on commit e8a8fb6

Please sign in to comment.