[Validator | main]: oaipmh-analysis.component.html: When no rule name, replaced - with [No title available] & added link in rule name | oaipmh-analysis.component.html: Commented option "all" for recordsNum & increased limit to 100 | oaipmh-validator.component.ts: [Bug fix] Added @ViewChild('customRecordsNum') customRecordsNum and in method updateRecordsNum(), if there is this input, mark it as checked & initialize form with this.recordsNum.
This commit is contained in:
parent
34a525f690
commit
df695da83f
|
@ -1 +1 @@
|
|||
Subproject commit 6d7f6eca720d18fe694f13e380c1ede1f46303a8
|
||||
Subproject commit 51bd7efcbe10543c56145c71c7af970fb730e63e
|
|
@ -16,7 +16,11 @@
|
|||
<tr *ngFor="let ruleResult of rules">
|
||||
<td>
|
||||
<div>
|
||||
<span>{{ruleResult.rule_name ? ruleResult.rule_name : '-'}}</span>
|
||||
<span *ngIf="!ruleResult.rule_name">[No title available]</span>
|
||||
<span *ngIf="ruleResult.rule_name">
|
||||
<a *ngIf="ruleResult.link" class="custom-external uk-link-text" [href]="ruleResult.link" target="_blank">{{ruleResult.rule_name}}</a>
|
||||
<span *ngIf="!ruleResult.link">{{ruleResult.rule_name}}</span>
|
||||
</span>
|
||||
<span *ngIf="ruleResult.requirement_level">
|
||||
<span> (</span>
|
||||
<ng-container *ngIf="requirementLevelMapping.has(ruleResult.requirement_level)">{{requirementLevelMapping.get(ruleResult.requirement_level)}}</ng-container>
|
||||
|
|
|
@ -23,22 +23,22 @@
|
|||
</div>
|
||||
|
||||
<div class="uk-margin-large-bottom">
|
||||
<h6><span class="uk-text-secondary uk-margin-right">3.</span> Define the number of record to validate</h6>
|
||||
<div class="uk-disabled uk-text-muted uk-margin-xsmall-left uk-margin-medium-top uk-margin-small-bottom">
|
||||
<input id="all" type="radio" name="recordsNum" value="-1" formControlName="recordsNum">
|
||||
<label for="all" class="uk-margin-xsmall-left">All</label>
|
||||
</div>
|
||||
<h6><span class="uk-text-secondary uk-margin-right">3.</span> Define the number of records to validate</h6>
|
||||
<!-- <div class="uk-disabled uk-text-muted uk-margin-xsmall-left uk-margin-medium-top uk-margin-small-bottom">-->
|
||||
<!-- <input id="all" type="radio" name="recordsNum" value="-1" formControlName="recordsNum">-->
|
||||
<!-- <label for="all" class="uk-margin-xsmall-left">All</label>-->
|
||||
<!-- </div>-->
|
||||
<div class="uk-flex uk-flex-middle uk-margin-xsmall-left">
|
||||
<input id="custom" type="radio" name="recordsNum" [value]="recordsNum" formControlName="recordsNum">
|
||||
<label for="custom" class="uk-margin-xsmall-left">
|
||||
Custom
|
||||
</label>
|
||||
<span class="uk-margin-left uk-flex-inline uk-flex-middle">
|
||||
<!-- <input #customRecordsNum id="custom" type="radio" name="recordsNum" [value]="recordsNum" formControlName="recordsNum">-->
|
||||
<!-- <label for="custom" class="uk-margin-xsmall-left uk-margin-right">-->
|
||||
<!-- Custom-->
|
||||
<!-- </label>-->
|
||||
<span class="uk-flex-inline uk-flex-middle">
|
||||
<icon class="clickable" name="remove_circle_outline" flex="true" ratio="0.9" type="outlined"
|
||||
[ngClass]="recordsNum <= 10 ? 'uk-disabled uk-text-muted' : ''" (click)="updateRecordsNum(false)"></icon>
|
||||
<span class="uk-margin-small-left uk-margin-small-right">{{recordsNum}}</span>
|
||||
<icon class="clickable" name="add_circle_outline" flex="true" ratio="0.9" type="outlined"
|
||||
[ngClass]="recordsNum >= 20 ? 'uk-disabled uk-text-muted' : ''" (click)="updateRecordsNum(true)"></icon>
|
||||
[ngClass]="recordsNum >= 100 ? 'uk-disabled uk-text-muted' : ''" (click)="updateRecordsNum(true)"></icon>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ export class OaipmhValidatorComponent implements OnInit {
|
|||
{label: 'OpenAIRE Guidelines for Literature Repositories Profile v4 & OpenAIRE FAIR Guidelines for Literature Profile', value: 'OpenAIRE Guidelines for Literature Repositories Profile v4'},
|
||||
{label: 'OpenAIRE FAIR Guidelines for Data Repositories Profile', value: 'OpenAIRE FAIR Guidelines for Data Repositories Profile'}
|
||||
];
|
||||
@ViewChild('customRecordsNum') customRecordsNum;
|
||||
public form: UntypedFormGroup;
|
||||
public sets: Option[] = [{label: 'All sets', value: 'all'}];
|
||||
public recordsNum: number = 10;
|
||||
|
@ -44,7 +45,7 @@ export class OaipmhValidatorComponent implements OnInit {
|
|||
this.form = this.fb.group({
|
||||
url: this.fb.control("", [Validators.required, StringUtils.urlValidator()]),//[Validators.required/*, Validators.email*/]),
|
||||
guidelines: this.fb.control("", Validators.required),
|
||||
recordsNum: this.fb.control(null, Validators.required),
|
||||
recordsNum: this.fb.control(this.recordsNum, Validators.required),
|
||||
set: this.fb.control('all', Validators.required)
|
||||
});
|
||||
}
|
||||
|
@ -84,6 +85,9 @@ export class OaipmhValidatorComponent implements OnInit {
|
|||
updateRecordsNum(increase: boolean = true) {
|
||||
this.recordsNum = this.recordsNum + (increase ? 10 : -10);
|
||||
this.form.get('recordsNum').setValue(this.recordsNum);
|
||||
if(this.customRecordsNum) {
|
||||
this.customRecordsNum.nativeElement.checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
getSets() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9e58421a1adf3fbeb361e21616feaea8c7f867af
|
||||
Subproject commit 6bb1e61b059bef1bff3bfb0611b0df46f7840426
|
|
@ -1 +1 @@
|
|||
Subproject commit 3a4aa92c441467994a45a2c6a4f0c21202945404
|
||||
Subproject commit 5e8c1addb1ebfa508aac8cb9540a755940c95b79
|
Loading…
Reference in New Issue