Template:Cite book: Difference between revisions

    m>Gracefool
    (updated from User:Gracefool/cite book)
     
    m>Ligulem
    (copied Template:Book reference as base version for comparing)
    Line 1: Line 1:
    <cite style="font-style:normal" {{qif
    <cite style="font-style:normal" {{qif
       |test={{{ref}}}
       |test={{{Ref|}}}
       |then={{qif
       |then={{qif
           |test={{booleq
           |test={{booleq
                 |{{{ref}}}
                 |{{{Ref}}}
                 |none
                 |none
               }}
               }}
           |then=
           |then=
           |else=id="{{{ref}}}"
           |else=id="{{{Ref}}}"
         }}
         }}
       |else={{qif
       |else={{qif
         |test={{booland
         |test={{booland
           |1={{{last|}}}
           |1={{{Last|}}}
           |2={{{year|}}}
           |2={{{Year|}}}
         }}
         }}
         |then=id="Reference-{{{last}}}-{{{year}}}"
         |then=id="Reference-{{{Last}}}-{{{Year}}}"
       }}
       }}
    }}
    }}
    }}>{{qif
    }}>{{qif
       |test={{{authorlink|}}}
       |test={{{Authorlink|}}}
       |then={{wikilink
       |then={{wikilink
         |1={{{authorlink}}}
         |1={{{Authorlink}}}
         |2={{qif
         |2={{qif
           |test={{{author|}}}
           |test={{{Author|}}}
           |then={{{author}}}
           |then={{{Author}}}
           |else={{{last|}}}{{qif
           |else={{{Last|}}}{{qif
             |test={{{first|}}}
             |test={{{First|}}}
             |then=, {{{first}}}
             |then=, {{{First}}}
           }}
           }}
         }}
         }}
       }}
       }}
       |else={{qif
       |else={{qif
         |test={{{author|}}}
         |test={{{Author|}}}
         |then={{{author}}}
         |then={{{Author}}}
         |else={{{last|}}}{{qif
         |else={{{Last|}}}{{qif
           |test={{{first|}}}
           |test={{{First|}}}
           |then=, {{{first}}}
           |then=, {{{First}}}
         }}
         }}
       }}
       }}
    }}{{qif
    }}{{qif
       |test={{{coauthors|}}}
       |test={{{Coauthors|}}}
       |then=<nowiki>,</nowiki> {{{coauthors}}}
       |then=<nowiki>,</nowiki> {{{Coauthors}}}
    }}{{qif
    }}{{qif
       |test={{{date|}}}
       |test={{{Date|}}}
       |then=&#32;({{{date}}})
       |then=&#32;({{{Date}}})
       |else={{qif
       |else={{qif
         |test={{{year|}}}
         |test={{{Year|}}}
         |then={{qif
         |then={{qif
           |test={{{month|}}}
           |test={{{Month|}}}
           |then=&#32;({{{month}}} {{{year}}})
           |then=&#32;({{{Month}}} {{{Year}}})
           |else=&#32;({{{year}}})
           |else=&#32;({{{Year}}})
         }}
         }}
       }}
       }}
    }}{{qif
    }}{{qif
       |test={{{author|{{{last|{{{year|}}}}}}}}}
       |test={{{Author|{{{Last|{{{Year|}}}}}}}}}
       |then=.
       |then=.
    }}{{qif
    }}{{qif
       |test={{{chapter|}}}
       |test={{{Chapter|}}}
       |then=&#32;"{{qif
       |then=&#32;"{{qif
       |test={{{chapterurl|}}}
       |test={{{ChapterURL|}}}
       |then=[{{{chapterurl}}} {{{chapter}}}]
       |then=[{{{ChapterURL}}} {{{Chapter}}}]
       |else={{{chapter}}}
       |else={{{Chapter}}}
    }}"}}{{qif
    }}"}}{{qif
       |test={{{editor|}}}
       |test={{{Editor|}}}
       |then=&#32;{{{editor}}}
       |then=&#32;{{{Editor}}}
    }} ''{{qif
    }} ''{{qif
       |test={{{link|}}}
       |test={{{URL|}}}
       |then={{wikilink
       |then=[{{{URL}}} {{{Title}}}]
        |1={{{link}}}
      |else={{{Title}}}
        |2={{{title}}}
        }}
      |else={{qif
        |test={{{url|}}}
        |then=[{{{url}}} {{{title}}}]
        |else={{{title}}}
      }}
    }}''{{qif
    }}''{{qif
       |test={{{link|}}}
       |test={{{Others|}}}
      |then=
       |then=, {{{Others}}}
      |else={{qif
        |test={{{format|}}}
        |then=&#32;({{{format}}})
      }}
    }}{{qif
      |test={{{others|}}}
       |then=, {{{others}}}
    }}{{qif
    }}{{qif
       |test={{{edition|}}}
       |test={{{Edition|}}}
       |then=, {{{edition}}}
       |then=, {{{Edition}}}
    }}{{qif
    }}{{qif
       |test={{{pages|}}}
       |test={{{Pages|}}}
       |then=, {{{pages}}}
       |then=, {{{Pages}}}
    }}{{qif
    }}{{qif
       |test={{{publisher|}}}
       |test={{{Publisher|}}}
       |then=, {{qif
       |then=, {{qif
         |test={{{location|}}}
         |test={{{Location|}}}
         |then={{{location}}}:&#32;
         |then={{{Location}}}:&#32;
       }}{{{publisher}}}
       }}{{{Publisher}}}
    }}{{qif
    }}{{qif
       |test={{{id|}}}
       |test={{{ID|}}}
       |then=. {{{id}}}
       |then=. {{{ID}}}
    }}{{qif
      |test={{{link|}}}
      |then=
      |else={{qif
        |test={{{accessdate|}}}
        |then=. URL accessed {{{accessdate}}}
        |else={{qif
          |test={{{accessyear|}}}
          |then=. URL accessed {{qif
            |test={{{accessmonth|}}}
            |then=on {{{accessmonth}}} {{{accessyear}}}
            |else=during {{{accessyear}}}
          }}
        }}
      }}
    }}.</cite><noinclude>
    }}.</cite><noinclude>
    This template replaces the deprecated {{tl|book reference}}.
    {{esoteric}}
    {{esoteric}}
    [[Category:Citation templates|{{PAGENAME}}]]
    [[Category:Citation templates|{{PAGENAME}}]]
    [[sk:Šablóna:Knižná_referencia]]
    [[sk:Šablóna:Knižná_referencia]]
    </noinclude>
    </noinclude>