Difference between revisions of "Template:FileSource"

[unchecked revision] [quality revision]
m
(Merge articles)
 

1 Usage[edit]

The FileSource template is used to indicate the source of any file used in this wiki. It should be added at the bottom of each page of the file namespace.

It puts a message box with a "light blue database" icon in the page, and adds this page to the File source category.

If the file source is located in STMicroelectronics intranet (restricted access), only signedlogged-up in users who have writing permissions, can see this location.

Usage:  {{FileSource | <source ID> | <file ID> | <comment>}}

Where:

  • <source ID> is the mandatory identifier of source of the file (see table below for the possible values)
  • <file ID> is the mandatory identifier of the file. Its values depend on the source identifier (see table below)
  • <comment> is an optional comment (see table below)
File source <source ID> <file ID> <comment>
STMicroelectronics Digital Assets Library (intranet - restricted access) Digital Assets Library Number of the document in this Library
Any space is replaced by a "%20" character
Not used
STMicroelectronics SharePoint user guide files library (intranet - restricted access) SharePoint File nameUser guide Relative path of the file source from the user guide files library root directory
Any space is replaced by a "%20" character
Not used
STMicroelectronics GeneralSharePoint training files library (intranet - restricted access) GeneralSharePoint File nameTraining Relative path of the file source from the training files library root directory
Any space is replaced by a "%20" character
Not used
STMicroelectronics UML diagrams' Git repository (intranet - restricted access) UML diagram Relative path of the UML diagram from the UML diagrams' Git repository root directory
Any space is replaced by a "%20" character
Not used
Internet Internet URL of the file source
Any space is removed
Optional link text
The file is "self-contained" (to modify the file, it is enough to download it) NA Optional comment Not used

2 Basic examples[edit]

You type You get
File source: document 7331 of the Digital Assets Library
{{FileSource | Digital Assets Library | 7331}}
Source.png

Source → STMicroelectronics

File source: UML diagram quadrature_x4_encoding.txt of the UML diagrams' Git repository document STM32MP157x-DKx.pptx of the user guide files library
{{FileSource | UMLUser diagramguide | timers/quadrature_x4_encoding.txtBoards/STM32MP157x-DKx.pptx}}
Source.png

Source → STMicroelectronics

File source: URL for OpenEmbedded document STM32MP15-Software-Software architecture.pptx of the training files library
{{FileSource | InternetTraining | http://www.openembedded.org/ | OpenEmbeddedSTM32MP15-Software-Software architecture.pptx}}
Source.png

Source → OpenEmbedded STMicroelectronics

File source: Link to SharePoint UML diagram quadrature_x4_encoding.txt of the UML diagrams' Git repository
{{FileSource | SharePoint|32F3348Discovery.pngUML diagram | timers/quadrature_x4_encoding.txt}}
Source.png

Source → STMicroelectronics

File source: Link to GeneralSharePoint URL for OpenEmbedded
{{FileSource | GeneralSharePoint|Debug_STM32CubeIDE.pngInternet | http://www.openembedded.org/ | OpenEmbedded}}
Source.png

Source → STMicroelectronics OpenEmbedded

"Self-contained" file
{{FileSource | NA | (archive file)}}
Source.png

Source → not applicable (archive file)

3 More examples[edit]

You type You get
No <source ID>
{{FileSource}}
Source.png

Source → STMicroelectronics

Unsupported value for <source ID>
{{FileSource | Unsupported value}}
Source.png

Source → STMicroelectronics

No <file ID> for the Digital Assets Library
{{FileSource | Digital Assets Library}}
Source.png

Source → STMicroelectronics

No <file ID> for the user guide files library

{{FileSource | User guide}}

Source.png

Source → STMicroelectronics

No <file ID> for the training files library

{{FileSource | Training}}

Source.png

Source → STMicroelectronics

No <file ID> for the UML diagrams' Git repository
{{FileSource | UML diagram}}
Source.png

Source → STMicroelectronics

No <file ID> for the Internet
{{FileSource | Internet}}
Source.png

Source → No URL supplied!

No <comment> for the Internet
{{FileSource | Internet | http://www.openembedded.org/}}
Source.png

Source → http://www.openembedded.org/

No <file ID> for the NA
{{FileSource | NA}}
Source.png

Source → not applicable

Check that the spaces before and after the message

BEFORE{{FileSource | NA}}AFTER<br>
BEFORE
{{FileSource | NA}}
AFTER

BEFORE

Source.png

Source → not applicable

AFTER

BEFORE

Source.png

Source → not applicable

AFTER

4 Maintenance[edit]

This template is a template common to all ST wikis.
Modifications must be done into the WikiModel. They must be reviewed by all ST wikis maintainers.
When approved, the template can be pushed/merged towards all ST wikis.

5 Code[edit]

Source.png

Source → STMicroelectronics

<noinclude>

==Usage==
The [[Template:FileSource|FileSource]] template is used '''to indicate the source of any file used in this wiki'''.  It should be added at the bottom of each page of the file namespace.

It puts a message box with a "light blue database" icon in the page, and adds this page to the [[:Category:File source|File source]] category.

If the file source is located in STMicroelectronics intranet (restricted access), '''only signed-uplogged-in users who have writing permissions, can see this location'''.

 Usage:  <nowiki>{{</nowiki>FileSource | {{HighlightParam|<source ID>}} | {{HighlightParam|<file ID>}} | {{HighlightParam|<comment>}}}}
Where:
* {{HighlightParam|<source ID>}} is the '''mandatory''' identifier of source of the file (see table below for the possible values)
* {{HighlightParam|<file ID>}} is the '''mandatory''' identifier of the file. Its values depend on the source identifier (see table below)
* {{HighlightParam|<comment>}} is an '''optional''' comment (see table below)

{| class="st-table"
! File source !! {{HighlightParam|<source ID>}} !! {{HighlightParam|<file ID>}} !! {{HighlightParam|<comment>}}
|-
| STMicroelectronics Digital Assets Library (intranet - restricted access)
{{InternalInfo|[https://medialib.st.com/index.php Digital Assets Library]}}
| {{HighlightParam|Digital Assets Library}} || Number of the document in this Library<br />Any space is replaced by a "%20" character || Not used
|-
| STMicroelectronics SharePoint user guide files library (intranet - restricted access)
{{InternalInfo|[http://best-collab.st.com/docshare/MCDAppli/SupportSolution/Documents/Web Community/STM32 Wiki/Images/]}}
| {{HighlightParam|SharePoint}} || File namews/MCD_Embedded_SW_MPU/Support/OurDocuments/User%20Guide/Sources%20files/ User guide files library]}}
| {{HighlightParam|User guide}} || Relative path of the file source from the user guide files library root directory<br />Any space is replaced by a "%20" character || Not used
|- 
| STMicroelectronics GeneralSharePoint training files library (intranet - restricted access)
{{InternalInfo|[http://best-drivecollab.st.com/media/MMS/ws/MCD/STM32/Wiki/]}}
| {{HighlightParam|GeneralSharePoint}} || File name_Embedded_SW_MPU/Support/OurDocuments/Trainings/ Training files library]}}
| {{HighlightParam|Training}} || Relative path of the file source from the training files library root directory<br />Any space is replaced by a "%20" character || Not used
|-
| STMicroelectronics UML diagrams' Git repository (intranet - restricted access)
{{InternalInfo|[https://codex.cro.st.com/plugins/git/mpu/oe/st/plantumplantuml UML diagrams' Git repository]}}
| {{HighlightParam|UML diagram}} || Relative path of the UML diagram from the UML diagrams' Git repository root directory<br />Any space is replaced by a "%20" character || Not used
|-
| Internet || {{HighlightParam|Internet}} || URL of the file source<br />Any space is removed || Optional link text
|-
| The file is "self-contained" (to modify the file, it is enough to download it) || {{HighlightParam|NA}} || Optional comment || Not used
|}

==Basic examples==
{| class="st-table"
! You type !! You get
|-
| File source: document 7331 of the Digital Assets Library<pre style="white-space: pre-wrap;">

{{FileSource | Digital Assets Library | 7331}}</pre>

|
{{FileSource | Digital Assets Library | 7331}}
|-
|  File source: UML diagram quadrature_x4_encoding.txt of the UML diagrams' Git repository<pre style="white-space: pre-wrap;">

{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}</pre>

|
{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}
|-
| File source: URL for OpenEmbedded<pre style="white-space: pre-wrap;">

{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}</pre>

|
{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}
|-
| File source: Link to SharePoint<pre style="white-space: pre-wrap;">

{{FileSource | SharePoint|32F3348Discovery.png}}</pre>

|
{{FileSource | SharePoint|32F3348Discovery.png}}
|-
| File source: Link to GeneralSharePoint<pre style="white-space: pre-wrap;">

{{FileSource | GeneralSharePoint|Debug_STM32CubeIDE.png}}</pre>

|
{{FileSource | GeneralSharePoint|Debug_STM32CubeIDE.pngdocument STM32MP157x-DKx.pptx of the user guide files library<pre style="white-space: pre-wrap;">

{{FileSource | User guide | Boards/STM32MP157x-DKx.pptx}}</pre>

|
{{FileSource | User guide | Boards/STM32MP157x-DKx.pptx}}
|-
|  File source: document STM32MP15-Software-Software architecture.pptx of the training files library<pre style="white-space: pre-wrap;">

{{FileSource | Training | STM32MP15-Software-Software architecture.pptx}}</pre>

|
{{FileSource | Training | STM32MP15-Software-Software architecture.pptx}}
|-
|  File source: UML diagram quadrature_x4_encoding.txt of the UML diagrams' Git repository<pre style="white-space: pre-wrap;">

{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}</pre>

|
{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}
|-
| File source: URL for OpenEmbedded<pre style="white-space: pre-wrap;">

{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}</pre>

|
{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}
|-
| "Self-contained" file<pre style="white-space: pre-wrap;">

{{FileSource | NA | (archive file)}}</pre>

|
{{FileSource | NA | (archive file)}}
|}

==More examples==
{| class="st-table"
! You type !! You get
|-
| No  {{HighlightParam|<source ID>}}<pre style="white-space: pre-wrap;">

{{FileSource}}</pre>

|
{{FileSource}}
|-
| Unsupported value for {{HighlightParam|<source ID>}}<pre style="white-space: pre-wrap;">

{{FileSource | Unsupported value}}</pre>

|
{{FileSource | Unsupported value}}
|-
| No {{HighlightParam|<file ID>}} for the Digital Assets Library<pre style="white-space: pre-wrap;">

{{FileSource | Digital Assets Library}}</pre>

|
{{FileSource | Digital Assets Library}}
|-
| No {{HighlightParam|<file ID>}} for the user guide files library<pre style="white-space: pre-wrap;">

{{FileSource | User guide}}</pre>

|
{{FileSource | User guide}}
|-
| No {{HighlightParam|<file ID>}} for the training files library<pre style="white-space: pre-wrap;">

{{FileSource | Training}}</pre>

|
{{FileSource | Training}}
|-
| No {{HighlightParam|<file ID>}} for the UML diagrams' Git repository<pre style="white-space: pre-wrap;">

{{FileSource | UML diagram}}</pre>

|
{{FileSource | UML diagram}}
|-
| No {{HighlightParam|<file ID>}} for the Internet<pre style="white-space: pre-wrap;">

{{FileSource | Internet}}</pre>

|
{{FileSource | Internet}}
|-
| No {{HighlightParam|<comment>}} for the Internet<pre style="white-space: pre-wrap;">

{{FileSource | Internet | http://www.openembedded.org/}}</pre>

|
{{FileSource | Internet | http://www.openembedded.org/}}
|-
| No {{HighlightParam|<file ID>}} for the NA<pre style="white-space: pre-wrap;">

{{FileSource | NA}}</pre>

|
{{FileSource | NA}}
|}

==Code==</noinclude>{|
| style="border-width: 1px 0px 1px 1px; border-style: solid; border-color: {{STLightBlue}}; background-color: transparent; color: #58585A; font-weight: normal; text-align:left;" | [[File:Source.png|40px|link=]]
| style="border-width: 1px 1px 1px 0px; border-style: solid; border-color: {{STLightBlue}}; background-color: transparent; color: #58585A; font-weight: normal; text-align:left; font-family:Arial-
| Check that the spaces before and after the message<pre style="white-space: pre-wrap;">

BEFORE{{FileSource | NA}}AFTER<br>

BEFORE
{{FileSource | NA}}
AFTER</pre>

|
BEFORE{{FileSource | NA}}AFTER<br>

BEFORE
{{FileSource | NA}}
AFTER
|}

==Maintenance==
This template is a template common to all ST wikis. <br>

Modifications must be done into the [[stwikimodel:Template:FileSource|WikiModel]]. They must be reviewed by all  ST wikis maintainers.<br>

When approved, the template can be pushed/merged towards all ST wikis.

==Code==</noinclude>{| class="st-table" style="border-color: {{STLightBlue}};"
| style="border-right-width: 0px;" | [[File:Source.png|40px|link=]]
| style="border-left-width: 0px;" |
{{#switch: {{{1}}}
 | Internet = Source → {{#if: {{{2|}}}|[{{#replace:{{{2|}}}| |}} {{{3|{{{2}}}}}}]|{{Highlight|No URL supplied!}}}}
 | NA = Source → not applicable {{{2|}}}
 | Source → STMicroelectronics {{#tag:secureTransclude||
src=ProtectedTemplate:FileSource|
params={{{1|}}} {{!}} {{{2|}}}
}}
}}
|}<includeonly>[[Category:File source]]</includeonly>
Line 2: Line 2:
 
==Usage==
 
==Usage==
 
The [[Template:FileSource|FileSource]] template is used '''to indicate the source of any file used in this wiki'''.  It should be added at the bottom of each page of the file namespace.
 
The [[Template:FileSource|FileSource]] template is used '''to indicate the source of any file used in this wiki'''.  It should be added at the bottom of each page of the file namespace.
+
 
 
It puts a message box with a "light blue database" icon in the page, and adds this page to the [[:Category:File source|File source]] category.
 
It puts a message box with a "light blue database" icon in the page, and adds this page to the [[:Category:File source|File source]] category.
   
If the file source is located in STMicroelectronics intranet (restricted access), '''only signed-up users who have writing permissions, can see this location'''.
+
If the file source is located in STMicroelectronics intranet (restricted access), '''only logged-in users who have writing permissions, can see this location'''.
   
 
  Usage:  <nowiki>{{</nowiki>FileSource | {{HighlightParam|<source ID>}} | {{HighlightParam|<file ID>}} | {{HighlightParam|<comment>}}}}
 
  Usage:  <nowiki>{{</nowiki>FileSource | {{HighlightParam|<source ID>}} | {{HighlightParam|<file ID>}} | {{HighlightParam|<comment>}}}}
Line 20: Line 20:
 
| {{HighlightParam|Digital Assets Library}} || Number of the document in this Library<br />Any space is replaced by a "%20" character || Not used
 
| {{HighlightParam|Digital Assets Library}} || Number of the document in this Library<br />Any space is replaced by a "%20" character || Not used
 
|-
 
|-
| STMicroelectronics SharePoint (intranet - restricted access)
+
| STMicroelectronics user guide files library (intranet - restricted access)
{{InternalInfo|[http://best.st.com/docshare/MCDAppli/SupportSolution/Documents/Web Community/STM32 Wiki/Images/]}}
+
{{InternalInfo|[http://best-collab.st.com/ws/MCD_Embedded_SW_MPU/Support/OurDocuments/User%20Guide/Sources%20files/ User guide files library]}}
| {{HighlightParam|SharePoint}} || File name<br />Any space is replaced by a "%20" character || Not used
+
| {{HighlightParam|User guide}} || Relative path of the file source from the user guide files library root directory<br />Any space is replaced by a "%20" character || Not used
|-
+
|-  
| STMicroelectronics GeneralSharePoint (intranet - restricted access)
+
| STMicroelectronics training files library (intranet - restricted access)
{{InternalInfo|[http://best-drive.st.com/media/MMS/MCD/STM32/Wiki/]}}
+
{{InternalInfo|[http://best-collab.st.com/ws/MCD_Embedded_SW_MPU/Support/OurDocuments/Trainings/ Training files library]}}
| {{HighlightParam|GeneralSharePoint}} || File name<br />Any space is replaced by a "%20" character || Not used
+
| {{HighlightParam|Training}} || Relative path of the file source from the training files library root directory<br />Any space is replaced by a "%20" character || Not used
 
|-
 
|-
 
| STMicroelectronics UML diagrams' Git repository (intranet - restricted access)
 
| STMicroelectronics UML diagrams' Git repository (intranet - restricted access)
{{InternalInfo|[https://codex.cro.st.com/plugins/git/mpu/oe/st/plantum UML diagrams' Git repository]}}
+
{{InternalInfo|[https://codex.cro.st.com/plugins/git/mpu/oe/st/plantuml UML diagrams' Git repository]}}
 
| {{HighlightParam|UML diagram}} || Relative path of the UML diagram from the UML diagrams' Git repository root directory<br />Any space is replaced by a "%20" character || Not used
 
| {{HighlightParam|UML diagram}} || Relative path of the UML diagram from the UML diagrams' Git repository root directory<br />Any space is replaced by a "%20" character || Not used
 
|-
 
|-
Line 48: Line 48:
 
{{FileSource | Digital Assets Library | 7331}}
 
{{FileSource | Digital Assets Library | 7331}}
 
|-
 
|-
| File source: UML diagram quadrature_x4_encoding.txt of the UML diagrams' Git repository
+
| File source: document STM32MP157x-DKx.pptx of the user guide files library
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}
+
{{FileSource | User guide | Boards/STM32MP157x-DKx.pptx}}
 
</pre>
 
</pre>
 
|
 
|
{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}
+
{{FileSource | User guide | Boards/STM32MP157x-DKx.pptx}}
 
|-
 
|-
| File source: URL for OpenEmbedded
+
| File source: document STM32MP15-Software-Software architecture.pptx of the training files library
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}
+
{{FileSource | Training | STM32MP15-Software-Software architecture.pptx}}
 
</pre>
 
</pre>
 
|
 
|
{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}
+
{{FileSource | Training | STM32MP15-Software-Software architecture.pptx}}
 
|-
 
|-
| File source: Link to SharePoint
+
| File source: UML diagram quadrature_x4_encoding.txt of the UML diagrams' Git repository
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
{{FileSource | SharePoint|32F3348Discovery.png}}
+
{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}
 
</pre>
 
</pre>
 
|
 
|
{{FileSource | SharePoint|32F3348Discovery.png}}
+
{{FileSource | UML diagram | timers/quadrature_x4_encoding.txt}}
 
|-
 
|-
| File source: Link to GeneralSharePoint
+
| File source: URL for OpenEmbedded
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
{{FileSource | GeneralSharePoint|Debug_STM32CubeIDE.png}}
+
{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}
 
</pre>
 
</pre>
 
|
 
|
{{FileSource | GeneralSharePoint|Debug_STM32CubeIDE.png}}
+
{{FileSource | Internet | http://www.openembedded.org/ | OpenEmbedded}}
 
|-
 
|-
 
| "Self-contained" file
 
| "Self-contained" file
Line 108: Line 108:
 
|
 
|
 
{{FileSource | Digital Assets Library}}
 
{{FileSource | Digital Assets Library}}
  +
|-
  +
| No {{HighlightParam|<file ID>}} for the user guide files library
  +
<pre style="white-space: pre-wrap;">
  +
{{FileSource | User guide}}
  +
</pre>
  +
|
  +
{{FileSource | User guide}}
  +
|-
  +
| No {{HighlightParam|<file ID>}} for the training files library
  +
<pre style="white-space: pre-wrap;">
  +
{{FileSource | Training}}
  +
</pre>
  +
|
  +
{{FileSource | Training}}
 
|-
 
|-
 
| No {{HighlightParam|<file ID>}} for the UML diagrams' Git repository
 
| No {{HighlightParam|<file ID>}} for the UML diagrams' Git repository
Line 136: Line 150:
 
|
 
|
 
{{FileSource | NA}}
 
{{FileSource | NA}}
  +
|-
  +
| Check that the spaces before and after the message
  +
<pre style="white-space: pre-wrap;">
  +
BEFORE{{FileSource | NA}}AFTER<br>
  +
BEFORE
  +
{{FileSource | NA}}
  +
AFTER
  +
</pre>
  +
|
  +
BEFORE{{FileSource | NA}}AFTER<br>
  +
BEFORE
  +
{{FileSource | NA}}
  +
AFTER
 
|}
 
|}
  +
  +
==Maintenance==
  +
This template is a template common to all ST wikis. <br>
  +
Modifications must be done into the [[stwikimodel:Template:FileSource|WikiModel]]. They must be reviewed by all  ST wikis maintainers.<br>
  +
When approved, the template can be pushed/merged towards all ST wikis.
   
 
==Code==
 
==Code==
</noinclude>{|
+
</noinclude>{| class="st-table" style="border-color: {{STLightBlue}};"
| style="border-width: 1px 0px 1px 1px; border-style: solid; border-color: {{STLightBlue}}; background-color: transparent; color: #58585A; font-weight: normal; text-align:left;" | [[File:Source.png|40px|link=]]
+
| style="border-right-width: 0px;" | [[File:Source.png|40px|link=]]
| style="border-width: 1px 1px 1px 0px; border-style: solid; border-color: {{STLightBlue}}; background-color: transparent; color: #58585A; font-weight: normal; text-align:left; font-family:Arial;" |
+
| style="border-left-width: 0px;" |
 
{{#switch: {{{1}}}
 
{{#switch: {{{1}}}
 
  | Internet = Source → {{#if: {{{2|}}}|[{{#replace:{{{2|}}}| |}} {{{3|{{{2}}}}}}]|{{Highlight|No URL supplied!}}}}
 
  | Internet = Source → {{#if: {{{2|}}}|[{{#replace:{{{2|}}}| |}} {{{3|{{{2}}}}}}]|{{Highlight|No URL supplied!}}}}