Difference between revisions of "Template:Metabox"
From OOModels
Jump to navigationJump to search
AndreasLeue (talk | contribs) |
|||
(75 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{| cellpadding="2" cellspacing="1" width="300px" class="metabox" | <includeonly>{| cellpadding="2" cellspacing="1" width="300px" class="metabox" | ||
! Classification | !colspan="2"| Classification | ||
|- | |- | ||
{{#if: {{{Meta_Type|}}}| | {{#if: {{{Meta_Type|}}}| | ||
{{!}} ''Type'' | {{!}} ''Type'' | ||
Line 32: | Line 30: | ||
{{!}} ''Supertype 5'' | {{!}} ''Supertype 5'' | ||
{{!}} [[{{{Meta_Supertype_5}}}]] | {{!}} [[{{{Meta_Supertype_5}}}]] | ||
{{!-}} | |||
}} | |||
{{#if: {{{Meta_MIMEType|}}}| | |||
{{!}} ''MIME Type'' | |||
{{!}} {{{Meta_MIMEType}}} | |||
{{!-}} | |||
}} | |||
{{#if: {{{Meta_FileExtension|}}}| | |||
{{!}} ''FileExtension'' | |||
{{!}} {{{Meta_FileExtension}}} | |||
{{!-}} | {{!-}} | ||
}} | }} | ||
{{#if: {{{Meta_Author|}}}| | {{#if: {{{Meta_Author|}}}| | ||
{{!}} ''Author'' | {{!}} ''Author'' | ||
{{!}} [[{{{Meta_Author}}}]] | {{!}} {{#ifeq: {{{Meta_AuthorExternal|}}}|true|{{{Meta_Author}}}|[[{{{Meta_Author}}}]]}} | ||
{{!-}} | {{!-}} | ||
}} | }} | ||
Line 72: | Line 80: | ||
{{!}} ''Category'' | {{!}} ''Category'' | ||
{{!}} [[{{{Meta_Category}}}]] | {{!}} [[{{{Meta_Category}}}]] | ||
{{!-}} | {{!-}} | ||
}} | }} | ||
{{#if: {{{Meta_Maturity|}}}| | |||
{{!}} ''Maturity'' | {{!}} ''Maturity'' | ||
{{!}} {{{Meta_Maturity}}} | {{!}} {{{Meta_Maturity}}} | ||
{{!-}} | |||
|}} | |}} | ||
{{#if: {{#ifeq: {{lc:{{{Meta_Download|false}}}}}|true|true|}}{{#ifeq: {{lc:{{{Meta_Signatures|false}}}}}|true|true|}}{{{Meta_Link|}}}{{{Meta_Diagram|}}}| | |||
{{#if: {{#ifeq: {{lc:{{{Meta_Download|false}}}}}|true|true|}}{{{Meta_Link|}}}| | !colspan="2"{{!}} More | ||
{{!-}} | {{!-}} | ||
{{#ifeq: {{lc:{{{Meta_Download|false}}}}}|true| | {{#ifeq: {{lc:{{{Meta_Download|false}}}}}|true| | ||
{{!}}colspan="2"{{!}} {{DownloadableArtefact}} | |||
{{!-}} | {{!-}} | ||
|}} | |}} | ||
{{#if: {{{Meta_Diagram|}}}| | |||
{{!}}colspan="2"{{!}} [[{{{Meta_Diagram}}}|Diagram]] | |||
{{!-}} | |||
}} | |||
{{#if: {{{Meta_Link|}}}| | {{#if: {{{Meta_Link|}}}| | ||
{{!}}colspan="2"{{!}} [{{{Meta_Link}}} {{{Meta_Link}}}] | |||
{{!-}} | |||
}} | |||
{{#if: {{{Meta_Signatures|}}}| | |||
{{!}}colspan="2"{{!}} [[{{FULLPAGENAME}}_Signatures|Signatures]] | |||
{{!-}} | {{!-}} | ||
}} | }} | ||
|}} | |}} | ||
|}</includeonly><noinclude> | {{#if:{{{Meta_Category|}}}| | ||
{{#ifeq:{{NAMESPACE}}|Namespace||{{#ifeq:{{NAMESPACE}}|Domain|| | |||
!colspan="2"{{!}} Namespace ([[Namespace:{{MajorNamespaceName|NamespaceName={{NamespaceName|IsPackage={{#switch:{{{Meta_Category||}}}|Type:org/oomodels/wiki/Package=true|Type:org/oomodels/wiki/Domain=true|Type:org/oomodels/wiki/Namespace=true|false}}|IsVersion={{#switch:{{{Meta_Category||}}}|Type:org/oomodels/wiki/Version=true|Type:org/oomodels/wiki/Variant=true|false}}}}}}|more]]) | |||
{{!-}} | |||
{{!}}colspan="2"{{!}} | |||
{{Namespace:{{MajorNamespaceName|NamespaceName={{NamespaceName|IsPackage={{#switch:{{{Meta_Category||}}}|Type:org/oomodels/wiki/Package=true|Type:org/oomodels/wiki/Domain=true|Type:org/oomodels/wiki/Namespace=true|false}}|IsVersion={{#switch:{{{Meta_Category||}}}|Type:org/oomodels/wiki/Version=true|Type:org/oomodels/wiki/Variant=true|false}}}}}}}} | |||
{{!-}} | |||
}}}} | |||
|}} | |||
{{!-}} | |||
!colspan="2" style="font-size:70%; padding:0 0 0 0; spacing:0 0 0 0; margin:0 0 0 0;"{{!}} <span class="plainlinks">[{{fullurl:CreatePages}}?namespace={{NamespaceName|IsPackage={{#switch:{{{Meta_Category||}}}|Type:org/oomodels/wiki/Package=true|Type:org/oomodels/wiki/Domain=true|Type:org/oomodels/wiki/Namespace=true|false}}|IsVersion={{#switch:{{{Meta_Category||}}}|Type:org/oomodels/wiki/Version=true|Type:org/oomodels/wiki/Variant=true|false}}}} create new pages]</span> | |||
|} | |||
{{#ifeq:{{{Meta_AddTypeToCategory|true}}}|true|{{#if:{{{Meta_Type|}}}|[[Category:{{{Meta_Type}}}|{{#replace:{{PAGENAME}}|(Template/)?(.*)|\2}}]]}}}} | |||
{{#ifeq:{{{Meta_AddDomainToCategory|true}}}|true|{{#if:{{{Meta_Domain|}}}|[[Category:{{{Meta_Domain}}}|{{#replace:{{PAGENAME}}|(Template/)?(.*)|\2}}]]}}}} | |||
{{#ifeq:{{{Meta_AddCategoryToCategory|true}}}|true|{{#if:{{{Meta_Category|}}}|[[Category:{{{Meta_Category}}}|{{#replace:{{PAGENAME}}|(Template/)?(.*)|\2}}]]}}}}</includeonly><noinclude> | |||
This template is used to add meta data to artefacts. | |||
==Usage== | |||
Add the following code to the start of your wiki page: | |||
This | <pre> | ||
{{Metabox | |||
Meta_NAME1 = VALUE1 | |||
Meta_NAME2 = VALUE2 | |||
... | |||
}} | |||
</pre> | |||
==Meta Attributes== | |||
{|class="nicetable" | |||
! Name | |||
! Description | |||
! Used on | |||
! Example | |||
|- | |||
| Meta_Type | |||
| The detailed type of the artefact. It is the name of a wikipage describing the type, the format is '''Type:.../.../...'''. This information is used by the [[DownloadManager]] and the [[ArtefactConversion]]. | |||
| Artefact pages | |||
| [[Type:org/ooem/UMLClass/1.0]] | |||
|- | |||
| Meta_Encoding | |||
| The detailed encoding of the artefact, which is technically also a type. It is the name of a wikipage describing the encoding, the format is '''Type:.../.../...'''. If provided, this information is used in addition to the type by the [[DownloadManager]] and the [[ArtefactConversion]]. | |||
| Artefact pages | |||
| [[Type:org/xocp/OCP/xml/2.0]] | |||
|- | |||
| Meta_Category | |||
| The type of the wiki page within oomodels. This information is partially redundant to the name of the page and the type, but not exactly the same. Specifically, the category [[Type:org/oomodels/wiki/Package]] is used to automatically include information from the corresponding namespace. | |||
| Formal wiki pages (Artefacts etc.) | |||
| [[Type:org/oomodels/wiki/Model]] | |||
|- | |||
| Meta_Supertype_1 | |||
| Links to the first supertype page. The format is the same as Meta_Type | |||
| Type pages | |||
| [[Type:org/ooem/UMLModelElement]] | |||
|- | |||
| Meta_Supertype_2 | |||
| 2nd supertype | |||
| Type pages | |||
| | |||
|- | |||
| Meta_Supertype_3 | |||
| 3rd supertype | |||
| Type pages | |||
| | |||
|- | |||
| Meta_Supertype_4 | |||
| 4th supertype | |||
| Type pages | |||
| | |||
|- | |||
| Meta_Supertype_5 | |||
| 5th supertype | |||
| Type pages | |||
| | |||
|- | |||
| Meta_MIMEType | |||
| The MIME type for resources of the respective type. It used by the [[DownloadManager]] to provide it to the browser when downloading. | |||
| Type pages | |||
| text/xml | |||
|- | |||
| Meta_FileExtension | |||
| Extension for files of the respective type. It used by the [[DownloadManager]] to provide it to the browser when downloading. | |||
| Type pages | |||
| xmi | |||
|- | |||
| Meta_Author | |||
| The author of the artefact. It is the name of a wikipage describing the author, the format is '''Contact:Person/.../.../...''' or '''Contact:Company/.../.../...'''. Please do not add an email or url directly here, but describe yourself in the context of oomodels a little on a seperate page. Reader's will appreciate this. | |||
| Arbitrary pages | |||
| [[Contact:Person/net/leue/andreas]] | |||
|- | |||
| Meta_Copyright | |||
| If there's a specific copyright on the code, you may state here so. Please note: by putting an artefact on oomodels.org you '''agree that anyone can download this code on her machine by means of the [[DownloadManager]], independent of any rights you hold on that artefact'''. | |||
| Arbitrary pages | |||
| 2008 by Hugo Meier | |||
|- | |||
| Meta_Owner | |||
| Within a namespace you are in control of (see [[Help:Structure]]), you can declare an ownership of that code. '''That does not restrict the use of the [[DownloadManager]] for anyone to download the respective artefacts'''. | |||
| Artefact and Product pages | |||
| | |||
|- | |||
| Meta_Vendor | |||
| Where to get the software from. | |||
| Product pages | |||
| [[Contact:Company/com/sphenon]] | |||
|- | |||
| Meta_License | |||
| What license applies to the artefact (if not the default creative commons license) or to the software. | |||
| Artefact and Product pages. | |||
| [http://www.gnu.org/licenses/lgpl.html LGPL] | |||
|- | |||
| Meta_Domain | |||
| The domain of the artefact. It is the name of a wikipage describing the domain, the format is '''Domain:.../.../...'''. | |||
| Artefact pages | |||
| [[Domain:business/industry/insurance]] | |||
|- | |||
| Meta_Maturity | |||
| The maturity of the page content. | |||
| Arbitrary pages | |||
| work in progress | |||
|- | |||
| Meta_Download | |||
| If this is a donwloadable artefact (true or false). | |||
| Artefact pages | |||
| true | |||
|- | |||
| Meta_Diagram | |||
| An additional diagram showing this element in a context. | |||
| Arbitrary pages | |||
| [[Artefact:Diagram/net/leue/andreas/process01/Process01]] | |||
|- | |||
| Meta_Link | |||
| An additional external link providing more information. | |||
| Arbitrary pages | |||
| [http://www.sphenon.de www.sphenon.de] | |||
|- | |||
| Meta_Signatures | |||
| If true, a link to an associated signature page is shown. Signature pages share the name of the page they refer to with the additional postfix "_Signatures". They contain pgp (or similar) signature certificates. | |||
| Arbitrary pages | |||
| [http://www.sphenon.de www.sphenon.de]] | |||
|- | |||
| Meta_AddTypeToCategory | |||
| If true, this page is automatically added to the category of it's Meta_Type | |||
| true (default) | |||
|- | |||
| Meta_AddDomainToCategory | |||
| If true, this page is automatically added to the category of it's Meta_Domain | |||
| true (default) | |||
|- | |||
| Meta_AddCategoryToCategory | |||
| If true, this page is automatically added to the category of it's Meta_Category | |||
| true (default) | |||
|} | |||
</noinclude> | </noinclude> |
Latest revision as of 14:29, 7 May 2009
This template is used to add meta data to artefacts.
Usage[edit]
Add the following code to the start of your wiki page:
{{Metabox Meta_NAME1 = VALUE1 Meta_NAME2 = VALUE2 ... }}
Meta Attributes[edit]
Name | Description | Used on | Example |
---|---|---|---|
Meta_Type | The detailed type of the artefact. It is the name of a wikipage describing the type, the format is Type:.../.../.... This information is used by the DownloadManager and the ArtefactConversion. | Artefact pages | Type:org/ooem/UMLClass/1.0 |
Meta_Encoding | The detailed encoding of the artefact, which is technically also a type. It is the name of a wikipage describing the encoding, the format is Type:.../.../.... If provided, this information is used in addition to the type by the DownloadManager and the ArtefactConversion. | Artefact pages | Type:org/xocp/OCP/xml/2.0 |
Meta_Category | The type of the wiki page within oomodels. This information is partially redundant to the name of the page and the type, but not exactly the same. Specifically, the category Type:org/oomodels/wiki/Package is used to automatically include information from the corresponding namespace. | Formal wiki pages (Artefacts etc.) | Type:org/oomodels/wiki/Model |
Meta_Supertype_1 | Links to the first supertype page. The format is the same as Meta_Type | Type pages | Type:org/ooem/UMLModelElement |
Meta_Supertype_2 | 2nd supertype | Type pages | |
Meta_Supertype_3 | 3rd supertype | Type pages | |
Meta_Supertype_4 | 4th supertype | Type pages | |
Meta_Supertype_5 | 5th supertype | Type pages | |
Meta_MIMEType | The MIME type for resources of the respective type. It used by the DownloadManager to provide it to the browser when downloading. | Type pages | text/xml |
Meta_FileExtension | Extension for files of the respective type. It used by the DownloadManager to provide it to the browser when downloading. | Type pages | xmi |
Meta_Author | The author of the artefact. It is the name of a wikipage describing the author, the format is Contact:Person/.../.../... or Contact:Company/.../.../.... Please do not add an email or url directly here, but describe yourself in the context of oomodels a little on a seperate page. Reader's will appreciate this. | Arbitrary pages | Contact:Person/net/leue/andreas |
Meta_Copyright | If there's a specific copyright on the code, you may state here so. Please note: by putting an artefact on oomodels.org you agree that anyone can download this code on her machine by means of the DownloadManager, independent of any rights you hold on that artefact. | Arbitrary pages | 2008 by Hugo Meier |
Meta_Owner | Within a namespace you are in control of (see Help:Structure), you can declare an ownership of that code. That does not restrict the use of the DownloadManager for anyone to download the respective artefacts. | Artefact and Product pages | |
Meta_Vendor | Where to get the software from. | Product pages | Contact:Company/com/sphenon |
Meta_License | What license applies to the artefact (if not the default creative commons license) or to the software. | Artefact and Product pages. | LGPL |
Meta_Domain | The domain of the artefact. It is the name of a wikipage describing the domain, the format is Domain:.../.../.... | Artefact pages | Domain:business/industry/insurance |
Meta_Maturity | The maturity of the page content. | Arbitrary pages | work in progress |
Meta_Download | If this is a donwloadable artefact (true or false). | Artefact pages | true |
Meta_Diagram | An additional diagram showing this element in a context. | Arbitrary pages | Artefact:Diagram/net/leue/andreas/process01/Process01 |
Meta_Link | An additional external link providing more information. | Arbitrary pages | www.sphenon.de |
Meta_Signatures | If true, a link to an associated signature page is shown. Signature pages share the name of the page they refer to with the additional postfix "_Signatures". They contain pgp (or similar) signature certificates. | Arbitrary pages | www.sphenon.de] |
Meta_AddTypeToCategory | If true, this page is automatically added to the category of it's Meta_Type | true (default) | |
Meta_AddDomainToCategory | If true, this page is automatically added to the category of it's Meta_Domain | true (default) | |
Meta_AddCategoryToCategory | If true, this page is automatically added to the category of it's Meta_Category | true (default) |