Difference between revisions of "Template:Honor landing"
(115 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | <noinclude><translate><!--T:21--> | ||
+ | </noinclude> | ||
+ | |||
+ | <!--T:22--> | ||
<noinclude> | <noinclude> | ||
+ | This template captures an honor's metadata and formats its landing page. | ||
+ | |||
+ | ==Parameters== <!--T:9--> | ||
+ | ;honorname: Name of the honor as it should be displayed at the top of the banner. | ||
+ | ;category: Category to which the honor belongs. | ||
+ | ;skill: Skill level of the honor (1, 2, or 3) | ||
+ | ;year: The year the honor was introduced | ||
+ | ;instructor: If an instructor is required, define this to any non-blank text. If the value specified is ''licensed, certified, skilled,'' or ''qualfied'', the honor will be added to [[:Category:Instructor Required/Licensed]], [[:Category:Instructor Required/Skilled]], or [[:Category:Instructor Required/Qualified]]. All honors that have this field set to anything (including the special values listed above) will be added to [[:Category:Instructor Required]]. | ||
+ | ;authority: The highest level organization in the church which has approved the honor. | ||
+ | ;insignia: Filename for the patch's image. If specified, the honor will be placed in [[:Category:Has insignia image]]. If omitted or if set to No_patch.png, the honor will be placed in [[:Category:No insignia image]]. | ||
+ | ;insignia_source: If the insignia is not carried by Advent''Source'', this variable will indicate where it can be obtained. If set, it will also superimpose a "Not available at Advent''Source''" warning across the insignia image. We are required to splash this warning by the NAD (our host). | ||
+ | ;primary: If this honor has variants depending on where it is taught (because the answer key is different, or because the requirements are different), this argument should indicate which page is the primary version of the honor. Because the wiki is hosted by the NAD, any NAD variant will be considered primary. Otherwise, the primary version will be the highest authority level. If left blank, this variant of the honor will be considered the primary version. If set, this variant will be marked as secondary and it will not show up in the main indices. Do not add this parameter to the honor that is the primary variant - add it to the ones that are not primary. | ||
+ | ;field_trip: This field can be set to "required" or "optional". If the honor cannot be earned without a field trip, set it to "required". If one of the requirements can be met by taking a field trip, set it to "optional". If no field trip is mentioned in the requirements, this parameter should be omitted. | ||
+ | ;challenge: This parameter should use the reqreq template to reproduce the requirement that is deemed most difficult. See the example for how to format it. If the requirement has subrequirements they can be added too, but should be indented. Try to pick just one requirement for this designation. | ||
+ | ;master1 and master2: If the honor is a component of a Master Award, the value assigned to master1 should indicate which award that is. If it's part of two Master Awards, master2 can be used to assign it to a second one. If the honor is part of a Master Award by virtue of being in a broad honor category (such as Arts, Crafts and Hobbies), this parameter should not be used to specify the Master Award since the {{{category}}} parameter will already have that information. | ||
+ | ;master_group1 and master_group2: Some Master Awards (such as Naturalist) are set up to require the Pathfinder to earn N honors from one List, and M from another (where N+M usually equals 7). If this honor belongs to one of those groups, add this parameter to identify the sub-group. This parameter will be ignored unless master1 (or master2) is filled in. | ||
+ | |||
+ | ==TODO== <!--T:10--> | ||
+ | Figure out how to do the IA Connection. The Master Award had been done by invoking the Master_Award template which took three arguments: honor, master, and an optional group. I'm not stoked about how I'm managing that above, but I'm not convinced there's a better way. The IA_Connection template also takes multiple parameters, so if we can't think of a better way to do the Master_Award, we'll just have to repeat that approach for IA. | ||
+ | |||
+ | <!--T:11--> | ||
+ | See_Also feature - I still need to look at how this was done on the old version. | ||
+ | |||
+ | ==Example== <!--T:12--> | ||
+ | <nowiki>{{Honor_landing</nowiki><br /> | ||
+ | |honorname=Aboriginal Lore<br /> | ||
+ | |skill=1<br /> | ||
+ | |year=2006<br /> | ||
+ | |category=Arts, Crafts and Hobbies<br /> | ||
+ | |authority=General Conference<br /> | ||
+ | |insignia=Aboriginal Lore AY Honor.png<br /> | ||
+ | |insignia_source=test<br /> | ||
+ | |challenge=<br /> | ||
+ | <nowiki><b>{{reqreq|page={{PAGENAME}}|num=3}}</b></nowiki><br /> | ||
+ | <nowiki>:<b>{{reqreq|page={{PAGENAME}}|num=3a|dispreq=a}}</b></nowiki><br /> | ||
+ | <nowiki>:<b>{{reqreq|page={{PAGENAME}}|num=3b|dispreq=b}}</b></nowiki><br /> | ||
+ | <nowiki>:<b>{{reqreq|page={{PAGENAME}}|num=3c|dispreq=c}}</b></nowiki><br /> | ||
+ | }} | ||
+ | |||
+ | <!--T:13--> | ||
{{Honor_landing | {{Honor_landing | ||
− | |honorname=Aboriginal Lore | + | |honorname=Aboriginal Lore<noinclude></translate></noinclude><noinclude> |
|skill=1 | |skill=1 | ||
|year=2006 | |year=2006 | ||
− | |category=Arts, Crafts | + | |category=Arts, Crafts and Hobbies |
|authority=General Conference | |authority=General Conference | ||
− | |insignia= | + | |insignia= |
− | | | + | |insignia_source=test</noinclude><noinclude><translate><!--T:18--> |
− | }} | + | </noinclude><noinclude> |
+ | |challenge= | ||
+ | <b>{{reqreq|page={{PAGENAME}}|num=3}}</b> | ||
+ | :<b>{{reqreq|page={{PAGENAME}}|num=3a|dispreq=a}}</b> | ||
+ | :<b>{{reqreq|page={{PAGENAME}}|num=3b|dispreq=b}}</b> | ||
+ | :<b>{{reqreq|page={{PAGENAME}}|num=3c|dispreq=c}}</b> | ||
+ | }} | ||
− | </noinclude><includeonly> | + | <!--T:3--> |
− | + | </noinclude><includeonly><languages /> __NOTOC__ | |
− | <div class="container"> | + | <div class="container mw-parser-output"> |
<div class="row"> | <div class="row"> | ||
<div class="col-md-3 order-md-last"> | <div class="col-md-3 order-md-last"> | ||
− | {{ | + | <div style="position: sticky; top: calc(80px + 1em);">{{Honor_infobox |
− | |honorname={{{honorname}}} | + | |honorname={{{honorname}}}<noinclude></translate></noinclude> |
− | |skill={{{skill| | + | |skill={{{skill|}}} |
− | |year={{{year| | + | |year={{{year|}}} |
− | |category={{{category}}} | + | |category={{{category|}}} |
− | |authority={{{authority}}} | + | |authority={{{authority|}}} |
− | |insignia={{{insignia}}} | + | |insignia={{{insignia|}}} |
− | {{ | + | |insignia_source={{{insignia_source|}}} |
+ | |field_trip={{{field_trip|}}} | ||
+ | |instructor={{{instructor|}}} | ||
+ | |master1={{{master1|}}} | ||
+ | |master2={{{master2|}}} | ||
+ | |advanced={{#var:advanced}} | ||
}} | }} | ||
− | </div> | + | <noinclude><translate><!--T:19--> |
+ | </noinclude> | ||
+ | </div><!--close sticky container--> | ||
+ | </div><!--close column--> | ||
<div class="col-md-9"> | <div class="col-md-9"> | ||
<ul class="nav nav-tabs" id="myTab" role="tablist"> | <ul class="nav nav-tabs" id="myTab" role="tablist"> | ||
<li class="nav-item" role="presentation"> | <li class="nav-item" role="presentation"> | ||
− | <htmltag tagname="a" href="#overview" class="nav-link active" id="overview-tab" data-toggle="tab" role="tab" aria-controls="overview" aria-selected="true">{{ | + | <htmltag tagname="a" href="#overview" class="nav-link active" id="overview-tab" data-toggle="tab" role="tab" aria-controls="overview" aria-selected="true">{{Localize|Overview}}</htmltag> |
</li> | </li> | ||
<li class="nav-item" role="presentation"> | <li class="nav-item" role="presentation"> | ||
− | <htmltag tagname="a" href="#requirements" class="nav-link" id="requirements-tab" data-toggle="tab" role="tab" aria-controls="requirements" aria-selected="false">{{ | + | <htmltag tagname="a" href="#requirements" class="nav-link" id="requirements-tab" data-toggle="tab" role="tab" aria-controls="requirements" aria-selected="false">{{Localize|Requirements}}</htmltag> |
</li> | </li> | ||
<li class="nav-item" role="presentation"> | <li class="nav-item" role="presentation"> | ||
− | <htmltag tagname="a" href="#answerkey" class="nav-link" id="answerkey-tab" data-toggle="tab" role="tab" aria-controls="answerkey" aria-selected="false">{{ | + | <htmltag tagname="a" href="#answerkey" class="nav-link" id="answerkey-tab" data-toggle="tab" role="tab" aria-controls="answerkey" aria-selected="false">{{Localize|Answer Key}}</htmltag> |
</li> | </li> | ||
+ | <!-- Disable Lesson plans until we have some--> | ||
<li class="nav-item" role="presentation"> | <li class="nav-item" role="presentation"> | ||
− | <htmltag tagname="a" href="#lessonplans" class="nav-link" id="lessonplans-tab" data-toggle="tab" role="tab" aria-controls="lessonplans" aria-selected="false">{{ | + | <htmltag tagname="a" href="#lessonplans" class="nav-link" id="lessonplans-tab" data-toggle="tab" role="tab" aria-controls="lessonplans" aria-selected="false">{{Localize|Lesson Plans}}</htmltag> |
</li> | </li> | ||
+ | <!--Lesson plan disable end --> | ||
+ | {{#vardefine:hasWorksheet | ||
+ | |{{#ifexist:{{#titleparts:{{PAGENAME}}|2}}/Worksheet{{GetLangSuffix}}|true|false}}}} | ||
+ | |||
+ | {{#ifeq:{{#var:hasWorksheet}}|true| | ||
<li class="nav-item" role="presentation"> | <li class="nav-item" role="presentation"> | ||
− | <htmltag tagname="a" href="#worksheet" class="nav-link" id="worksheet-tab" data-toggle="tab" role="tab" aria-controls="worksheet" aria-selected="false">{{ | + | <htmltag tagname="a" href="#worksheet" class="nav-link" id="worksheet-tab" data-toggle="tab" role="tab" aria-controls="worksheet" aria-selected="false">{{Localize|Worksheet}}</htmltag> |
</li> | </li> | ||
+ | }} | ||
</ul> | </ul> | ||
<div class="tab-content" id="myTabContent"> | <div class="tab-content" id="myTabContent"> | ||
<div class="tab-pane fade show active" id="overview" role="tabpanel" aria-labelledby="overview-tab"> | <div class="tab-pane fade show active" id="overview" role="tabpanel" aria-labelledby="overview-tab"> | ||
− | {{{ | + | {{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Overview{{GetLangSuffix}}|Body}} |
+ | |||
+ | <!--T:4--> | ||
+ | {{Localize|Challenging Part}} | ||
− | { | + | <!--T:5--> |
+ | {{{challenge|}}} | ||
</div> | </div> | ||
<div class="tab-pane fade show" id="requirements" role="tabpanel" aria-labelledby="requirements-tab"> | <div class="tab-pane fade show" id="requirements" role="tabpanel" aria-labelledby="requirements-tab"> | ||
− | + | {{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Requirements{{GetLangSuffix}}|Body}} | |
− | |||
</div> | </div> | ||
<div class="tab-pane fade" id="answerkey" role="tabpanel" aria-labelledby="answerkey-tab"> | <div class="tab-pane fade" id="answerkey" role="tabpanel" aria-labelledby="answerkey-tab"> | ||
− | + | [{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|action=edit}} {{Localize|Edit Answer Key}}] | |
− | |||
+ | <!--T:6--> | ||
{{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|Body}} | {{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|Body}} | ||
</div> | </div> | ||
Line 63: | Line 131: | ||
</div> | </div> | ||
<div class="tab-pane fade" id="worksheet" role="tabpanel" aria-labelledby="worksheet-tab"> | <div class="tab-pane fade" id="worksheet" role="tabpanel" aria-labelledby="worksheet-tab"> | ||
− | {{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Worksheet{{GetLangSuffix}}|Body}} | + | {{#ifeq:{{#var:hasWorksheet}}|true |
+ | |{{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Worksheet{{GetLangSuffix}}|Body}}}} | ||
</div> | </div> | ||
</div> <!-- close tabs-content div --> | </div> <!-- close tabs-content div --> | ||
Line 70: | Line 139: | ||
</div> <!-- close container div --> | </div> <!-- close container div --> | ||
</includeonly> | </includeonly> | ||
+ | |||
+ | <!--T:14--> | ||
+ | <!-- | ||
+ | If {{NAMESPACE}} is defined the template has not been invoked from the Main namespace, so we can just add | ||
+ | the template to [[Category:Honor templates]]. Otherwise, we add the page to any of many various categories as per the parameters. | ||
+ | --> | ||
+ | {{#if:{{NAMESPACE}}|[[Category:Honor templates]]| | ||
+ | {{#ifexist:{{#titleparts:{{PAGENAME}}|2|1}} - Advanced|[[Category:AY Honors/Honors with an Advanced Option{{GetLangSuffix}}|{{{honorname}}}]]}} | ||
+ | {{#if:{{{insignia|}}}| | ||
+ | {{#ifeq:{{{insignia}}}|{{Localize|No Patch}} | ||
+ | |[[Category:No insignia image{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | |[[Category:Has insignia image{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | }} | ||
+ | |[[Category:No insignia image{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | }} | ||
+ | {{#switch:{{{category}}} | ||
+ | | Arts, Crafts and Hobbies =[[Category:AY Honors/Artisan Master Award{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | | Outdoor Industries =[[Category:AY Honors/Farming Master Award{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | | Household Arts =[[Category:AY Honors/Homemaking Master Award{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | | Vocational =[[Category:AY Honors/Technician Master Award{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | | ADRA =[[Category:AY Honors/ADRA Master Award/ADRA{{GetLangSuffix}}|{{{honorname}}}]][[Category:AY Honors/ADRA Master Award{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | }} | ||
+ | {{#if:{{{primary|}}}|[[Category:AY Honors/Secondary|{{{honorname}}}]]| | ||
+ | {{#ifeq:{{SUBPAGENAME}}|en|[[Category:AY Honors/Secondary|{{{honorname}}}]] | ||
+ | |[[Category:AY Honors/Primary|{{{honorname}}}]] | ||
+ | }} | ||
+ | }} | ||
+ | {{#if:{{{master1|}}}|[[Category:AY Honors/{{{master1}}} Master Award{{#if:{{{master_group1|}}}|/{{{master_group1}}}}}{{GetLangSuffix}}|{{{honorname}}}]]}} | ||
+ | {{#if:{{{master2|}}}|[[Category:AY Honors/{{{master2}}} Master Award{{#if:{{{master_group2|}}}{{GetLangSuffix}}|/{{{master_group2}}}}}|{{{honorname}}}]]}} | ||
+ | [[Category:AY Honors/Honor_landing{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | [[Category:AY Honors/{{{category}}}{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | [[Category:AY Honors/Introduced in {{{year|Unknown}}}{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | [[Category:AY Honors/Skill Level {{{skill|Unknown}}}{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | [[Category:AY Honors/Approved by {{{authority|Unknown}}}{{GetLangSuffix}}|{{{honorname}}}]] | ||
+ | }} | ||
+ | <!--Add honor to next and previous honors in Roman-numbered series--> | ||
+ | {{AddRomanToSeeAlso}} | ||
+ | |||
+ | <!--T:20--> | ||
+ | <noinclude></translate></noinclude> |
Latest revision as of 20:21, 9 February 2022
This template captures an honor's metadata and formats its landing page.
Parameters
- honorname
- Name of the honor as it should be displayed at the top of the banner.
- category
- Category to which the honor belongs.
- skill
- Skill level of the honor (1, 2, or 3)
- year
- The year the honor was introduced
- instructor
- If an instructor is required, define this to any non-blank text. If the value specified is licensed, certified, skilled, or qualfied, the honor will be added to Category:Instructor Required/Licensed, Category:Instructor Required/Skilled, or Category:Instructor Required/Qualified. All honors that have this field set to anything (including the special values listed above) will be added to Category:Instructor Required.
- authority
- The highest level organization in the church which has approved the honor.
- insignia
- Filename for the patch's image. If specified, the honor will be placed in Category:Has insignia image. If omitted or if set to No_patch.png, the honor will be placed in Category:No insignia image.
- insignia_source
- If the insignia is not carried by AdventSource, this variable will indicate where it can be obtained. If set, it will also superimpose a "Not available at AdventSource" warning across the insignia image. We are required to splash this warning by the NAD (our host).
- primary
- If this honor has variants depending on where it is taught (because the answer key is different, or because the requirements are different), this argument should indicate which page is the primary version of the honor. Because the wiki is hosted by the NAD, any NAD variant will be considered primary. Otherwise, the primary version will be the highest authority level. If left blank, this variant of the honor will be considered the primary version. If set, this variant will be marked as secondary and it will not show up in the main indices. Do not add this parameter to the honor that is the primary variant - add it to the ones that are not primary.
- field_trip
- This field can be set to "required" or "optional". If the honor cannot be earned without a field trip, set it to "required". If one of the requirements can be met by taking a field trip, set it to "optional". If no field trip is mentioned in the requirements, this parameter should be omitted.
- challenge
- This parameter should use the reqreq template to reproduce the requirement that is deemed most difficult. See the example for how to format it. If the requirement has subrequirements they can be added too, but should be indented. Try to pick just one requirement for this designation.
- master1 and master2
- If the honor is a component of a Master Award, the value assigned to master1 should indicate which award that is. If it's part of two Master Awards, master2 can be used to assign it to a second one. If the honor is part of a Master Award by virtue of being in a broad honor category (such as Arts, Crafts and Hobbies), this parameter should not be used to specify the Master Award since the {{{category}}} parameter will already have that information.
- master_group1 and master_group2
- Some Master Awards (such as Naturalist) are set up to require the Pathfinder to earn N honors from one List, and M from another (where N+M usually equals 7). If this honor belongs to one of those groups, add this parameter to identify the sub-group. This parameter will be ignored unless master1 (or master2) is filled in.
TODO
Figure out how to do the IA Connection. The Master Award had been done by invoking the Master_Award template which took three arguments: honor, master, and an optional group. I'm not stoked about how I'm managing that above, but I'm not convinced there's a better way. The IA_Connection template also takes multiple parameters, so if we can't think of a better way to do the Master_Award, we'll just have to repeat that approach for IA.
See_Also feature - I still need to look at how this was done on the old version.
Example
{{Honor_landing
|honorname=Aboriginal Lore
|skill=1
|year=2006
|category=Arts, Crafts and Hobbies
|authority=General Conference
|insignia=Aboriginal Lore AY Honor.png
|insignia_source=test
|challenge=
<b>{{reqreq|page={{PAGENAME}}|num=3}}</b>
:<b>{{reqreq|page={{PAGENAME}}|num=3a|dispreq=a}}</b>
:<b>{{reqreq|page={{PAGENAME}}|num=3b|dispreq=b}}</b>
:<b>{{reqreq|page={{PAGENAME}}|num=3c|dispreq=c}}</b>
}}
Arts, Crafts and Hobbies | |
Skill Level 123 | |
Approval authority General Conference | Year of Introduction 2006 |
See also |
The most challenging requirement of this honor is probably this: