Skip to content

Commit 4c24324

Browse files
committed
Cardify all panels
1 parent 5f3f181 commit 4c24324

File tree

3 files changed

+99
-96
lines changed

3 files changed

+99
-96
lines changed

app/styles/pages/dashboard-index.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
.bulletin-actions {
1111
width: 150px;
1212
}
13+
14+
.create-bulletin {
15+
margin-bottom: $padding-l;
16+
}
1317
}
1418

app/templates/dashboard/index.hbs

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,65 +3,65 @@
33

44
<div class="row">
55
<div class="col-md-6">
6-
<div class="panel panel-default">
7-
<div class="panel-heading">
8-
<h3 class="panel-title">Bulletins</h3>
9-
</div>
10-
<div class="panel-body">
11-
{{#link-to 'bulletins.new' 'english-service'
12-
class='btn btn-default'
13-
data-auto-id="dashboard-bulletins-create"}}
14-
Create
15-
{{/link-to}}
16-
</div>
17-
<table class="table table-hover" data-auto-id="dashboard-bulletins">
18-
<thead>
19-
<tr>
20-
<th>Bulletin</th>
21-
<th class="bulletin-actions">Actions</th>
22-
</tr>
23-
</thead>
24-
<tbody>
25-
{{#each model.bulletins as |bulletin|}}
26-
<tr data-auto-id="dashboard-bulletin">
27-
<td>
28-
<div data-auto-id="dashboard-bulletin-name">
29-
{{bulletin.name}}
30-
</div>
31-
<small data-auto-id="dashboard-bulletin-published-at">
32-
{{moment-format bulletin.publishedAt}}
33-
</small>
34-
</td>
35-
<td>
36-
{{#link-to 'bulletin.index' 'english-service' bulletin
37-
class='btn btn-default'
38-
data-auto-id="dashboard-bulletin-show"}}
39-
Show
40-
{{/link-to}}
6+
<div class="card">
7+
<h3 class="card-header">Bulletins</h3>
8+
<div class="card-block">
9+
<div class="card-text">
10+
{{#link-to 'bulletins.new' 'english-service'
11+
class='btn btn-secondary create-bulletin'
12+
data-auto-id="dashboard-bulletins-create"}}
13+
Create
14+
{{/link-to}}
15+
<table class="table table-striped" data-auto-id="dashboard-bulletins">
16+
<thead>
17+
<tr>
18+
<th>Bulletin</th>
19+
<th class="bulletin-actions">Actions</th>
20+
</tr>
21+
</thead>
22+
<tbody>
23+
{{#each model.bulletins as |bulletin|}}
24+
<tr data-auto-id="dashboard-bulletin">
25+
<td>
26+
<div data-auto-id="dashboard-bulletin-name">
27+
{{bulletin.name}}
28+
</div>
29+
<small data-auto-id="dashboard-bulletin-published-at">
30+
{{moment-format bulletin.publishedAt}}
31+
</small>
32+
</td>
33+
<td>
34+
{{#link-to 'bulletin.index' 'english-service' bulletin
35+
class='btn btn-default'
36+
data-auto-id="dashboard-bulletin-show"}}
37+
Show
38+
{{/link-to}}
4139

42-
{{#link-to 'bulletin.edit' 'english-service' bulletin
43-
class='btn btn-default'
44-
data-auto-id="dashboard-bulletin-edit"}}
45-
Edit
46-
{{/link-to}}
47-
</td>
48-
</tr>
49-
{{/each}}
50-
</tbody>
51-
</table>
40+
{{#link-to 'bulletin.edit' 'english-service' bulletin
41+
class='btn btn-default'
42+
data-auto-id="dashboard-bulletin-edit"}}
43+
Edit
44+
{{/link-to}}
45+
</td>
46+
</tr>
47+
{{/each}}
48+
</tbody>
49+
</table>
50+
</div>
51+
</div>
5252
</div>
5353
</div>
5454
<div class="col-md-6">
55-
<div class="panel panel-default">
56-
<div class="panel-heading">
57-
<h3 class="panel-title">Settings</h3>
58-
</div>
59-
<div class="panel-body">
60-
{{#link-to 'settings.password'
61-
class='btn btn-default'
62-
data-auto-id="dashboard-update-password"}}
63-
Update your password
64-
{{/link-to}}
55+
<div class="card">
56+
<h3 class="card-header">Settings</h3>
57+
<div class="card-block">
58+
<div class="card-text">
59+
{{#link-to 'settings.password'
60+
class='btn btn-secondary'
61+
data-auto-id="dashboard-update-password"}}
62+
Update your password
63+
{{/link-to}}
64+
</div>
6565
</div>
6666
</div>
6767
</div>

app/templates/settings/password.hbs

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,49 @@
11
<div class="container password-form">
22
<div class="row">
33
<div class="col-md-10">
4-
<div class="panel panel-default">
5-
<div class="panel-heading">
6-
<h2 class="panel-title">Change password</h2>
7-
</div>
8-
9-
<div class="panel-body">
10-
<form action="#" data-test-id="password-form">
11-
<div class="row">
12-
<div class="form-group col-md-6 {{if errors.model.currentPassword "has-error" ""}}">
13-
<label class="control-label">Old password {{errors.model.currentPassword}}</label>
14-
{{input value=model.currentPassword
15-
type="password"
16-
class="form-control"
17-
data-auto-id="current-password"}}
18-
</div>
19-
</div>
20-
<div class="row">
21-
<div class="form-group col-md-6 {{if errors.model.password "has-error" ""}}">
22-
<label class="control-label">New password {{errors.model.password}}</label>
23-
{{input value=model.password
24-
type="password"
25-
class="form-control"
26-
data-auto-id="new-password"}}
4+
<div class="card">
5+
<h3 class="card-header">Change Password</h3>
6+
<div class="card-block">
7+
<div class="card-text">
8+
<form action="#" data-test-id="password-form">
9+
<div class="row">
10+
<div class="form-group col-md-6 {{if errors.model.currentPassword "has-error" ""}}">
11+
<label class="control-label">Old password {{errors.model.currentPassword}}</label>
12+
{{input value=model.currentPassword
13+
type="password"
14+
class="form-control"
15+
data-auto-id="current-password"}}
16+
</div>
2717
</div>
28-
<div class="form-group col-md-6 {{if errors.model.passwordConfirmation "has-error" ""}}">
29-
<label class="control-label">Password confirmation {{errors.model.passwordConfirmation}}</label>
30-
{{input value=model.passwordConfirmation
31-
type="password"
32-
class="form-control"
33-
data-auto-id="password-confirmation"}}
18+
<div class="row">
19+
<div class="form-group col-md-6 {{if errors.model.password "has-error" ""}}">
20+
<label class="control-label">New password {{errors.model.password}}</label>
21+
{{input value=model.password
22+
type="password"
23+
class="form-control"
24+
data-auto-id="new-password"}}
25+
</div>
26+
<div class="form-group col-md-6 {{if errors.model.passwordConfirmation "has-error" ""}}">
27+
<label class="control-label">Password confirmation {{errors.model.passwordConfirmation}}</label>
28+
{{input value=model.passwordConfirmation
29+
type="password"
30+
class="form-control"
31+
data-auto-id="password-confirmation"}}
32+
</div>
3433
</div>
35-
</div>
36-
<div class="row">
37-
<div class="col-md-12">
38-
<button type="submit"
39-
{{action "updatePassword"}}
40-
class="btn btn-primary"
41-
disabled={{disableUpdateButton}}
42-
data-auto-id="password-submit">
43-
Update password
44-
</button>
34+
<div class="row">
35+
<div class="col-md-12">
36+
<button type="submit"
37+
{{action "updatePassword"}}
38+
class="btn btn-primary"
39+
disabled={{disableUpdateButton}}
40+
data-auto-id="password-submit">
41+
Update password
42+
</button>
43+
</div>
4544
</div>
46-
</div>
47-
</form>
45+
</form>
46+
</div>
4847
</div>
4948
</div>
5049
</div>

0 commit comments

Comments
 (0)