Improve war list and detail style

pull/7/head v1.3.2
Florian Hartwich 2017-08-13 16:35:42 +02:00
parent ae20c7ce7d
commit 41c5f3dc6e
4 changed files with 22 additions and 27 deletions

View File

@ -2,14 +2,14 @@
<div style="min-height: 263px;"> <div style="min-height: 263px;">
<h2>{{war.title}} - vom {{war.date | date: 'dd.MM.yyyy'}}</h2> <h2>{{war.title}} - vom {{war.date | date: 'dd.MM.yyyy'}}</h2>
<h3 class="pull-left"> <h3 class="pull-left" style="width: 250px">
<h4>Endpunktestand:</h4> <h4>Endpunktestand:</h4>
<span class="text-blufor" style="font-weight: bold; margin-right: 10px">NATO {{war.ptBlufor}}</span> <span class="text-blufor" style="font-weight: bold; margin-right: 10px">NATO {{war.ptBlufor}}</span>
<span style="font-size: x-large">|</span> <span style="font-size: x-large">|</span>
<span class="text-opfor" style="font-weight: bold; margin-left: 10px;">{{war.ptOpfor}} CSAT</span> <span class="text-opfor" style="font-weight: bold; margin-left: 10px;">{{war.ptOpfor}} CSAT</span>
</h3> </h3>
<h3 class="pull-left"> <h3 class="pull-left" style="padding-left: 150px;">
<h4>Teilnehmer:</h4> <h4>Teilnehmer:</h4>
<ngx-charts-pie-chart <ngx-charts-pie-chart
[view]="[150, 150]" [view]="[150, 150]"
@ -23,7 +23,7 @@
</ngx-charts-pie-chart> </ngx-charts-pie-chart>
</h3> </h3>
<div style="margin-top:1%"> <div class="pull-left" style="padding-left: 150px; padding-top:15px">
<a class="btn btn-default" style="margin: 20px" target="_blank" href="resource/logs/{{war._id}}/clean.log">Logfile <a class="btn btn-default" style="margin: 20px" target="_blank" href="resource/logs/{{war._id}}/clean.log">Logfile
anzeigen</a> anzeigen</a>
<form class="form-group"> <form class="form-group">
@ -50,7 +50,7 @@
</div> </div>
</div> </div>
<div class="pull-left" > <div class="pull-left">
<div class="table-container scoreboard-table-container"> <div class="table-container scoreboard-table-container">
<table class="table table-hover" [mfData]="players" #mf="mfDataTable" [(mfSortBy)]="sortBy" <table class="table table-hover" [mfData]="players" #mf="mfDataTable" [(mfSortBy)]="sortBy"
[(mfSortOrder)]="sortOrder"> [(mfSortOrder)]="sortOrder">

View File

@ -1,10 +1,5 @@
.search-bar { .war-list {
padding-top: 20px; padding-top: 30px;
padding-bottom: 20px;
}
.rank-list {
width: 100%;
} }
:host /deep/ .card-header { :host /deep/ .card-header {

View File

@ -1,23 +1,12 @@
<div class="war-list"> <div class="war-list">
<div class="input-group search-bar" style="width:100%" *ngIf="loginService.hasPermission(3)"> <div class="input-group search-bar" style="margin-bottom:12px" *ngIf="loginService.hasPermission(3)">
<a class="pull-left btn btn-success" (click)="selectNewWar()"> <a class="pull-left btn btn-success" (click)="selectNewWar()">
Schlacht hinzufügen Schlacht hinzufügen
</a> </a>
</div> </div>
<div class="fade-in list-entry" style="margin-top: 20px; margin-bottom: 20px;" <accordion *ngFor="let campaign of campaigns; let isFirstRow=first">
[ngClass]="{selected : selectedWarId == 'all'}" (click)="selectOverview('all')"> <accordion-group [isOpen]="isFirstRow">
<div class="row">
<div class="col-xs-9">
<span style="margin:auto">
<a>Gesamtübersicht</a>
</span>
</div>
</div>
</div>
<accordion *ngFor="let campaign of campaigns">
<accordion-group>
<div accordion-heading (click)="selectOverview(campaign._id)"> <div accordion-heading (click)="selectOverview(campaign._id)">
{{campaign.title}} {{campaign.title}}
<span class="pull-right"></span> <span class="pull-right"></span>
@ -45,4 +34,15 @@
</accordion-group> </accordion-group>
</accordion> </accordion>
<div class="fade-in list-entry" style="margin-top: 20px; margin-bottom: 20px;"
[ngClass]="{selected : selectedWarId == 'all'}" (click)="selectOverview('all')">
<div class="row">
<div class="col-xs-9">
<span style="margin:auto">
<a>Gesamtübersicht</a>
</span>
</div>
</div>
</div>
</div> </div>

View File

@ -11,7 +11,7 @@ import {LoginService} from "../../services/login-service/login-service";
}) })
export class WarListComponent implements OnInit { export class WarListComponent implements OnInit {
selectedWarId: string | number = 'all'; selectedWarId: string | number;
campaigns: Campaign[] = []; campaigns: Campaign[] = [];
@ -25,7 +25,7 @@ export class WarListComponent implements OnInit {
this.warService.getAllCampaigns().subscribe((items) => { this.warService.getAllCampaigns().subscribe((items) => {
this.warService.campaigns = items; this.warService.campaigns = items;
this.campaigns = items; this.campaigns = items;
this.router.navigate([{outlets: {'right': ['overview', 'all']}}], {relativeTo: this.route}); this.selectOverview(this.campaigns[0]._id);
}); });
} }