Template:Document: Difference between revisions
Add automatic categories for documents missing content or orphaned - fixes maintenance queries (via update-page on MediaWiki MCP Server) |
Add Has related accessory / Has related part semantic properties, display tables, update orphan check (via update-page on MediaWiki MCP Server) |
||
| Line 14: | Line 14: | ||
{{#arraymap:{{{crt_models|}}}|,|@@@@|{{#set:Has related CRT model=@@@@}}}} | {{#arraymap:{{{crt_models|}}}|,|@@@@|{{#set:Has related CRT model=@@@@}}}} | ||
{{#arraymap:{{{av_devices|}}}|,|@@@@|{{#set:Has related AV device=@@@@}}}} | {{#arraymap:{{{av_devices|}}}|,|@@@@|{{#set:Has related AV device=@@@@}}}} | ||
{{#arraymap:{{{accessories|}}}|,|@@@@|{{#set:Has related accessory=@@@@}}}} | |||
{{#arraymap:{{{parts|}}}|,|@@@@|{{#set:Has related part=@@@@}}}} | |||
[[Category:Documents]] | [[Category:Documents]] | ||
{{#if:{{{file|}}}{{{url|}}}||[[Category:Documents missing content]]}} | {{#if:{{{file|}}}{{{url|}}}||[[Category:Documents missing content]]}} | ||
{{#if:{{{crt_models|}}}{{{av_devices|}}}||[[Category:Orphaned documents]]}} | {{#if:{{{crt_models|}}}{{{av_devices|}}}{{{accessories|}}}{{{parts|}}}||[[Category:Orphaned documents]]}} | ||
</includeonly> | </includeonly> | ||
| Line 48: | Line 50: | ||
|class=wikitable sortable | |class=wikitable sortable | ||
|mainlabel=AV device | |mainlabel=AV device | ||
}}|}}{{#if:{{{accessories|}}}| | |||
<div class="document-section-header"><strong>Related Accessories:</strong></div> | |||
{{#ask: | |||
[[Category:Accessories]] | |||
{{#arraymap:{{{accessories|}}}|,|@@@@|[[@@@@]]|OR}} | |||
|?Has image#100px;x100px=Photo | |||
|?Has model code=Model | |||
|?Has accessory type=Type | |||
|?Has description=Description | |||
|format=table | |||
|class=wikitable sortable | |||
|mainlabel=Accessory | |||
}}|}}{{#if:{{{parts|}}}| | |||
<div class="document-section-header"><strong>Related Parts:</strong></div> | |||
{{#ask: | |||
[[Category:Parts]] | |||
{{#arraymap:{{{parts|}}}|,|@@@@|[[@@@@]]|OR}} | |||
|?Has image#100px;x100px=Photo | |||
|?Has model code=Part # | |||
|?Has part type=Type | |||
|?Has description=Description | |||
|format=table | |||
|class=wikitable sortable | |||
|mainlabel=Part | |||
}}|}}<div class="document-buttons"> | }}|}}<div class="document-buttons"> | ||
{{#if:{{{file|}}}|[{{fullurl:Special:Redirect/file/{{{file}}}}} <span class="document-button document-button-primary">Download</span>]}}{{#if:{{{url|}}}|{{#if:{{{file|}}}||[{{{url}}} <span class="document-button document-button-primary">Download</span>]}}}} [{{fullurl:Special:FormStart|form=Document&page_name={{PAGENAMEE}}}} <span class="document-button document-button-secondary">Edit this data</span>] | {{#if:{{{file|}}}|[{{fullurl:Special:Redirect/file/{{{file}}}}} <span class="document-button document-button-primary">Download</span>]}}{{#if:{{{url|}}}|{{#if:{{{file|}}}||[{{{url}}} <span class="document-button document-button-primary">Download</span>]}}}} [{{fullurl:Special:FormStart|form=Document&page_name={{PAGENAMEE}}}} <span class="document-button document-button-secondary">Edit this data</span>] | ||
Revision as of 01:30, 14 February 2026
Document
Type: