Mollywhite has submitted this change and it was merged.

Change subject: Adding a "link" property to each section entry.
......................................................................


Adding a "link" property to each section entry.

This allows for a section to have a name that's different from
the name of the wiki page, and allows for automatic linking.

Change-Id: I7b35c3fe32607cf14caeabb00e18c411c4bfdbf2
---
M examples/book.json
M schemas/bookschema.json
2 files changed, 16 insertions(+), 1 deletion(-)

Approvals:
  Mollywhite: Verified; Looks good to me, approved



diff --git a/examples/book.json b/examples/book.json
index 15f6f60..7b6c635 100644
--- a/examples/book.json
+++ b/examples/book.json
@@ -13,43 +13,53 @@
        "sections": [
                {
                        "name": "The Interpretation of Dreams",
+                        "link": "The Interpretation of Dreams",
                        "pages": [ 7, [ 9, 16 ] ]
                },
                {
                        "name": "The Scientific Literature on the Problems of 
the Dream",
+                        "link": "The Interpretation of Dreams/Chapter 1",
                        "pages": [ [ 19, 97 ] ]
                },
                {
                        "name": "Method of Dream Interpretation: The Analysis 
of a Sample Dream",
+                        "link": "The Interpretation of Dreams/Chapter 2",
                        "pages": [ [ 98, 120 ] ]
                },
                {
                        "name": "The Dream is the Fulfilment of a Wish",
+                        "link": "The Interpretation of Dreams/Chapter 3",
                        "pages": [ [ 121, 130 ] ]
                },
                {
                        "name": "Distortion in Dreams",
+                        "link": "The Interpretation of Dreams/Chapter 4",
                        "pages": [ [ 131, 155 ] ]
                },
                {
                        "name": "The Material and Sources of Dreams",
+                        "link": "The Interpretation of Dreams/Chapter 5",
                        "pages": [ [ 156, 277 ] ]
                },
                {
                        "name": "The Dream-Work",
+                        "link": "The Interpretation of Dreams/Chapter 6",
                        "pages": [ [ 278, 420 ] ]
                },
                {
                        "name": "The Psychology of the Dream Activities",
+                        "link": "The Interpretation of Dreams/Chapter 7",
                        "pages": [ [ 421, 511 ] ]
                },
                {
                        "name": "Literary Index",
+                        "link": "The Interpretation of Dreams/Chapter 8",
                        "pages": [ [ 512, 517 ] ]
                },
                {
                        "name": "Index",
+                        "link": "The Interpretation of Dreams/Index",
                        "pages": [ [ 519, 528 ] ]
                }
        ]
-}
+}
\ No newline at end of file
diff --git a/schemas/bookschema.json b/schemas/bookschema.json
index b062610..6653fae 100644
--- a/schemas/bookschema.json
+++ b/schemas/bookschema.json
@@ -171,6 +171,11 @@
                             "type": "string",
                             "required": true
                         },
+                                               "link": {
+                                                       "description": "Name of 
the wiki page where this section is located",
+                                                       "type": "string",
+                                                       "required": true
+                                               },
                         "pages": {
                             "description": "Page numbers in the section. Can 
either be an array of numbers, or there can be arrays in the list. These 
sub-arrays are interpreted as a range, so [1,5] is intepreted as pages 1, 2, 3, 
4, and 5.",
                             "type": "array",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b35c3fe32607cf14caeabb00e18c411c4bfdbf2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <molly.whi...@gmail.com>
Gerrit-Reviewer: Mollywhite <molly.whi...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to