Template:Repo link: Difference between revisions

Jump to navigation Jump to search
Modification of the Gitorious link text construction - the text is prepended by "gitorious/" and if the project is not supplied, the text will fall back to "Gitorious website". The default values have also been removed.
(Modified the Gitorious URL generation so that if no project or repository is given, then just the base URL https://gitorious.org is created.)
(Modification of the Gitorious link text construction - the text is prepended by "gitorious/" and if the project is not supplied, the text will fall back to "Gitorious website". The default values have also been removed.)
Line 372: Line 372:
     | {{#ifeq: {{{full|}}} | 1
     | {{#ifeq: {{{full|}}} | 1
         | <!--                                                    No text. -->
         | <!--                                                    No text. -->
         | {{#if: {{{pre|}}}
         | {{#if: {{{proj|}}}
            | {{{pre}}}<!--                                       A prefix to the link label. -->
            | {{#if: {{{repo|}}}
            | {{#if: {{{simplepath|}}}
                | {{#if: {{{pre|}}}
                | <!--                                             No project, repository or branch. -->
                    | {{{pre}}}<!--                               A prefix to the link label. -->
                | {{{proj|fg}}}/<!--                               The project name.
                    | {{#if: {{{simplepath|}}}
                -->{{{repo|flightgear}}}/<!--                       The repository name.
                        | <!--                                     No project, repository or branch. -->
                -->{{#if: {{{mr|}}}
                        | gitorious/<!--                          Site advertising.
                    | merge-requests/{{{mr}}}<!--                 The merge request.-->
                        -->{{{proj|}}}/<!--                         The project name.
                    | {{{commit|{{{branch|HEAD}}}}}}<!--           Or the commit or branch.-->
                        -->{{{repo|}}}/<!--                         The repository name.
                   }}
                        -->{{#if: {{{mr|}}}
                            | merge-requests/{{{mr}}}<!--         The merge request.-->
                            | {{{commit|{{{branch|HEAD}}}}}}<!--   Or the commit or branch.-->
                          }}
                      }}
                   }}<!--
                -->{{#if: {{{path|}}} | /{{{path}}}}}<!--          The file or directory path.
                -->{{#if: {{{line|}}} | &#35;l{{{line}}}}} <!--    The optional line number. -->
               }}
               }}
          }}<!--
            | Gitorious website
        -->{{#if: {{{path|}}} | /{{{path}}}}}<!--                  The file or directory path.
          }}
        -->{{#if: {{{line|}}} | &#35;l{{{line}}}}} <!--            The optional line number. -->
       }}
       }}
   }}
   }}

Navigation menu