Difference between revisions of "Template:Class"

From blackwiki
Jump to navigation Jump to search
test>Happy-melon
(make space conditional)
test>Happy-melon
(tweak)
Line 3: Line 3:
 
--><td class="assess-{{lc:{{{1|}}}}} {{{class|}}}" style="text-align:center; font-weight:bold; {{{style|}}}" {{{attr|}}}><!--
 
--><td class="assess-{{lc:{{{1|}}}}} {{{class|}}}" style="text-align:center; font-weight:bold; {{{style|}}}" {{{attr|}}}><!--
  
-->{{#ifeq:{{{image|}}}|yes|{{Classicon|class={{{1|}}}}}&nbsp;}}<!--
+
-->{{#ifeq:{{{image|}}}|yes|{{classicon|class={{{1|}}}}}&nbsp;}}<!--
  
 
-->[[:Category:<!--
 
-->[[:Category:<!--
  
   -->{{#switch:{{{1|}}} |#default={{{1}}}-Class |Unassessed|=Unassessed }}<!--
+
   -->{{#switch:{{lc:{{{1|}}}}}
 +
      |fa|fl|ga|na|={{uc:{{{1}}}-Class
 +
      |unassessed|=Unassessed
 +
      |#default={{lc:{{{1}}}}}-Class
 +
    }}<!--
  
 
   --> {{#if:{{{category|}}}|{{{category}}}|articles}}<!--
 
   --> {{#if:{{{category|}}}|{{{category}}}|articles}}<!--
  
-->|{{#if:{{{1|}}} | {{{1}}} | ??? }}]]<!--
+
-->|{{#switch:{{lc:{{{1|}}}}}
 +
      |fa|fl|ga|na|={{uc:{{{1}}}
 +
      |unassessed|=???
 +
      |#default={{ucfirst:{{lc:{{{1}}}}}}}
 +
    }}]]<!--
  
 
--></td><!--
 
--></td><!--

Revision as of 19:06, 25 January 2009

[[:Category:{{#switch:
      |fa|fl|ga|na|={{{1}}}-CLASS articles|{{#switch:
|fa|fl|ga|na|={{{1}}}]]
50px Template documentation[view] [edit] [history] [purge]

This template is used to show WP1.0 assessment ratings on WikiProject banners and other places.

Usage

  • {{class|grade}}
    Where grade is the classification of the article.
  • {{class|grade|image=yes}}
    |image=yes Displays a small icon next to the grade description for all assessments (produced by {{class/icon}}).
    |image=no does not ever display icons.
    |image= (blank or undefined) displays icons for FA, FL, A and GA classes only.
  • {{class|grade|category=category}}
    Define an alternative category link.
  • {{class|grade|header=yes}}
    By default the {{class}} template generates a table cell using the <td>...</td> element. If the template is used in the header row of a sortable table, use |header=yes so that the cell is constructed using the <th>...</th> element. If used elsewhere than a header row, omit this parameter.

Examples

{{class|FA}}

[[:Category:{{#switch:fa fl|ga|na|=FA-CLASS articles|{{#switch:fa fl|ga|na|=FA]]

{{class|FA|image=no}}

[[:Category:{{#switch:fa fl|ga|na|=FA-CLASS articles|{{#switch:fa fl|ga|na|=FA]]

{{class|FA|category=biography articles}}

[[:Category:{{#switch:fa fl|ga|na|=FA-CLASS biography articles|{{#switch:fa fl|ga|na|=FA]]

{{class|B}}

[[:Category:{{#switch:b fl|ga|na|=B-CLASS articles|{{#switch:b fl|ga|na|=B]]

{{class|B|image=yes}}

16px [[:Category:{{#switch:b fl|ga|na|=B-CLASS articles|{{#switch:b fl|ga|na|=B]]

{{class|B|category=mathematics articles}}

[[:Category:{{#switch:b fl|ga|na|=B-CLASS mathematics articles|{{#switch:b fl|ga|na|=B]]

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Class

Template parameters

ParameterDescriptionTypeStatus
Grade1

The classification of the article

Stringrequired
Imageimage

Set to 'yes' to display an icon; 'no' to not display an icon; or no value or blank to display an icon for FA, FL, A and GA classes only

Stringoptional
Categorycategory

An alternative category link

Stringoptional
Headerheader

Set to 'yes' if the template is used in the header row of a sortable table, so that the cell is constructed using a "th" element rather than a "td" element

Stringoptional

See also

Standard class types
16px [[:Category:{{#switch:fa
      |fa|fl|ga|na|=FA-CLASS articles|{{#switch:fa
|fa|fl|ga|na|=FA]]
16px [[:Category:{{#switch:fl
      |fa|fl|ga|na|=FL-CLASS articles|{{#switch:fl
|fa|fl|ga|na|=FL]]
16px [[:Category:{{#switch:fm
      |fa|fl|ga|na|=FM-CLASS articles|{{#switch:fm
|fa|fl|ga|na|=FM]]
16px [[:Category:{{#switch:a
      |fa|fl|ga|na|=A-CLASS articles|{{#switch:a
|fa|fl|ga|na|=A]]
{{class|FA}} {{class|FL}} {{class|FM}} {{class|A}}
16px [[:Category:{{#switch:ga
      |fa|fl|ga|na|=GA-CLASS articles|{{#switch:ga
|fa|fl|ga|na|=GA]]
16px [[:Category:{{#switch:b
      |fa|fl|ga|na|=B-CLASS articles|{{#switch:b
|fa|fl|ga|na|=B]]
16px [[:Category:{{#switch:c
      |fa|fl|ga|na|=C-CLASS articles|{{#switch:c
|fa|fl|ga|na|=C]]
16px [[:Category:{{#switch:start
      |fa|fl|ga|na|=START-CLASS articles|{{#switch:start
|fa|fl|ga|na|=START]]
{{class|GA}} {{class|B}} {{class|C}} {{class|Start}}
16px [[:Category:{{#switch:stub
      |fa|fl|ga|na|=STUB-CLASS articles|{{#switch:stub
|fa|fl|ga|na|=STUB]]
16px [[:Category:{{#switch:list
      |fa|fl|ga|na|=LIST-CLASS articles|{{#switch:list
|fa|fl|ga|na|=LIST]]
16px [[:Category:{{#switch:na
      |fa|fl|ga|na|=NA-CLASS articles|{{#switch:na
|fa|fl|ga|na|=NA]]
16px [[:Category:{{#switch:unassessed
      |fa|fl|ga|na|=UNASSESSED-CLASS articles|{{#switch:unassessed
|fa|fl|ga|na|=UNASSESSED]]
{{class|Stub}} {{class|List}} {{class|NA}} {{class|Unassessed}}
Non-standard class types
16px [[:Category:{{#switch:current
      |fa|fl|ga|na|=CURRENT-CLASS articles|{{#switch:current
|fa|fl|ga|na|=CURRENT]]
16px [[:Category:{{#switch:future
      |fa|fl|ga|na|=FUTURE-CLASS articles|{{#switch:future
|fa|fl|ga|na|=FUTURE]]
16px [[:Category:{{#switch:sia
      |fa|fl|ga|na|=SIA-CLASS articles|{{#switch:sia
|fa|fl|ga|na|=SIA]]
[[:Category:{{#switch:deferred
      |fa|fl|ga|na|=DEFERRED-CLASS articles|{{#switch:deferred
|fa|fl|ga|na|=DEFERRED]]
{{class|Current}} {{class|Future}} {{class|SIA}} {{class|Deferred}}
[[:Category:{{#switch:al
      |fa|fl|ga|na|=AL-CLASS articles|{{#switch:al
|fa|fl|ga|na|=AL]]
[[:Category:{{#switch:bl
      |fa|fl|ga|na|=BL-CLASS articles|{{#switch:bl
|fa|fl|ga|na|=BL]]
[[:Category:{{#switch:cl
      |fa|fl|ga|na|=CL-CLASS articles|{{#switch:cl
|fa|fl|ga|na|=CL]]
[[:Category:{{#switch:sl
      |fa|fl|ga|na|=SL-CLASS articles|{{#switch:sl
|fa|fl|ga|na|=SL]]
{{class|AL}} {{class|BL}} {{class|CL}} {{class|SL}}
[[:Category:{{#switch:book
      |fa|fl|ga|na|=BOOK-CLASS articles|{{#switch:book
|fa|fl|ga|na|=BOOK]]
[[:Category:{{#switch:category
      |fa|fl|ga|na|=CATEGORY-CLASS articles|{{#switch:category
|fa|fl|ga|na|=CATEGORY]]
[[:Category:{{#switch:disambig
      |fa|fl|ga|na|=DISAMBIG-CLASS articles|{{#switch:disambig
|fa|fl|ga|na|=DISAMBIG]]
[[:Category:{{#switch:draft
      |fa|fl|ga|na|=DRAFT-CLASS articles|{{#switch:draft
|fa|fl|ga|na|=DRAFT]]
{{class|Book}} {{class|Category}} {{class|Disambig}} {{class|Draft}}
[[:Category:{{#switch:file
      |fa|fl|ga|na|=FILE-CLASS articles|{{#switch:file
|fa|fl|ga|na|=FILE]]
[[:Category:{{#switch:merge
      |fa|fl|ga|na|=MERGE-CLASS articles|{{#switch:merge
|fa|fl|ga|na|=MERGE]]
[[:Category:{{#switch:needed
      |fa|fl|ga|na|=NEEDED-CLASS articles|{{#switch:needed
|fa|fl|ga|na|=NEEDED]]
[[:Category:{{#switch:portal
      |fa|fl|ga|na|=PORTAL-CLASS articles|{{#switch:portal
|fa|fl|ga|na|=PORTAL]]
{{class|File}} {{class|Merge}} {{class|Needed}} {{class|Portal}}
[[:Category:{{#switch:project
      |fa|fl|ga|na|=PROJECT-CLASS articles|{{#switch:project
|fa|fl|ga|na|=PROJECT]]
[[:Category:{{#switch:redirect
      |fa|fl|ga|na|=REDIRECT-CLASS articles|{{#switch:redirect
|fa|fl|ga|na|=REDIRECT]]
[[:Category:{{#switch:template
      |fa|fl|ga|na|=TEMPLATE-CLASS articles|{{#switch:template
|fa|fl|ga|na|=TEMPLATE]]
[[:Category:{{#switch:user
      |fa|fl|ga|na|=USER-CLASS articles|{{#switch:user
|fa|fl|ga|na|=USER]]
{{class|Project}} {{class|Redirect}} {{class|Template}} {{class|User}}
Importance types
 Top   High   Mid   Low 
{{importance|Top}} {{importance|High}} {{importance|Mid}} {{importance|Low}}
 Bottom   NA   ??? 
{{importance|Bottom}} {{importance|NA}} {{importance|Unknown}}
Class
Importance
Hybrid
Others
Tool to add multiple templates to quality assessment pages