Fix service icons in job lists, Readd publishing year in corpus_file lists

This commit is contained in:
Patrick Jentsch 2020-11-22 16:02:51 +01:00
parent c3c3b70030
commit d1b39449e8

View File

@ -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 = {
<td class="filename" style="word-break: break-word;"></td>
<td class="author" style="word-break: break-word;"></td>
<td class="title" style="word-break: break-word;"></td>
<td class="publishing-year" style="word-break: break-word;"></td>
<td>
<div class="right-align">
<a class="btn-floating modal-trigger red tooltipped waves-effect waves-light delete-modal-trigger" data-position="top" data-tooltip="Delete">
@ -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"},