chore: Add breadcrumbs to auth-methods views

This commit is contained in:
Susmitha Girumala committed 2020-08-13 18:04:27 -04:00
1 parent 99169e7ff9
commit 252e5764f1
9 files changed
+97

No files matched your search

@@ -0,0 +1,18 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeAuthMethodsController extends Controller {
// =services
@service intl;
// =attributes
/**
* Translated auth-methods breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.intl.t('resources.auth-methods');
}
}
@@ -0,0 +1,13 @@
import Controller from '@ember/controller';
export default class ScopesScopeAuthMethodsAuthMethodController extends Controller {
// =attributes
/**
* An auth-method breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.model.displayName;
}
}
@@ -0,0 +1,18 @@
import Controller from '@ember/controller';
import { inject as service } from '@ember/service';
export default class ScopesScopeAuthMethodsNewController extends Controller {
// =services
@service intl;
// =attributes
/**
* Translated new auth-method breadcrumb
* @type {string}
*/
get breadCrumb() {
return this.intl.t('titles.new');
}
}
@@ -6,6 +6,10 @@
</Rose::Badge>
</page.header>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.navigation>
<Rose::Nav::Tabs as |nav|>
<nav.link @route='scopes.scope.auth-methods.auth-method'>
@@ -3,6 +3,10 @@
<h2>{{t "resources.auth-methods"}}</h2>
</page.header>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.actions>
{{#if @model}}
<Rose::LinkButton @route="scopes.scope.auth-methods.new" @style="primary">
@@ -5,6 +5,10 @@
<h2>{{t "titles.new"}}</h2>
</page.header>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.body>
<Form::AuthMethod
@model={{@model}}
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/auth-methods', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/auth-methods');
assert.ok(controller);
});
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/auth-methods/auth-method', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/auth-methods/auth-method');
assert.ok(controller);
});
});
@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | scopes/scope/auth-methods/new', function(hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:scopes/scope/auth-methods/new');
assert.ok(controller);
});
});