Commit 575bbf6f authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Add description to method building blocks and method patterns

parent a7bbb9d7
......@@ -40,35 +40,23 @@
<div noResults>No Method Building Blocks defined.</div>
<ul results class="list-group">
<li
class="
d-flex
list-group-item
justify-content-between
align-items-baseline
"
class="list-group-item"
*ngFor="let developmentMethod of developmentMethodsList"
>
<div>
<span>{{ developmentMethod.name }}</span>
<app-results-list-item
[viewLink]="['methodview', developmentMethod._id]"
(delete)="openDeleteDevelopmentMethodModal(developmentMethod)"
>
<ng-container itemTitle>
{{ developmentMethod.name }}
</ng-container>
<ng-container itemDescription>
{{ developmentMethod.description }}
</ng-container>
<app-author-info
[author]="developmentMethod.author"
></app-author-info>
</div>
<div>
<a
[routerLink]="['methodview', developmentMethod._id]"
type="button"
class="btn btn-dark btn-xs mr-1"
>View</a
>
<button
(click)="openDeleteDevelopmentMethodModal(developmentMethod)"
type="button"
class="btn btn-danger btn-xs"
>
Delete
</button>
</div>
</app-results-list-item>
</li>
</ul>
</app-list-wrapper>
......
......@@ -37,33 +37,21 @@
<div noResults>No Method Patterns defined.</div>
<ul results class="list-group">
<li
class="
d-flex
list-group-item
justify-content-between
align-items-baseline
"
class="list-group-item"
*ngFor="let processPattern of processPatternList"
>
<div>
<span>{{ processPattern.name }}</span>
<app-results-list-item
[viewLink]="['processview', processPattern._id]"
(delete)="openDeleteProcessPatternModal(processPattern)"
>
<ng-container itemTitle>
{{ processPattern.name }}
</ng-container>
<ng-container itemDescription>
{{ processPattern.description }}
</ng-container>
<app-author-info [author]="processPattern.author"></app-author-info>
</div>
<div>
<a
[routerLink]="['processview', processPattern._id]"
type="button"
class="btn btn-dark btn-xs mr-1"
>View</a
>
<button
(click)="openDeleteProcessPatternModal(processPattern)"
type="button"
class="btn btn-danger btn-xs"
>
Delete
</button>
</div>
</app-results-list-item>
</li>
</ul>
</app-list-wrapper>
......
<div class="d-flex justify-content-between align-items-baseline">
<div class="mr-3">
<span><ng-content select="[itemTitle]"></ng-content></span>
<div class="text-muted small">
<ng-content select="[itemDescription]"></ng-content>
</div>
<ng-content></ng-content>
</div>
<div class="d-flex">
<a [routerLink]="viewLink" type="button" class="btn btn-dark btn-xs">
View
</a>
<button
(click)="delete.emit()"
type="button"
class="btn btn-danger btn-xs ml-1"
>
Delete
</button>
</div>
</div>
import { Component, EventEmitter, Input, Output } from '@angular/core';
@Component({
selector: 'app-results-list-item',
templateUrl: './results-list-item.component.html',
styleUrls: ['./results-list-item.component.css'],
})
export class ResultsListItemComponent {
@Input() viewLink: string[];
@Output() delete = new EventEmitter();
}
......@@ -12,6 +12,8 @@ import { DomainsSelectionFormComponent } from './domains-selection-form/domains-
import { DeleteModalComponent } from './delete-modal/delete-modal.component';
import { SearchComponent } from './search/search.component';
import { ListWrapperComponent } from './list-wrapper/list-wrapper.component';
import { ResultsListItemComponent } from './results-list-item/results-list-item.component';
import { RouterModule } from '@angular/router';
@NgModule({
declarations: [
......@@ -24,12 +26,14 @@ import { ListWrapperComponent } from './list-wrapper/list-wrapper.component';
DeleteModalComponent,
SearchComponent,
ListWrapperComponent,
ResultsListItemComponent,
],
imports: [
CommonModule,
DevelopmentProcessViewModule,
NgbModule,
ReactiveFormsModule,
RouterModule,
],
exports: [
CommonModule,
......@@ -45,6 +49,7 @@ import { ListWrapperComponent } from './list-wrapper/list-wrapper.component';
DomainsSelectionFormComponent,
SearchComponent,
ListWrapperComponent,
ResultsListItemComponent,
],
})
export class SharedModule {}
Markdown is supported
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