| Aquesta plantilla utilitza una crida a un mòdul de tipus Lua, nom que li ve del llenguatge Lua que utilitza. Per tant, si volguéssiu modificar-la, abans hauríeu d'estar familiaritzats amb aquest llenguatge i les funcions de l'extensió Scribunto. Vegeu com fer proves de plantilles.
Aquesta plantilla utilitza el següent mòdul:
|
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.
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}}
|v1={{Q-|145}}
}}
{{Statement++
|P={{P|27}}
|v1={{Q|145}}
}}
Setting qp
, qv
(qualifier property and qualifier value) and rp
, rv
(reference property and reference value).
{{Statement++
|rank=+1
|P={{P-|800}}
|v1={{Q-|25169}}
|v1.q1.p={{P-|136}}
|v1.q1.v1={{Q-|761469}}
|v1.r1.p1={{P-|248}}
|v1.r1.p1.v1={{Q-|5375741}}
}}
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)
|v1={{Q-|25169}}
|v1.q1.p={{Font color|red|yellow|{{P-|136}} }}
|v1.q1.v={{Font color|red|yellow|{{Q-|761469}} }} ← highlighted
|v1.r1.p1=[[Fitxer:OOjs UI icon alert-progressive.svg|20px]] {{P-|248}}<br/>(↑ Inserted image)
|v1.r1.p1.v1={{Q-|5375741}}<ref group="note">Added note</ref>
}}
{{referències|grup="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}} }}
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}}
|v1={{Q-|691283}}
|v1.q1.p={{P-|582}}
|v1.q1.v1=1974
|v1.q2.p={{P-|812}}
|v1.q2.v1={{Q-|186579}}
|v1.q3.p={{P-|512}}
|v1.q3.v1={{Q-|1765120}}
|v1.q4.p={{P-|580}}
|v1.q4.v1=1971
|v1.r1.p1={{P-|248}}
|v1.r1.p1.v1={{Q-|5375741}}
|v1.r2.p1={{P-|854}}
|v1.r2.p1.v1=http://www.nndb.com/people/731/000023662/
|v1.r2.p2={{P-|407}}
|v1.r2.p2.v1={{Q-|1860}}
|v1.r2.p3={{P-|123}}
|v1.r2.p3.v1={{Q-|1373513}}
|v1.r2.p4={{P-|813}}
|v1.r2.p4.v1=7 desembre 2013
|v1.r2.p5={{P-|1476}}
|v1.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
}}
|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=
- Setting width by
%
or px
. For example |width=50%
or |width=400px
. Default is |width=80%
{{Statement++
|width=50%
|P={{P-|27}}
|v1={{Q-|145}}
}}
|left=
or |indent=
- Setting indent by
px
or em
. For example |left=20px
or |left=5em
. Default is |left=0
{{Statement++
|left=5em
|width=50%
|P={{P-|27}}
|v1={{Q-|145}}
}}
|reference=close
- By setting this parameter as
close
, collapsible reference table is shown with closed state.
{{Statement++
|reference=close
|width=50%
|P={{P-|27}}
|v1={{Q-|145}}
|v1.r1.p1=Alfa
|v1.r1.p1.v1=Bravo
|v1.r2.p1.v2=Charlie
|v1.r2.p1=Delta
|v1.r2.p1.v1=Echo
|v1.r2.p2=Foxtrot
|v1.r2.p2.v1=Golf
|v1.r3.p1=Hotel
|v1.r3.p1.v1=India
|v1.r3.p1.v2=Juliett
}}
|navbar=
navbar=no
, hide the "navbar icon" on top of the box. By default, {{navbar}} is shown.
|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=1
- Debug option. By setting this parameter as
1
, each inner tables are shown with different color borders. See #Template structure section.
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 (Help:Statements#Values). Lower case letter q
represents qualifier (Help:Qualifiers). Lower case letter r
represents reference (Help:Sources). And lower case letter v
represents value for qualifier or reference.
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 = 1
|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.v1
|v1.q3.v2 = v1.q3.v2
|v1.q3.v3 = v1.q3.v3
|v1.q4.p = v1.q4.p
|v1.q4.v1 = v1.q4.v1
|v1.q4.v2 = v1.q4.v2
|v1.q4.v3 = v1.q4.v3
|v1.r1.p1 = v1.r1.p1
|v1.r1.p1.v1 = v1.r1.p1.v1
|v1.r1.p1.v2= v1.r1.p1.v2
|v1.r1.p1.v3 = v1.r1.p1.v3
|v1.r1.p2 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v1 = v3.r2.p2.v1
|v3.r2.p2.v2 = v3.r2.p2.v2
|v3.r2.p2.v3 = v3.r2.p2.v3
|v3.r2.p3 = v3.r2.p3
|v3.r2.p3.v1 = v3.r2.p3.v1
|v3.r2.p3.v2 = v3.r2.p3.v2
|v3.r2.p3.v3 = v3.r2.p3.v3
|v3.r2.p4 = v3.r2.p4
|v3.r2.p4.v1 = v3.r2.p4.v1
|v3.r2.p4.v2 = v3.r2.p4.v2
|v3.r2.p4.v3 = v3.r2.p4.v3
|v3.r2.p5 = v3.r2.p5
|v3.r2.p5.v1 = v3.r2.p5.v1
|v3.r2.p5.v2 = v3.r2.p5.v2
|v3.r2.p5.v3 = v3.r2.p5.v3
|v3.r3.p1 = v3.r3.p1
|v3.r3.p1.v1 = v3.r3.p1.v1
|v3.r3.p1.v2 = v3.r3.p1.v2
|v3.r3.p1.v3 = v3.r3.p1.v3
|v3.r3.p2 = v3.r3.p2
|v3.r3.p2.v1 = v3.r3.p2.v1
|v3.r3.p2.v2 = v3.r3.p2.v2
|v3.r3.p2.v3 = v3.r3.p2.v3
|v3.r3.p3 = v3.r3.p3
|v3.r3.p3.v1 = v3.r3.p3.v1
|v3.r3.p3.v2 = v3.r3.p3.v2
|v3.r3.p3.v3 = v3.r3.p3.v3
|v3.r3.p4 = v3.r3.p4
|v3.r3.p4.v1 = v3.r3.p4.v1
|v3.r3.p4.v2 = v3.r3.p4.v2
|v3.r3.p4.v3 = v3.r3.p4.v3
|v3.r3.p5 = v3.r3.p5
|v3.r3.p5.v1 = v3.r3.p5.v1
|v3.r3.p5.v2 = v3.r3.p5.v2
|v3.r3.p5.v3 = v3.r3.p5.v3
}}
- Appearance
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
|
|
V |
modifica |
|
|
▼ 2 referència |
|
r2p 2 |
r2p2v |
|
|
r2p2v2 |
|
|
r2p2v3 |
| |
|
+ afegiu un valor |
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 v1=Q42
(property number only or item number only style.) Because in such format, users can't modify appearance.
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.
{{Statement++
|showTables=1
|P={{P-|800}}
|v1={{Q-|25169}}
|v1.q1.p={{P-|136}}
|v1.q1.v1={{Q-|761469}}
|v1.r1.p1={{P-|248}}
|v1.r1.p1.v1={{Q-|5375741}}
}}
- {{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.