Шаблон:Achievement table header — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
 
(не показаны 2 промежуточные версии этого же участника)
Строка 1: Строка 1:
<onlyinclude>{{#if:<!-- remove whitespace -->
+
<includeonly>{{#if: {{NAMESPACE}} {{#pos: {{#show: {{PAGENAME}} | ?Category | link = none }} | Historical achievements}} {{#pos: {{FULLPAGENAME}} | Daily }}
{{#set:Has canonical name={{{name|{{trim|{{#replace:{{PAGENAME}}|(achievements)|}}}}}}}}}
+
| <!-- historical, dailies, or not in main namespace: don't show the account achievements widget --><div></div>
{{#ask:[[Has achievement category::{{{1|{{PAGENAME}}}}}]]|?Has achievement tiers|?Has AP cap#|mainlabel=-|format=template|template=Parse tier|limit=250}}<!-- Calculates total achievement points stored in #var:table_tier_total -->
+
| <!-- current: show the account achievement widget --><div id="achievementcontrol"></div><!--{{Account achievements widget}}-->
}}{| {{STDT|mech1}}
+
}}
!style="font-size:large;" |<div style="position:absolute; top:0; left:5px; z-index:1;">[[Has game icon::File:{{{icon|{{PAGENAME}}.png}}}|48px]]</div> {{{title|Достижение}}} {{#if:{{{group|}}}|<small>([[Has achievement group::{{{group|}}}]])</small>}}<!-- Need better place for this, next to icon? -->
+
{| {{STDT|mech1 no-odd-even}} style="display:table;"
! Всего достижений: {{#ask:[[Has achievement category::{{{1|{{PAGENAME}}}}}]]|format=count}}
+
! style="font-size:large;" | <div style="position:absolute; top:0; left:5px;">{{#if: {{{icon|}}}
! style="text-align: right; border-left-width: 0;" | {{mastery point|{{#var_final:mastery_total|0}}|region={{#var_final:mastery_type|Default}}}} {{ap|{{#var:table_tier_total}}}}</onlyinclude>
+
| [[File:{{{icon}}}|48px]]
|}
+
| [[{{#var:category_icon|File:{{PAGENAME}}.png}}|48px]]
 
+
}}</div> {{#if: {{{title|}}}
 +
| {{{title}}}
 +
| {{#var:category_name|{{trim|{{#replace:{{#replace:{{PAGENAME}}|&#39;|'}}|(achievements)|}}}}}}
 +
}} {{#if:{{{group|}}}
 +
| <small>({{{group}}})</small>
 +
| {{#if: {{#var:category_group}}|<small>({{#var:category_group}})</small>}}
 +
}}
 +
! Total achievements: {{#var_final:achievement_count|0}}
 +
! style="text-align: right; border-left-width: 0;" | {{#ifexpr: <!-- set in the infobox -->{{#var:category_mastery_qty}}|{{mastery point|{{#var:category_mastery_qty}}|region={{#var:category_mastery}}}} <nowiki/>}}<!--
 +
-->{{ap|{{#var_final:group_ap_total|0}}}}</includeonly><noinclude>
 
== Usage ==
 
== Usage ==
 
<pre>
 
<pre>
 
{{achievement table header}}
 
{{achievement table header}}
 
{{achievement table header
 
{{achievement table header
| name =
 
 
| icon =  
 
| icon =  
| title = (optional)
+
| title =  
| group = (optional)
+
| group =  
 
}}
 
}}
 
</pre>
 
</pre>
  
== Parameters ==
+
=== Parameters ===
;name
+
:''Note that all parameters are already specified in the {{tl|Achievement category infobox}} and passed over to this template.''
:The canonical name of the achievement category. Usually for categories requiring (achievements) qualifier. Defaults to <nowiki>{{PAGENAME}}</nowiki>, without the (achievements) text.
 
 
;icon
 
;icon
:The icon for the achievement category. Defaults to <nowiki>File:{{PAGENAME}}.png</nowiki>
+
:Optional. The icon for the achievement category. Defaults to <nowiki>File:{{PAGENAME}}.png</nowiki>.
 
;title
 
;title
:Optional. The header title. Defaults to Achievement.
+
:Optional. The header title. Defaults to <nowiki>{{PAGENAME}}</nowiki>, without the (achievements) suffix.
 
;group
 
;group
:Optional. Displays next to the header title in smaller font. Assigns the ''Has achievement group'' property.
+
:Optional. Displays next to the header title in smaller font.
  
== Example ==
+
=== Example ===
 +
<pre>{{Achievement table header
 +
| icon = Bazaar of the Four Winds.png
 +
| title = Bazaar of the Four Winds
 +
| group = Historical
 +
}}
 +
{{Achievement table row
 +
| name = Bazaar Ambassador
 +
| description = Complete 16 Bazaar of the Four Winds Achievements.
 +
| rewards = Gift of Quartz
 +
| meta = self
 +
| tiers = Bazaar Achievements: 16;50
 +
}}
 +
|}</pre>
 
{{Achievement table header
 
{{Achievement table header
|icon=Bazaar of the Four Winds.png
+
| icon = Bazaar of the Four Winds.png
 +
| title = Bazaar of the Four Winds
 
| group = Historical
 
| group = Historical
 
}}
 
}}
Строка 38: Строка 59:
 
| description = Complete 16 Bazaar of the Four Winds Achievements.
 
| description = Complete 16 Bazaar of the Four Winds Achievements.
 
| rewards = Gift of Quartz
 
| rewards = Gift of Quartz
 
 
| meta = self
 
| meta = self
 
| tiers = Bazaar Achievements: 16;50
 
| tiers = Bazaar Achievements: 16;50
Строка 45: Строка 65:
  
 
[[Category:Achievement formatting templates]]
 
[[Category:Achievement formatting templates]]
 +
</noinclude>

Текущая версия на 21:50, 14 апреля 2021

Usage[править]

{{achievement table header}}
{{achievement table header
| icon = 
| title = 
| group = 
}}

Parameters[править]

Note that all parameters are already specified in the {{Achievement category infobox}} and passed over to this template.
icon
Optional. The icon for the achievement category. Defaults to File:{{PAGENAME}}.png.
title
Optional. The header title. Defaults to {{PAGENAME}}, without the (achievements) suffix.
group
Optional. Displays next to the header title in smaller font.

Example[править]

{{Achievement table header
| icon = Bazaar of the Four Winds.png
| title = Bazaar of the Four Winds
| group = Historical
}}
{{Achievement table row
| name = Bazaar Ambassador
| description = Complete 16 Bazaar of the Four Winds Achievements.
| rewards = Gift of Quartz
| meta = self
| tiers = Bazaar Achievements: 16;50
}}
|}
Bazaar of the Four Winds.png
Bazaar of the Four Winds (Historical)
Total achievements: 1 50 Очко достижений