الگو:?

از ویکی‌پدیا، دانشنامهٔ آزاد
پرش به: ناوبری، جستجو

؟

نشان توضیحات توضیحات الگو [ویرایش] [تاریخچه] [پاکسازی میانگیر]
This template documentation is transcluded from Template:Table cell templates [edit]

These templates are designed to be used in a table to make a cell with text in that cell, with an appropriately coloured background. They are commonly used in comparison tables.

For example, {{Yes}} makes a cell with a green background; the text in the cell is taken from the template parameter and defaults to "Yes".

If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template; instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped, change that to {{{1|Dropped}}}.

Templates in this series[ویرایش]

CSS class[۱] Templates Preview 1 Preview 2 Preview 3
table-rh {{rh}}[۲] | Row header Row header
table-yes {{yes}}, {{yes|[[Alternate]] text}} بله Alternate text
table-no {{no}} نه
table-yes2 {{yes2}}[۳] Text Text
table-no2 {{no2}}[۳] Text Text
table-partial {{partial}}, {{Yes-No}}, {{some}} جزیی آری/خیر اندکی
table-any {{any}} هيچ
table-na {{n/a}} ناموجود
table-unknown {{dunno}}, {{unk}} ؟ نامعلوم
table-depends {{depends}} وابسته
table-included {{included}} دربرداشته
table-dropped {{dropped}}, {{terminated}} رهاشده پایان‌یافته
table-beta {{beta}} بتا
table-free {{free}} رایگان
table-nonfree {{nonfree}}[۳] [[US$]]3.14 غیر آزاد US$3.14
unstyled {{incorrect}} نادرست
unstyled {{?}}[۴] ؟

Notes[ویرایش]

  1. The CSS class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
  3. ۳٫۰ ۳٫۱ ۳٫۲ Does not take a parameter; the content should be placed after the template call.
  4. Does not take a parameter; not really a table cell template at all, but here for completeness
نشان توضیحات توضیحات الگو [ویرایش] [تاریخچه] [پاکسازی میانگیر]

The templates in this series are designed to be used in a راهنما:جدول‌ها to make a cell with text in that cell, with an appropriately colored background. They are commonly used in رده:مقایسه‌ها.

For example, {{yes}} makes a cell with a green background. The text in the cell is taken from the راهنما:الگو; {{yes|Sure}} would output "Sure" otherwise it defaults to "Yes". Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: {{table cell template}} text or {{table cell template}} | text. This information, the colors and default texts are found in the table below.

If you want to use other attributes for the table cells, e.g. colspan or rowspan, they need to be put before the template call and there must be no vertical bar | in between them:

بله نه ناموجود
آری/خیر
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 {{Yes-No}}
...

Templates in this series[ویرایش]

Table cell templates
Class[۱] Template Preview Preview, alternative
table-rh {{rh}} | Row header Row header
{{rh2}}[۲] | Row header Row header
table-yes {{yes}}, {{yes|Alternative [[نوشته ساده]]}} بله Alternative نوشته ساده
table-no {{no}}, {{no|Alternative [[نوشته ساده]]}} نه Alternative نوشته ساده
{{coming soon}} Coming soon
{{bad}}, {{bad|F}} Bad F
table-siteactive {{Site active}} فعال
table-siteinactive {{Site inactive}} غیرفعال
table-yes2 {{yes2}}[۳] Text Text
{{won}}, {{won|5}} برنده 5
{{won|place=1}} or =Gold برنده
{{won|place=2}} or =Silver برنده
{{won|place=3}} or =Bronze برنده
{{won|text=white|color=blue}} or =#1122CC برنده
{{good}}, {{good|A}} Good A
table-no2 {{no2}}[۳] Text Text
{{nom}}, {{nom|5}} نامزد شد 5
{{sho}} Shortlisted
table-partial {{partial}} جزیی
{{yes-No}} آری/خیر
{{okay}}, {{okay|C}} Neutral C
{{some}} اندکی
table-any {{any}} هيچ
table-na {{n/a}} ناموجود
{{BLACK}} N/A
table-unknown {{dunno}} ؟
{{Unknown}} Unknown
table-depends {{Depends}}, {{Depends|Alternative [[نوشته ساده]]}} وابسته Alternative نوشته ساده
table-included {{Included}} دربرداشته
table-dropped {{dropped}} رهاشده
{{terminated}} پایان‌یافته
table-beta {{beta}} بتا
{{table-experimental}}, {{table-experimental|Alternative [[نوشته ساده]]}} Experimental Alternative نوشته ساده
table-free {{free}}, {{free|Alternative [[نوشته ساده]]}} رایگان Alternative نوشته ساده
table-nonfree {{nonfree}}, {{nonfree|Alternative [[نوشته ساده]]}} غیر آزاد Alternative نوشته ساده
table-proprietary {{proprietary}}, {{proprietary|Alternative [[نوشته ساده]]}} مالکیتی Alternate نوشته ساده
table-needs {{needs}}, {{needs|Alternative [[نوشته ساده]]}} Needs Alternative نوشته ساده
no class {{incorrect}}, {{incorrect|Alternative [[نوشته ساده]]}} نادرست Alternative نوشته ساده
no class {{no result}}, {{no result|N.R.}} No result N.R.
no class {{pending}} در جریان
table-nightly {{nightly}}, {{nightly|Alternative [[نوشته ساده]]}} Nightly build Alternative نوشته ساده
table-release-candidate {{release-candidate}}, {{release-candidate|Alternative [[نوشته ساده]]}} Release candidate Alternative نوشته ساده
no class {{?}}[۴] ؟
no class {{unofficial}} Unofficial
no class {{usually}} معمولاً
no class {{rarely}} به ندرت
no class {{sometimes}} Sometimes
no class {{draw}}[۳] Text Text

Code[ویرایش]

Common code to most if not all the templates in this series:

This template documentation is transcluded from Template:Table cell templates [edit]

These templates are designed to be used in a table to make a cell with text in that cell, with an appropriately coloured background. They are commonly used in comparison tables.

For example, {{Yes}} makes a cell with a green background; the text in the cell is taken from the template parameter and defaults to "Yes".

If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template; instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped, change that to {{{1|Dropped}}}.

Templates in this series[ویرایش]

CSS class[۱] Templates Preview 1 Preview 2 Preview 3
table-rh {{rh}}[۲] | Row header Row header
table-yes {{yes}}, {{yes|[[Alternate]] text}} بله Alternate text
table-no {{no}} نه
table-yes2 {{yes2}}[۳] Text Text
table-no2 {{no2}}[۳] Text Text
table-partial {{partial}}, {{Yes-No}}, {{some}} جزیی آری/خیر اندکی
table-any {{any}} هيچ
table-na {{n/a}} ناموجود
table-unknown {{dunno}}, {{unk}} ؟ نامعلوم
table-depends {{depends}} وابسته
table-included {{included}} دربرداشته
table-dropped {{dropped}}, {{terminated}} رهاشده پایان‌یافته
table-beta {{beta}} بتا
table-free {{free}} رایگان
table-nonfree {{nonfree}}[۳] [[US$]]3.14 غیر آزاد US$3.14
unstyled {{incorrect}} نادرست
unstyled {{?}}[۴] ؟

Notes[ویرایش]

  1. ۱٫۰ ۱٫۱ The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. ۲٫۰ ۲٫۱ Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
  3. ۳٫۰ ۳٫۱ ۳٫۲ ۳٫۳ ۳٫۴ ۳٫۵ Does not take a parameter; the content should be placed after the template call.
  4. ۴٫۰ ۴٫۱ Does not take a parameter; not really a table cell template at all, but here for completeness


Code specific to this template:

؟

To make a new table cell template you can use:

{{subst:Table cell templates| text = default text | bg = background color | class = a class name without prefix | align = 
standard horizontal alignment}}

You should leave out the align parameter and often the class parameter is unnecessary, too.

Add the new template to the table in the common documentation afterwards. Please consider reusing one of the other templates and please choose the color sensibly.

If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template! Instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped, change that to {{{1|Dropped}}}.

See also[ویرایش]

  • {{GPL-lic}}
  • {{chg}}: calculate and display changes between two values

Notes[ویرایش]