Add button for edit campaign

pull/34/head
HardiReady 2018-04-27 15:19:23 +02:00
parent 2cd7541ca6
commit 6381c1ca86
3 changed files with 13 additions and 6 deletions

View File

@ -91,7 +91,6 @@ export class CampaignPlayerDetailComponent implements OnInit {
}
private initDataArray() {
this.graphData.forEach(dataSet => {
const killObj = {
name: dataSet.label,

View File

@ -11,13 +11,18 @@
<accordion *ngFor="let campaign of campaigns; let isFirstRow=first">
<accordion-group [isOpen]="isFirstRow">
<div accordion-heading>
{{campaign.title}}
<span class="pull-right"></span>
<span (click)="deleteCampaign(campaign); $event.stopPropagation()" title="Löschen"
style="color: whitesmoke; padding-top: 0; padding-right: 20px;"
class="glyphicon glyphicon-trash trash pull-right"
<span (click)="editCampaign(campaign); $event.stopPropagation()" title="Bearbeiten"
style="color: whitesmoke; padding-top: 0; padding-right: 10px;"
class="glyphicon glyphicon-edit trash pull-left"
*ngIf="loginService.hasPermission(3)">
</span>
<span (click)="deleteCampaign(campaign); $event.stopPropagation()" title="Löschen"
style="color: whitesmoke; padding-top: 0; padding-right: 10px;"
class="glyphicon glyphicon-trash trash pull-left"
*ngIf="loginService.hasPermission(3)">
</span>
{{campaign.title}}
<span class="pull-right"></span>
</div>
<div class="fade-in list-entry top-list-entry"

View File

@ -99,4 +99,7 @@ export class WarListComponent implements OnInit {
}
}
editCampaign(selectCampaign) {
this.router.navigate([{outlets: {'right': ['overview', selectCampaign._id]}}], {relativeTo: this.route});
}
}