Skip to content

Commit b2d7f4c

Browse files
Merge branch 'release/0.10.1'
2 parents 4584b7b + f24b210 commit b2d7f4c

File tree

10 files changed

+62
-38
lines changed

10 files changed

+62
-38
lines changed

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ abstract: >-
4141
transcripts, to aid clinical linguists and research into
4242
language development and language disorders.
4343
license: BSD-3-Clause
44-
version: 0.10.0
45-
date-released: '2025-10-13'
44+
version: 0.10.1
45+
date-released: '2025-11-06'

backend/analysis/serializers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def get_num_transcripts(self, obj):
6969

7070
class Meta:
7171
model = Corpus
72-
fields = ('id', 'name', 'method_category', 'num_transcripts', 'username')
72+
fields = ('id', 'name', 'method_category',
73+
'num_transcripts', 'username', 'date_added')
7374

7475

7576
class CorpusDetailsSerializer(serializers.ModelSerializer):

backend/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ djangorestframework==3.13.1
9191
# via
9292
# -r requirements.in
9393
# django-rest-auth
94-
editdistance==0.6.2
94+
editdistance==0.6.1
9595
# via auchann
9696
et-xmlfile==1.1.0
9797
# via openpyxl

frontend/src/app/corpus/corpus-detail.component.html

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,22 @@ <h3 class="title is-4"><span class="tag is-primary is-light">{{defaultTam?.categ
3131
</p-dropdown>
3232
</div>
3333
</div>
34-
<table class="table is-fullwidth is-hoverable">
35-
<thead>
34+
35+
<p-table [value]="corpus.transcripts" [rowHover]="true" sortField="date" [sortOrder]="-1">
36+
<ng-template pTemplate="header">
3637
<tr>
37-
<th>Transcript</th>
38-
<th>Status</th>
39-
<th>Utterances (#)</th>
40-
<th>Created on</th>
38+
<th pSortableColumn="name">Transcript<p-sortIcon field="name" /></th>
39+
<th pSortableColumn="status_name">Status<p-sortIcon field="status_name" /></th>
40+
<th pSortableColumn="utterances.length">
41+
Utterances (#) <p-sortIcon field="utterances.length" />
42+
</th>
43+
<th pSortableColumn="date_added">Created on<p-sortIcon field="date_added" /></th>
4144
<th class="has-text-right">Actions</th>
4245
</tr>
43-
</thead>
44-
<tbody>
45-
<tr *ngFor="let transcript of corpus.transcripts">
46+
</ng-template>
47+
48+
<ng-template pTemplate="body" let-transcript>
49+
<tr>
4650
<td class="transcript-name" [routerLink]="['/transcript/', transcript.id]">
4751
<a>{{ transcript.name }}</a>
4852
</td>
@@ -64,6 +68,8 @@ <h3 class="title is-4"><span class="tag is-primary is-light">{{defaultTam?.categ
6468
</div>
6569
</td>
6670
</tr>
67-
</tbody>
68-
</table>
71+
</ng-template>
72+
73+
</p-table>
74+
6975
</ng-container>

frontend/src/app/corpus/list-corpus.component.html

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
1-
<ng-container *ngIf="(corpora$ | async) as corpora; else loading;">
2-
<table class="table is-fullwidth is-hoverable" *ngIf="corpora.length > 0">
3-
<thead>
1+
<ng-container *ngIf="corpora$ | async as corpora; else loading">
2+
<p-table [value]="corpora" [rowHover]="true" sortField="date_added" [sortOrder]="-1">
3+
<ng-template pTemplate="header">
44
<tr>
5-
<th>Name</th>
6-
<th>transcripts (#)</th>
7-
<th *ngIf="(authService.currentUser$ | async).isAdmin">Owner</th>
5+
<th pSortableColumn="name">Name <p-sortIcon field="name" /></th>
6+
<th pSortableColumn="num_transcripts">
7+
Transcripts (#) <p-sortIcon field="num_transcripts" />
8+
</th>
9+
<th
10+
pSortableColumn="username"
11+
*ngIf="(authService.currentUser$ | async).isAdmin"
12+
>
13+
Owner <p-sortIcon field="username" />
14+
</th>
15+
<th pSortableColumn="date_added">Created on<p-sortIcon field="date_added" /></th>
816
<th class="has-text-right">Actions</th>
917
</tr>
10-
</thead>
11-
<tbody>
12-
<tr *ngFor="let corp of corpora" [routerLink]="['/corpora/', corp.id]">
13-
<td>{{ corp.name }}</td>
14-
<td>{{ corp.num_transcripts|| "0" }}</td>
15-
<td *ngIf="(authService.currentUser$ | async).isAdmin">{{corp.username}}</td>
18+
</ng-template>
19+
<ng-template pTemplate="body" let-corpus>
20+
<tr [routerLink]="['/corpora/', corpus.id]">
21+
<td>{{ corpus.name }}</td>
22+
<td>{{ corpus.num_transcripts || "0" }}</td>
23+
<td *ngIf="(authService.currentUser$ | async).isAdmin">
24+
{{ corpus.username }}
25+
</td>
26+
<td>{{ corpus.date_added | date: "dd/MM/yyyy" }}</td>
1627
<td class="has-text-right">
1728
<div class="buttons is-right">
1829
<button class="button is-success" pTooltip="add transcripts" (click)="$event.stopPropagation()"
19-
[routerLink]="['/upload']" [queryParams]="{ corpus: corp.id }">
30+
[routerLink]="['/upload']" [queryParams]="{ corpus: corpus.id }">
2031
<span class="icon is-small">
2132
<fa-icon [icon]="faPlus"></fa-icon>
2233
</span>
2334
</button>
2435
<button class="button is-danger" pTooltip="delete corpus"
25-
(click)="confirmDeleteCorpus($event, corp)">
36+
(click)="confirmDeleteCorpus($event, corpus)">
2637
<span class="icon is-small">
2738
<fa-icon [icon]="faTrash"></fa-icon>
2839
</span>
2940
</button>
3041
</div>
3142
</td>
3243
</tr>
33-
</tbody>
34-
</table>
44+
</ng-template>
45+
</p-table>
3546

3647
<h1 *ngIf="corpora.length === 0" class="title is-2">
3748
No corpora yet!
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
tbody tr {
2-
cursor: pointer;
3-
}

frontend/src/app/shared/models/corpus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export interface ListedCorpus {
66
method_category: number;
77
num_transcripts: number;
88
username?: string;
9+
date_added?: Date;
910
}
1011

1112
export interface Corpus extends Omit<ListedCorpus, 'num_transcripts'> {
1213
status: 'created';
13-
date_added?: Date;
1414
date_modified?: Date;
1515
default_method?: number;
1616
transcripts?: ListedTranscript[];

frontend/src/app/shared/shared.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { FieldsetModule } from 'primeng/fieldset';
99
import { FileUploadModule } from 'primeng/fileupload';
1010
import { MessageModule } from 'primeng/message';
1111
import { MessagesModule } from 'primeng/messages';
12+
import { TableModule } from 'primeng/table';
1213
import { ToastModule } from 'primeng/toast';
1314
import { TooltipModule } from 'primeng/tooltip';
1415
import { PanelModule } from 'primeng/panel';
@@ -29,6 +30,7 @@ const primeNGModules = [
2930
FileUploadModule,
3031
MessageModule,
3132
MessagesModule,
33+
TableModule,
3234
ToastModule,
3335
TooltipModule,
3436
PanelModule,

frontend/src/styles.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import 'bulma/bulma';
33
@import "@creativebulma/bulma-divider";
44
@import 'primeicons/primeicons.css';
5-
@import 'primeng/resources/themes/nova/theme.css';
5+
@import "primeng/resources/themes/lara-light-blue/theme.css";
66
@import 'primeng/resources/primeng.css';
77

88
@media print {
@@ -37,4 +37,11 @@
3737

3838
.p-toast-detail {
3939
word-break: break-all;
40-
}
40+
}
41+
tbody.p-element>tr:hover {
42+
cursor: pointer;
43+
}
44+
45+
.p-datatable {
46+
@extend .table
47+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sasta",
3-
"version": "0.10.0",
3+
"version": "0.10.1",
44
"description": "Annotate and analyze transcripts",
55
"author": "UU Digital Humanities Lab",
66
"license": "BSD-3-Clause",

0 commit comments

Comments
 (0)