6,566
edits
m (Bugman moved page Template:Fgaddon file to Template:Fgaddon aircraft source: See the talk page for discussions - this is for the expansion and better organisation of the {{repo link}} family of templates.) |
(Replacement of the template content with the {{fgaddon aircraft source/sandbox}} content. See the discussion page for full details. This mimics the original behaviour perfectly, while being based on the {{repo link}} master template.) |
||
Line 1: | Line 1: | ||
{{#if: {{{ | {{repo link | ||
| site = {{project infrastructure|abbrev}} | |||
| cmd{{#if:{{{cmd|}}}||NULL}} = {{{cmd}}} | |||
| opt{{#if:{{{opt|}}}||NULL}} = {{{opt}}} | |||
| protocol{{#if:{{{protocol|}}}||NULL}} = {{{protocol}}} | |||
| login{{#if:{{{login|}}}||NULL}} = {{{login}}} | |||
| type = {{{type|svn web}}} | |||
| proj = flightgear | |||
| repo = fgaddon | |||
| branch{{#if:{{{branch|{{{b|}}}}}}||NULL}} = {{{branch|{{{b}}}}}} | |||
| path = Aircraft{{#if: {{{1|}}} | |||
|/{{strip whitespace|{{{1}}}}}<!-- | |||
-->{{#if: {{{2|}}} | |||
|/{{strip whitespace|{{{2}}}}} | |||
}} | |||
| | }} | ||
| commit{{#if:{{{commit|{{{c|{{{r|}}}}}}}}}||NULL}} = {{{commit|{{{c|{{{r}}}}}}}}} | |||
| line{{#if:{{{line|{{{l|}}}}}}||NULL}} = {{{line|{{{l}}}}}} | |||
| view{{#if:{{{view|{{{v|}}}}}}||NULL}} = {{{view|{{{v}}}}}} | |||
| text{{#if:{{{text|{{{t|{{{file|}}}}}}}}}||NULL}} = {{{text|{{{t|{{#if: {{{file|}}} | {{{1}}}/{{{2}}} }} }}}}}} | |||
| pre{{#if:{{{pre|}}}||NULL}} = {{{pre}}} | |||
| post{{#if:{{{post|}}}||NULL}} = {{{post}}} | |||
| simplepath{{#if:{{{simplepath|}}}||NULL}} = {{{simplepath}}} | |||
| full = {{#if: {{{file|}}} | |||
| 0 | |||
| {{#if: {{{text|{{{t|}}}}}} | |||
| 0 | |||
| {{#if: {{{pre|}}} | |||
| 0 | |||
| 1 | |||
}} | |||
}} | |||
}} | |||
}}<noinclude> | |||
{{Informative template|1= | {{Informative template|1= | ||
__NOTOC__ | __NOTOC__ | ||
== Goal == | == Goal == | ||
This template | This template is for creating links or URLs for files in the FGAddon svn version control repository. It is a subtemplate of the master {{tl|repo link}} template designed to simplify the interface by being specific for the FGAddon repository and avoiding the need to supply the <code>Aircraft/</code> directory. | ||
{{repo link/doc usage | |||
| template = fgaddon aircraft source | |||
| param1 = 1 | name1 = aircraft | type1 = num | pos1 = 1 | desc1 = The aircraft directory name. The path is constructed as <code><nowiki><branch>/Aircraft/<aircraft></nowiki></code>. If empty, the path of <code><branch>/Aircraft/</code> will be used. | |||
| param2 = 1 | name2 = path | type2 = num | pos2 = 2 | desc2 = The file path following from the aircraft directory name. The full file path will be constructed as <code><nowiki><branch>/Aircraft/<aircraft>/<path></nowiki></code>. | |||
| param3 = 1 | name3 = file | type3 = named | desc3 = If set, then a link to the file rather than the full URL will be shown. | |||
| cmd = 1 | eg_cmd = svn co | |||
| opt = 1 | |||
| protocol = 1 | |||
| login = 1 | |||
| type = 1 | default_type = svn web | |||
| branch = 1 | short_branch = b | |||
| commit = 1 | short_commit = c {{!}} r | |||
| line = 1 | short_line = l | |||
| post = 1 | |||
| view = 1 | short_view = v | |||
| text = 1 | short_text = t | |||
| pre = 1 | |||
| simplepath = 1 | |||
| full = 1 | |||
| intro = The {{param|aircraft}}, {{param|path}}, and {{param|file}} parameters are unique to this template and are used to construct the parent {{tl|repo link}} template {{param|path}} and {{param|text}} parameters. Note that the {{param|text}} parameter overrides {{param|file}}, if supplied. | |||
| sf = 1 | |||
| svn = 1 | |||
}} | |||
{{repo link/doc plain text}} | |||
== Examples == | |||
=== No parameters === | |||
{{obr}}fgaddon aircraft source{{cbr}} | |||
{{fgaddon aircraft source}} | |||
=== Aircraft given === | |||
{{obr}}fgaddon aircraft source{{!}}737-200{{cbr}} | |||
{{fgaddon aircraft source|737-200}} | |||
=== Revision number given === | |||
{{obr}}fgaddon aircraft source{{!}}ec135{{!}}r=560{{cbr}} | |||
{{fgaddon aircraft source|ec135|r=560}} | |||
=== Branch name given === | |||
{{obr}}fgaddon aircraft source{{!}}B-1B{{!}}b=release-3.6.0{{cbr}} | |||
{{fgaddon aircraft source|B-1B|b=branches/release-3.6.0}} | |||
=== Path and line number given === | |||
{{obr}}fgaddon aircraft source{{!}}F-15{{!}}Nasal/fox2.nas{{cbr}} | |||
{{fgaddon aircraft source|F-15|Nasal/fox2.nas}} | |||
{{obr}}fgaddon aircraft source{{!}}F-15{{!}}f15c-set.xml{{!}}l=8{{cbr}} | |||
{{fgaddon aircraft source|F-15|f15c-set.xml|l=8}} | |||
=== Usage in a wiki URL === | |||
<nowiki>[</nowiki>{{obr}}fgaddon aircraft source{{!}}F-15{{!}}Nasal/fox2.nas{{cbr}} The F-15's missile system<nowiki>]</nowiki> | |||
[{{fgaddon aircraft source|F-15|Nasal/fox2.nas}} The F-15's missile system] | |||
== | === Pointer to a file === | ||
{{obr}} | {{obr}}fgaddon aircraft source{{!}}F-15{{!}}Nasal/fox2.nas{{!}}file=yes{{cbr}} | ||
{{fgaddon aircraft source|F-15|Nasal/fox2.nas|file=yes}} | |||
=== The repository === | |||
{{obr}}fgaddon aircraft source | |||
{{!}} text = The official FGAddon aircraft repository | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| text = The official FGAddon aircraft repository | |||
}} | |||
=== File === | |||
{{obr}}fgaddon aircraft source | |||
{{!}} wrightFlyer1903 | |||
{{!}} wrightFlyer1903-set.xml | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| wrightFlyer1903 | |||
| wrightFlyer1903-set.xml | |||
}} | |||
=== File and a branch === | |||
{{obr}}fgaddon aircraft source | |||
{{!}} wrightFlyer1903 | |||
{{!}} wrightFlyer1903-set.xml | |||
{{!}} branch = branches/release-2016.1 | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| wrightFlyer1903 | |||
| wrightFlyer1903-set.xml | |||
| branch = branches/release-2016.1 | |||
}} | |||
=== File and a commit === | |||
{{obr}}fgaddon aircraft source | |||
{{!}} 787-8 | |||
{{!}} Nasal/systems.nas | |||
{{!}} commit = 1333 | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| 787-8 | |||
| Nasal/systems.nas | |||
| commit = 1333 | |||
}} | |||
== | === File and line number === | ||
= | {{obr}}fgaddon aircraft source | ||
{{!}} ornithopter | |||
{{ | {{!}} ornithopter-set.xml | ||
{{!}} line = 13 | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| ornithopter | |||
| ornithopter-set.xml | |||
| line = 13 | |||
}} | |||
=== | === File, line number, and commit === | ||
{{obr}}fgaddon aircraft source | |||
{{ | {{!}} ornithopter | ||
{{!}} ornithopter-set.xml | |||
{{!}} commit = 3 | |||
{{!}} line = 10 | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| ornithopter | |||
| ornithopter-set.xml | |||
| commit = 3 | |||
| line = 10 | |||
}} | |||
=== | === Custom label given === | ||
{{obr}}fgaddon aircraft source | |||
{{ | {{!}} mirage2000 | ||
{{!}} mirage2000-set.xml | |||
{{!}} text = The Mirage 2000 *-set.xml file | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| mirage2000 | |||
| mirage2000-set.xml | |||
| text = The Mirage 2000 *-set.xml file | |||
}} | |||
=== | === Prefix of $FG_AIRCRAFT === | ||
{{obr}}fgaddon aircraft source | |||
{{!}} SpaceShuttle | |||
{{!}} Sounds/SpaceShuttle-Sounds.xml | |||
{{!}} pre = $FG_AIRCRAFT | |||
{{cbr}} | |||
{{fgaddon aircraft source | |||
| SpaceShuttle | |||
| Sounds/SpaceShuttle-Sounds.xml | |||
| pre = $FG_AIRCRAFT | |||
}} | |||
=== Full path === | |||
== | {{obr}}fgaddon aircraft source | ||
=== | {{!}} CRJ700-family | ||
{{!}} CRJ900-set.xml | |||
{{!}} commit = 1418 | |||
{{!}} line = 10 | |||
{{cbr}} | |||
{{ | {{fgaddon aircraft source | ||
| CRJ700-family | |||
| CRJ900-set.xml | |||
| commit = 1418 | |||
| line = 10 | |||
}} | |||
== Related templates == | == Related templates == | ||
Line 92: | Line 217: | ||
}} | }} | ||
[[Category:Repository link | [[Category:Repository link templates]] | ||
</noinclude> | </noinclude> |