Commit da7b9b37 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Merge branch '42-add-search-module-display-as-instance-option' into 'develop'

Resolve "Add search module display as instance option"

Closes #42

See merge request !26
parents 45ad0717 5dc50d74
Pipeline #3143 passed with stages
in 8 minutes and 4 seconds
......@@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](,
and this project adheres to [Semantic Versioning](
## [3.4.0]
### Added
- #42: Add instance options: 'Display search', 'Display search multiple' and 'Display documentation'
- #38: Add new search-type: list
- #41: Add dataset option 'Opened result accordion'
- #33: Add dataset option 'Direct link to the result'
## [3.3.0]
### Added
- #37: Configuration cone search by dataset (form dataset)
## [3.2.0]
......@@ -14,7 +14,7 @@ list:
@echo " test > run $(NAME_APP) tests"
@echo " test-watch > run $(NAME_APP) tests on every file change"
@echo " report > open the code coverage report in a browser (only available for Linux)"
@echo " dist > generate the angular dist application (html, css, js)"
@echo " build > generate the angular dist application (html, css, js)"
@echo " logs > display $(NAME_APP) container logs"
@echo " shell > shell into $(NAME_APP) container"
@echo ""
......@@ -48,7 +48,7 @@ test-watch:
xdg-open var/coverage/index.html
@docker build -t anis-node conf-dev && docker run --init -it --rm --user $(UID):$(GID) \
-v $(CURDIR):/project \
-w /project anis-node ng build --prod --base-href /admin/
<form name="form" (ngSubmit)="f.form.valid && emit(f.form.value)" #f="ngForm" novalidate>
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="name" [ngModel]="" #name="ngModel" [disabled]="" required>
<input id="name" type="text" class="form-control" name="name" [ngModel]="" #name="ngModel" [disabled]="" required>
<div class="form-group">
<label for="label">Label</label>
<input type="text" class="form-control" name="label" [ngModel]="model.label" #label="ngModel" required>
<input id="label" type="text" class="form-control" name="label" [ngModel]="model.label" #label="ngModel" required>
<div class="form-group">
<label for="client_url">Client URL</label>
<input type="text" class="form-control" name="client_url" [ngModel]="model.client_url" #clientUrl="ngModel">
<input id="client_url" type="text" class="form-control" name="client_url" [ngModel]="model.client_url" #clientUrl="ngModel">
<div class="form-group">
<hr class="mt-4">
<h4>Search: </h4>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="search" name="search" [ngModel]="getConfigSearchEnabled()">
<label class="form-check-label" for="search">Classic search allowed</label>
<div class="form-check">
<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 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 class="form-group pt-4">
......@@ -12,9 +12,35 @@ export class FormInstanceComponent {
@Input() model: Instance = new Instance();
@Output() submitted: EventEmitter<Instance> = new EventEmitter();
getConfigSearchEnabled(): boolean {
if (this.model.config && {
return false;
getConfigSearchMultipleEnabled(): boolean {
if (this.model.config && this.model.config.search_multiple) {
return this.model.config.search_multiple;
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;
( ? instanceEmitted = {name:, ...instance} : instanceEmitted = instance;
instanceEmitted.config = {
search_multiple: this.ngForm.value.search_multiple,
documentation: this.ngForm.value.documentation
......@@ -2,4 +2,9 @@ export class Instance {
name: string;
label: string;
client_url: string;
config: {
search: boolean;
search_multiple: boolean;
documentation: boolean;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment