Template:Repo link/doc commit: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Switch to the {{repo link/doc design sourceforge commit}} documentation template.)
(Finer control for passing the 'git' and 'svn' parameters into the other templates.)
Line 5: Line 5:


{{repo link/doc usage
{{repo link/doc usage
| template   = {{{repo|MISSING}}} commit
| template                   = {{{repo|MISSING}}} commit
| commit     = 1
| commit                     = 1
| type_commit = num
| type_commit                 = num
| pos_commit = 1
| pos_commit                 = 1
| stat_commit = mandatory
| stat_commit                 = mandatory
| text       = 1
| text                       = 1
| type_text   = named
| type_text                   = named
| short_text = t
| short_text                 = t
| pos_text   = 2
| pos_text                   = 2
| sf         = 1
| sf                         = 1
| svn         = {{{svn|1}}}
| svn{{#if:{{{svn|}}}||NULL}} = {{{svn}}}
| git         = {{{git|1}}}
| git{{#if:{{{git|}}}||NULL}} = {{{git}}}
| break       = 0
| break                       = 0
}}
}}


Line 27: Line 27:
| repo{{#if:{{{repo|}}}||NULL}}  = {{{repo}}}
| repo{{#if:{{{repo|}}}||NULL}}  = {{{repo}}}
| user                            = 0
| user                            = 0
| git                             = {{{git|1}}}
| git{{#if:{{{git|}}}||NULL}}    = {{{git}}}
| svn                             = {{{svn|1}}}}}
| svn{{#if:{{{svn|}}}||NULL}}    = {{{svn}}}
{{repo link/doc plain text}}
{{repo link/doc plain text}}



Revision as of 19:47, 6 March 2016

{{Informative template|1=

Goal

This template can be used when linking to summaries of commits for the MISSING git repository at SourceForge. It is a subtemplate of the master {{repo link}} template designed to link to specific version control commits.

Usage

{{MISSING commit
| commit
| text       =
}}

The parameters are:

Parameter Description Abbreviated
parameter
Numbered
parameter
Status
commit The commit identifier. 1 mandatory
text Text to display as the link label. t 2 optional

Design

In this section, the following notation will be used:

Angular brackets + lower case text <xyz>
Template parameters.
Angular brackets + upper case text <XYZ>
Template constructed text.
Square brackets [xyz]
Optional text, only added if the parameter is set.
Or symbol |
The value on the left, if present, otherwise the value on the right of the symbol.

Overview

The general design is:

<cmd> <opt> [<URL> <TEXT>] <post>

Here the square brackets do not denote optional text, but will instead produce a Mediawiki link. This can be modified by setting full = 1 to produce:

<cmd> <opt> <URL> <post>


Site: SourceForge

Project page

For a normal SourceForge project page, the base URL is respectively constructed as:

https://sourceforge.net/p/flightgear/<repo>/

SourceForge git <URL>

For the svn repository type, the <URL> value will be:

https://sourceforge.net/p/flightgear/<repo>/ci/<commit>

SourceForge svn <URL>

For the svn repository type, the <URL> value will be:

https://sourceforge.net/p/flightgear/<repo>/<commit|HEAD>

SourceForge URL <TEXT>

The link text <TEXT>, if the text parameter is not set, will simply be:

MISSING commit <commit>

Or if the text parameter is supplied, the <TEXT> is simply:

<text>