%#
Copyright 2013-2018 the original author or authors from the JHipster project.
This file is part of the JHipster project, see http://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-%>
<% const keyPrefix = angularAppName + '.' + entityTranslationKey; %>
">
<%= entityClassHumanized %> {{<%= entityInstance %>.id}}
<<%= jhiPrefixDashed %>-alert-error><%= jhiPrefixDashed %>-alert-error>
<%_ for (idx in fields) {
const fieldName = fields[idx].fieldName;
const fieldType = fields[idx].fieldType;
const fieldTypeBlobContent = fields[idx].fieldTypeBlobContent; _%>
<%= fields[idx].fieldNameHumanized %>
<%_ if (fields[idx].fieldIsEnum) { _%>
{{<%= entityInstance %>.<%= fieldName %>}}
<%_ } else if (['byte[]', 'ByteBuffer'].includes(fieldType) && fieldTypeBlobContent === 'image') { _%>
<%_ } else if (['Instant', 'ZonedDateTime'].includes(fieldType)) { _%>
{{<%=entityInstance %>.<%= fieldName %> | date:'medium'}}
<%_ } else if (fieldType === 'LocalDate') { _%>
{{<%=entityInstance %>.<%= fieldName %> | date:'mediumDate'}}
<%_ } else if (['byte[]', 'ByteBuffer'].includes(fieldType) && fieldTypeBlobContent === 'any') { _%>
<%_ } else { _%>
{{<%= entityInstance %>.<%= fieldName %>}}
<%_ } _%>
<%_ } _%>
<%_ for (idx in relationships) {
const relationshipType = relationships[idx].relationshipType;
const ownerSide = relationships[idx].ownerSide;
const relationshipName = relationships[idx].relationshipName;
const relationshipFieldName = relationships[idx].relationshipFieldName;
const relationshipFieldNamePlural = relationships[idx].relationshipFieldNamePlural;
const relationshipNameHumanized = relationships[idx].relationshipNameHumanized;
const otherEntityName = relationships[idx].otherEntityName;
const otherEntityStateName = relationships[idx].otherEntityStateName;
const otherEntityField = relationships[idx].otherEntityField;
const otherEntityFieldCapitalized = relationships[idx].otherEntityFieldCapitalized;
if (relationshipType === 'many-to-one'
|| (relationshipType === 'one-to-one' && ownerSide === true)
|| (relationshipType === 'many-to-many' && ownerSide === true)) { _%>
<%= relationshipNameHumanized %>
<%_ if (otherEntityName === 'user') { _%>
<%_ if (relationshipType === 'many-to-many') { _%>
of <%= entityInstance %>.<%= relationshipFieldNamePlural %>; let last = last">
{{<%= relationshipFieldName %>.<%= otherEntityField %>}}{{last ? '' : ', '}}
<%_ } else { _%>
<%_ if (dto === 'no') { _%>
{{<%= entityInstance + "." + relationshipFieldName + "?." + otherEntityField %>}}
<%_ } else { _%>
{{<%= entityInstance + "." + relationshipFieldName + otherEntityFieldCapitalized %>}}
<%_ } _%>
<%_ } _%>
<%_ } else { _%>
<%_ if (relationshipType === 'many-to-many') { _%>
of <%= entityInstance %>.<%= relationshipFieldNamePlural %>; let last = last">
', <%= relationshipFieldName %>?.id ]">{{<%= relationshipFieldName %>.<%= otherEntityField %>}} {{last ? '' : ', '}}
<%_ } else { _%>
<%_ if (dto === 'no') { _%>
<%_ } else { _%>
<%_ } _%>
<%_ } _%>
<%_ } _%>
<%_ } _%>
<%_ } _%>
Back
/'+ <%= entityInstance %>.id + '/edit'} }]"
replaceUrl="true"
queryParamsHandling="merge"
class="btn btn-primary">
Edit