Plantilla:Statement+
| propietat |
| ||||||||||
| afegiu un valor | |||||||||||
| Aquest plantilla utilitza TemplateStyles: |
Descripció
[modifica]This template shows statement graphically. Used mainly in documentation and talk pages.
This is just mock-up which looks similar to actual statement but doesn't afford any real functionality at all (edit/add buttons don't work).
You can use Module:CreateStatement to create the invoke text for a qualifier and property.
Sintaxi
[modifica]Simple
[modifica]Setting P (property) and V (value). Template {{P-}} and {{Q-}} giving output which is similar to actual appearance (upper case). On the other hand, template {{P}} and {{Q}} giving output which is not actual, but could be useful one (lower case).
{{Statement+
|P={{P-|27}}
|V={{Q-|145}}
}}
| Ciutadania |
| ||||||||||
| afegiu un valor | |||||||||||
{{Statement+
|P={{P|27}}
|V={{Q|145}}
}}
| Ciutadania (P27) |
| ||||||||||
| afegiu un valor | |||||||||||
Basic
[modifica]Setting qp, qv (qualifier property and qualifier value) and rp, rv (reference property and reference value).
{{Statement+
|rank=+1
|P={{P-|800}}
|V={{Q-|25169}}
|qp={{P-|136}}
|qv={{Q-|761469}}
|rp={{P-|248}}
|rv={{Q-|5375741}}
}}
| Obres destacables |
| ||||||||||||
| afegiu un valor | |||||||||||||
Annotation
[modifica]It is possible highlighting certain part, adding note, or inserting image, by using ordinary wikitext.
{{Statement+
|P={{P-|800}}<br/><br/>memo<br/>(↑ Inserted memo)
|V={{Q-|25169}}
|qp={{Font color|red|yellow|{{P-|136}} }}
|qv={{Font color|red|yellow|{{Q-|761469}} }} ← highlighted
|rp=[[Fitxer:OOjs UI icon alert-progressive.svg|20px]] {{P-|248}}<br/>(↑ Inserted image)
|rv={{Q-|5375741}}<ref group="note">Added note</ref>
}}
{{referències|grup="note"}}
| Obres destacables memo (↑ Inserted memo) |
| ||||||||||||||
| afegiu un valor | |||||||||||||||
- ↑ Added note
Annotation using doc parameter
[modifica]Another way to document constrains, values, conditions, etc. is using an specific column filled using ordinary wikitext.
{{Statement+ |navbar=no | width_doc=30% | color_doc= |reference=close
|P={{P-|570}}
|V1={{date|1920|01|26}}
|doc = [[Fitxer:Pictogram voting number one.svg|{{{px|15}}}px|link=|]] {{label |Q52060874}}
[[Fitxer:Pictogram reply soft green.svg|{{{px|15}}}px|link=|]]<u> {{label |Q21510851}}:</u> <sup><small> [[:d:Help:date|'''?''']]</small></sup>:
{{P|1480}} +
{{P|4241}} +
{{P|1319}} + {{P|1326}} }}
| Data de defunció |
|
| ||||||||||
| afegiu un valor | ||||||||||||
Populated
[modifica]By using more longer code, it's possible to make complex statement mock-up. For details about input variables, see #Variables section.
{{Statement+
|P={{P-|69}}
|V={{Q-|691283}}
|q1.p={{P-|582}}
|q1.v1=1974
|q2.p={{P-|812}}
|q2.v1={{Q-|186579}}
|q3.p={{P-|512}}
|q3.v1={{Q-|1765120}}
|q4.p={{P-|580}}
|q4.v1=1971
|r1.p1={{P-|248}}
|r1.p1.v1={{Q-|5375741}}
|r2.p1={{P-|854}}
|r2.p1.v1=http://www.nndb.com/people/731/000023662/
|r2.p2={{P-|407}}
|r2.p2.v1={{Q-|1860}}
|r2.p3={{P-|123}}
|r2.p3.v1={{Q-|1373513}}
|r2.p4={{P-|813}}
|r2.p4.v1=7 desembre 2013
|r2.p5={{P-|1476}}
|r2.p5.v1=Douglas Adams (English)
|V2={{Q-|4961791}}
|V2.q1.p={{P-|582}}
|V2.q1.v1=1970
|V2.q2.p={{P-|580}}
|V2.q2.v1=1959
}}
| Formació |
| |||||||||||||||||||||||||||||||||||||||||
| afegiu un valor | ||||||||||||||||||||||||||||||||||||||||||
Variables
[modifica]Special variables
[modifica]rank
[modifica]|rank=
- Setting this parameter when you change rank.
| Description | Example | |
Preferred or P or +1
|
|rank=+1
| |
Normal or N or 0 (Default)
|
|rank=0
| |
Deprecated or D or -1
|
|rank=-1
|
width
[modifica]|width=
- Setting width by
%orpx. For example|width=50%or|width=400px. Default is|width=80%
{{Statement+
|width=50%
|P={{P-|27}}
|V={{Q-|145}}
}}
| Ciutadania |
| ||||||||||
| afegiu un valor | |||||||||||
indent
[modifica]|left= or |indent=
- Setting indent by
pxorem. For example|left=20pxor|left=5em. Default is|left=0
{{Statement+
|left=5em
|width=50%
|P={{P-|27}}
|V={{Q-|145}}
}}
| Ciutadania |
| ||||||||||
| afegiu un valor | |||||||||||
reference
[modifica]|reference=close
- By setting this parameter as
close, collapsible reference table is shown with closed state.
{{Statement+
|reference=close
|width=50%
|P={{P-|27}}
|V={{Q-|145}}
|rp=Alfa
|rv=Bravo
|rv2=Charlie
|r2p=Delta
|r2v=Echo
|r2p2=Foxtrot
|r2p2v=Golf
|r3p=Hotel
|r3v=India
|r3v2=Juliett
}}
| Ciutadania |
| ||||||||||||||||||||||
| afegiu un valor | |||||||||||||||||||||||
navbar
[modifica]|navbar=
navbar=no, hide the "navbar icon" on top of the box. By default, {{navbar}} is shown.
doc
[modifica]|doc=
- Allows to give a free text in order to document complementary specifications, constrains, used values, etc. When "doc" is informed, a new column with its content is shown on the right side. Its width is 20% of whole table, and can be modify by
|width_doc=. In addition, color can be modify by|color_doc=.
showTables
[modifica]|showTables=1
- Debug option. By setting this parameter as
1, each inner tables are shown with different color borders. See #Template structure section.
Field variables
[modifica]Although there are many field variables for this template, its syntax is basically simple. For example:
V2.r1.p4.v3 is "Second value's first reference's fourth property's third value."
Capital letter V represents value (d:Help:Statements#Values). Lower case letter q represents qualifier (d:Help:Qualifiers). Lower case letter r represents reference (d:Help:Sources). And lower case letter v represents value for qualifier or reference.
Canonical style
[modifica]Following is canonical style input variables. Although it looks bit complex, standardized variables are useful when you construct big size statement. If you don't need such a huge size, see the next section, #Abbreviated style.
- Code
{{Statement+|
|reference = close
|showTables =
|P = P
|V1.rank =
|V1 = V1
|V1.q1.p = V1.q1.p
|V1.q1.v1 = V1.q1.v1
|V1.q1.v2 = V1.q1.v2
|V1.q1.v3 = V1.q1.v3
|V1.q2.p = V1.q2.p
|V1.q2.v1 = V1.q2.v1
|V1.q2.v2 = V1.q2.v2
|V1.q2.v3 = V1.q2.v3
|V1.q3.p = V1.q3.p
|V1.q3.v1 = V1.q3.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v1
|V3.r3.p5.v2 = V3.r3.p5.v2
|V3.r3.p5.v3 = V3.r3.p5.v3
}}
- Appearance
| P |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| afegiu un valor | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Abbreviated style
[modifica]If you don't use so many fields, it is useful to use following simpler version. In this template, if number is abbreviated, it is automatically interpreted as 1. For example, rp is interpreted as r1.p1. And if there is no first capital V, it is interpreted as variable for V1 (first value). So finally rp is interpreted as V1.r1.p1.
- Code
{{Statement+|
|P = P
|rank =
|V = V
|qp = qp
|qv = qv
|qv2 = qv2
|qv3 = qv3
|q2p = q2p
|q2v = q2v
|q2v2 = q2v2
|q2v3 = q2v3
|rp = rp
|rv = rv
|rv2 = rv2
|rv3 = rv3
|rp2 = rp2
|rp2v = rp2v
|rp2v2 = rp2v2
|rp2v3 = rp2v3
|r2p = r2p
|r2v = r2v
|r2v2 = r2v2
|r2v3 = r2v3
|r2p2 = r2p 2
|r2p2v = r2p2v
|r2p2v2 = r2p2v2
|r2p2v3 = r2p2v3
|reference = close
|showTables =
}}
- Appearance
| P |
| ||||||||||||||||||||||||||||||||||||||||||||||
| afegiu un valor | |||||||||||||||||||||||||||||||||||||||||||||||
Information for developers
[modifica]Editing is welcome. Feel free to edit, change, modify, add the code or utilize Lua. But only one thing,
- #Annotation function is important key feature. So please keep current input style. (Wikitext input style)
In other words, please don't change input style to something like P=P31 or V=Q42 (property number only or item number only style.) Because in such format, users can't modify appearance.
Template structure
[modifica]Currently this template consists of three kinds of tables. By setting showTables=1 option, each tables are shown with different color borders.
Each tables are stored at following pages.
- Template:Statement+ - Table for statement
- Template:Statement+/Value - Table for values
- Template:Statement+/Block- Table for qualifiers or references
{{Statement+
|showTables=1
|P={{P-|800}}
|V={{Q-|25169}}
|qp={{P-|136}}
|qv={{Q-|761469}}
|rp={{P-|248}}
|rv={{Q-|5375741}}
}}
| Obres destacables |
| ||||||||||||
| afegiu un valor | |||||||||||||
Related pages
[modifica]- {{RankIcon}}: -
-
- 
- Pencil image: -
(This is just a similar pencil image. Because couldn't find out actual pencil image.) - Douglas Adams (Q42) - Wikidata model page
- Viquipèdia:Proves de Wikidata (Q4115189) - Sandbox. You can edit and see how actual interface looks like
- Help:Collapsing - documentation about the class used in collapsible reference table
- Module:Random - module used to assign unique IDs to each collapsible reference tables
- Special/AllMessages wikibase - list of wikidata system messages. Codes like
{{int:wikibase-statementlistview-add}}(this returns "afegiu un valor") are system messages which are automatically translated to user's setting language.
Vegeu també
[modifica]Els editors poden fer proves amb aquesta plantilla al seu espai de proves (crea | modifica)
Afegiu categories en la subpàgina /ús. Vegeu les subpàgines d'aquesta plantilla, utilització de paràmetres.