Difference between revisions of "CreateTopicForm"
Jump to navigation
Jump to search
Tim Holzheim (talk | contribs) |
Tim Holzheim (talk | contribs) |
||
| (7 intermediate revisions by the same user not shown) | |||
| Line 17: | Line 17: | ||
{%- set dump = topic_properties.append(p["name"]) -%} | {%- set dump = topic_properties.append(p["name"]) -%} | ||
{%- endfor %} | {%- endfor %} | ||
| − | {%- set property_printouts = "" | + | {%- set property_printouts = namespace(query_vars="") %} |
| + | {% for p in properties %} | ||
| + | {%- set property_printouts.query_vars = property_printouts.query_vars + "|?Property " + p + "=" + p -%} | ||
| + | {%- endfor %} | ||
{%- set topic_property_properties = [] -%} | {%- set topic_property_properties = [] -%} | ||
| − | {% for pp in smw.query("[[Property topic::" + row.Topic + "]]" + property_printouts).values() %} | + | {% for pp in smw.query("[[Property topic::" + row.Topic + "]]" + property_printouts.query_vars).values() %} |
{%- set dump = topic_property_properties.append(pp) -%} | {%- set dump = topic_property_properties.append(pp) -%} | ||
{%- endfor %} | {%- endfor %} | ||
{%- set property_properties = [] -%} | {%- set property_properties = [] -%} | ||
| − | {% for pp in smw.query("[[Property topic::Concept:Property]]" + property_printouts).values() %} | + | {% for pp in smw.query("[[Property topic::Concept:Property]]" + property_printouts.query_vars).values() %} |
{%- set dump = property_properties.append(pp) -%} | {%- set dump = property_properties.append(pp) -%} | ||
{%- endfor %} | {%- endfor %} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
<noinclude> | <noinclude> | ||
This is the {{'{{'}}smartMediaWiki{{'}}'}}-Form for "{{ row.name }}". | This is the {{'{{'}}smartMediaWiki{{'}}'}}-Form for "{{ row.name }}". | ||
| Line 55: | Line 53: | ||
<!-- {{ pp["type"] }} {{ pp["name"] }} --> | <!-- {{ pp["type"] }} {{ pp["name"] }} --> | ||
| {{'{{{'}}field | | {{'{{{'}}field | ||
| − | + | |{{ pp["name"] }} | |
| − | + | |property={{ row.name }} {{ pp["name"] }} | |
| − | + | |size= {%- if pp["size"] -%} {{ pp["size"] }} {% else %} 80 {% endif %} | |
| − | + | {%- if pp["mandatory"] and (pp["mandatory"] == 'True' or pp["mandatory"] == 'T' or pp["mandatory"] == 't' or pp["mandatory"] == 'true') -%}|mandatory {%- endif %} | |
| − | + | {%- if pp["inputType"] -%}|input type={{ pp["inputType"] }} {% endif %} | |
| − | + | {%- if pp["allowedValues"] -%}|values={{ pp["allowedValues"] }} {% endif %} | |
| − | + | {%- if pp["values from "] -%}|values from {{ pp["values from "] }} {% endif %} | |
| − | + | {%- if pp["default"] -%}|default={{ pp["default"] }} {% endif %} | |
| − | + | {{'}}}'}} | |
{%- endfor %} | {%- endfor %} | ||
|- | |- | ||
| Line 85: | Line 83: | ||
<!-- {{ pp["type"] }} {{ pp["name"] }} --> | <!-- {{ pp["type"] }} {{ pp["name"] }} --> | ||
| {{'{{{'}}field | | {{'{{{'}}field | ||
| − | + | |{{ pp["name"] }} | |
| − | + | |property=Property {{ pp["name"] }} | |
| − | + | |size= {%- if pp["size"] -%} {{ pp["size"] }} {% else %} 80 {% endif %} | |
| − | + | {%- if pp["mandatory"] and (pp["mandatory"] == 'True' or pp["mandatory"] == 'T' or pp["mandatory"] == 't' or pp["mandatory"] == 'true') -%}|mandatory {%- endif %} | |
| − | + | {%- if pp["inputType"] -%}|input type={{ pp["inputType"] }} {% endif %} | |
| − | + | {%- if pp["allowedValues"] -%}|values={{ pp["allowedValues"] }} {% endif %} | |
| − | + | {%- if pp["values from "] -%}|values from {{ pp["values from "] }} {% endif %} | |
| − | + | {%- if pp["default"] -%}|default={{ pp["default"] }} {% endif %} | |
| − | + | {{'}}}'}} | |
{%- endfor %} | {%- endfor %} | ||
|- | |- | ||
Latest revision as of 00:59, 15 February 2021
Sourcecode
| Sourcecode | |
|---|---|
| id | CreateTopicForm |
| lang | jinja |
| author | Tim Holzheim |
| since | 2021/02/14 |
| test | '"`UNIQ--pre-00000000-QINU`"'
|
| url | |