Skip to content

Commit

Permalink
feat(role index view): add roles list view
Browse files Browse the repository at this point in the history
  • Loading branch information
velrest committed Jun 30, 2020
1 parent 749b00c commit 5dccab4
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions addon/controllers/roles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PaginationController from "ember-emeis/controllers/pagination";

export default class RolesIndexController extends PaginationController {}
3 changes: 3 additions & 0 deletions addon/routes/roles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Route from "@ember/routing/route";

export default class RolesRoute extends Route {}
3 changes: 3 additions & 0 deletions addon/routes/roles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Route from "@ember/routing/route";

export default class RolesIndexRoute extends Route {}
3 changes: 3 additions & 0 deletions addon/templates/roles.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<SectionTitle @model="roles" />

{{outlet}}
38 changes: 38 additions & 0 deletions addon/templates/roles/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<DataTable
@modelName="role"
@page={{this.page}}
@search={{this.search}}
@updatePage={{fn this.updateQueryParam "page"}}
@updateSearch={{fn this.updateQueryParam "search"}} as |table|
>
<table.head>
<th>
{{t "emeis.roles.headings.name"}}
</th>
<th>
{{t "emeis.roles.headings.slug"}}
</th>
<th>
{{t "emeis.roles.headings.description"}}
</th>
</table.head>
<table.body as |body|>
<body.row>
{{#with body.model as |role|}}
<td class="uk-width-1-4" data-test-role-name={{role.id}}>
<LinkTo @route="roles.edit" @model={{role}} class="uk-link-text">
{{role.name}}
</LinkTo>
</td>

<td class="uk-width-1-4" data-test-role-slug={{role.id}}>
{{role.slug}}
</td>

<td class="uk-width-expand" data-test-role-desc={{role.id}}>
{{role.description}}
</td>
{{/with}}
</body.row>
</table.body>
</DataTable>
1 change: 1 addition & 0 deletions app/controllers/roles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "ember-emeis/controllers/roles/index";
1 change: 1 addition & 0 deletions app/routes/roles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "ember-emeis/routes/roles";
1 change: 1 addition & 0 deletions app/routes/roles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "ember-emeis/routes/roles/index";
1 change: 1 addition & 0 deletions app/templates/roles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "ember-emeis/templates/roles";
1 change: 1 addition & 0 deletions app/templates/roles/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "ember-emeis/templates/roles/index";

0 comments on commit 5dccab4

Please sign in to comment.