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

Материал из Протест.wiki
Нет описания правки
Метка: отменено
Нет описания правки
Метка: отменено
Строка 1: Строка 1:
<includeonly>
<includeonly>
<!-- Инфобокс: делаем inline-block + float:right чтобы не ломать поток абзаца -->
<!-- Надежный инфобокс на основе таблицы. -->
<div class="infobox" role="complementary" style="float:right; display:inline-block; vertical-align:top; width:300px; max-width:300px; margin:0 0 0.6em 1em; box-sizing:border-box;">
<table class="infobox" role="complementary"
   <h3 class="infobox-title" style="text-align:center; margin:0 0 0.4em 0; padding:0; font-size:1.1em;">{{{name}}}</h3>
      style="float:right; width:300px; max-width:300px; margin:0 0 0.8em 1em; border:1px solid #c8d0da; background:#fff; border-collapse:collapse; box-sizing:border-box;">
   <tbody>
    <tr>
      <td style="padding:0.6em 0.6em 0.4em 0.6em; text-align:center; font-weight:700; font-size:1.05em;">
        {{{name}}}
      </td>
    </tr>


  <div class="infobox-image" style="text-align:center; padding:0 0 0.4em 0; margin:0;">
    {{#if:{{{image|}}}
    [[File:{{{image}}}|200px|center|link=]]
    |<tr>
  </div>
      <td style="padding:0 0.6em 0.6em 0.6em; text-align:center;">
        <!-- изображение: display:block чтобы не создавать лишних пробелов -->
        [[File:{{{image}}}|200px|link=|alt={{{name}}}]]
      </td>
    </tr>
    }}


  <div class="infobox-content" style="font-size:90%; line-height:1.2; margin:0; padding:0;">
     <tr><td style="padding:0; border-top:1px solid #e6eef6;"></td></tr>
     {{#if:{{{status|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Статус:</strong> {{{status}}}</p>}}
    {{#if:{{{organization_type|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Тип организации:</strong> {{{organization_type}}}</p>}}
    {{#if:{{{ideology|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Идеология:</strong> {{{ideology}}}</p>}}
    {{#if:{{{region|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Регион:</strong> [[:Категория:{{{region}}}|{{{region}}}]]</p>}}
    {{#if:{{{influence|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Влияние:</strong> {{{influence}}}</p>}}


     {{#if:{{{tags|}}|
     <tr>
      |<p style="margin:0 0 0.35em 0; padding:0;"><strong>Теги:</strong>
      <td style="padding:0.5em 0.6em; font-size:0.92em; line-height:1.25;">
        {{#if:{{#explode:{{{tags}}}|,|0}}|[[:Категория:{{#explode:{{{tags}}}|,|0}}|{{#explode:{{{tags}}}|,|0}}]]}}
        {{#if:{{{status|}}}|<div style="margin:0 0 0.5em 0;"><strong>Статус:</strong> {{{status}}}</div>}}
         {{#if:{{#explode:{{{tags}}}|,|1}}|, [[:Категория:{{#explode:{{{tags}}}|,|1}}|{{#explode:{{{tags}}}|,|1}}]]}}
        {{#if:{{{organization_type|}}}|<div style="margin:0 0 0.5em 0;"><strong>Тип организации:</strong> {{{organization_type}}}</div>}}
         {{#if:{{#explode:{{{tags}}}|,|2}}|, [[:Категория:{{#explode:{{{tags}}}|,|2}}|{{#explode:{{{tags}}}|,|2}}]]}}
         {{#if:{{{ideology|}}}|<div style="margin:0 0 0.5em 0;"><strong>Идеология:</strong> {{{ideology}}}</div>}}
        {{#if:{{#explode:{{{tags}}}|,|3}}|, [[:Категория:{{#explode:{{{tags}}}|,|3}}|{{#explode:{{{tags}}}|,|3}}]]}}
         {{#if:{{{region|}}}|<div style="margin:0 0 0.5em 0;"><strong>Регион:</strong> [[:Категория:{{{region}}}|{{{region}}}]]</div>}}
         {{#if:{{#explode:{{{tags}}}|,|4}}|, [[:Категория:{{#explode:{{{tags}}}|,|4}}|{{#explode:{{{tags}}}|,|4}}]]}}
         {{#if:{{{influence|}}}|<div style="margin:0 0 0.5em 0;"><strong>Влияние:</strong> {{{influence}}}</div>}}
      </p>
    }}}


    {{#if:{{{creation_date|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Дата создания:</strong> {{{creation_date}}}</p>}}
        {{#if:{{{tags|}}|
    {{#if:{{{end_of_activity|}}}|<p style="margin:0 0 0.35em 0; padding:0;"><strong>Дата прекращения активности:</strong> {{{end_of_activity}}}</p>}}
          |<div style="margin:0 0 0.5em 0;"><strong>Теги:</strong>
            {{#if:{{#explode:{{{tags}}}|,|0}}|[[:Категория:{{#explode:{{{tags}}}|,|0}}|{{#explode:{{{tags}}}|,|0}}]]}}
            {{#if:{{#explode:{{{tags}}}|,|1}}|, [[:Категория:{{#explode:{{{tags}}}|,|1}}|{{#explode:{{{tags}}}|,|1}}]]}}
            {{#if:{{#explode:{{{tags}}}|,|2}}|, [[:Категория:{{#explode:{{{tags}}}|,|2}}|{{#explode:{{{tags}}}|,|2}}]]}}
          </div>
        }}


    {{#if:{{{reasons_for_cessation|}}|
        {{#if:{{{creation_date|}}}|<div style="margin:0 0 0.5em 0;"><strong>Дата создания:</strong> {{{creation_date}}}</div>}}
      |<p style="margin:0 0 0.35em 0; padding:0;"><strong>Причины прекращения активности:</strong>
         {{#if:{{{end_of_activity|}}}|<div style="margin:0 0 0.5em 0;"><strong>Дата прекращения активности:</strong> {{{end_of_activity}}}</div>}}
        {{#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:{{{persons|}}|
        {{#if:{{{reasons_for_cessation|}}|
      |<p style="margin:0 0 0.35em 0; padding:0;"><strong>Лица:</strong>
          |<div style="margin:0 0 0.5em 0;"><strong>Причины прекращения активности:</strong>
        {{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
            {{#if:{{#explode:{{{reasons_for_cessation}}}|,|0}}|[[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|0}}|{{#explode:{{{reasons_for_cessation}}}|,|0}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
            {{#if:{{#explode:{{{reasons_for_cessation}}}|,|1}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|1}}|{{#explode:{{{reasons_for_cessation}}}|,|1}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|2}}|, [[:Категория:{{#explode:{{{persons}}}|,|2}}|{{#explode:{{{persons}}}|,|2}}]]}}
          </div>
        {{#if:{{#explode:{{{persons}}}|,|3}}|, [[:Категория:{{#explode:{{{persons}}}|,|3}}|{{#explode:{{{persons}}}|,|3}}]]}}
        }}
        {{#if:{{#explode:{{{persons}}}|,|4}}|, [[:Категория:{{#explode:{{{persons}}}|,|4}}|{{#explode:{{{persons}}}|,|4}}]]}}
      </p>
    }}}


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


<!-- Автоматическое добавление категорий (сохраняем как было, без лишних отступов) -->
        {{#if:{{{size|}}}|<div style="margin:0 0 0.5em 0;"><strong>Численность:</strong> {{{size}}}</div>}}
        {{#if:{{{resources|}}}|<div style="margin:0 0 0.5em 0;"><strong>Ресурсы:</strong> {{{resources}}}</div>}}
        {{#if:{{{links|}}}|<div style="margin:0 0 0.5em 0;"><strong>Ссылки:</strong> {{{links}}}</div>}}
        {{#if:{{{predecessor|}}}|<div style="margin:0 0 0.5em 0;"><strong>Предшественник:</strong> {{{predecessor}}}</div>}}
        {{#if:{{{successor|}}}|<div style="margin:0 0 0.5em 0;"><strong>Преемник:</strong> {{{successor}}}</div>}}
      </td>
    </tr>
  </tbody>
</table>
 
<!-- автоматические категории (оставляем без лишних переносов) -->
{{#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>
Строка 85: Строка 82:
<templatedata>
<templatedata>
{
{
   "description": "Инфобокс для отображения сведений об организации или партии с автокатегоризацией.",
   "description": "Инфобокс для отображения сведений об организации с автокатегоризацией (таблица, float:right).",
   "params": {
   "params": {
     "name": {"label":"Название","type":"string","required":true},
     "name": {"label":"Название","type":"string","required":true},

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


Инфобокс для отображения сведений об организации с автокатегоризацией (таблица, float:right).

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

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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

без описания

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