Difference between revisions of "Template:Commit"

From BITPlan Wiki
Jump to navigation Jump to search
m (created by WikiTask 2020-02-07T14:28:01Z)
(Undo revision 11605 by Wf (talk))
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
<!--
 
<!--
   -- Copyright (C) 2015-2018 BITPlan GmbH
+
   -- Copyright (C) 2015-2017 BITPlan GmbH
 
   --  
 
   --  
 
   -- Pater-Delp-Str. -- 1
 
   -- Pater-Delp-Str. -- 1
Line 140: Line 140:
 
}}
 
}}
 
{{#switch: {{{viewmode|}}}
 
{{#switch: {{{viewmode|}}}
|hidden=
 
 
|masterdetail=
 
|masterdetail=
 
|tableheader={{{!}} class='wikitable'
 
|tableheader={{{!}} class='wikitable'
Line 187: Line 186:
 
[[Category:Template]]
 
[[Category:Template]]
  
</noinclude><includeonly>{{#switch:{{{userparam|}}}|sidif={{#if:{{{?pageid|}}}|{{#replace:{{#replace:{{{?pageid}}}|#|}}|-|_}} isA Commit<br>|}}
+
</noinclude><includeonly>[[Category:Commit]]{{#switch:{{{userparam|}}}|sidif={{#if:{{{?pageid|}}}|{{#replace:{{#replace:{{{?pageid}}}|#|}}|-|_}} isA Commit<br>|}}
 
{{#if:{{{?host|}}}|"{{{?host}}}" is host of it <br>|}}
 
{{#if:{{{?host|}}}|"{{{?host}}}" is host of it <br>|}}
 
{{#if:{{{?path|}}}|"{{{?path}}}" is path of it <br>|}}
 
{{#if:{{{?path|}}}|"{{{?path}}}" is path of it <br>|}}
Line 199: Line 198:
 
|subobject={{#subobject:-
 
|subobject={{#subobject:-
 
|isA=Commit
 
|isA=Commit
|Commit host={{{host|}}}
+
|Commit host={{{host|http://git.bitplan.com}}}
|Commit path={{{path|}}}
+
|Commit path={{{path|source/java}}}
 
|Commit project={{{project|}}}
 
|Commit project={{{project|}}}
 
|Commit subject={{{subject|}}}
 
|Commit subject={{{subject|}}}
Line 219: Line 218:
 
}}
 
}}
 
{{#switch: {{{viewmode|}}}
 
{{#switch: {{{viewmode|}}}
|hidden=
+
|line=[{{#ifeq: {{#pos:{{{host|}}}|https://github.com}} | 0 |{{{host|}}}/{{{path|}}}/{{{project|}}}/commit/{{{hash|}}} | https://service.bitplan.com/gitweb/?p={{{path|}}}/{{{project|}}};a=commit;h={{{hash|}}} }} {{{project|}}}/{{{path|}}}:{{{subject|}}} ({{{name|}}}/{{{date|}}})]<br />
 
|masterdetail=
 
|masterdetail=
 
|tableheader={{{!}} class='wikitable'
 
|tableheader={{{!}} class='wikitable'
Line 259: Line 258:
 
{{!}}}
 
{{!}}}
 
}}
 
}}
}}
+
}}</includeonly>
</includeonly>
 

Revision as of 09:01, 8 February 2020

This is the template Commit. It belongs to the concept/topic Concept:Commit
You may find examples for the use of this template via the List of Commits.

Usage

storemode subobject

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|storemode=subobject
}}

storemode property

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|storemode=property
}}

storemode none

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|storemode=none
}}


viewmode tableheader

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|viewmode=tableheader
}}

viewmode tablerow

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|viewmode=tablerow
}}

viewmode tablefooter

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|viewmode=tablefooter
}}

viewmode labelfield

{{Commit
|host=
|path=
|project=
|subject=
|name=
|date=
|hash=
|viewmode=labelfield
}}

Source (pretty printed)

{{#switch:{{{userparam|}}}|sidif={{#if:{{{?pageid|}}}|{{#replace:{{#replace:{{{?pageid}}}|#|}}|-|_}} isA Commit<br>|}}
{{#if:{{{?host|}}}|"{{{?host}}}" is host of it <br>|}}
{{#if:{{{?path|}}}|"{{{?path}}}" is path of it <br>|}}
{{#if:{{{?project|}}}|"{{{?project}}}" is project of it <br>|}}
{{#if:{{{?subject|}}}|"{{{?subject}}}" is subject of it <br>|}}
{{#if:{{{?name|}}}|"{{{?name}}}" is name of it <br>|}}
{{#if:{{{?date|}}}|"{{{?date}}}" is date of it <br>|}}
{{#if:{{{?hash|}}}|"{{{?hash}}}" is hash of it <br>|}}
|#default={{#switch:{{{storemode|}}}
|none=
|subobject={{#subobject:-
|isA=Commit
|Commit host={{{host|}}}
|Commit path={{{path|}}}
|Commit project={{{project|}}}
|Commit subject={{{subject|}}}
|Commit name={{{name|}}}
|Commit date={{{date|}}}
|Commit hash={{{hash|}}}
}}
|#default={{#set:
|isA=Commit
|Commit host={{{host|}}}
|Commit path={{{path|}}}
|Commit project={{{project|}}}
|Commit subject={{{subject|}}}
|Commit name={{{name|}}}
|Commit date={{{date|}}}
|Commit hash={{{hash|}}}
}}
}}
{{#switch: {{{viewmode|}}}
|masterdetail=
|tableheader={{{!}} class='wikitable'
!host!!path!!project!!subject!!name!!date!!hash
{{!}}-
|tablerow=
{{!}}{{{host|}}}{{!}}{{!}}{{{path|}}}{{!}}{{!}}{{{project|}}}{{!}}{{!}}{{{subject|}}}{{!}}{{!}}{{{name|}}}{{!}}{{!}}{{{date|}}}{{!}}{{!}}{{{hash|}}}
{{!}}-
|tablefooter={{!}}}
|labelfield=
host={{#if:{{{host|}}}|{{{host|}}}|}}<br>path={{#if:{{{path|}}}|{{{path|}}}|}}<br>project={{#if:{{{project|}}}|{{{project|}}}|}}<br>subject={{#if:{{{subject|}}}|{{{subject|}}}|}}<br>name={{#if:{{{name|}}}|{{{name|}}}|}}<br>date={{#if:{{{date|}}}|{{{date|}}}|}}<br>hash={{#if:{{{hash|}}}|{{{hash|}}}|}}<br>|#default={{{!}} class='wikitable'
! colspan='2' {{!}}Commit
{{!}}-
{{#switch:{{{storemode|}}}|property=
! colspan='2' style='text-align:left' {{!}} {{Icon|name=edit|size=24}}{{Link|target=Special:FormEdit/Commit/{{FULLPAGENAME}}|title=edit}}
{{!}}-
}}
!host
{{!}}&nbsp;{{#if:{{{host|}}}|{{{host|}}}|}}
{{!}}-
!path
{{!}}&nbsp;{{#if:{{{path|}}}|{{{path|}}}|}}
{{!}}-
!project
{{!}}&nbsp;{{#if:{{{project|}}}|{{{project|}}}|}}
{{!}}-
!subject
{{!}}&nbsp;{{#if:{{{subject|}}}|{{{subject|}}}|}}
{{!}}-
!name
{{!}}&nbsp;{{#if:{{{name|}}}|{{{name|}}}|}}
{{!}}-
!date
{{!}}&nbsp;{{#if:{{{date|}}}|{{{date|}}}|}}
{{!}}-
!hash
{{!}}&nbsp;{{#if:{{{hash|}}}|{{{hash|}}}|}}
{{!}}-
{{!}}}
}}
}}

Source

Click on "Edit" to edit the noinclude-part Source of this Template.