From d1b39449e800136df7b4d06bef404deff2674b7b Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Sun, 22 Nov 2020 16:02:51 +0100
Subject: [PATCH] Fix service icons in job lists, Readd publishing year in
corpus_file lists
---
web/app/static/js/nopaque.lists.js | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/web/app/static/js/nopaque.lists.js b/web/app/static/js/nopaque.lists.js
index 8d7b6159..c907f5be 100644
--- a/web/app/static/js/nopaque.lists.js
+++ b/web/app/static/js/nopaque.lists.js
@@ -14,7 +14,7 @@ class RessourceList extends List {
_init(ressources) {
this.clear();
this._add(Object.values(ressources));
- this.sort("creation_date", {order: "desc"});
+ this.sort("id", {order: "desc"});
}
@@ -84,7 +84,9 @@ RessourceList.dataMappers = {
CorpusFile: corpus_file => ({
author: corpus_file.author,
filename: corpus_file.filename,
+ id: corpus_file.id,
link: `${corpus_file.corpus_id}/files/${corpus_file.id}`,
+ "publishing-year": corpus_file.publishing_year,
title: corpus_file.title,
title1: corpus_file.title,
"delete-link": `/corpora/${corpus_file.corpus_id}/files/${corpus_file.id}/delete`,
@@ -98,7 +100,7 @@ RessourceList.dataMappers = {
description: job.description,
id: job.id,
link: `/jobs/${job.id}`,
- service: job.service,
+ service: job.service.name,
status: job.status,
title: job.title,
title1: job.title,
@@ -143,22 +145,7 @@ RessourceList.dataMappers = {
RessourceList.options = {
// common list.js options for 5 rows per page etc.
- common: {
- page: 5,
- pagination: [
- {
- name: "paginationTop",
- paginationClass: "paginationTop",
- innerWindow: 4,
- outerWindow: 1
- },
- {
- paginationClass: "paginationBottom",
- innerWindow: 4,
- outerWindow: 1,
- },
- ],
- },
+ common: {page: 5, pagination: [{innerWindow: 4, outerWindow: 1}]},
// extended list.js options for 10 rows per page etc.
extended: {
page: 10,
@@ -238,6 +225,7 @@ RessourceList.options = {
|
|
|
+ |
@@ -265,8 +253,10 @@ RessourceList.options = {
valueNames: [
"author",
"filename",
+ "publishing-year",
"title",
"title1",
+ {data: ["id"]},
{name: "delete-link", attr: "href"},
{name: "delete-modal-trigger", attr: "data-target"},
{name: "delete-modal", attr: "id"},
|