Widget: UseCaseList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 268: | Line 268: | ||
const SCALE_PROP = 'Scale'; | const SCALE_PROP = 'Scale'; | ||
const CAT_PROP = 'Use Cases Category'; | const CAT_PROP = 'Use Cases Category'; | ||
const EVENT_PROP = 'Event type' | const EVENT_PROP = 'Event type'; | ||
const SUMMARY_PROP = 'Description'; | |||
const useCaseQuery = '[[Category:Use Cases]]' | const useCaseQuery = '[[Category:Use Cases]]' | ||
Line 277: | Line 278: | ||
+ '|?' + EVENT_PROP | + '|?' + EVENT_PROP | ||
+ '|?' + CAT_PROP | + '|?' + CAT_PROP | ||
+ '|?' + SUMMARY_PROP | |||
+ '|?' + YEAR_PROP; | + '|?' + YEAR_PROP; | ||
Line 295: | Line 297: | ||
useCase[SCALE_PROP] = useCaseResult.printouts[SCALE_PROP].map(value => value.fulltext); | useCase[SCALE_PROP] = useCaseResult.printouts[SCALE_PROP].map(value => value.fulltext); | ||
useCase[EVENT_PROP] = useCaseResult.printouts[EVENT_PROP].map(value => value.fulltext); | useCase[EVENT_PROP] = useCaseResult.printouts[EVENT_PROP].map(value => value.fulltext); | ||
useCase[SUMMARY_PROP] = useCaseResult.printouts[SUMMARY_PROP].map(value => value.fulltext); | |||
useCase[YEAR_PROP] = useCaseResult.printouts[YEAR_PROP][0] && useCaseResult.printouts[YEAR_PROP][0].raw.slice(-4); | useCase[YEAR_PROP] = useCaseResult.printouts[YEAR_PROP][0] && useCaseResult.printouts[YEAR_PROP][0].raw.slice(-4); | ||
return useCase; | return useCase; | ||
Line 475: | Line 478: | ||
field: 'title', | field: 'title', | ||
cssClass: 'usecase-title', | cssClass: 'usecase-title', | ||
formatter: cell = | formatter: function (cell) { | ||
let out = '<a href="' + cell.getData().url + '">' + cell.getValue() + '</a>'; | |||
out += '<div class="uc-summary">' + cell.getData()[SUMMARY_PROP] + '</div>'; | |||
return out; | |||
}, | |||
minWidth: '800px' | minWidth: '800px' | ||
}, | }, |
Revision as of 12:44, 12 October 2023
Current version of the List of Use Cases.
Currently in use – do not modify!