Skip to content

Commit

Permalink
style: improve inactive model stylez (#466)
Browse files Browse the repository at this point in the history
* style: stretch line-through on whole inactive row

* feat: show inactive badge on deactivated models
  • Loading branch information
derrabauke authored Apr 27, 2022
1 parent b24dd06 commit 24efac2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addon/components/tree-node.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{/unless}}
</UkButton>
{{/if}}
<LinkTo @route={{@itemRoute}} @model={{@item}} class="uk-link-text {{unless @item.isActive "text-line-through"}}" data-test-node-id={{@item.id}}>
<LinkTo @route={{@itemRoute}} @model={{@item}} class="uk-link-text {{unless @item.isActive "text-line-through uk-text-muted"}}" data-test-node-id={{@item.id}}>
{{@item.name}}{{#if @item.children}} ({{@item.children.length}}){{/if}}
</LinkTo>
{{#if this.expanded}}
Expand Down
6 changes: 5 additions & 1 deletion addon/templates/scopes/edit.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div uk-grid class="uk-grid-divider uk-grid-divider-fix">
<div class="uk-width-1-2@xl">
<h3>{{t "emeis.scopes.edit.edit-scope"}}</h3>
<h3>{{t "emeis.scopes.edit.edit-scope"}}
{{#unless @model.isActive}}
<span class="uk-badge uk-background-secondary">{{t "emeis.inactive"}}</span>
{{/unless}}
</h3>
<EditForm
@model={{@model}}
@updateModel={{this.updateModel}}
Expand Down
6 changes: 5 additions & 1 deletion addon/templates/users/edit.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
</LinkTo>
<div uk-grid class="uk-grid-divider">
<div class="uk-width-1-2@l">
<h3>{{t "emeis.users.edit.edit-user"}}</h3>
<h3>{{t "emeis.users.edit.edit-user"}}
{{#unless @model.isActive}}
<span class="uk-badge uk-background-secondary">{{t "emeis.inactive"}}</span>
{{/unless}}
</h3>
<EditForm
@model={{@model}}
@updateModel={{this.updateModel}}
Expand Down
12 changes: 6 additions & 6 deletions addon/templates/users/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@
{{user.lastName}}
</LinkTo>
</td>
<td>{{user.firstName}}</td>
<td class="uk-link-text {{unless user.isActive "text-line-through"}}">{{user.firstName}}</td>
{{else}}
<td data-test-user-username={{user.id}}>
<LinkTo @route="users.edit" @model={{user}} class="uk-link-text {{unless user.isActive "text-line-through"}}">
{{user.username}}
</LinkTo>
</td>
<td>{{user.lastName}}</td>
<td>{{user.firstName}}</td>
<td class="uk-link-text {{unless user.isActive "text-line-through"}}">{{user.lastName}}</td>
<td class="uk-link-text {{unless user.isActive "text-line-through"}}">{{user.firstName}}</td>
{{/if}}

<td data-test-user-email={{user.id}}>
<td class="uk-link-text {{unless user.isActive "text-line-through"}}" data-test-user-email={{user.id}}>
{{user.email}}
</td>
<td>
<td class="uk-link-text {{unless user.isActive "text-line-through"}}">
<ul class="uk-list uk-list-divider">
{{#each user.acls as |acl|}}
<li>
Expand All @@ -74,7 +74,7 @@
</ul>
</td>
{{!-- SCOPES --}}
<td>
<td class="uk-link-text {{unless user.isActive "text-line-through"}}">
<ul class="uk-list uk-list-divider">
{{#each user.acls as |acl|}}
<li>
Expand Down
1 change: 1 addition & 0 deletions translations/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ emeis:
not-found: "Diese Seite konnte nicht gefunden werden."
empty: "Keine Einträge gefunden..."
loading: "Laden..."
inactive: "Inaktiv"
general-error: "Ein Problem ist aufgetretten. Bitte versuchen Sie es erneut."
actions: "Aktionen"
export: "Export"
Expand Down
1 change: 1 addition & 0 deletions translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ emeis:
not-found: "This page could not be found."
empty: "No entries found..."
loading: "Loading..."
inactive: "Inactive"
general-error: "A problem occured. Please try again."
actions: "Actions"
export: "Export"
Expand Down

0 comments on commit 24efac2

Please sign in to comment.