Skip to content

Commit

Permalink
Merge pull request #590 from open-formulieren/feature/469-refactor-ed…
Browse files Browse the repository at this point in the history
…itgrid

[#469] Add specific style for editgrid summary
  • Loading branch information
sergei-maertens authored Nov 10, 2023
2 parents 23f1937 + 7b42cf9 commit 5d50035
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion design-tokens
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@floating-ui/react": "^0.24.2",
"@formio/protected-eval": "^1.2.1",
"@fortawesome/fontawesome-free": "^6.1.1",
"@open-formulieren/design-tokens": "^0.46.0",
"@open-formulieren/design-tokens": "^0.47.0",
"@sentry/react": "^6.13.2",
"@sentry/tracing": "^6.13.2",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
Expand Down
13 changes: 10 additions & 3 deletions src/formio/templates/editGridRow.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<dl class="utrecht-data-list utrecht-data-list--html-dl utrecht-data-list--rows">
{% for (const key in ctx.flattenedComponents) { %}
{% if (ctx.isVisibleInRow(ctx.flattenedComponents[key]) && ctx.flattenedComponents[key].label) { %}
<div>{{ctx.flattenedComponents[key].label}}: {{ ctx.getView(ctx.flattenedComponents[key], ctx.row[key]) }}</div>
{% } %}
{% if (ctx.isVisibleInRow(ctx.flattenedComponents[key]) && ctx.flattenedComponents[key].label) { %}
<div class="utrecht-data-list__item">
<dt class="utrecht-data-list__item-key">{{ctx.flattenedComponents[key].label}}</dt>
<dd class="utrecht-data-list__item-value utrecht-data-list__item-value--html-dd">
{{ ctx.getView(ctx.flattenedComponents[key], ctx.row[key]) }}
</dd>
</div>
{% } %}
{% } %}
</dl>

{% if (!ctx.self.options.readOnly) { %}
<p class="utrecht-button-group utrecht-button-group--openforms-editgrid" role="group">
Expand Down
1 change: 1 addition & 0 deletions src/scss/nl-design-system-community.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
@import '@utrecht/components/dist/form-fieldset/css/index.css';
@import '@utrecht/components/dist/radio-button/css/index.css';
@import '@utrecht/components/dist/alert/css/index.css';
@import '@utrecht/components/dist/data-list/css/index.css';

0 comments on commit 5d50035

Please sign in to comment.