Show sequential number in motion list
Shows the sequential number (ID) in motion list
This commit is contained in:
parent
6364a04d22
commit
1dd8562dfc
@ -163,6 +163,12 @@ export abstract class ListViewBaseComponent<V extends BaseViewModel, M extends B
|
|||||||
this.dataSource.paginator = this.paginator;
|
this.dataSource.paginator = this.paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Central search/filter function. Can be extended and overwritten by a filterPredicate.
|
||||||
|
* Functions for that are usually called 'setFulltextFilter'
|
||||||
|
*
|
||||||
|
* @param event the string to search for
|
||||||
|
*/
|
||||||
public searchFilter(event: string): void {
|
public searchFilter(event: string): void {
|
||||||
this.dataSource.filter = event;
|
this.dataSource.filter = event;
|
||||||
}
|
}
|
||||||
|
@ -683,18 +683,18 @@
|
|||||||
></os-search-value-selector>
|
></os-search-value-selector>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="extra-data" *osPerms="'motion.can_manage'">
|
<div class="extra-data">
|
||||||
<!-- Attachments -->
|
<!-- Attachments -->
|
||||||
<div *ngIf="motion.hasAttachments() || editMotion" class="content-field">
|
<div *ngIf="motion.hasAttachments() || editMotion" class="content-field">
|
||||||
<div *ngIf="!editMotion">
|
<div *ngIf="!editMotion">
|
||||||
<h3>{{ 'Attachments' | translate }}<mat-icon>attach_file</mat-icon></h3>
|
<h3>{{ 'Attachments' | translate }}<mat-icon>attach_file</mat-icon></h3>
|
||||||
<mat-list dense>
|
<mat-list dense>
|
||||||
<mat-list-item *ngFor="let file of motion.attachments">
|
<mat-list-item *ngFor="let file of motion.attachments">
|
||||||
<a [routerLink]="" (click)="onClickAttacment(file)">{{ file.title }}</a>
|
<a [routerLink]="" (click)="onClickAttachment(file)">{{ file.title }}</a>
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="editMotion" class="shortened-selector">
|
<div *osPerms="'motions.can_manage';and:editMotion" class="shortened-selector">
|
||||||
<os-search-value-selector
|
<os-search-value-selector
|
||||||
class="selector"
|
class="selector"
|
||||||
ngDefaultControl
|
ngDefaultControl
|
||||||
|
@ -1294,7 +1294,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
|||||||
*
|
*
|
||||||
* @param attachment the selected file
|
* @param attachment the selected file
|
||||||
*/
|
*/
|
||||||
public onClickAttacment(attachment: Mediafile): void {
|
public onClickAttachment(attachment: Mediafile): void {
|
||||||
window.open(attachment.downloadUrl);
|
window.open(attachment.downloadUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,11 @@
|
|||||||
<!-- submitters line -->
|
<!-- submitters line -->
|
||||||
<div class="submitters-line ellipsis-overflow" *ngIf="motion.submitters.length">
|
<div class="submitters-line ellipsis-overflow" *ngIf="motion.submitters.length">
|
||||||
<span translate>by</span> {{ motion.submitters }}
|
<span translate>by</span> {{ motion.submitters }}
|
||||||
|
<span *osPerms="'motions.can_manage'">
|
||||||
|
·
|
||||||
|
<span translate>Sequential number</span>
|
||||||
|
{{ motion.id }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- state line-->
|
<!-- state line-->
|
||||||
<div class="ellipsis-overflow white">
|
<div class="ellipsis-overflow white">
|
||||||
|
@ -295,7 +295,7 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Overwrites the dataSource's string filter with a case-insensitive search
|
* Overwrites the dataSource's string filter with a case-insensitive search
|
||||||
* in the identifier, title, state, recommendations, submitters and motion blocks
|
* in the identifier, title, state, recommendations, submitters, motion blocks and id
|
||||||
*/
|
*/
|
||||||
private setFulltextFilter(): void {
|
private setFulltextFilter(): void {
|
||||||
this.dataSource.filterPredicate = (data, filter) => {
|
this.dataSource.filterPredicate = (data, filter) => {
|
||||||
@ -332,6 +332,12 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
|||||||
if (data.identifier && data.identifier.toLowerCase().includes(filter)) {
|
if (data.identifier && data.identifier.toLowerCase().includes(filter)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dataid = '' + data.id;
|
||||||
|
if (dataid.includes(filter)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user