Brief experiment with UI patterns which would be great if could pass in label value
This commit is contained in:
parent
b846522aad
commit
158b69051b
2 changed files with 27 additions and 0 deletions
19
agaric/templates/patterns/detail/detail.ui_patterns.yml
Normal file
19
agaric/templates/patterns/detail/detail.ui_patterns.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
detail:
|
||||||
|
label: Detail
|
||||||
|
description: Show a single detail field.
|
||||||
|
variants:
|
||||||
|
default:
|
||||||
|
label: Default
|
||||||
|
fields:
|
||||||
|
label:
|
||||||
|
type: text
|
||||||
|
label: Label
|
||||||
|
description: The field label.
|
||||||
|
preview: Project name
|
||||||
|
value:
|
||||||
|
type: text
|
||||||
|
label: Value
|
||||||
|
description: The field contents, or value.
|
||||||
|
preview: The Agaric Initiatives
|
||||||
|
libraries:
|
||||||
|
- octavia/global
|
|
@ -0,0 +1,8 @@
|
||||||
|
{{ label }}
|
||||||
|
<p class="pattern-field-detail">
|
||||||
|
<label{{ title_attributes }}>{{ label }}</label>
|
||||||
|
{% for item in items %}
|
||||||
|
<strong>{{ item.content }}</strong>
|
||||||
|
{% endfor %}
|
||||||
|
</p>
|
||||||
|
{{ value }}
|
Loading…
Reference in a new issue