Template: ResearchProject: Difference between revisions
From Innovation
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
</pre> | </pre> | ||
The status badge (진행 중 / 종료 / 예정) is computed automatically from <code>StartDate</code> and <code>EndDate</code> by comparing them to the current year/month. <code>YYYY-MM</code> format is required | The status badge (진행 중 / 종료 / 예정) is computed automatically from <code>StartDate</code> and <code>EndDate</code> by comparing them to the current year/month. <code>YYYY-MM</code> format is required. | ||
This template requires the [[mw:Extension:ParserFunctions|ParserFunctions]] | This template requires only the standard [[mw:Extension:ParserFunctions|ParserFunctions]] extension (bundled with most MediaWiki installs) — it uses <code>{{#time:}}</code>, <code>{{#expr:}}</code>, <code>{{#ifexpr:}}</code>, and <code>{{#switch:}}</code>. | ||
== SMW properties == | == SMW properties == | ||
| Line 27: | Line 27: | ||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude><includeonly><div style="background:#ffffff; border:1px solid #e5e5e0; border-radius:12px; padding:24px 26px; margin:0 0 1.5em; max-width:760px;">{{# | </noinclude><includeonly><div style="background:#ffffff; border:1px solid #e5e5e0; border-radius:12px; padding:24px 26px; margin:0 0 1.5em; max-width:760px;">{{#switch: {{#ifexpr: {{#time:Ym|{{{StartDate|1900-01}}}}} > {{#time:Ym}} | upcoming | {{#ifexpr: {{#time:Ym|{{{EndDate|1900-01}}}}} < {{#time:Ym}} | ended | active }} }} | ||
| active = <span style="display:inline-block; padding:3px 10px; font-size:11px; font-weight:500; border-radius:999px; background:#E1F5EE; color:#0F6E56; margin-bottom:8px;">● 진행 중</span> | | active = <span style="display:inline-block; padding:3px 10px; font-size:11px; font-weight:500; border-radius:999px; background:#E1F5EE; color:#0F6E56; margin-bottom:8px;">● 진행 중</span> | ||
| ended = <span style="display:inline-block; padding:3px 10px; font-size:11px; font-weight:500; border-radius:999px; background:#f1efe8; color:#5F5E5A; margin-bottom:8px;">● 종료</span> | | ended = <span style="display:inline-block; padding:3px 10px; font-size:11px; font-weight:500; border-radius:999px; background:#f1efe8; color:#5F5E5A; margin-bottom:8px;">● 종료</span> | ||
Revision as of 00:10, 4 May 2026
Usage
A modern, badge-styled infobox for research project pages.
{{ResearchProject
| ProjectName = Full official project name
| StartDate = 2024-06
| EndDate = 2025-01
| FundingAgency = National Research Foundation of Korea
| FundingProgram = LINC 3.0
| GovernmentMinistry = Ministry of Education
}}
The status badge (진행 중 / 종료 / 예정) is computed automatically from StartDate and EndDate by comparing them to the current year/month. YYYY-MM format is required.
This template requires only the standard ParserFunctions extension (bundled with most MediaWiki installs) — it uses , , , and .
SMW properties
- Property:ProjectName (Text) — 연구과제명
- Property:StartDate (Date) — 연구시작일
- Property:EndDate (Date) — 연구종료일
- Property:FundingAgency (Page) — 연구비지원기관
- Property:FundingProgram (Page) — 연구비지원사업
- Property:GovernmentMinistry (Page) — 소관정부부처명