Template:GitlabDownload and Template:GitlabDownload/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
>Shirayuki
use #if
 
>Xxmarijnw
No edit summary
 
Line 4: Line 4:
<div style="white-space: nowrap;">
<div style="white-space: nowrap;">
{{#if:{{{snapshot|}}}|
{{#if:{{{snapshot|}}}|
[https://{{#if:{{{customdomain|}}}|{{{customdomain}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/downloads '''<translate><!--T:1--> Download snapshot</translate>'''] {{#if:{{{mastertarball|}}}| ([https://{{#if:{{{customdomain|}}}|{{{customdomain}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/-/archive/master/{{{2|{{PAGENAMEE:{{translatable}}}}}}}-master.tar.gz <translate><!--T:2--> Git master</translate>]) }}<br />
[https://test/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/downloads '''<translate><!--T:1--> Download snapshot</translate>'''] {{#if:{{{mastertarball|}}}| ([https://gitlab.com/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/-/archive/master/{{{2|{{PAGENAMEE:{{translatable}}}}}}}-master.tar.gz <translate><!--T:2--> Git master</translate>]) }}<br />
|{{#if:{{{mastertarball|}}}|
|{{#if:{{{mastertarball|}}}|
[https://{{#if:{{{customdomain|}}}|{{{customdomain}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/-/archive/master/{{{2|{{PAGENAMEE:{{translatable}}}}}}}-master.tar.gz '''<translate><!--T:3--> Download master snapshot</translate>''']<br />
[https://{{#if:{{{customdomain|}}}|{{{customdomain|}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/-/archive/master/{{{2|{{PAGENAMEE:{{translatable}}}}}}}-master.tar.gz '''<translate><!--T:3--> Download master snapshot</translate>''']<br />
}}}}
}}}}
GitLab:
GitLab:
* [https://{{#if:{{{customdomain|}}}|{{{customdomain}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/ <translate><!--T:4--> project page</translate>]
* [https://{{#if:{{{customdomain|}}}|{{{customdomain|}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/ <translate><!--T:4--> project page</translate>]
* [https://{{#if:{{{customdomain|}}}|{{{customdomain}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}.git <translate><!--T:5--> git repository URL</translate>] <sup>[<span></span>{{ll|Gerrit|2=<translate><!--T:6--> help</translate>}}]</sup>
* [https://{{#if:{{{customdomain|}}}|{{{customdomain|}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}.git <translate><!--T:5--> git repository URL</translate>] <sup>[<span></span>{{ll|Gerrit|2=<translate><!--T:6--> help</translate>}}]</sup>
* [https://{{#if:{{{customdomain|}}}|{{{customdomain}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/commits/master <translate><!--T:7--> commit history</translate>]<br />
* [https://{{#if:{{{customdomain|}}}|{{{customdomain|}}}|gitlab.com}}/{{{1|{{{user|}}}}}}/{{{2|{{PAGENAMEE:{{translatable}}}}}}}/commits/master <translate><!--T:7--> commit history</translate>]<br />
{{#if:{{{translatewiki|}}}||<small>''<translate><!--T:8--> Note:</translate><br /><translate><!--T:9--> No [[<tvar name=1>Special:MyLanguage/Localisation#Translation resources</tvar>|localisation]] updates are<br />provided by <tvar name=twn>{{ll|translatewiki.net|translatewiki.net}}</tvar>.</translate>''</small>}}
{{#if:{{{translatewiki|}}}||<small>''<translate><!--T:8--> Note:</translate><br /><translate><!--T:9--> No [[<tvar name=1>Special:MyLanguage/Localisation#Translation resources</tvar>|localisation]] updates are<br />provided by <tvar name=twn>{{ll|translatewiki.net|translatewiki.net}}</tvar>.</translate>''</small>}}
</div><includeonly>[[Category:Extensions in GitLab version control{{#translation:}}]]</includeonly><!--
</div><includeonly>[[Category:Extensions in GitLab version control{{#translation:}}]]</includeonly><!--
Line 30: Line 30:
* <code>snapshot</code>: Displays a link to your downloads page if you have added any.
* <code>snapshot</code>: Displays a link to your downloads page if you have added any.
* <code>mastertarball</code>: Displays a download link to a tarball of your <code>master</code> branch.
* <code>mastertarball</code>: Displays a download link to a tarball of your <code>master</code> branch.
* <code>customdomain</code>: Changes the domain from <code>gitlab.com</code> to something else.
   
   
==== Usage Example ====
==== Usage Example ====
Line 44: Line 45:
<code><nowiki>{{GitlabDownload|<Repository Username>|<Repository Name>|translatewiki=1}}</nowiki></code>
<code><nowiki>{{GitlabDownload|<Repository Username>|<Repository Name>|translatewiki=1}}</nowiki></code>


If you are using a self-hosted GitLab instance, you can change the domain by adding the parameter <code>customdomain</code>:
If you are using a self-hosted GitLab instance, you can change the domain using the parameter <code>customdomain</code>:


<code><nowiki>{{GitlabDownload|<Repository Username>|<Repository Name>|customdomain=example.com}}</nowiki></code>
<code><nowiki>{{GitlabDownload|<Repository Username>|<Repository Name>|customdomain=example.com}}</nowiki></code>