Difference between revisions of "Template:Honor landing"

From Pathfinder Wiki
 
(63 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude><translate>
+
<noinclude><translate><!--T:21-->
 +
</noinclude>
  
<!--T:8-->
+
<!--T:22-->
 +
<noinclude>
 
This template captures an honor's metadata and formats its landing page.  
 
This template captures an honor's metadata and formats its landing page.  
  
Line 15: Line 17:
 
;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.
 
;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.
 
;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.
;overview: This parameter should be some text providing a "product description" of the honor. It should answer the question "Why would I want to earn or teach this?"
 
 
;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.
 
;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.
;master and master2: If the honor is a component of a Master Award, the value assigned to master 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.
+
;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_group 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 master (or master2) is filled in.
+
;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-->
 
==TODO== <!--T:10-->
Line 33: Line 34:
 
|category=Arts, Crafts and Hobbies<br />
 
|category=Arts, Crafts and Hobbies<br />
 
|authority=General Conference<br />
 
|authority=General Conference<br />
|insignia=Aboriginallore.png<br />
+
|insignia=Aboriginal Lore AY Honor.png<br />
 
|insignia_source=test<br />
 
|insignia_source=test<br />
|overview=Study the history and culture of the native peoples of Australia. Explore Aboriginal food, music, arts, and games. Learn about boomerangs and didgeridoos. <br />
 
 
|challenge=<br />
 
|challenge=<br />
 
<nowiki><b>{{reqreq|page={{PAGENAME}}|num=3}}</b></nowiki><br />
 
<nowiki><b>{{reqreq|page={{PAGENAME}}|num=3}}</b></nowiki><br />
Line 45: Line 45:
 
<!--T:13-->
 
<!--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 and Hobbies
 
|category=Arts, Crafts and Hobbies
 
|authority=General Conference
 
|authority=General Conference
|insignia=Aboriginallore.png
+
|insignia=
|insignia_source=test
+
|insignia_source=test</noinclude><noinclude><translate><!--T:18-->
|overview=Study the history and culture of the native peoples of Australia. Explore Aboriginal food, music, arts, and games. Learn about boomerangs and didgeridoos.
+
</noinclude><noinclude>
 
|challenge=
 
|challenge=
 
<b>{{reqreq|page={{PAGENAME}}|num=3}}</b>
 
<b>{{reqreq|page={{PAGENAME}}|num=3}}</b>
Line 61: Line 61:
  
 
<!--T:3-->
 
<!--T:3-->
</noinclude><includeonly>
+
</noinclude><includeonly><languages /> __NOTOC__
__NOTOC__ <languages />
+
<div class="container mw-parser-output">
<div class="container">
 
 
<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
 
<div style="position: sticky; top: calc(80px + 1em);">{{Honor_infobox
|honorname={{{honorname}}}
+
|honorname={{{honorname}}}<noinclude></translate></noinclude>
|skill={{{skill|Unknown}}}
+
|skill={{{skill|}}}
|year={{{year|Unknown}}}
+
|year={{{year|}}}
|category={{{category}}}
+
|category={{{category|}}}
|authority={{{authority}}}
+
|authority={{{authority|}}}
|insignia={{{insignia}}}
+
|insignia={{{insignia|}}}
 
|insignia_source={{{insignia_source|}}}
 
|insignia_source={{{insignia_source|}}}
 
|field_trip={{{field_trip|}}}
 
|field_trip={{{field_trip|}}}
 
|instructor={{{instructor|}}}
 
|instructor={{{instructor|}}}
|master={{{master|}}}
+
|master1={{{master1|}}}
 
|master2={{{master2|}}}
 
|master2={{{master2|}}}
 
|advanced={{#var:advanced}}
 
|advanced={{#var:advanced}}
 
}}
 
}}
 +
<noinclude><translate><!--T:19-->
 +
</noinclude>
 
</div><!--close sticky container-->
 
</div><!--close sticky container-->
 
</div><!--close column-->
 
</div><!--close column-->
Line 85: Line 86:
 
<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">{{:Template:Translations/Overview{{GetLangSuffix}}}}</htmltag>
+
     <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">{{:Template:Translations/Requirements{{GetLangSuffix}}}}</htmltag>
+
     <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">{{:Template:Translations/Answer Key{{GetLangSuffix}}}}</htmltag>
+
     <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">{{:Template:Translations/Lesson Plans{{GetLangSuffix}}}}</htmltag>
+
     <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">{{:Template:Translations/Worksheet{{GetLangSuffix}}}}</htmltag>
+
     <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">
{{See Also{{GetLangSuffix}}}}
+
{{#lst:{{#titleparts:{{PAGENAME}}|2|1}}/Overview{{GetLangSuffix}}|Body}}
{{{overview|}}}
 
  
 
<!--T:4-->
 
<!--T:4-->
{{:Template:Translations/Challenging Part{{GetLangSuffix}}}}
+
{{Localize|Challenging Part}}
  
 
<!--T:5-->
 
<!--T:5-->
Line 112: Line 119:
 
</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}}
[{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Requirements{{GetLangSuffix}}|action=mpdf}} {{:Template:Translations/Printable Requirements{{GetLangSuffix}}}}]
 
  {{#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}}]
[{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|action=mpdf}} {{:Template:Translations/Printable Answer Key{{GetLangSuffix}}}}] - [{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|action=edit}} {{:Template:Translations/Edit Answer Key{{GetLangSuffix}}}}]
 
  
 
<!--T:6-->
 
<!--T:6-->
Line 127: 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 136: Line 141:
  
 
<!--T:14-->
 
<!--T:14-->
<!--Add the honor to various categories as per parameters-->
+
<!--
{{#ifexist:{{#titleparts:{{PAGENAME}}|2|1}} - Advanced|[[Category:AY Honors/Honors with an Advanced Option|{{{honorname}}}]]}}
+
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|}}}|
 
{{#if:{{{insignia|}}}|
   {{#ifeq:{{{insignia}}}|No_Patch.png
+
   {{#ifeq:{{{insignia}}}|{{Localize|No Patch}}
     |[[Category:No insignia image|{{{honorname}}}]]
+
     |[[Category:No insignia image{{GetLangSuffix}}|{{{honorname}}}]]
     |[[Category:Has insignia image|{{{honorname}}}]]
+
     |[[Category:Has insignia image{{GetLangSuffix}}|{{{honorname}}}]]
 
   }}
 
   }}
   |[[Category:No insignia image|{{{honorname}}}]]
+
   |[[Category:No insignia image{{GetLangSuffix}}|{{{honorname}}}]]
 
}}
 
}}
 
{{#switch:{{{category}}}
 
{{#switch:{{{category}}}
   | Arts, Crafts and Hobbies =[[Category:AY Honors/Artisan Master Award|{{{honorname}}}]]
+
   | Arts, Crafts and Hobbies =[[Category:AY Honors/Artisan Master Award{{GetLangSuffix}}|{{{honorname}}}]]
   | Outdoor Industries =[[Category:AY Honors/Farming Master Award|{{{honorname}}}]]
+
   | Outdoor Industries =[[Category:AY Honors/Farming Master Award{{GetLangSuffix}}|{{{honorname}}}]]
   | Household Arts =[[Category:AY Honors/Homemaking Master Award|{{{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}}}]]  
 
}}
 
}}
{{#if:{{{master|}}}|[[Category:AY Honors/{{{master}}} Master Award{{#if:{{{master_group|}}}|/{{{master_group}}}}}|{{{honorname}}}]]}}
+
<!--Add honor to next and previous honors in Roman-numbered series-->
{{#if:{{{master2|}}}|[[Category:AY Honors/{{{master2}}} Master Award{{#if:{{{master_group2|}}}|/{{{master_group2}}}}}|{{{honorname}}}]]}}
+
{{AddRomanToSeeAlso}}
[[Category:AY Honors/Honor_landing|{{{honorname}}}]]
 
[[Category:AY Honors/{{{category}}}|{{{honorname}}}]]
 
[[Category:AY Honors/Introduced in {{{year}}}|{{{honorname}}}]]
 
[[Category:AY Honors/Skill Level {{{skill}}}|{{{honorname}}}]]
 
[[Category:AY Honors/Approved by {{{authority}}}|{{{honorname}}}]]
 
  
<!--T:7-->
+
<!--T:20-->
 
<noinclude></translate></noinclude>
 
<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>
}}


Other languages:
English
Arts, Crafts and Hobbies
Skill Level
123
Approval authority
General Conference
Year of Introduction
2006
See also