Template:Infobox military operation: Difference between revisions

Jump to navigation Jump to search
imported>Kirill Lokshin
(Try collapsing images into single block)
imported>Phuzion
(Added subtitle to check for unknown parameters)
 
(41 intermediate revisions by 17 users not shown)
Line 1: Line 1:
<includeonly>
{{infobox
{| {{WPMILHIST Infobox style|main_box|vevent}}
|bodyclass = vevent
|-  
|bodystyle = {{WPMILHIST Infobox style|main_box_raw}}
! colspan="2" {{WPMILHIST Infobox style|header_bar}} | {{#if:{{{title|}}}|{{{title}}}|{{{name}}}}}
|abovestyle = {{WPMILHIST Infobox style|header_raw}}
|-
|aboveclass = summary
{{#if:{{{partof|}}}{{{conflict|}}} |
| headerstyle = {{WPMILHIST Infobox style|header_raw}}
{{!}} colspan="2" {{WPMILHIST Infobox style|header_bar}} {{!}} Part of {{#if:{{{conflict|}}}|{{{conflict}}}|{{{partof|}}}}}
|above = {{if empty|{{{title|}}}|{{{name|}}}|{{PAGENAMEBASE}}}}
|subheaderstyle = {{WPMILHIST Infobox style|sub_header_raw}}
|subheader = {{br separated entries|{{{subtitle|}}}|{{#if:{{{partof|}}}{{{conflict|}}}|Part of {{if empty|{{{conflict|}}}|{{{partof|}}}}} }}}}
|labelstyle = padding-right: 1em;
|imagestyle = {{WPMILHIST Infobox style|image_box_raw}}
|image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}}
|caption = {{{caption|}}}
 
| label1 = {{#if:{{{scope|}}}|Operational scope|Type}}
| data1 = {{if empty|{{{scope|}}}|{{{type|}}}}}
 
| label2 = Location{{#if:{{{location2|}}}|s}}
| data2 = {{br separated entries
|1 = {{#if:{{{location|{{{place|}}}}}}|<div style="display:inline;" class="location">{{{location|{{{place|}}}}}}</div>}}
|2 = {{{coordinates|}}}
|3 = {{#if:{{{location2|}}}|<div style="display:inline;" class="location">{{{location2|}}}</div>}}
|4 = {{#if:{{{location2|}}}|{{{coordinates2|}}}}}
|5 = {{#if:{{{location3|}}}|<div style="display:inline;" class="location">{{{location3|}}}</div>}}
|6 = {{#if:{{{location3|}}}|{{{coordinates3|}}}}}
|7 = {{#if:{{{location4|}}}|<div style="display:inline;" class="location">{{{location4|}}}</div>}}
|8 = {{#if:{{{location4|}}}|{{{coordinates4|}}}}}
|9 = {{#if:{{{location5|}}}|<div style="display:inline;" class="location">{{{location5|}}}</div>}}
|10= {{#if:{{{location5|}}}|{{{coordinates5|}}}}}
|11= {{#if:{{{location6|}}}|<div style="display:inline;" class="location">{{{location6|}}}</div>}}
|12= {{#if:{{{location6|}}}|{{{coordinates6|}}}}}
|13= {{#if:{{{location7|}}}|<div style="display:inline;" class="location">{{{location7|}}}</div>}}
|14= {{#if:{{{location7|}}}|{{{coordinates7|}}}}}
|15= {{#if:{{{location8|}}}|<div style="display:inline;" class="location">{{{location8|}}}</div>}}
|16= {{#if:{{{location8|}}}|{{{coordinates8|}}}}}
|17= {{#if:{{{location9|}}}|<div style="display:inline;" class="location">{{{location9|}}}</div>}}
|18= {{#if:{{{location9|}}}|{{{coordinates9|}}}}}
|19= {{#if:{{{location10|}}}|<div style="display:inline;" class="location">{{{location10|}}}</div>}}
|20= {{#if:{{{location10|}}}|{{{coordinates10|}}}}}
}}
}}
|-
 
{{#if:{{{image|}}}{{{base_map|}}}{{{latd|}}}|
| label3 = Planned
{{!}} colspan="2" {{WPMILHIST Infobox style|image_box}} {{!}} {{#if:{{{image|}}}|{{{image|}}}<br/>{{{caption|}}}}}
| data3 = {{{planned|}}}
{{#if: {{{base_map|}}}|<div>{{Superimpose| base = {{{base_map}}}
 
  | base_width = 230px
| label4 = Planned&nbsp;by
  | base_caption = {{{caption|}}}
| data4 = {{{planned_by|}}}
  | float = {{{locator|}}}
 
  | float_width = 6px
| label5 = Commanded&nbsp;by
  | x = {{{locator_x}}}
| data5 = {{{commanded_by|}}}
  | y = {{{locator_y}}}
 
}}</div>}}
| label6 = {{#if:{{{target|}}}|Target|Objective}}
{{#if:{{{latd|}}}|<div><div style="width: 240px; background: transparent">
| data6 = {{if empty|{{{target|}}}|{{{objective|}}}}}
<div style="position:relative; width:240px">{{{locator_map}}}<br/><div style="position:absolute; z-index:200;
 
top:{{#expr:(  (38.757 -{{{latd}}}) *10.581 <!-- 100/(38.757-29.306) -->) round 1}}%;
| label7 = Date
left:{{#expr:( ({{{longd}}}-60.069) * 6.641 <!-- 100/(75.126-60.069) -->) round 1}}%; height:0; width:0; margin:0; padding:0;">
| data7 = {{br separated entries
<div style="position:relative; top:-4px; left:-4px; width:8px; text-align:center; z-index:201">[[Image:Red pog.svg|8x8px]]</div>
|1 = {{if empty|{{{executed|}}}|{{{date|}}}}}
<div style="font-size:110%; line-height:110%; position:relative; top:-1.5em; text-align: {{#switch: {{{locator_position}}}
|2 = {{{time|}}}  
| left = right; left:-6.5em
|3 = {{#if:{{{time-begin|}}}|{{{time-begin}}} &ndash; {{{time-end|}}}}}  
|#default=left; left:0.5em}}; width:6em; z-index:202;">
}} {{#if:{{{timezone|}}}|({{{timezone}}})}}
<b style="padding:1px; background:none">{{{locator}}}</b>
 
</div>
| label8 = Executed&nbsp;by
</div>
| data8 = {{if empty|{{{instigator|}}}|{{{executed_by|}}}}}
</div>
 
</div>}}
| label9 = Outcome
| data9 = {{{outcome|}}}
 
| label10 = Casualties
| data10 = {{if empty|{{{casualties|}}}|{{br separated entries
|1 = {{#if:{{{fatalities|}}}|{{{fatalities|}}} killed}}
|2 = {{#if:{{{injuries|}}}|{{{injuries|}}} injured}}
}} }}
 
| header27 = {{#if:{{{map_type|}}}|<nowiki />}}
| data28 = {{#if:{{{map_type|}}}|
{{#if:{{{coordinates2|}}}|
{{Location map many|{{{map_type}}}|coordinates1={{if empty|{{{map_coord|}}} | {{{coordinates|}}} }}|width={{{map_size|220}}}|float=center|border=infobox|label1={{{map_label|}}}|caption={{{map_caption|Location within {{#invoke:Location map|data|{{{map_type}}}|name}} }}}
|coordinates2={{{coordinates2|}}}|label2={{{map_label2|}}}
{{#if:{{{coordinates3|}}}|{{!}}coordinates3={{{coordinates3|}}}{{!}}label3={{{map_label3|}}} }}
{{#if:{{{coordinates4|}}}|{{!}}coordinates4={{{coordinates4|}}}{{!}}label4={{{map_label4|}}} }}
{{#if:{{{coordinates5|}}}|{{!}}coordinates5={{{coordinates5|}}}{{!}}label5={{{map_label5|}}} }}
{{#if:{{{coordinates6|}}}|{{!}}coordinates6={{{coordinates6|}}}{{!}}label6={{{map_label6|}}} }}
{{#if:{{{coordinates7|}}}|{{!}}coordinates7={{{coordinates7|}}}{{!}}label7={{{map_label7|}}} }}
{{#if:{{{coordinates8|}}}|{{!}}coordinates8={{{coordinates8|}}}{{!}}label8={{{map_label8|}}} }}
{{#if:{{{coordinates9|}}}|{{!}}coordinates9={{{coordinates9|}}}{{!}}label9={{{map_label9|}}} }}
{{#if:{{{coordinates10|}}}|{{!}}coordinates10={{{coordinates10|}}}{{!}}label10={{{map_label10|}}} }}
}}
}}
|-
|{{Location map|{{{map_type}}}|coordinates={{if empty|{{{map_coord|}}} | {{{coordinates|}}} }}|width={{{map_size|220}}}|float=center|border=infobox|label={{{map_label|}}}|caption={{{map_caption|Location within {{#invoke:Location map|data|{{{map_type}}}|name}} }}} }}
{{#if:{{{scope|}}}{{{type|}}}|
! style="padding-right: 1em;" {{!}} {{#if:{{{scope|}}}|Operational scope|Type}}
{{!}} {{#if:{{{scope|}}}|{{{scope}}}|{{{type}}}}}
}}
}}
|-
{{#if:{{{location|}}}{{{coordinates|}}}|
! style="padding-right: 1em;" {{!}} Location
{{!}} {{{location}}}<br/>{{{coordinates|}}}
}}
}}
|-
 
{{#if:{{{planned|}}}|
}}{{{campaignbox|}}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox military operation with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox military operation]] with unknown parameter "_VALUE_"|ignoreblank=y| alt | campaignbox | caption | casualties | commanded_by | conflict | coordinates | date | executed | executed_by | fatalities | image | image_size | image_upright | injuries | instigator | location | map_caption | map_coord | map_label | map_size | map_type | name | objective | outcome | partof | planned | planned_by | scope | subtitle | target | time | time-begin | time-end | timezone | title | type | coordinates2 | coordinates3 | coordinates4 | coordinates5 | coordinates6 | coordinates7 | coordinates8 | coordinates9 | coordinates10 | map_label2 | map_label3 | map_label4 | map_label5 | map_label6 | map_label7 | map_label8 | map_label9 | map_label10 | location2 | location3 | location4 | location5 | location6 | location7 | location8 | location9 | location10 }}<noinclude>
! style="padding-right: 1em;" {{!}} Planned
{{!}} {{{planned}}}
}}
|-
{{#if:{{{planned_by|}}}|
! style="padding-right: 1em;" {{!}} Planned&nbsp;by
{{!}} {{{planned_by}}}
}}
|-
! style="padding-right: 1em;" | {{#if:{{{target|}}}|Target|Objective}}
| {{#if:{{{target|}}}|{{{target}}}|{{{objective}}}}}
|-
{{#if:{{{executed|}}}{{{date|}}}|
! style="padding-right: 1em;" {{!}} Date
{{!}} {{#if:{{{executed|}}}|{{{executed}}}|{{{date}}}}} {{#if:{{{time|}}}|<br/>{{{time}}}|{{#if:{{{time-begin|}}}|<br/>{{{time-begin}}} &ndash; {{{time-end}}}}}}} {{#if:{{{timezone|}}}|({{{timezone}}})}}
}}
|-
{{#if:{{{executed_by|}}}{{{instigator|}}}|
! style="padding-right: 1em;" {{!}} Executed&nbsp;by
{{!}} {{#if:{{{instigator|}}}|{{{instigator}}}|{{{executed_by}}}}}
}}
|-
{{#if:{{{outcome|}}}|
! style="padding-right: 1em;" {{!}} Outcome
{{!}} {{{outcome}}}
}}
|-
{{#if:{{{casualties|}}}{{{fatalities|}}}{{{injuries|}}}|
! style="padding-right: 1em;" {{!}} Casualties
{{!}} {{#if:{{{casualties|}}}|{{{casualties}}}|{{#if:{{{fatalities|}}}|{{{fatalities|}}} killed}}<br/>{{#if:{{{injuries|}}}|{{{injuries|}}} injured}}}}
}}
|}</includeonly><noinclude>
{{template doc}}
{{template doc}}
</noinclude>
</noinclude>

Latest revision as of 15:43, 15 February 2023

Infobox military operation

Template:Template doc