-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7821 from michaelchadwick/frontend-3759-add-guide…
…-icon-to-header Add icon to header to link to User Guide
- Loading branch information
Showing
11 changed files
with
84 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ | |
{{#if this.session.isAuthenticated}} | ||
<UserMenu /> | ||
{{/if}} | ||
<UserGuideLink /> | ||
</div> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="user-guide-link" data-test-user-guide-link> | ||
<a | ||
href="https://iliosproject.gitbook.io/ilios-user-guide" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<FaIcon | ||
@icon="circle-question" | ||
@title={{t "general.iliosUserGuide"}} | ||
data-test-user-guide-link-icon | ||
/> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/frontend/app/styles/components/user-guide-link.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@use "../ilios-common/mixins" as cm; | ||
@use "../ilios-common/colors" as c; | ||
|
||
.user-guide-link { | ||
margin-left: 0.5rem; | ||
|
||
@include cm.for-tablet-and-up { | ||
margin-left: 0.25rem; | ||
margin-right: 0.5rem; | ||
} | ||
|
||
a { | ||
svg { | ||
align-items: center; | ||
color: c.$white; | ||
display: flex; | ||
height: 30px; | ||
width: 30px; | ||
} | ||
} | ||
|
||
@include cm.for-phone-only { | ||
a { | ||
svg { | ||
height: 24px; | ||
width: 24px; | ||
} | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
packages/frontend/tests/integration/components/user-guide-link-test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'frontend/tests/helpers'; | ||
import { render } from '@ember/test-helpers'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
import { setLocale, setupIntl } from 'ember-intl/test-support'; | ||
|
||
module('Integration | Component | user-guide-link', function (hooks) { | ||
setupRenderingTest(hooks); | ||
setupIntl(hooks, 'en-us'); | ||
|
||
test('it renders', async function (assert) { | ||
await render(hbs`<UserGuideLink />`); | ||
|
||
assert.dom('[data-test-user-guide-link]').exists(); | ||
assert.dom('[data-test-user-guide-link-icon]').exists(); | ||
assert.dom('[data-test-user-guide-link-icon]').hasText('Ilios User Guide'); | ||
|
||
await setLocale('es'); | ||
|
||
assert.dom('[data-test-user-guide-link-icon]').hasText('Ilios Guía de usuario'); | ||
|
||
await setLocale('fr'); | ||
|
||
assert.dom('[data-test-user-guide-link-icon]').hasText("Ilios Guide d'utilisation"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters