Skip to content

Commit 062439d

Browse files
authored
UX: Update the admin page header to use DPageHeader (#258)
Update the header of the admin page to be more consistent with the rest of the admin UI. The tabs to access the different sub-pages have also been updated.
1 parent b013f44 commit 062439d

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed

admin/assets/javascripts/discourse/templates/update-index.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<div class="updates-heading">
2-
<h3>{{i18n "admin.docker.update_title"}}</h3>
32
{{#unless this.outdated}}
43
<DButton
54
disabled={{this.upgradeAllButtonDisabled}}

admin/assets/javascripts/discourse/templates/update-show.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>{{this.title}}</h1>
1+
<h2>{{this.title}}</h2>
22

33
<DockerManager::ProgressBar @percent={{this.upgradeStore.progressPercentage}} />
44

admin/assets/javascripts/discourse/templates/update.hbs

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
1-
<div class="admin-controls">
2-
<nav>
3-
<ul class="nav nav-pills">
4-
<li>
5-
<LinkTo @route="update.index">
6-
{{i18n "admin.docker.navigation.versions"}}
7-
</LinkTo>
8-
</li>
1+
<DPageHeader
2+
@titleLabel={{i18n "admin.docker.update_title"}}
3+
@descriptionLabel={{i18n "admin.docker.update_description"}}
4+
@shouldDisplay={{true}}
5+
>
6+
<:breadcrumbs>
7+
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
8+
<DBreadcrumbsItem
9+
@path="/admin/update"
10+
@label={{i18n "admin.docker.update_title"}}
11+
/>
12+
</:breadcrumbs>
13+
<:tabs>
14+
<NavItem @route="update.index" @label="admin.docker.navigation.versions" />
15+
<NavItem
16+
@route="update.processes"
17+
@label="admin.docker.navigation.processes"
18+
/>
19+
</:tabs>
20+
</DPageHeader>
921

10-
<li>
11-
<LinkTo @route="update.processes">
12-
{{i18n "admin.docker.navigation.processes"}}
13-
</LinkTo>
14-
</li>
15-
</ul>
16-
</nav>
17-
</div>
18-
19-
<div class="docker-manager">
22+
<div class="docker-manager admin-container">
2023
{{#if this.showBanner}}
2124
<div id="banner">
2225
<div id="banner-content">

config/locales/client.en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ en:
3737
update_successful: "Update completed successfully!"
3838
update_tab: "Update Discourse"
3939
update_title: "Updates"
40+
update_description: "Update Discourse and view running processes."
4041
updating: "Updating…"
4142
repo:
4243
name: "Name"

test/javascripts/acceptance/docker-manager-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ acceptance("docker_manager", function (needs) {
8080

8181
await click(".upgrade-button");
8282

83-
assert.dom("h1").hasText("Update discourse");
83+
assert.dom("h2").hasText("Update discourse");
8484
assert.dom("button.start-upgrade").exists();
8585
});
8686
});

0 commit comments

Comments
 (0)