Шаблон:Партия: различия между версиями

Материал из Протест.wiki
Нет описания правки
Нет описания правки
 
Строка 2: Строка 2:
<div class="infobox" style="max-width: 300px; margin: auto;">  
<div class="infobox" style="max-width: 300px; margin: auto;">  
     <h3 class="infobox-title" style="text-align: center; margin: 0;">{{{name}}}</h3>
     <h3 class="infobox-title" style="text-align: center; margin: 0;">{{{name}}}</h3>
    {{#if:{{{image|}}}|
     <div class="infobox-image" style="text-align: center; padding: 5px;">
     <div class="infobox-image" style="text-align: center; padding: 5px;">
         [[File:{{{image}}}|200px|center|link=]]
         [[File:{{{image}}}|200px|center|link=]]
     </div>
     </div>
 
    }}
 
     <div class="infobox-content">
     <div class="infobox-content">
         {{#if:{{{status|}}}|<p><strong>Статус:</strong> {{{status}}}</p>}}
         {{#if:{{{status|}}}|<p><strong>Статус:</strong> {{{status}}}</p>}}
Строка 18: Строка 21:
         {{#if:{{#explode:{{{tags}}}|,|3}}|, [[:Категория:{{#explode:{{{tags}}}|,|3}}|{{#explode:{{{tags}}}|,|3}}]]}}
         {{#if:{{#explode:{{{tags}}}|,|3}}|, [[:Категория:{{#explode:{{{tags}}}|,|3}}|{{#explode:{{{tags}}}|,|3}}]]}}
         {{#if:{{#explode:{{{tags}}}|,|4}}|, [[:Категория:{{#explode:{{{tags}}}|,|4}}|{{#explode:{{{tags}}}|,|4}}]]}}
         {{#if:{{#explode:{{{tags}}}|,|4}}|, [[:Категория:{{#explode:{{{tags}}}|,|4}}|{{#explode:{{{tags}}}|,|4}}]]}}
         </p>}}
         </p>
        }}


         {{#if:{{{creation_date|}}}|<p><strong>Дата создания:</strong> {{{creation_date}}}</p>}}
         {{#if:{{{creation_date|}}}|<p><strong>Дата создания:</strong> {{{creation_date}}}</p>}}
Строка 28: Строка 32:
         {{#if:{{#explode:{{{reasons_for_cessation}}}|,|1}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|1}}|{{#explode:{{{reasons_for_cessation}}}|,|1}}]]}}
         {{#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}}]]}}
         {{#if:{{#explode:{{{reasons_for_cessation}}}|,|2}}|, [[:Категория:{{#explode:{{{reasons_for_cessation}}}|,|2}}|{{#explode:{{{reasons_for_cessation}}}|,|2}}]]}}
         </p>}}
         </p>
        }}


        <!-- Лица (с поддержкой альтернативных названий статей) -->
         {{#if:{{{persons|}}}|
         {{#if:{{{persons|}}}|
         <p><strong>Лица:</strong>  
         <p><strong>Лица:</strong>
         {{#if:{{#explode:{{{persons}}}|,|0}}|[[:Категория:{{#explode:{{{persons}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]}}
 
         {{#if:{{#explode:{{{persons}}}|,|1}}|, [[:Категория:{{#explode:{{{persons}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]}}
         {{#if:{{#explode:{{{persons}}}|,|0}}|
         {{#if:{{#explode:{{{persons}}}|,|2}}|, [[:Категория:{{#explode:{{{persons}}}|,|2}}|{{#explode:{{{persons}}}|,|2}}]]}}
        {{#if:{{#explode:{{{persons_articles|}}}|,|0}}
         {{#if:{{#explode:{{{persons}}}|,|3}}|, [[:Категория:{{#explode:{{{persons}}}|,|3}}|{{#explode:{{{persons}}}|,|3}}]]}}
        | [[{{#explode:{{{persons_articles}}}|,|0}}|{{#explode:{{{persons}}}|,|0}}]]
         {{#if:{{#explode:{{{persons}}}|,|4}}|, [[:Категория:{{#explode:{{{persons}}}|,|4}}|{{#explode:{{{persons}}}|,|4}}]]}}
        | {{#explode:{{{persons}}}|,|0}}
         </p>}}
        }}
        }}
 
         {{#if:{{#explode:{{{persons}}}|,|1}}|,
        {{#if:{{#explode:{{{persons_articles|}}}|,|1}}
        | [[{{#explode:{{{persons_articles}}}|,|1}}|{{#explode:{{{persons}}}|,|1}}]]
        | {{#explode:{{{persons}}}|,|1}}
        }}
        }}
 
         {{#if:{{#explode:{{{persons}}}|,|2}}|,
        {{#if:{{#explode:{{{persons_articles|}}}|,|2}}
        | [[{{#explode:{{{persons_articles}}}|,|2}}|{{#explode:{{{persons}}}|,|2}}]]
        | {{#explode:{{{persons}}}|,|2}}
        }}
        }}
 
         {{#if:{{#explode:{{{persons}}}|,|3}}|,
        {{#if:{{#explode:{{{persons_articles|}}}|,|3}}
        | [[{{#explode:{{{persons_articles}}}|,|3}}|{{#explode:{{{persons}}}|,|3}}]]
        | {{#explode:{{{persons}}}|,|3}}
        }}
        }}
 
         {{#if:{{#explode:{{{persons}}}|,|4}}|,
        {{#if:{{#explode:{{{persons_articles|}}}|,|4}}
        | [[{{#explode:{{{persons_articles}}}|,|4}}|{{#explode:{{{persons}}}|,|4}}]]
        | {{#explode:{{{persons}}}|,|4}}
        }}
        }}
 
         </p>
        }}


         {{#if:{{{size|}}}|<p><strong>Численность:</strong> {{{size}}}</p>}}
         {{#if:{{{size|}}}|<p><strong>Численность:</strong> {{{size}}}</p>}}
Строка 47: Строка 85:
</div>
</div>


<!-- Автоматическое добавление категорий -->
<!-- Автоматические категории -->
{{#if:{{{tags|}}}
{{#if:{{{tags|}}}
|{{#if:{{#explode:{{{tags}}}|,|0}}|[[Категория:{{#explode:{{{tags}}}|,|0}}]]}}
|{{#if:{{#explode:{{{tags}}}|,|0}}|[[Категория:{{#explode:{{{tags}}}|,|0}}]]}}
Строка 70: Строка 108:
}}
}}
</includeonly>
</includeonly>
<noinclude>
<templatedata>
{
    "description": "Шаблон для отображения информации об организации или партии в формате инфобокса.",
    "params": {
        "name": {"label": "Название", "type": "string", "required": true},
        "image": {"label": "Изображение", "type": "string"},
        "status": {"label": "Статус", "type": "string"},
        "ideology": {"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>

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