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

Материал из Протест.wiki
Нет описания правки
Метка: отменено
Нет описания правки
Метка: ручная отмена
 
(не показано 17 промежуточных версий 2 участников)
Строка 1: Строка 1:
<includeonly>
<includeonly>
<!-- Надежный инфобокс на основе таблицы. -->
<div class="infobox" style="float:right; max-width:300px; margin:0 0 1em 1em;">  
<table class="infobox" role="complementary"
     <h3 class="infobox-title" style="text-align: center; margin: 0;">{{{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>


     {{#if:{{{image|}}}
     <div class="infobox-image" style="text-align: center; padding: 5px;">
     |<tr>
        [[File:{{{image}}}|200px|center|link=]]
      <td style="padding:0 0.6em 0.6em 0.6em; text-align:center;">
     </div>
        <!-- изображение: display:block чтобы не создавать лишних пробелов -->
 
        [[File:{{{image}}}|200px|link=|alt={{{name}}}]]
    <div class="infobox-content">
      </td>
        {{#if:{{{status|}}}|<p><strong>Статус:</strong> {{{status}}}</p>}}
    </tr>
        {{#if:{{{organization_type|}}}|<p><strong>Тип организации:</strong> {{{organization_type}}}</p>}}
    }}
        {{#if:{{{ideology|}}}|<p><strong>Идеология:</strong> {{{ideology}}}</p>}}
        {{#if:{{{region|}}}|<p><strong>Регион:</strong> [[:Категория:{{{region}}}|{{{region}}}]]</p>}}
        {{#if:{{{influence|}}}|<p><strong>Влияние:</strong> {{{influence}}}</p>}}


    <tr><td style="padding:0; border-top:1px solid #e6eef6;"></td></tr>
        <!-- Теги -->
        {{#if:{{{tags|}}}|
        <p><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}}]]}}
        {{#if:{{#explode:{{{tags}}}|,|3}}|, [[:Категория:{{#explode:{{{tags}}}|,|3}}|{{#explode:{{{tags}}}|,|3}}]]}}
        {{#if:{{#explode:{{{tags}}}|,|4}}|, [[:Категория:{{#explode:{{{tags}}}|,|4}}|{{#explode:{{{tags}}}|,|4}}]]}}
        </p>}}


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


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


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


         {{#if:{{{reasons_for_cessation|}}|
         {{#if:{{#explode:{{{persons}}}|,|3}}|,
          |<div style="margin:0 0 0.5em 0;"><strong>Причины прекращения активности:</strong>
        {{#if:{{#explode:{{{persons_articles|}}}|,|3}}
            {{#if:{{#explode:{{{reasons_for_cessation}}}|,|0}}|[[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|0}}|{{#explode:{{{reasons_for_cessation}}}|,|0}}]]}}
        | [[{{#explode:{{{persons_articles}}}|,|3}}|{{#explode:{{{persons}}}|,|3}}]]
            {{#if:{{#explode:{{{reasons_for_cessation}}}|,|1}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|1}}|{{#explode:{{{reasons_for_cessation}}}|,|1}}]]}}
        | {{#explode:{{{persons}}}|,|3}}
          </div>
        }}
         }}
         }}


         {{#if:{{{persons|}}|
         {{#if:{{#explode:{{{persons}}}|,|4}}|,
          |<div style="margin:0 0 0.5em 0;"><strong>Лица:</strong>
        {{#if:{{#explode:{{{persons_articles|}}}|,|4}}
            {{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
        | [[{{#explode:{{{persons_articles}}}|,|4}}|{{#explode:{{{persons}}}|,|4}}]]
            {{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
        | {{#explode:{{{persons}}}|,|4}}
          </div>
        }}
         }}
         }}


         {{#if:{{{size|}}}|<div style="margin:0 0 0.5em 0;"><strong>Численность:</strong> {{{size}}}</div>}}
         </p>
         {{#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:{{{size|}}}|<p><strong>Численность:</strong> {{{size}}}</p>}}
         {{#if:{{{predecessor|}}}|<div style="margin:0 0 0.5em 0;"><strong>Предшественник:</strong> {{{predecessor}}}</div>}}
         {{#if:{{{resources|}}}|<p><strong>Ресурсы:</strong> {{{resources}}}</p>}}
         {{#if:{{{successor|}}}|<div style="margin:0 0 0.5em 0;"><strong>Преемник:</strong> {{{successor}}}</div>}}
         {{#if:{{{links|}}}|<p><strong>Ссылки:</strong> {{{links}}}</p>}}
      </td>
         {{#if:{{{predecessor|}}}|<p><strong>Предшественник:</strong> {{{predecessor}}}</p>}}
     </tr>
         {{#if:{{{successor|}}}|<p><strong>Преемник:</strong> {{{successor}}}</p>}}
  </tbody>
     </div>
</table>
</div>


<!-- автоматические категории (оставляем без лишних переносов) -->
<!-- Автоматические категории -->
{{#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>
<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>

Текущая версия от 15:37, 19 декабря 2025