Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add colors indicating selections to participants table again #289

Merged
merged 1 commit into from
Nov 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/styles/_participants-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
}
}
}

tbody {
td {
&.yes {
background-color: #c6ffbf;
}

&.no {
background-color: #ffbabc;
}
}
}
}
}
}
26 changes: 11 additions & 15 deletions app/templates/components/poll-evaluation-participants-table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,19 @@
{{user.name}}
</td>
{{#each this.options as |option index|}}
<td
data-test-is-selection-cell
data-test-value-for={{option.value}}
>
{{#let (object-at index user.selections) as |selection|}}
{{#if this.isFreeText}}
{{selection.label}}
{{#let (object-at index user.selections) as |selection|}}
<td
class={{selection.type}}
data-test-is-selection-cell
data-test-value-for={{option.value}}
>
{{#if selection.labelTranslation}}
{{t selection.labelTranslation}}
{{else}}
{{#if selection.type}}
<span class={{selection.type}}>
<span class={{selection.icon}}></span>
{{t selection.labelTranslation}}
</span>
{{/if}}
{{selection.label}}
{{/if}}
{{/let}}
</td>
</td>
{{/let}}
{{/each}}
</tr>
{{/each}}
Expand Down