mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/nopaque into development
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
class RessourceList extends List {
|
||||
constructor(idOrElement, subscriberList, type, options={}) {
|
||||
if (!["Corpus", "CorpusFile", "Job", "JobInput", "QueryResult", "User", "result"].includes(type)) {
|
||||
if (!["Corpus", "CorpusFile", "Job", "JobInput", "QueryResult", "User"].includes(type)) {
|
||||
console.error("Unknown Type!");
|
||||
return;
|
||||
}
|
||||
@ -124,16 +124,6 @@ RessourceList.dataMapper = {
|
||||
link: `/query_results/${query_result.id}`,
|
||||
query: query_result.query_metadata.query,
|
||||
title: query_result.title}),
|
||||
result: result => ({query: result.query,
|
||||
match_count: result.match_count,
|
||||
corpus_name: result.corpus_name,
|
||||
corpus_creation_date: result.corpus_creation_date,
|
||||
corpus_analysis_date: result.corpus_analysis_date,
|
||||
corpus_type : result.corpus_type,
|
||||
"details-link": `${result.id}/details`,
|
||||
"inspect-link": `${result.id}/inspect`,
|
||||
"download-link": `${result.id}/file/${result.file_id}/download`,
|
||||
"delete-modal": `delete-result-${result.id}-modal`}),
|
||||
// Mapping for user entities shown in admin table
|
||||
User: user => ({username: user.username,
|
||||
email: user.email,
|
||||
@ -277,56 +267,6 @@ RessourceList.options = {
|
||||
{data: ["id"]},
|
||||
{name: "inspect-link", attr: "href"},
|
||||
{name: "link", attr: "href"}]},
|
||||
// Result (imported from corpus analysis) entity blueprint setting html
|
||||
// strucuture per entity per row
|
||||
// Link classes have to correspond with Links defined in the Mapping process
|
||||
result: {item: `<tr>
|
||||
<td class="query"></td>
|
||||
<td class="match_count"></td>
|
||||
<td class="corpus_name"></td>
|
||||
<td class="corpus_creation_date"></td>
|
||||
<td class="corpus_analysis_date"></td>
|
||||
<td class="corpus_type"></td>
|
||||
<td class="actions right-align">
|
||||
<a class="btn-floating tooltipped details-link
|
||||
waves-effect waves-light"
|
||||
data-position="top"
|
||||
data-tooltip="Metadata Info">
|
||||
<i class="material-icons">info_outline</i>
|
||||
</a>
|
||||
<a class="btn-floating tooltipped inspect-link
|
||||
waves-effect waves-light"
|
||||
data-position="top"
|
||||
data-tooltip="View Results">
|
||||
<i class="material-icons">search</i>
|
||||
</a>
|
||||
<a class="btn-floating tooltipped download-link
|
||||
waves-effect waves-light"
|
||||
data-position="top"
|
||||
data-tooltip="Download">
|
||||
<i class="material-icons">file_download</i>
|
||||
</a>
|
||||
<a class="btn-floating tooltipped red delete-modal
|
||||
waves-effect waves-light modal-trigger"
|
||||
data-position="top"
|
||||
data-tooltip="Delete">
|
||||
<i class="material-icons">delete</i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>`,
|
||||
// Result Value Names per column. Have to correspond with keys from the
|
||||
// Mapping step above.
|
||||
valueNames: ["query",
|
||||
"match_count",
|
||||
"corpus_name",
|
||||
"corpus_creation_date",
|
||||
"corpus_analysis_date",
|
||||
"corpus_type",
|
||||
{name: "details-link", attr: "href"},
|
||||
{name: "inspect-link", attr: "href"},
|
||||
{name: "download-link", attr: "href"},
|
||||
{name: "delete-modal", attr: "data-target"}]
|
||||
},
|
||||
// User entity blueprint setting html strucuture per entity per row
|
||||
// Link classes have to correspond with Links defined in the Mapping process
|
||||
User: {item: `<tr>
|
||||
|
Reference in New Issue
Block a user