Merge pull request #4571 from tsiegleauq/motion-list-show-id
Show sequential number in motion list
This commit is contained in:
commit
4ca8fccbea
@ -168,6 +168,12 @@ export abstract class ListViewBaseComponent<V extends BaseViewModel, M extends B
|
||||
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 {
|
||||
this.dataSource.filter = event;
|
||||
}
|
||||
|
@ -683,18 +683,18 @@
|
||||
></os-search-value-selector>
|
||||
</div>
|
||||
|
||||
<div class="extra-data" *osPerms="'motion.can_manage'">
|
||||
<div class="extra-data">
|
||||
<!-- Attachments -->
|
||||
<div *ngIf="motion.hasAttachments() || editMotion" class="content-field">
|
||||
<div *ngIf="!editMotion">
|
||||
<h3>{{ 'Attachments' | translate }}<mat-icon>attach_file</mat-icon></h3>
|
||||
<mat-list dense>
|
||||
<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>
|
||||
</div>
|
||||
<div *ngIf="editMotion" class="shortened-selector">
|
||||
<div *osPerms="'motions.can_manage';and:editMotion" class="shortened-selector">
|
||||
<os-search-value-selector
|
||||
class="selector"
|
||||
ngDefaultControl
|
||||
|
@ -1305,7 +1305,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
*
|
||||
* @param attachment the selected file
|
||||
*/
|
||||
public onClickAttacment(attachment: Mediafile): void {
|
||||
public onClickAttachment(attachment: Mediafile): void {
|
||||
window.open(attachment.downloadUrl);
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,11 @@
|
||||
<!-- submitters line -->
|
||||
<div class="submitters-line ellipsis-overflow" *ngIf="motion.submitters.length">
|
||||
<span translate>by</span> {{ motion.submitters }}
|
||||
<span *osPerms="'motions.can_manage'">
|
||||
·
|
||||
<span translate>Sequential number</span>
|
||||
{{ motion.id }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- state line-->
|
||||
<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
|
||||
* in the identifier, title, state, recommendations, submitters and motion blocks
|
||||
* in the identifier, title, state, recommendations, submitters, motion blocks and id
|
||||
*/
|
||||
private setFulltextFilter(): void {
|
||||
this.dataSource.filterPredicate = (data, filter) => {
|
||||
@ -332,6 +332,12 @@ export class MotionListComponent extends ListViewBaseComponent<ViewMotion, Motio
|
||||
if (data.identifier && data.identifier.toLowerCase().includes(filter)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const dataid = '' + data.id;
|
||||
if (dataid.includes(filter)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user