Шаблон:Организация: различия между версиями

Материал из Протест.wiki
Нет описания правки
Метка: отменено
Нет описания правки
Метка: ручная отмена
Строка 1: Строка 1:
<includeonly>
<includeonly><div class="infobox" style="max-width: 300px; margin: auto;">
{| class="infobox" style="float:right; width:300px; max-width:300px; margin:0 0 0.8em 1em; border:1px solid #c8d0da; background:#ffffff !important; border-collapse:collapse; box-sizing:border-box; border-radius:6px; padding:0 !important;"
    <h3 class="infobox-title" style="text-align: center; margin: 0;">{{{name}}}</h3>
|-
    <div class="infobox-image" style="text-align: center; padding: 5px;">
! style="text-align:center; padding:0.8em 0.6em 0.6em 0.6em; font-weight:700; font-size:1.05em; background:transparent !important;" | {{{name}}}
        [[File:{{{image}}}|200px|center|link=]]
{{#if:{{{image|}}}
     </div>
|-
 
| style="text-align:center; padding:0.6em 0.6em 0.6em 0.6em; background:transparent !important;" |
     <div class="infobox-content">
  {{#ifexist:File:{{{image}}}
        {{#if:{{{status|}}}|<p><strong>Статус:</strong> {{{status}}}</p>}}
    | <!-- файл существует — показываем frameless (без рамки) -->
        {{#if:{{{organization_type|}}}|<p><strong>Тип организации:</strong> {{{organization_type}}}</p>}}
      [[File:{{{image}}}|frameless|200px|alt={{{name|}}}|link=]]
        {{#if:{{{ideology|}}}|<p><strong>Идеология:</strong> {{{ideology}}}</p>}}
     | <!-- файл не найден — показываем ничего -->
        {{#if:{{{region|}}}|<p><strong>Регион:</strong> [[:Категория:{{{region}}}|{{{region}}}]]</p>}}
     }}
        {{#if:{{{influence|}}}|<p><strong>Влияние:</strong> {{{influence}}}</p>}}
}}
 
|-
        <!-- Теги -->
| style="padding:0.6em; font-size:0.92em; line-height:1.25; vertical-align:top; background:transparent !important;" |
        {{#if:{{{tags|}}}|
{{#if:{{{status|}}}|'''Статус:''' {{{status}}}<br/>}}
        <p><strong>Теги:</strong>
{{#if:{{{organization_type|}}}|'''Тип организации:''' {{{organization_type}}}<br/>}}
        {{#if:{{#explode:{{{tags}}}|,|0}}|[[:Категория:{{#explode:{{{tags}}}|,|0}}|{{#explode:{{{tags}}}|,|0}}]]}}
{{#if:{{{ideology|}}}|'''Идеология:''' {{{ideology}}}<br/>}}
        {{#if:{{#explode:{{{tags}}}|,|1}}|, [[:Категория:{{#explode:{{{tags}}}|,|1}}|{{#explode:{{{tags}}}|,|1}}]]}}
{{#if:{{{region|}}}|'''Регион:''' [[:Категория:{{{region}}}|{{{region}}}]]<br/>}}
        {{#if:{{#explode:{{{tags}}}|,|2}}|, [[:Категория:{{#explode:{{{tags}}}|,|2}}|{{#explode:{{{tags}}}|,|2}}]]}}
{{#if:{{{influence|}}}|'''Влияние:''' {{{influence}}}<br/>}}
        {{#if:{{#explode:{{{tags}}}|,|3}}|, [[:Категория:{{#explode:{{{tags}}}|,|3}}|{{#explode:{{{tags}}}|,|3}}]]}}
        {{#if:{{#explode:{{{tags}}}|,|4}}|, [[:Категория:{{#explode:{{{tags}}}|,|4}}|{{#explode:{{{tags}}}|,|4}}]]}}
        </p>}}


{{#if:{{{tags|}}}
        {{#if:{{{creation_date|}}}|<p><strong>Дата создания:</strong> {{{creation_date}}}</p>}}
|'''Теги:'''
        {{#if:{{{end_of_activity|}}}|<p><strong>Дата прекращения активности:</strong> {{{end_of_activity}}}</p>}}
{{#if:{{#explode:{{{tags}}}|,|0}}|[[:Категория:{{#explode:{{{tags}}}|,|0}}|{{#explode:{{{tags}}}|,|0}}]]}}
{{#if:{{#explode:{{{tags}}}|,|1}}|, [[:Категория:{{#explode:{{{tags}}}|,|1}}|{{#explode:{{{tags}}}|,|1}}]]}}
<br/>
}}


{{#if:{{{creation_date|}}}|'''Дата создания:''' {{{creation_date}}}<br/>}}
        <!-- Причины прекращения активности -->
{{#if:{{{end_of_activity|}}}|'''Дата прекращения активности:''' {{{end_of_activity}}}<br/>}}
        {{#if:{{{reasons_for_cessation|}}}|
        <p><strong>Причины прекращения активности:</strong>
        {{#if:{{#explode:{{{reasons_for_cessation}}}|,|0}}|[[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|0}}|{{#explode:{{{reasons_for_cessation}}}|,|0}}]]}}
        {{#if:{{#explode:{{{reasons_for_cessation}}}|,|1}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|1}}|{{#explode:{{{reasons_for_cessation}}}|,|1}}]]}}
        {{#if:{{#explode:{{{reasons_for_cessation}}}|,|2}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|2}}|{{#explode:{{{reasons_for_cessation}}}|,|2}}]]}}
        </p>}}


{{#if:{{{reasons_for_cessation|}}}
        <!-- Лица -->
|'''Причины прекращения активности:'''
        {{#if:{{{persons|}}}|
{{#if:{{#explode:{{{reasons_for_cessation}}}|,|0}}|[[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|0}}|{{#explode:{{{reasons_for_cessation}}}|,|0}}]]}}
        <p><strong>Лица:</strong>
{{#if:{{#explode:{{{reasons_for_cessation}}}|,|1}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|1}}|{{#explode:{{{reasons_for_cessation}}}|,|1}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
<br/>
        {{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
}}
        {{#if:{{#explode:{{{persons}}}|,|2}}|, [[:Категория:{{#explode:{{{persons}}}|,|2}}|{{#explode:{{{persons}}}|,|2}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|3}}|, [[:Категория:{{#explode:{{{persons}}}|,|3}}|{{#explode:{{{persons}}}|,|3}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|4}}|, [[:Категория:{{#explode:{{{persons}}}|,|4}}|{{#explode:{{{persons}}}|,|4}}]]}}
        </p>}}


{{#if:{{{persons|}}}
        {{#if:{{{size|}}}|<p><strong>Численность:</strong> {{{size}}}</p>}}
|'''Лица:'''
        {{#if:{{{resources|}}}|<p><strong>Ресурсы:</strong> {{{resources}}}</p>}}
{{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
        {{#if:{{{links|}}}|<p><strong>Ссылки:</strong> {{{links}}}</p>}}
{{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
        {{#if:{{{predecessor|}}}|<p><strong>Предшественник:</strong> {{{predecessor}}}</p>}}
<br/>
        {{#if:{{{successor|}}}|<p><strong>Преемник:</strong> {{{successor}}}</p>}}
}}
    </div>
</div>


{{#if:{{{size|}}}|'''Численность:''' {{{size}}}<br/>}}
<!-- Автоматическое добавление категорий -->
{{#if:{{{resources|}}}|'''Ресурсы:''' {{{resources}}}<br/>}}
{{#if:{{{links|}}}|'''Ссылки:''' {{{links}}}<br/>}}
{{#if:{{{predecessor|}}}|'''Предшественник:''' {{{predecessor}}}<br/>}}
{{#if:{{{successor|}}}|'''Преемник:''' {{{successor}}}<br/>}}
|}
<!-- автокатегории -->
{{#if:{{{region|}}}|[[Категория:{{{region}}}]]}}
{{#if:{{{region|}}}|[[Категория:{{{region}}}]]}}
{{#if:{{{tags|}}}
{{#if:{{{tags|}}}
  |{{#if:{{#explode:{{{tags}}}|,|0}}|[[Категория:{{#explode:{{{tags}}}|,|0}}]]}}
|{{#if:{{#explode:{{{tags}}}|,|0}}|[[Категория:{{#explode:{{{tags}}}|,|0}}]]}}
  {{#if:{{#explode:{{{tags}}}|,|1}}|[[Категория:{{#explode:{{{tags}}}|,|1}}]]}}
{{#if:{{#explode:{{{tags}}}|,|1}}|[[Категория:{{#explode:{{{tags}}}|,|1}}]]}}
{{#if:{{#explode:{{{tags}}}|,|2}}|[[Категория:{{#explode:{{{tags}}}|,|2}}]]}}
{{#if:{{#explode:{{{tags}}}|,|3}}|[[Категория:{{#explode:{{{tags}}}|,|3}}]]}}
{{#if:{{#explode:{{{tags}}}|,|4}}|[[Категория:{{#explode:{{{tags}}}|,|4}}]]}}
}}
}}
{{#if:{{{reasons_for_cessation|}}}
{{#if:{{{reasons_for_cessation|}}}
  |{{#if:{{#explode:{{{reasons_for_cessation}}}|,|0}}|[[Категория:{{#explode:{{{reasons_for_cessation}}}|,|0}}]]}}
|{{#if:{{#explode:{{{reasons_for_cessation}}}|,|0}}|[[Категория:{{#explode:{{{reasons_for_cessation}}}|,|0}}]]}}
{{#if:{{#explode:{{{reasons_for_cessation}}}|,|1}}|[[Категория:{{#explode:{{{reasons_for_cessation}}}|,|1}}]]}}
{{#if:{{#explode:{{{reasons_for_cessation}}}|,|2}}|[[Категория:{{#explode:{{{reasons_for_cessation}}}|,|2}}]]}}
}}
}}
{{#if:{{{persons|}}}
{{#if:{{{persons|}}}
  |{{#if:{{#explode:{{{persons}}}|,|0}}|[[Категория:{{#explode:{{{persons}}}|,|0}}]]}}
|{{#if:{{#explode:{{{persons}}}|,|0}}|[[Категория:{{#explode:{{{persons}}}|,|0}}]]}}
{{#if:{{#explode:{{{persons}}}|,|1}}|[[Категория:{{#explode:{{{persons}}}|,|1}}]]}}
{{#if:{{#explode:{{{persons}}}|,|2}}|[[Категория:{{#explode:{{{persons}}}|,|2}}]]}}
{{#if:{{#explode:{{{persons}}}|,|3}}|[[Категория:{{#explode:{{{persons}}}|,|3}}]]}}
{{#if:{{#explode:{{{persons}}}|,|4}}|[[Категория:{{#explode:{{{persons}}}|,|4}}]]}}
}}
}}
[[Категория:Организации]]
[[Категория:Организации]]
</includeonly>
</includeonly>
Строка 68: Строка 82:
<templatedata>
<templatedata>
{
{
  "description": "Инфобокс для организации — таблица, показывается справа.",
    "description": "Инфобокс для отображения сведений об организации или партии с автокатегоризацией.",
  "params": {
    "params": {
    "name": {"label":"Название","type":"string","required":true},
        "name": {"label": "Название", "type": "string", "required": true},
    "image": {"label":"Имя файла (без 'File:'), например: Logo.png","type":"string"}
        "image": {"label": "Изображение", "type": "string"},
  }
        "status": {"label": "Статус", "type": "string"},
        "organization_type": {"label": "Тип организации", "type": "string"},
        "ideology": {"label": "Идеология", "type": "string"},
        "region": {"label": "Регион", "type": "string"},
        "influence": {"label": "Влияние", "type": "string"},
        "tags": {"label": "Теги", "type": "string"},
        "creation_date": {"label": "Дата создания", "type": "string"},
        "end_of_activity": {"label": "Дата прекращения активности", "type": "string"},
        "reasons_for_cessation": {"label": "Причины прекращения активности", "type": "string"},
        "persons": {"label": "Лица", "type": "string"},
        "size": {"label": "Численность", "type": "string"},
        "resources": {"label": "Ресурсы", "type": "string"},
        "links": {"label": "Ссылки", "type": "string"},
        "predecessor": {"label": "Предшественник", "type": "string"},
        "successor": {"label": "Преемник", "type": "string"}
    }
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Версия от 07:27, 9 ноября 2025


Инфобокс для отображения сведений об организации или партии с автокатегоризацией.

Параметры шаблона

ПараметрОписаниеТипСтатус
Названиеname

без описания

Строковый (без форматирования)обязательный
Изображениеimage

без описания

Строковый (без форматирования)необязательный
Статусstatus

без описания

Строковый (без форматирования)необязательный
Тип организацииorganization_type

без описания

Строковый (без форматирования)необязательный
Идеологияideology

без описания

Строковый (без форматирования)необязательный
Регионregion

без описания

Строковый (без форматирования)необязательный
Влияниеinfluence

без описания

Строковый (без форматирования)необязательный
Тегиtags

без описания

Строковый (без форматирования)необязательный
Дата созданияcreation_date

без описания

Строковый (без форматирования)необязательный
Дата прекращения активностиend_of_activity

без описания

Строковый (без форматирования)необязательный
Причины прекращения активностиreasons_for_cessation

без описания

Строковый (без форматирования)необязательный
Лицаpersons

без описания

Строковый (без форматирования)необязательный
Численностьsize

без описания

Строковый (без форматирования)необязательный
Ресурсыresources

без описания

Строковый (без форматирования)необязательный
Ссылкиlinks

без описания

Строковый (без форматирования)необязательный
Предшественникpredecessor

без описания

Строковый (без форматирования)необязательный
Преемникsuccessor

без описания

Строковый (без форматирования)необязательный