TableCell_YesNoUnknown.mw 1.2 KB

12345678910111213141516171819202122
  1. <includeonly>[[Template:#ifeq: {{{Value|]]} | yes
  2. | style="background: #e0ffe0; color: #006000;" [[Template:!]] [[Template:#if: {{{Text|]]} | [[Template:{Text]]} | yes}}
  3. [[Template:#if: {{{YesCategory]]} | [[Category:[[Template:{YesCategory]]}]]}}
  4. | [[Template:#ifeq: {{{Value|]]} | no
  5. | style="background: #ffe0e0; color: #600000;" [[Template:!]] [[Template:#if: {{{Text|]]} | [[Template:{Text]]} | no}}
  6. [[Template:#if: {{{NoCategory]]} | [[Category:[[Template:{NoCategory]]}]]}}
  7. | style="background: #e0e0e0; color: #000000;" [[Template:!]] [[Template:#if: {{{Value|]]} | [[Template:{Value]]} | ''unknown''}}
  8. [[Template:#if: {{{UnknownCategory]]} | [[Category:[[Template:{UnknownCategory]]}]]}}
  9. }}
  10. }}</includeonly><noinclude>Adds a colored table cell. The color of the cell depends on the ''Value'' argument which can be either "yes" or "no". If it is neither, "unknown" is assumed. This template is meant to be used in more specialized templates.
  11. == Usage ==
  12. <nowiki>{{TableCell YesNoUnknown</nowiki>
  13. | Value=yes
  14. | Text=this is true
  15. | YesCategory=Pages which are true
  16. | NoCategory=Pages which are false
  17. | UnknownCategory=Schroedinger's pages
  18. <nowiki>}}</nowiki>
  19. </noinclude>