6,566
edits
(Redesign and large simplification of the GitHub URL and Mediawiki link text construction. Now if the 'user' or 'proj' parameters are not supplied the base GitHub URL will be constructed, and the default text of "GitHub website" will be used.) |
(Redesign and large simplification of the GitLab URL and Mediawiki link text construction. If the 'user' or 'proj' parameters are not supplied, the base GitLab URL will be constructed, and the default text of "GitLab website" will be used.) |
||
Line 255: | Line 255: | ||
| gitlab = <!-- | | gitlab = <!-- | ||
-->{{{protocol|https}}}://<!-- URL protocol (default = https). | -->{{{protocol|https}}}://<!-- URL protocol (default = https). | ||
-->gitlab.com | -->gitlab.com<!-- The URL. | ||
-->{{#if: {{{user|}}} <!-- | -->{{#if: {{{user|{{{proj|}}}}}} | {{#if: {{{repo|}}}<!-- Continue with the URL construction, only if the project or repository is given. --> | ||
| {{#if: {{{user|}}} <!-- Project or user? --> | |||
| /{{{user}}} | |||
| /{{{proj|}}} | |||
-->{{{repo|}}}<!-- | }}<!-- | ||
-->{{#switch: {{{type|git web}}} <!-- | -->{{#if: {{{repo|}}} | /{{{repo|}}}}}<!-- The version control repository. | ||
-->{{#switch: {{{type|git web}}} <!-- The URL type. --> | |||
| git = .git<!-- Append '.git' to the base repository URL. --> | |||
| git web = /<!-- TODO: The rest of the URL. --> | |||
| zip = /repository/archive.zip<!-- The base zip file URL. | |||
-->{{#if: {{{commit|{{{tag|{{{branch|master}}}}}}}}} | |||
| ?ref={{{commit|{{{tag|{{{branch|master}}}}}}}}}<!-- Download for a specific commit, tag, or branch (defaulting to master). --> | |||
}} | |||
}} | |||
}}}} <!-- | |||
-->{{#if: {{{text|}}} | |||
| {{{text}}}<!-- The text description for the link. --> | |||
| {{#ifeq: {{{full|}}} | 1 | |||
| <!-- No text. --> | |||
| {{#if: {{{user|{{{proj|}}}}}} | |||
| {{#if: {{{repo|}}} | |||
| {{#if: {{{pre|}}} | |||
| {{{pre}}}<!-- A prefix to the link label. --> | |||
| {{#if: {{{simplepath|}}} | |||
| <!-- No project, repository or branch. --> | |||
| gitlab/<!-- Site advertising. | |||
-->{{{user|{{{proj|}}}}}}/<!-- The user or project name. | |||
-->{{{repo|}}}/<!-- The repository name. | |||
-->{{{commit|{{{tag|{{{branch|master}}}}}}}}}<!-- The commit, tag, or branch.--> | |||
}} | |||
}}<!-- | |||
-->{{#switch: {{{type|git web}}} <!-- The URL type. --> | |||
| git web = | |||
{{#if: {{{path|}}} | /{{{path}}}}}<!-- The file or directory path. | |||
-->{{#if: {{{line|}}} | #L{{{line}}}}} <!-- The optional line number(s). | |||
-->{{#switch: {{{view|tree}}} <!-- TODO: The view description. --> | |||
| tree = | |||
}} | |||
| zip = <nowiki></nowiki> zip file<!-- The link description. --> | |||
}} | }} | ||
}} | }} | ||
| GitLab website | |||
}} | }} | ||
}} | }} |