Difference between revisions of "Template:Rating"

From Imagico.de TagDoc
Jump to navigation Jump to search
(Creating tag rating template)
 
(Adding possibility for rating by geometry type)
Line 1: Line 1:
<includeonly>{{#switch: {{{2}}}
<includeonly><tr><td class="tagdoc-ibox-section">{{{1}}} [[TagDoc:Ratings|ⓘ]]</td>
| excellent = <tr><td class="tagdoc-ibox-section">{{{1}}}</td>
{{#if: {{{4|}}}|
     <td class="tagdoc-rating-excellent">[[TagDoc:Ratings|excellent]]</td></tr>
  {{SubRating|{{{1}}}|{{{2}}}}}
    {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with excellent {{{1}}}]]}}
  {{SubRating|{{{1}}}|{{{3}}}}}
| good = <tr><td class="tagdoc-ibox-section">{{{1}}}</td>
  {{SubRating|{{{1}}}|{{{4}}}}}
    <td class="tagdoc-rating-good">[[TagDoc:Ratings|good]]</td></tr>
  |{{#switch: {{{2}}}
    {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with good {{{1}}}]]}}
     | excellent = <td colspan="3" class="tagdoc-rating-excellent">[[:Category:Tags with excellent {{{1}}}|excellent]]</td> {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with excellent {{{1}}}]]}}
| moderate = <tr><td class="tagdoc-ibox-section">{{{1}}}</td>
    | good = <td colspan="3" class="tagdoc-rating-good">[[:Category:Tags with excellent {{{1}}}|good]]</td> {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with good {{{1}}}]]}}
    <td class="tagdoc-rating-moderate">[[TagDoc:Ratings|moderate]]</td></tr>
    | moderate = <td colspan="3" class="tagdoc-rating-moderate">[[:Category:Tags with excellent {{{1}}}|moderate]]</td> {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with moderate {{{1}}}]]}}
    {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with moderate {{{1}}}]]}}
    | bad = <td colspan="3" class="tagdoc-rating-bad">[[:Category:Tags with excellent {{{1}}}|bad]]</td> {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with bad {{{1}}}]]}}
| bad = <tr><td class="tagdoc-ibox-section">{{{1}}}</td>
    | very bad = <td colspan="3" class="tagdoc-rating-verybad">[[:Category:Tags with excellent {{{1}}}|very bad]]</td> {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with very bad {{{1}}}]]}}
    <td class="tagdoc-rating-bad">[[TagDoc:Ratings|bad]]</td></tr>
    | #default = <td colspan="3" class="tagdoc-rating-invalid">invalid</td>
    {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with bad {{{1}}}]]}}
    }}
| very bad = <tr><td class="tagdoc-ibox-section">{{{1}}}</td>
    <td class="tagdoc-rating-verybad">[[TagDoc:Ratings|very bad]]</td></tr>
    {{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Tags with very bad {{{1}}}]]}}
| #default = <tr><td class="tagdoc-ibox-section">{{{1}}}</td><td class="tagdoc-rating-invalid">invalid</td></tr>
}}</includeonly>
}}</includeonly>
<noinclude>Template to display a qualitative rating in a tag page info box.  Like:
<noinclude>Template to display a qualitative rating in a tag page info box.  Like:
Line 25: Line 21:
{{Rating|Consistency|very bad}}
{{Rating|Consistency|very bad}}
{{Rating|Consistency|*invalid*}}
{{Rating|Consistency|*invalid*}}
{{Rating|Consistency|very bad|none|excellent}}
{{Rating|Consistency|good|*invalid*|bad}}
</table>
</table>
</noinclude>
</noinclude>

Revision as of 21:08, 25 January 2022

Template to display a qualitative rating in a tag page info box. Like:

Consistency excellent
Consistency good
Consistency moderate
Consistency bad
Consistency very bad
Consistency invalid
Consistency 🞼
Consistency + xx