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

Материал из Протест.wiki
Нет описания правки
Метка: отменено
Нет описания правки
 
(не показаны 3 промежуточные версии этого же участника)
Строка 1: Строка 1:
<includeonly>
<includeonly><div class="infobox" style="float:right; max-width:300px; margin:0 0 1em 1em;">
<!-- Надежный инфобокс на основе таблицы. -->
    <h3 class="infobox-title" style="text-align: center; margin: 0;">{{{name}}}</h3>
<table class="infobox" role="complementary"
     <div class="infobox-image" style="text-align: center; padding: 5px;">
      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;">
        [[File:{{{image}}}|200px|center|link=]]
  <tbody>
    </div>
     <tr>
 
      <td style="padding:0.6em 0.6em 0.4em 0.6em; text-align:center; font-weight:700; font-size:1.05em;">
    <div class="infobox-content">
         {{{name}}}
        {{#if:{{{status|}}}|<p><strong>Статус:</strong> {{{status}}}</p>}}
      </td>
        {{#if:{{{organization_type|}}}|<p><strong>Тип организации:</strong> {{{organization_type}}}</p>}}
    </tr>
         {{#if:{{{ideology|}}}|<p><strong>Идеология:</strong> {{{ideology}}}</p>}}
        {{#if:{{{region|}}}|<p><strong>Регион:</strong> [[:Категория:{{{region}}}|{{{region}}}]]</p>}}
        {{#if:{{{influence|}}}|<p><strong>Влияние:</strong> {{{influence}}}</p>}}


    {{#if:{{{image|}}}
        <!-- Теги -->
    |<tr>
        {{#if:{{{tags|}}}|
      <td style="padding:0 0.6em 0.6em 0.6em; text-align:center;">
        <p><strong>Теги:</strong>  
        <!-- изображение: display:block чтобы не создавать лишних пробелов -->
        {{#if:{{#explode:{{{tags}}}|,|0}}|[[:Категория:{{#explode:{{{tags}}}|,|0}}|{{#explode:{{{tags}}}|,|0}}]]}}
        [[File:{{{image}}}|200px|link=|alt={{{name}}}]]
        {{#if:{{#explode:{{{tags}}}|,|1}}|, [[:Категория:{{#explode:{{{tags}}}|,|1}}|{{#explode:{{{tags}}}|,|1}}]]}}
      </td>
        {{#if:{{#explode:{{{tags}}}|,|2}}|, [[:Категория:{{#explode:{{{tags}}}|,|2}}|{{#explode:{{{tags}}}|,|2}}]]}}
    </tr>
        {{#if:{{#explode:{{{tags}}}|,|3}}|, [[:Категория:{{#explode:{{{tags}}}|,|3}}|{{#explode:{{{tags}}}|,|3}}]]}}
    }}
        {{#if:{{#explode:{{{tags}}}|,|4}}|, [[:Категория:{{#explode:{{{tags}}}|,|4}}|{{#explode:{{{tags}}}|,|4}}]]}}
        </p>}}


    <tr><td style="padding:0; border-top:1px solid #e6eef6;"></td></tr>
        {{#if:{{{creation_date|}}}|<p><strong>Дата создания:</strong> {{{creation_date}}}</p>}}
        {{#if:{{{end_of_activity|}}}|<p><strong>Дата прекращения активности:</strong> {{{end_of_activity}}}</p>}}


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


         {{#if:{{{tags|}}|
        <!-- Лица -->
          |<div style="margin:0 0 0.5em 0;"><strong>Теги:</strong>
         {{#if:{{{persons|}}}|
            {{#if:{{#explode:{{{tags}}}|,|0}}|[[:Категория:{{#explode:{{{tags}}}|,|0}}|{{#explode:{{{tags}}}|,|0}}]]}}
        <p><strong>Лица:</strong>  
            {{#if:{{#explode:{{{tags}}}|,|1}}|, [[:Категория:{{#explode:{{{tags}}}|,|1}}|{{#explode:{{{tags}}}|,|1}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
            {{#if:{{#explode:{{{tags}}}|,|2}}|, [[:Категория:{{#explode:{{{tags}}}|,|2}}|{{#explode:{{{tags}}}|,|2}}]]}}
        {{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
          </div>
        {{#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:{{{creation_date|}}}|<div style="margin:0 0 0.5em 0;"><strong>Дата создания:</strong> {{{creation_date}}}</div>}}
         {{#if:{{{size|}}}|<p><strong>Численность:</strong> {{{size}}}</p>}}
         {{#if:{{{end_of_activity|}}}|<div style="margin:0 0 0.5em 0;"><strong>Дата прекращения активности:</strong> {{{end_of_activity}}}</div>}}
        {{#if:{{{resources|}}}|<p><strong>Ресурсы:</strong> {{{resources}}}</p>}}
        {{#if:{{{links|}}}|<p><strong>Ссылки:</strong> {{{links}}}</p>}}
         {{#if:{{{predecessor|}}}|<p><strong>Предшественник:</strong> {{{predecessor}}}</p>}}
        {{#if:{{{successor|}}}|<p><strong>Преемник:</strong> {{{successor}}}</p>}}
    </div>
</div>


        {{#if:{{{reasons_for_cessation|}}|
<!-- Автоматическое добавление категорий -->
          |<div style="margin:0 0 0.5em 0;"><strong>Причины прекращения активности:</strong>
{{#if:{{{region|}}}|[[Категория:{{{region}}}]]}}
            {{#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}}]]}}
          </div>
        }}
 
        {{#if:{{{persons|}}|
          |<div style="margin:0 0 0.5em 0;"><strong>Лица:</strong>
            {{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
            {{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
          </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:{{{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>
<noinclude>
<templatedata>
{
  "description": "Инфобокс для отображения сведений об организации с автокатегоризацией (таблица, float:right).",
  "params": {
    "name": {"label":"Название","type":"string","required":true},
    "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>
</noinclude>

Текущая версия от 07:30, 9 ноября 2025