Template:Document: Difference between revisions
Tag: Undo |
|||
| Line 1: | Line 1: | ||
{{#default_form:Document}} | |||
<includeonly> | |||
{{#if:{{{file|}}}| | |||
{{#set:Has document file=File:{{{file}}}}} | |||
}} | |||
{{#if:{{{url|}}}| | |||
{{#set:Has document URL={{{url}}}}} | |||
}} | |||
{{#set: | |||
Has document title={{{title|}}} | |||
|Has document type={{{doc_type|}}} | |||
}} | |||
{{#arraymap:{{{crt_models|}}}|,|@@@@|{{#set:Has related CRT model=@@@@}}}} | |||
[[Category:Documents]] | |||
</includeonly> | |||
{{#default_form:Document}} | {{#default_form:Document}} | ||
| Line 19: | Line 36: | ||
<div style="margin-bottom: 1em; padding: 0.5em; border: 1px solid #a2a9b1; background: #f8f9fa;"> | <div style="margin-bottom: 1em; padding: 0.5em; border: 1px solid #a2a9b1; background: #f8f9fa;"> | ||
<div>'''Type:''' {{{doc_type|}}}</div> | <div>'''Type:''' {{{doc_type|}}}</div>{{#if:{{{title|}}}|<div>'''Title:''' {{{title}}}</div>}}{{#if:{{{file|}}}|<div>'''File:''' [[:File:{{{file}}}|{{{file}}}]]</div>}}{{#if:{{{url|}}}|<div>'''URL:''' {{{url}}}</div>}}{{#if:{{{crt_models|}}}|<div>'''Related CRT Models:''' {{#arraymap:{{{crt_models|}}}|,|@@@@|[[@@@@]] }}</div>}} | ||
{{#if:{{{title|}}}|<div>'''Title:''' {{{title}}}</div>}} | |||
{{#if:{{{file|}}}|<div>'''File:''' [[:File:{{{file}}}|{{{file}}}]]</div>}} | |||
{{#if:{{{url|}}}|<div>'''URL:''' {{{url}}}</div>}} | |||
{{#if:{{{crt_models|}}}|<div>'''Related CRT Models:''' {{#arraymap:{{{crt_models|}}}|,|@@@@|[[@@@@]] }}</div>}} | |||
<div style="text-align: center; margin-top: 0.5em;"> | <div style="text-align: center; margin-top: 0.5em;"> | ||
{{#if:{{{file|}}}|[{{fullurl:Special:Redirect/file/{{{file}}}}} <span style="display:inline-block;padding:0.5rem 1rem;background-color:#2563eb;color:#ffffff;border:1px solid #2563eb;border-radius:0.375rem;font-size:0.875rem;font-weight:500;text-decoration:none;cursor:pointer;">Download</span>]}}{{#if:{{{url|}}}|{{#if:{{{file|}}}||[{{{url}}} <span style="display:inline-block;padding:0.5rem 1rem;background-color:#2563eb;color:#ffffff;border:1px solid #2563eb;border-radius:0.375rem;font-size:0.875rem;font-weight:500;text-decoration:none;cursor:pointer;">Download</span>]}}}} [{{fullurl:Special:FormStart|form=Document&page_name={{PAGENAME}}}} <span style="display:inline-block;padding:0.5rem 1rem;background-color:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;border-radius:0.375rem;font-size:0.875rem;font-weight:500;text-decoration:none;">Edit this data</span>] | {{#if:{{{file|}}}|[{{fullurl:Special:Redirect/file/{{{file}}}}} <span style="display:inline-block;padding:0.5rem 1rem;background-color:#2563eb;color:#ffffff;border:1px solid #2563eb;border-radius:0.375rem;font-size:0.875rem;font-weight:500;text-decoration:none;cursor:pointer;">Download</span>]}}{{#if:{{{url|}}}|{{#if:{{{file|}}}||[{{{url}}} <span style="display:inline-block;padding:0.5rem 1rem;background-color:#2563eb;color:#ffffff;border:1px solid #2563eb;border-radius:0.375rem;font-size:0.875rem;font-weight:500;text-decoration:none;cursor:pointer;">Download</span>]}}}} [{{fullurl:Special:FormStart|form=Document&page_name={{PAGENAME}}}} <span style="display:inline-block;padding:0.5rem 1rem;background-color:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;border-radius:0.375rem;font-size:0.875rem;font-weight:500;text-decoration:none;">Edit this data</span>] | ||