jenkins-bot has submitted this change and it was merged.

Change subject: Altered property page layout
......................................................................


Altered property page layout

Put data type into separate section and adjusted messages.

Change-Id: I2b2b46803be008d5a8757dece6a06c83e4ab4705
---
M lib/resources/templates.php
M lib/resources/wikibase.css
M repo/i18n/en.json
M repo/i18n/qqq.json
M repo/includes/PropertyView.php
5 files changed, 21 insertions(+), 16 deletions(-)

Approvals:
  Aude: Looks good to me, approved
  WikidataJenkins: Verified
  Siebrand: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/resources/templates.php b/lib/resources/templates.php
index 4b977b4..eebdfbf 100644
--- a/lib/resources/templates.php
+++ b/lib/resources/templates.php
@@ -338,9 +338,8 @@
 
        $templates['wb-property-datatype'] =
 <<<HTML
-<div class="wb-datatype wb-value-row">
-       <span class="wb-datatype-label">$1</span>
-       <span class="wb-datatype-value">$2</span>
+<div class="wb-datatype">
+       <div class="wb-datatype-value">$1</div>
 </div>
 HTML;
 
diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css
index 655026c..15ffef7 100644
--- a/lib/resources/wikibase.css
+++ b/lib/resources/wikibase.css
@@ -1011,14 +1011,16 @@
 /********** PROPERTY PAGE **********/
 
 .wb-propertypage .wb-datatype {
-       clear: both;
-       margin-bottom: .2em;
-       margin-top: .5em;
+       background-color: #f8f8f8;
+       border: 1px solid #c9c9c9;
+       border-collapse: separate;
+       float: left;
+       width: 100%;
 }
 
-.wb-propertypage .wb-datatype-label {
+.wb-propertypage .wb-datatype-value {
        font-weight: bold;
-       padding-left: 10px;
+       padding: 10px;
 }
 
 /********** /PROPERTY PAGE **********/
diff --git a/repo/i18n/en.json b/repo/i18n/en.json
index bb4d035..e1691fe 100644
--- a/repo/i18n/en.json
+++ b/repo/i18n/en.json
@@ -34,7 +34,7 @@
     "wikibase-description-input-help-message": "Enter a short description in 
$1.",
     "wikibase-claims": "Claims",
     "wikibase-statements": "Statements",
-    "wikibase-constraints": "Constraints",
+    "wikibase-attributes": "Attributes",
     "wikibase-terms": "In other languages",
     "wikibase-sitelinks-add": "add a link to a site-link",
     "wikibase-sitelinks-empty": "No site-link for this item yet.",
@@ -64,7 +64,7 @@
     "wikibase-aliases-label": "Also known as:",
     "wikibase-aliases-input-help-message": "If this data set is known under 
more than one particular name, you may enter aliases and synonyms, so it can be 
found by its alternative names.",
     "wikibase-aliases-empty": "No aliases defined.",
-    "wikibase-datatype-label": "Data type:",
+    "wikibase-propertypage-datatype": "Data type",
     "wikibase-property-footer": "",
     "wikibase-claimview-snak-tooltip": "Enter a value corresponding to the 
property named \"$1\". If the property has no designated value or the actual 
value is not known, you may choose an alternative to specifying a custom value 
by clicking the icon next to the value input box.",
     "wikibase-claimview-snak-new-tooltip": "After specifying a property you 
can enter a corresponding value. If the property has no designated value or the 
actual value is not known, you may choose an alternative to specifying a custom 
value by clicking the icon next to the value input box.",
diff --git a/repo/i18n/qqq.json b/repo/i18n/qqq.json
index 74682d8..7463f0a 100644
--- a/repo/i18n/qqq.json
+++ b/repo/i18n/qqq.json
@@ -55,7 +55,7 @@
     "wikibase-description-input-help-message": "[[File:Screenshot WikidataRepo 
2012-05-13 H.png|right|0x150px]]\nBubble help message for entering the 
description of the data set used for a specific item. Takes on additional 
argument that is the sub site identifier, ie. \"English\" in nominative 
singular form. See also Wikidatas glossary for 
[[d:Wikidata:Glossary#languageattribute-description|description]] and 
[[d:Wikidata:Glossary#Item|item]].\n\nParameters:\n* $1 - language 
name\n{{Related|Wikibase-input-help-message}}",
     "wikibase-claims": "Heading for the list of claims giving specific 
information about the currently viewed entity. See also Wikidata's glossary for 
[[m:d:Wikidata:Glossary#Claim|claim]].",
     "wikibase-statements": "Heading for the list of statements giving specific 
information about the currently viewed item. See also Wikidata's glossary for 
[[m:d:Wikidata:Glossary#Statement|statements]] and 
[[m:d:Wikidata:Glossary#Item|item]].",
-    "wikibase-constraints": "Heading for the list of claims defining 
constraints for the currently viewed property. See also Wikidata's glossary for 
[[m:d:Wikidata:Glossary#Claims|claims]] and 
[[m:d:Wikidata:Glossary#Property|property]].",
+    "wikibase-attributes": "Heading for the list of claims defining attributes 
for the currently viewed property. See also Wikidata's glossary for 
[[m:d:Wikidata:Glossary#Claims|claims]] and 
[[m:d:Wikidata:Glossary#Property|property]].",
     "wikibase-terms": "Heading for the table with the labels and descriptions 
in other languages.\n{{Identical|Otherlanguages}}",
     "wikibase-sitelinks-add": "Add a sitelink to a language specific page on 
the cluster. See also Wikidata's glossary for 
[[d:Wikidata:Glossary#Sitelink|sitelinks]].",
     "wikibase-sitelinks-empty": "There are no site links for any of the 
language specific pages on the given cluster.  See also Wikidatas glossary for 
[[d:Wikidata:Glossary#sitelinks|sitelinks]] and 
[[d:Wikidata:Glossary#sitelinks-title|title]].",
@@ -85,7 +85,7 @@
     "wikibase-aliases-label": "Label for list of aliases, displayed in front 
of the list. Aliases are alternate names and nicknames for the item. See also 
[[d:Wikidata:Glossary]].",
     "wikibase-aliases-input-help-message": "Bubble help message for entering 
the aliases of the data set used for a specific item.\n\nParameters:\n* $1 - 
(Unused) language name\n{{Related|Wikibase-input-help-message}}",
     "wikibase-aliases-empty": "Placeholder message when no aliases for this 
data set representing a specific item have been defined.",
-    "wikibase-datatype-label": "Label for the data type name/label on a 
property page.\n\nFollowed by any one of the following data types:\n* 
{{msg-mw|Datatypes-type-string}}\n* {{msg-mw|Datatypes-type-quantity}}\n* 
{{msg-mw|Datatypes-type-monolingual-text}}\n* 
{{msg-mw|Datatypes-type-multilingual-text}}\n* 
{{msg-mw|Datatypes-type-number}}\n* 
{{msg-mw|Datatypes-type-mediawiki-title}}\n* 
{{msg-mw|Datatypes-type-unknown}}\n* {{msg-mw|Datatypes-type-boolean}}\n* 
{{msg-mw|Datatypes-type-globe-coordinate}}\n* {{msg-mw|Datatypes-type-time}}",
+    "wikibase-propertypage-datatype": "Heading used on a page displaying a 
[[d:Wikidata:Glossary#Property|Property]] for the 
[[d:Wikidata:Glossary#Datatypes|data type]] applied to a property.\n\nThe 
section below the heading contains a data type label. (See 
[[d:Special:ListDatatypes|List of all data types available]].)",
     "wikibase-claimview-snak-tooltip": "Tooltip message displayed when 
hovering/clicking the help icon next to the save, cancel and remove links of a 
claim (see [[d:Wikidata:Glossary#Claim]]).\n\nParameters:\n* $1 - the property 
name the user is about to edit a value of or add another value to",
     "wikibase-claimview-snak-new-tooltip": "Tooltip message displayed when 
hovering/clicking the help icon next to the save, cancel and remove links of a 
claim (see [[d:Wikidata:Glossary]]) when about to add a completely new claim 
which includes specifying the property.",
     "wikibase-statementview-rank-preferred": "Label of the 
[[d:Wikidata:Glossary#Rank-preferred|Preferred Rank]] item within the menu that 
allows adjusting a [[d:Wikidata:Glossary#Statement|Statement's]] 
[[d:Wikidata:Glossary#Rank|Rank]]. The message is additionally used as tooltip 
on the rank icon when the statement has assigned the Preferred rank.",
diff --git a/repo/includes/PropertyView.php b/repo/includes/PropertyView.php
index 06960c6..9aa7d4c 100644
--- a/repo/includes/PropertyView.php
+++ b/repo/includes/PropertyView.php
@@ -43,13 +43,14 @@
 
                $html .= $this->getHtmlForLabel( $property, $editable );
                $html .= $this->getHtmlForDescription( $property, $editable );
-               $html .= $this->getHtmlForDataType( $this->getDataType( 
$property ) );
 
                $html .= wfTemplate( 'wb-entity-header-separator' );
 
                $html .= $this->getHtmlForAliases( $property, $editable );
                $html .= $this->getHtmlForToc();
                $html .= $this->getHtmlForTermBox( $property, $editable );
+
+               $html .= $this->getHtmlForDataType( $this->getDataType( 
$property ) );
 
                if ( defined( 'WB_EXPERIMENTAL_FEATURES' ) && 
WB_EXPERIMENTAL_FEATURES ) {
                        $html .= $this->getHtmlForClaims( $property, $editable 
);
@@ -78,7 +79,7 @@
        protected function getHtmlForClaimsSectionHeading( Entity $entity, 
$editable = true ) {
                $html = wfTemplate(
                        'wb-section-heading',
-                       wfMessage( 'wikibase-constraints' ),
+                       wfMessage( 'wikibase-attributes' )->escaped(),
                        'claims' // ID - TODO: should not be added if output 
page is not the entity's page
                );
 
@@ -103,8 +104,11 @@
        protected function getHtmlForDataType( DataType $dataType, $editable = 
true ) {
                $lang = $this->getLanguage();
 
-               return wfTemplate( 'wb-property-datatype',
-                       wfMessage( 'wikibase-datatype-label' )->text(),
+               return wfTemplate( 'wb-section-heading',
+                       wfMessage( 'wikibase-propertypage-datatype' 
)->escaped(),
+                       'datatype'
+               )
+               . wfTemplate( 'wb-property-datatype',
                        htmlspecialchars( $dataType->getLabel( $lang->getCode() 
) )
                );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/123587
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b2b46803be008d5a8757dece6a06c83e4ab4705
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to