「テンプレート:PermissionOTRS」の版間の差分

ナビゲーションに移動 検索に移動
Fulfilling edit request by Tacsipacsi. Thanks for helping! +lang parameter
(ページの作成:「{{Autotranslate |1= {{ #if: {{{ticket|}}} | {{{ticket}}} | {{ #if: {{{id|}}} | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{i...」)
 
bsd>Perhelion
(Fulfilling edit request by Tacsipacsi. Thanks for helping! +lang parameter)
1行目: 1行目:
{{Autotranslate
{{#switch:1
|1=
   <!-- CASE 1: parameter "id" or "1" which is numeric and in the correct range -->
{{ #if: {{{ticket|}}}
   |{{#expr:{{{id|{{{1|0}}}}}}>1980000000000000 and {{{id|{{{1|0}}}}}}<3000000000000000}} =  
   | {{{ticket}}}
    {{Autotranslate|base=PermissionOTRS|1=https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{id|{{{1}}}}}}|2={{{id|{{{1}}}}}}|lang={{{lang|}}} }}<!-- 
   | {{ #if: {{{id|}}}
  -->{{#switch:{{{nocat|}}}{{NAMESPACE}}|File|File talk =[[Category:Items with OTRS permission confirmed]]|Template = [[Category:Custom OTRS permission template]] |Category = [[Category:Categories with OTRS permission template]] }}
    | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{id}}}
 
    | {{ #if: {{{freeform|}}}
  <!-- CASE 2: parameter "id" or "1" which is likely not right -->
      | {{{freeform}}}
   |{{#if:{{{id|{{{1|}}}}}}|1|0}} =
      | {{ #if: {{{1|}}}
    {{Autotranslate|base=PermissionOTRS|1=https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{id|{{{1}}}}}}|2=<span style="color:red">{{{id|{{{1}}}}}}</span>|lang={{{lang|}}} }}<!--
        | {{#ifeq:{{#expr:{{{1}}}> 1980000000000000 and {{{1}}}<3000000000000000}}|1
   -->{{gibox|text='''Warning:''' This file's OTRS ticket ID seems to be invalid.|type=issue}}<!-- 
          | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{1}}}
   -->{{#switch:{{{nocat|}}}{{NAMESPACE}}|File|File talk|Category|Template = [[Category:Items with incorrect OTRS ticket ID]]}}
          | {{ #if: {{{2|}}}
 
            | {{#ifeq:{{#expr:{{{2}}}>1980000000000000 and {{{2}}}<3000000000000000}}|1
  <!-- CASE 3: everything else which means no "id" or "1" parameters -->
            | https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber={{{2}}}
  |#default =
            | {{{1}}}{{#if: {{{2|}}}|{{!}}{{{2}}}}}{{#if: {{{3|}}}|{{!}}{{{3}}}}}{{#if: {{{4|}}}|{{!}}{{{4}}}}}{{#if: {{{5|}}}|{{!}}{{{5}}}}}{{#if: {{{6|}}}|{{!}}{{{6}}}}}{{#if: {{{7|}}}|{{!}}{{{7}}}}}{{#if: {{{8|}}}|{{!}}{{{8}}}}}{{#if: {{{9|}}}|{{!}}{{{9}}}}}
    {{Autotranslate|base=PermissionOTRS|1=|2=|lang={{{lang|}}} }}<!-- 
              | <span style="color: red; font-weight: bold; font-style: italic">&lt;template error: no id or ticket is specified&gt;</span>
  -->{{gibox|text='''Warning:''' This file is missing essential information needed to confirm validity of the OTRS ticket.|type=issue}}<!-- 
            }}
  --><includeonly>{{#switch:{{{nocat|}}}{{NAMESPACE}}|File|File talk|Category|Template = [[Category:Items with incorrect OTRS ticket ID]]}}</includeonly>
          }}
}}<span class="autoconfonly" id="otrstemplatewr" style="display:none;">{{#invoke:TemplatePar|check
        }}
|opt= id= nocat= date= comment= user= lang= 1= 2= 3= 4=
      }}
|cat= Pages using PermissionOTRS template with incorrect parameter
    }}
|errNS= 6
   }}
|template= [[Template:PermissionOTRS]]
}}
}}</span><noinclude>
|2=
{{ #if: {{{ticket|}}}
  |
  | {{ #if: {{{id|}}}
    | {{{id}}}
    | {{ #if: {{{freeform|}}}
      |
      | {{ #if: {{{1|}}}
        | {{#ifeq:{{#expr:{{{1}}}>1980000000000000 and {{{1}}}<3000000000000000}}|1
          | {{{1}}}
          | {{ #if: {{{2|}}}
            | {{#ifeq:{{#expr:{{{2}}}>1980000000000000 and {{{2}}}<3000000000000000}}|1
            | {{{2}}}
            |  
            }}
          }}
        }}
      }}
    }}
   }}
}}
|base=PermissionOTRS
}}
{{ #if: {{{ticket|}}}
   | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
  | {{ #if: {{{id|}}}
    | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
    | {{ #if: {{{freeform|}}}
      | {{{category|[[Category:Items with freeform OTRS permission confirmed|{{PAGENAME}}]]}}}
      | {{ #if: {{{1|}}}
        | {{#ifeq:{{#expr:{{{1}}}>1980000000000000 and {{{1}}}<3000000000000000}}|1
          | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
          | {{ #if: {{{2|}}}
            | {{#ifeq:{{#expr:{{{2}}}>1980000000000000 and {{{2}}}<3000000000000000}}|1
            | {{{category|[[Category:Items with OTRS permission confirmed]]}}}
              |
              {{ #if: {{{nocat|}}}
                |
                |<includeonly>{{{category|[[Category:Items missing OTRS ticket ID]]}}}{{gibox|text='''Warning:''' This file is missing essential information needed to confirm validity of the OTRS ticket.|type=issue}}</includeonly>
              }}
            }}
          }}
        }}
      }}
    }}
  }}
}}
{{ #if: {{{debug|}}}|<small>Template PermissionOTRS was called with the following parameters:{{{1}}}{{!}}{{{2}}}{{!}}id={{{id}}}{{!}}ticket={{{ticket}}}{{!}}freeform={{{freeform}}}{{!}}debug={{{debug}}}</small>}}{{ #if:{{{category|}}}{{{nocat|}}}{{{freeform|}}}|{{DebugTag}} }}<noinclude>


{{documentation}}
{{documentation}}
</noinclude>
</noinclude>
匿名利用者

案内メニュー