aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular/videos/components
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-24 23:00:58 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-24 23:00:58 +0200
commita99593ed9f3244e75f7db793ba6716754d664573 (patch)
treed17a2b5cda09bc0ec51ec102ec853e6584f3901a /client/angular/videos/components
parentaff038cd784ab09a9f62b2e81816110e100ba7b8 (diff)
downloadPeerTube-a99593ed9f3244e75f7db793ba6716754d664573.tar.gz
PeerTube-a99593ed9f3244e75f7db793ba6716754d664573.tar.zst
PeerTube-a99593ed9f3244e75f7db793ba6716754d664573.zip
Make the sort/results bar less ugly
Diffstat (limited to 'client/angular/videos/components')
-rw-r--r--client/angular/videos/components/list/video-sort.component.html2
-rw-r--r--client/angular/videos/components/list/videos-list.component.html6
-rw-r--r--client/angular/videos/components/list/videos-list.component.scss20
-rw-r--r--client/angular/videos/components/list/videos-list.component.ts12
4 files changed, 35 insertions, 5 deletions
diff --git a/client/angular/videos/components/list/video-sort.component.html b/client/angular/videos/components/list/video-sort.component.html
index b1392ccca..3bece0b22 100644
--- a/client/angular/videos/components/list/video-sort.component.html
+++ b/client/angular/videos/components/list/video-sort.component.html
@@ -1,4 +1,4 @@
1<select [(ngModel)]="currentSort" (ngModelChange)="onSortChange()"> 1<select class="form-control input-sm" [(ngModel)]="currentSort" (ngModelChange)="onSortChange()">
2 <option *ngFor="let choice of choiceKeys" [value]="choice"> 2 <option *ngFor="let choice of choiceKeys" [value]="choice">
3 {{ getStringChoice(choice) }} 3 {{ getStringChoice(choice) }}
4 </option> 4 </option>
diff --git a/client/angular/videos/components/list/videos-list.component.html b/client/angular/videos/components/list/videos-list.component.html
index 5524ab546..3e30b39b0 100644
--- a/client/angular/videos/components/list/videos-list.component.html
+++ b/client/angular/videos/components/list/videos-list.component.html
@@ -1,6 +1,6 @@
1<div class="videos-info"> 1<div class="row videos-info">
2 <span class="videos-total-results"> {{ pagination.total }}</span> 2 <div class="col-md-9 videos-total-results"> {{ pagination.total }} videos</div>
3 <my-video-sort [currentSort]="sort" (sort)="onSort($event)"></my-video-sort> 3 <my-video-sort class="col-md-3" [currentSort]="sort" (sort)="onSort($event)"></my-video-sort>
4</div> 4</div>
5 5
6<div class="videos-miniatures"> 6<div class="videos-miniatures">
diff --git a/client/angular/videos/components/list/videos-list.component.scss b/client/angular/videos/components/list/videos-list.component.scss
index 05c38b833..2abc47b1b 100644
--- a/client/angular/videos/components/list/videos-list.component.scss
+++ b/client/angular/videos/components/list/videos-list.component.scss
@@ -10,3 +10,23 @@ pagination {
10 display: block; 10 display: block;
11 text-align: center; 11 text-align: center;
12} 12}
13
14.videos-info {
15
16 padding-bottom: 20px;
17 margin-bottom: 20px;
18 border-bottom: 1px solid #f1f1f1;
19 height: 40px;
20 line-height: 40px;
21 width: 765px;
22 margin-left: 15px;
23
24 my-video-sort {
25 padding-right: 0;
26 }
27
28 .videos-total-results {
29 font-size: 13px;
30 padding-left: 0;
31 }
32}
diff --git a/client/angular/videos/components/list/videos-list.component.ts b/client/angular/videos/components/list/videos-list.component.ts
index db64a856e..94b064e16 100644
--- a/client/angular/videos/components/list/videos-list.component.ts
+++ b/client/angular/videos/components/list/videos-list.component.ts
@@ -78,7 +78,17 @@ export class VideosListComponent implements OnInit {
78 78
79 onSort(sort: SortField) { 79 onSort(sort: SortField) {
80 this.sort = sort; 80 this.sort = sort;
81 this._router.navigate(['VideosList', { sort: this.sort }]); 81
82 const params: any = {
83 sort: this.sort
84 };
85
86 if (this.search.value) {
87 params.search = this.search.value;
88 params.field = this.search.field;
89 }
90
91 this._router.navigate(['VideosList', params]);
82 this.getVideos(); 92 this.getVideos();
83 } 93 }
84} 94}