chore: add new host catalog logic

This commit is contained in:
Randall Morey committed 2020-07-28 12:21:45 -04:00
1 parent 234dc2a746
commit ee6c6626c9
2 files changed
+33 -1

No files matched your search

@@ -1,4 +1,16 @@
import Route from '@ember/routing/route';
export default class ScopesScopeProjectsProjectHostCatalogsNewRoute extends Route {
// =methods
/**
* Creates a new unsaved host catalog belonging to the current project scope.
* @return {HostCatalogModel}
*/
model() {
const scopeID = this.modelFor('scopes.scope.projects.project').id;
return this.store.createRecord('host-catalog', { scopeID });
}
}
@@ -1 +1,21 @@
{{outlet}}
{{title (t 'titles.new')}}
<Rose::Layout::Page as |page|>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.header>
<h2>{{t "titles.new"}}</h2>
</page.header>
<page.body>
<Form::HostCatalog
@model={{@model}}
@submit={{route-action "save" @model}}
@cancel={{route-action "cancel" @model}}
/>
</page.body>
</Rose::Layout::Page>