Category:Item: Difference between revisions

2,737 bytes added ,  13 November 2024
Update package: OSW Core
(Update package: OSW Core)
 
(Update package: OSW Core)
 
(12 intermediate revisions by 2 users not shown)
jsondata
Line 14: Line 14:
         }
         }
     ],
     ],
    "_debug": false,
     "description": [
     "description": [
         {
         {
Line 27: Line 26:
             "lang": "en"
             "lang": "en"
         }
         }
    ],
    "type": [
        "Category:Category"
     ]
     ]
}
}
jsonschema
Line 3: Line 3:
         "/wiki/Category:Entity?action=raw\u0026slot=jsonschema",
         "/wiki/Category:Entity?action=raw\u0026slot=jsonschema",
         {
         {
             "type_": {
             "type": {
                 "@id": "@type",
                 "@id": "Property:HasType",
                 "@type": "@id"
                 "@type": "@id"
             },
             },
             "type*": "Property:HasType"
             "type*": {
                "@id": "Property:HasSchema",
                "@type": "@id"
            }
         }
         }
     ],
     ],
Line 14: Line 17:
     "allOf": [
     "allOf": [
         {
         {
            "type": "object",
             "$ref": "/wiki/Category:Entity?action=raw\u0026slot=jsonschema"
             "$ref": "/wiki/Category:Entity?action=raw\u0026slot=jsonschema"
         }
         }
Line 29: Line 31:
             "type": "array",
             "type": "array",
             "format": "table",
             "format": "table",
            "propertyOrder": -1000,
            "eval_template": [
                {
                    "type": "mustache-wikitext",
                    "mode": "render",
                    "value": "{{#type}} [[:{{{.}}}]] \u003Cbr\u003E{{/type}}"
                }
            ],
             "items": {
             "items": {
                 "title": "Type",
                 "title": "Type",
Line 36: Line 46:
                 "type": "string",
                 "type": "string",
                 "format": "autocomplete",
                 "format": "autocomplete",
                 "query": "[[IsA::Category:Category]] |?Display_title_of=label",
                 "subclassof_range": "Category:Item"
                "previewWikiTextTemplate": "[[:{{result.fulltext}}]]",
                "labelTemplate": "{{result.printouts.label.[0]}}"
             },
             },
             "minLength": 1,
             "minItems": 1,
             "default": [
             "default": [
                 "Category:Item"
                 "Category:Item"
Line 48: Line 56:
                 "conditional_visible": {
                 "conditional_visible": {
                     "modes": [
                     "modes": [
                        "default",
                         "query"
                         "query"
                     ]
                     ]
                }
            }
        },
        "entry_access": {
            "type": "object",
            "title": "Access restrictions",
            "title*": {
                "de": "Zugriffsbeschränkungen"
            },
            "eval_template": {
                "type": "mustache-wikitext",
                "mode": "render",
                "value": "{{=\u003C% %\u003E=}} {{#ifeq: \u003C%={{ }}=%\u003E {{{entry_access.read.level}}} {{=\u003C% %\u003E=}} |public|{{#set: |Visible to=public }} | }} \u003C%={{ }}=%\u003E"
            },
            "properties": {
                "read": {
                    "type": "object",
                    "title": "Read access",
                    "title*": {
                        "de": "Lesezugriff"
                    },
                    "properties": {
                        "level": {
                            "type": "string",
                            "title": "Level",
                            "title*": {
                                "de": "Level"
                            },
                            "enum": [
                                "public",
                                "internal",
                                "restricted"
                            ],
                            "options": {
                                "enum_titles": [
                                    "Public",
                                    "For all users",
                                    "For some users"
                                ],
                                "enum_titles*": [
                                    "Öffentlich",
                                    "Für alle Nutzer",
                                    "Für bestimmte Nutzer"
                                ]
                            }
                        }
                    }
                 }
                 }
             }
             }
footer_template
Line 1: Line 1:
=={{#switch:{{USERLANGUAGECODE}}|en=Graph|de=Graph}}==
<h2 class="section-collapsible-initial-collapsed section-heading--collapsed">{{#switch:{{USERLANGUAGECODE}}|en=Graph|de=Graph}}</h2>
<div style="width: 100%;" class="InteractiveSemanticGraph" data-config='{ "root":"{{FULLPAGENAME}}", "properties":["Subcategory of","-Subcategory of","-IsASubcategoryOf","IsASubcategoryOf","-IsInstanceOf","IsLocatedIn"], "ignore_properties":["IsA"], "permalink":true, "depth":2, "edit": true}'></div>
<div style="width: 100%;" class="InteractiveSemanticGraph" data-config='{ "root":"{{FULLPAGENAME}}", "properties":["HasSchema", "SubClassOf", "HasImage", "IsLocatedIn"], "ignore_properties":["Subcategory_of", "-Subcategory_of", "Has_query", "Display_title_of", "Display_title_of_lowercase", "Display_title_of_normalized"], "permalink":true, "depth":1, "edit": true,  "query_limit":25}'></div>
<br>
<br>
<br>
<h2 class="section-collapsible-initial-collapsed section-heading--collapsed">{{#switch:{{USERLANGUAGECODE}}|en=QR Code|de=QR-Code|#default=QR Code}}</h2>
<div class="QrCodeGenerator" data-config='{
    "text": "{{fullurl:{{FULLPAGENAME}}}}",
    "heading": "{{{label|{{#ask:[[{{FULLPAGENAME}}]]|?HasLabel.[0].text=|mainlabel=-}}}}}",
    "image": true,
    "print": true,
    "print_unit": "mm",
    "print_format": [29,42],
    "print_margin": [3,3,3,3],
    "print_scale": 0.115
}' style="width: 200px;"></div>
header_template
Line 11: Line 11:
<tr>
<tr>
<th>{{{_label_type|Type(s)/Category(s)}}}</th>
<th>{{{_label_type|Type(s)/Category(s)}}}</th>
<td>{{#ask:[[{{FULLPAGENAME}}]]|?HasType=|format=plain|mainlabel=-}}</td>
<td>{{{type|}}}</td>
</tr>
</tr>
</table>
</table>