Changes for page Material Collection
Last modified by Judith Steinfeld on 2025/06/03 11:13
From version 23.1
edited by Judith Steinfeld
on 2024/07/25 10:35
on 2024/07/25 10:35
Change comment:
There is no comment for this version
To version 69.1
edited by Judith Steinfeld
on 2024/11/14 16:37
on 2024/11/14 16:37
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 2 added, 0 removed)
-
Objects (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Material Collection 1 +Material Collection - Syntax
-
... ... @@ -1,1 +1,1 @@ 1 - markdown+github1.01 +XWiki 2.1 - Content
-
... ... @@ -1,23 +2,51 @@ 1 -**Learning and Teaching Materials for ErUM-Data-Scientists** 2 2 3 -{{info}} 4 -Are you an ErUM-Data-Scientist who wants to expand your digital skills or do you want to support (young/prospective) ErUM-Scientists in pursuing digital transformation? 5 -With our material collection we want to provide an overview of existing materials and contacts by outlining where to find what. 6 -Furthermore, we supply you with our own materials. As 7 -{{/info}} 8 8 9 - ######Areyouan ErUM-Data-Scientistwho wantstoexpandyourdigitalkillsordo you want to support (young/prospective)ErUM-Scientistsin pursuing digital transformation?3 +== **Learning and Teaching Materials for ErUM-Data-Scientists** == 10 10 11 - ###### Withourmaterialcollectionwe want toprovidean overviewof existing materialsand contacts by outlining whereto findwhat.5 +{{box cssClass="floatinginfobox" title="=== Further Material Collections === 12 12 13 -###### Furthermore, we supply you with our own materials. As 7 + "}} 8 +{{displayIcon name="world"/}} 9 +{{/box}} 14 14 15 - 11 +{{info width="70%"}} 12 +Are you an ErUM-Data-Scientist who wants to expand your digital skills or do you want to support (young/prospective) ErUM-Scientists in pursuing digital transformation? 16 16 17 - 14 +With our material collection we want to provide an overview of existing materials and contacts by outlining where to find what. 18 18 19 - ######Occasionally,wewill alsoprovide our own materials(e.g.slides andvideos from events).16 +The collection of existing materials thrives on being filled and is complemented by our own materials which include for example videos and slides from various workshops and schools organized by the ErUM-Data-Hub in collaboration with DIG-UM with which we reached over 800 participants so far. 20 20 21 -more to come ... 22 22 23 -![[IMG_1529.JPG|IMG_1529.JPG]] 19 +If you want to be subscribed or unsubscribed from this list please contact [[judith.steinfeld@erumdatahub.de>>mailto:judith.steinfeld@erumdatahub.de]] 20 +{{/info}} 21 + 22 +{{success width="70%"}} 23 +Our collection of materials covers many different topics. You can click on one or more tags to filter the list or search for titles and authors. 24 +{{/success}} 25 + 26 + 27 +{{velocity}} 28 +#set ($columnsProperties = { 29 + 'doc.location': {"displayName": "Title", "html": true}, 30 + 'link': {"type": "hidden"}, 31 + 'date': {"html": true}, 32 + 'author': {}, 33 + "tags": {"sortable": false, "filterable": false, "html": true, "headerClass": "tagsCol"}, 34 + "_actions": {"actions": ["view", "edit"]} 35 +}) 36 +#set ($options = { 37 + 'className': 'Materials.Code.MaterialsClass', 38 + 'translationPrefix': 'materials.livetable.', 39 + 'tagCloud': true, 40 + 'rowCount': 25, 41 + 'maxPages': 10, 42 + "extraParams" : "tags_className=XWiki.TagClass", 43 + 'selectedColumn': 'date', 44 + 'defaultOrder': 'desc' 45 +}) 46 +#set ($columns = ['doc.location', 'link', "tags", "tags", 'date', 'author']) 47 +#if (!$isGuest) 48 + #set($discard = $columns.add("_actions")) 49 +#end 50 +#livetable('materials' $columns $columnsProperties $options) 51 +{{/velocity}}
- show all abc 2.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.JudithSteinfeld - Size
-
... ... @@ -1,0 +1,1 @@ 1 +245.5 KB - Content
- show all abc.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.JudithSteinfeld - Size
-
... ... @@ -1,0 +1,1 @@ 1 +27.8 KB - Content
- XWiki.JavaScriptExtension[0]
-
- Caching policy
-
... ... @@ -1,0 +1,1 @@ 1 +default - Code
-
... ... @@ -1,0 +1,96 @@ 1 +const tabName = "materials"; 2 +const tagCols = [ 3 + ["Type", "lecture", "exercise", "hands-on", "solution", "tutorial", "talk", "course", "video", "paper"], 4 + ["Tags", true], 5 +] 6 + 7 +document.observe('xwiki:livetable:loading', () => { 8 + const mats = document.getElementById(tabName); 9 + 10 + // coulmn data sources 11 + const conf = JSON.parse(mats.dataset.settings); 12 + tagCols.forEach(([name], i) => { 13 + const cn = `tags-${i}`; 14 + conf.columns.splice(conf.columns.indexOf("tags"), 1, cn); 15 + conf.columnDescriptors[cn] = { 16 + displayName: name, 17 + headerClass: "tagsCol", 18 + html: true, 19 + sortable: false, 20 + }; 21 + }); 22 + mats.dataset.settings = JSON.stringify(conf); 23 + 24 + // column headers 25 + mats.querySelectorAll(".xwiki-livetable-display-header .tagsCol").forEach( 26 + (v, i) => v.textContent = tagCols[i][0] 27 + ); 28 + 29 + // handle clicks for tags 30 + document.getElementById(`${tabName}-display`).addEventListener("click", ev => { 31 + if (ev.button) return; // only left click 32 + if (ev.target.nodeName !== "SPAN") return; 33 + if (!ev.target.classList.contains("ltTag")) return; 34 + const tag = ev.target.textContent; 35 + ev.preventDefault(); 36 + const lt = mats.__liveTable; 37 + const st = lt.tagCloud.selectedTags; 38 + if (tag in st) delete st[tag]; 39 + else st[tag] = {}; 40 + lt.tags = Object.keys(st); 41 + lt.clearCache(); 42 + lt.showRows(1, lt.limit); 43 + }) 44 +}); 45 + 46 +document.observe(`xwiki:livetable:${tabName}:receivedEntries`, ({memo: {data}}) => { 47 + for (const row of data.rows) { 48 + const ol = new DOMParser().parseFromString(row.doc_location, "text/xml").documentElement; 49 + const li = ol.children; 50 + 51 + li[0].remove(); // remove "Event" 52 + for (let i = 1; i < li.length - 1; i++) // intermediate 53 + li[i].textContent = li[i].textContent; // remove link 54 + 55 + const a = li[li.length - 1].children[0]; 56 + const b = a.ownerDocument.createElement("b"); 57 + a.replaceWith(b); 58 + b.appendChild(a); 59 + a.textContent = row.doc_title; 60 + 61 + const u = new URL(row.link_value); 62 + let icon; 63 + if (u.hostname.includes("github")) icon = "github"; 64 + if (u.hostname.includes("github.io")) icon = "book"; 65 + if (u.hostname.includes("gitlab")) icon = "gitlab"; 66 + if (u.hostname.includes("google")) icon = "google"; 67 + if (u.hostname.includes("colab")) icon = "code"; 68 + if (u.hostname.includes("youtube")) icon = "youtube-play"; 69 + if (u.pathname.endsWith(".pdf")) icon = "file-pdf-o"; 70 + if (u.pathname.endsWith(".pptx")) icon = "file-powerpoint-o"; 71 + if (icon) { 72 + const s = a.ownerDocument.createElement("span"); 73 + s.appendChild(a.ownerDocument.createElement("wbr")); 74 + s.setAttribute("class", `fa fa-${icon}`); 75 + s.setAttribute("style", "padding-right: .3em;"); 76 + a.insertBefore(s, a.firstChild); 77 + } 78 + a.setAttribute("class", "wikiexternallink"); 79 + a.setAttribute("href", u.href); 80 + 81 + row.doc_location = ol.outerHTML; 82 + 83 + // tags 84 + const tags = new Set(row.tags_value.slice(1, -1).split(", ")); 85 + tagCols.forEach(([name, ...want], i) => 86 + row[`tags-${i}`] = ( 87 + want[0] === true 88 + ? Array.from(tags) 89 + : want.filter(tag => tags.delete(tag)) 90 + ).sort().map(tag => `<span class="ltTag" style="cursor:pointer;white-space:nowrap;">${tag}</span>`).join(", ") 91 + ); 92 + } 93 +}); 94 + 95 + 96 + - Name
-
... ... @@ -1,0 +1,1 @@ 1 +Live Table - Materials - Parse content
-
... ... @@ -1,0 +1,1 @@ 1 +No - Use this extension
-
... ... @@ -1,0 +1,1 @@ 1 +currentPage
- XWiki.XWikiRights[4]
-
- Allow/Deny
-
... ... @@ -1,0 +1,1 @@ 1 +Allow - Groups
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Staff - Levels
-
... ... @@ -1,0 +1,1 @@ 1 +edit,script,comment
- XWiki.XWikiRights[5]
-
- Allow/Deny
-
... ... @@ -1,0 +1,1 @@ 1 +Allow - Groups
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiAdminGroup - Levels
-
... ... @@ -1,0 +1,1 @@ 1 +comment,script,edit
- XWiki.XWikiRights[6]
-
- Allow/Deny
-
... ... @@ -1,0 +1,1 @@ 1 +Allow - Groups
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiAllGroup - Levels
-
... ... @@ -1,0 +1,1 @@ 1 +comment,edit,script
- XWiki.XWikiRights[7]
-
- Allow/Deny
-
... ... @@ -1,0 +1,1 @@ 1 +Deny - Groups
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.XWikiAllGroup - Levels
-
... ... @@ -1,0 +1,1 @@ 1 +delete