Open main menu

Changes

no edit summary
<noinclude>
This template is used to print a list of accepted theories on this topic. It looks for displays the theories accepted theories on a given topic by sorting them according to their topic's sorting order. To print the details of the topic and then indicates accepted theories, use [[Template:PrintTopicAcceptedTheoriesDetails]]. The template prints a short statement of which communities it is currently theories are accepted byin which community. This can be done in two options depending on the value of <code><nowiki>groupbycommunity</nowiki></code>:  ''Option 1'': (if <code><nowiki>groupbycommunity=yes</nowiki></code>)* Community A: Theory 1, Theory 2, Theory 3* Community B: Theory 2, Theory 3, Theory 4* Community C: Theory 1, Theory 3, Theory 5 ''Option 2'': (if <code><nowiki>groupbycommunity=no</nowiki></code> or empty)* Theory 1: Community A, Community C* Theory 2: Community A, Community B* Theory 3: Community A, Community B, Community C* Theory 4: Community B* Theory 5: Community C Formulation texts can also be printed if <code><nowiki>formulationtext=yes</nowiki></code>
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
 
'''Parameters:'''
* <code><nowiki>|topic=</nowiki></code> - the theorytopic.
* <code><nowiki>|intro=</nowiki></code> - initial text that precedes the output, if at least some results exist.
* <code><nowiki>|outro=</nowiki></code> - text that is appended to the output, if at least some results exist.
* <code><nowiki>|default=</nowiki></code> - if, for any reason, the query returns no results, this will be printed instead.
* <code><nowiki>|detailsformulationtext=</nowiki></code> - if ''yes'', then details the formulation of the theory such as its will be added. Otherwise (default), the formulation and diagram are added to each recordtext won't be printed.* <code><nowiki>|bulletscommunitiesfirst=</nowiki></code> - if ''yes'', a bulletthe communities will be mentioned first in the sentence. If ''no'' (default) the name of the theory will appear first.* <code><nowiki>|groupbycommunity=</nowiki></code> -list if ''yes'', the result will be grouped by community (e.g. Theories A, B, C are accepted by community X. Theories A, D, E are accepted by community Y.) If ''no'' (default) the result will be producedgrouped by theory (e.g. Theory A is accepted in communities X and Y.).
</noinclude><includeonly><!--
-->{{#if: {{{topic|}}} <!-- -->|<!-- --><!-- Get the default text --><!-- -->{{#switch: {{#show: {{{topic|}}}|?Topic Type|link=none}}<!-- -->|<!-- -->Definitional={{#vardefine: varDefault|At the moment, the term has no accepted definition in}}<!-- -->|<!-- -->{{#vardefine: varDefault|At the moment, the question has no accepted answer in}}<!-- -->}}<!-- get switch --><!--   --><!-- Get the theories firstlist of all answers --><!-- -->{{#arraydefine: varAccTheoriesvarAnswers<!-- -->|{{#ask:<!-- -->[[SubObjectCategory::Acceptance RecordCurrent Answer]]<!-- -->[[Topic::{{{topic|}}}]]<!-- -->[[Still AcceptedAnswer Type::trueComplete||Inherited||Partial]]<!-- -->|?Theory<!-- -->|mainlabel=-<!-- -->|headers=hide<!-- -->|sort=Answer Type, Sorting Order<!-- -->|order=asc, asc<!-- -->|link=none<!-- -->|limit=10000<!-- -->}}<!-- -->| , |unique<!-- -->}}<!-- arraydefine --><!-- --><!-- remove duplicates -->{{#arrayunique: varAnswers}}<!--  --><!-- --><!-- Check the grouping flag --><!-- -->{{#ifeq: {{{groupbycommunity|no}}}|yes<!--  -->|<!-- Yes: Group BY Community --><!-- -->{{#arraydefine: varAccCommunities<!-- -->|{{#ask:<!-- -->[[SubObjectCategory::Current Answer]]<!-- -->[[Topic::{{{topic|}}}]]<!-- -->|?Community<!-- -->|mainlabel=-<!-- -->|headers=hide<!-- -->|link=none<!-- -->|limit=10000<!-- -->}}<!-- -->| , |unique<!-- -->}}<!-- arraydefine --><!-- --><!-- remove duplicates -->{{#arrayunique: varAccTheoriesvarAccCommunities}}<!-- --><!-- -->{{#switch: {{#arraysize: varAccTheoriesvarAccCommunities}}<!-- -->|0={{{default|}}}<!-- -->|{{{intro|}}}<!-- -->{{#arrayprint: varAccTheoriesvarAccCommunities||varCommunity<!-- -->|<!-- -->{{PrintCommunityTopicCurrentTheories<!-- -->|@@@@community=varCommunity<!-- -->|topic={{{topic|}}}<nowiki/!-- -->|default={{#ifeqvar: varDefault}} [[varCommunity|{{PAGENAME: varCommunity}}]].<!-- -->|communityfirst={{bullets{communitiesfirst|no}}}|yes|*<nowiki> </nowiki!-- -->|formulationtext={{{formulationtext|no}}{{PrintTheoryCurrentlyAcceptedInCommunities}<!-- -->|theorylink=@@@@yes<!-- -->|prettylinktheory=yes<!-- -->}}&#32;<!--   -->}}<!--arrayprint -->{{#ifeq: {{{detailsoutro|}}}|yes<!-- -->}}<!-- switch --><!--   -->|<!--No: Group By Theory --><!-- --><nowiki/!-- -->{{#switch: {{#showarraysize: @@@@|?Formulation Text|link=nonevarAccTheories}}<!-- -->|0={{{default|}}}<!-- -->|{{{intro|}}}<!-- add image if exists Formulation File -->{{#ifarrayprint: varAccTheories||varTheory<!-- -->|<!--  -->{{#show: @@@@PrintTheoryCurrentlyAcceptedInCommunities<!-- -->|theory=varTheory<!-- -->|communitiesfirst={{{communitiesfirst|?Formulation Fileno}}}<!-- -->|link=noneyes<!-- -->|linktheory=yes<!-- -->}}&#32;<!--   -->}}<!--arrayprint   -->{{{outro|}}}<!-- -->}}<nowiki/!-- switch --><!--   -->}}<!-- ifeq grouping flag
{{PrintDiagramFile|diagram file={{#show: @@@@|?Formulation File|link=none}}|}}
<nowiki/>
<!--
-->}}<!-- if diagram
-->}}<!-- if details
-->}}<!--arrayprint
-->{{{outro|}}}<!--
-->}}<!-- switch
--><!--
-->}}<!-- if
--></includeonly>