Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
anis
anis-admin
Commits
a1aee450
Commit
a1aee450
authored
Oct 06, 2020
by
Tifenn Guillas
Browse files
Update instance config for documentation => DONE
parent
caaf2c19
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/app/metamodel/components/instance/form-instance.component.html
View file @
a1aee450
...
...
@@ -22,6 +22,10 @@
<input
class=
"form-check-input"
type=
"checkbox"
id=
"search_multiple"
name=
"search_multiple"
[ngModel]=
"getConfigSearchMultipleEnabled()"
>
<label
class=
"form-check-label"
for=
"search_multiple"
>
Search multiple allowed
</label>
</div>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"checkbox"
id=
"documentation"
name=
"documentation"
[ngModel]=
"getConfigDocumentationEnabled()"
>
<label
class=
"form-check-label"
for=
"documentation"
>
Documentation allowed
</label>
</div>
<div
class=
"form-group pt-4"
>
<ng-content></ng-content>
...
...
src/app/metamodel/components/instance/form-instance.component.ts
View file @
a1aee450
...
...
@@ -26,12 +26,20 @@ export class FormInstanceComponent {
return
false
;
}
getConfigDocumentationEnabled
():
boolean
{
if
(
this
.
model
.
config
&&
this
.
model
.
config
.
documentation
)
{
return
this
.
model
.
config
.
documentation
;
}
return
false
;
}
emit
(
instance
:
Instance
)
{
let
instanceEmitted
:
Instance
;
(
this
.
model
.
name
)
?
instanceEmitted
=
{
name
:
this
.
model
.
name
,
...
instance
}
:
instanceEmitted
=
instance
;
instanceEmitted
.
config
=
{
search
:
this
.
ngForm
.
form
.
value
.
search
,
search_multiple
:
this
.
ngForm
.
value
.
search_multiple
search_multiple
:
this
.
ngForm
.
value
.
search_multiple
,
documentation
:
this
.
ngForm
.
value
.
documentation
};
this
.
submitted
.
emit
(
instanceEmitted
);
}
...
...
src/app/metamodel/store/model/instance.model.ts
View file @
a1aee450
...
...
@@ -5,5 +5,6 @@ export class Instance {
config
:
{
search
:
boolean
;
search_multiple
:
boolean
;
documentation
:
boolean
;
};
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment