Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Library work: Difference between revisions

Template page
m (Awful nasty nested ifs to make source and source_url work)
mNo edit summary
(34 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:''{{{title}}}''{{#if: {{{author|}}}| ({{{author|}}})|}} }}
<includeonly>{{#SEO:
|image={{{image|}}}
|title= {{{title|}}}{{#if: {{{author|}}}|,&nbsp;{{{author|}}}|}} {{#if: {{{published_date|}}}|,&nbsp;{{{published_date|}}}|}} - ProleWiki
}}
{{DISPLAYTITLE:''{{{title|}}}''{{#if: {{{author|}}}|&nbsp;({{{author|}}})|}} }}</includeonly>
<span style="display:none;">{{{summary|}}}</span>
<span style="display:none;">{{{summary|}}}</span>
{{Infobox
{{Infobox
Line 25: Line 29:
|  data2  = {{{written in|}}}
|  data2  = {{{written in|}}}


| label3  = Spoken on
| label3  = Spoken&nbsp;on
|  data3  = {{{spoken on|}}}
|  data3  = {{{spoken on|}}}


| label4  = Translated by
| label4  = Translated&nbsp;by
|  data4  = {{#ifexist:{{{translated by|}}}|[[{{{translated by}}}]]|{{{translated by|}}}}}
|  data4  = {{{translated by|}}} {{#if:{{{original language|}}}|from {{{original language|}}}}}
 
| label5  = Original language
| data5  = {{{original language|}}}


| label6  = Publisher
| label6  = Publisher
Line 38: Line 39:


| label7  = First published
| label7  = First published
|  data7  = {{{published|}}}{{{published_date|}}}{{#if:{{{published_location|}}}|<br/>{{{published_location}}}}}
|  data7  = {{Br separated entries|{{{published_date|}}}|{{{published_location|}}}|{{{published_source|}}}}}


| label8  = Edition
| label8  = Edition
|  data8  = {{{edition_date|}}}
|  data8  = {{{edition|}}}


| label9  = Type
| label9  = Type
Line 50: Line 51:


| label11  = Source
| label11  = Source
|  data11  = {{#if:{{{source|}}}|{{{source|}}}{{#if:{{{source_url|}}}|<br/>{{{source_url}}}}}|{{#if:{{{source_url|}}}|{{{source_url}}}}}}}
|  data11  = {{Br separated entries|{{{source|}}}|{{{source2|}}}|{{{source3|}}}|{{{source4|}}}}}


| label12  = PDF
| label12  = PDF
Line 60: Line 61:
| label14 = Audiobook
| label14 = Audiobook
| data14 = {{{audiobook|}}}
| data14 = {{{audiobook|}}}
}}{{#ifexist:Category:Library works by {{{author|}}}|[[Category:Library works by {{{author}}}]]}}<noinclude>
 
}}{{#ifexist:Category:Library works by {{{author|}}}|[[Category:Library works by {{{author}}}]]}}{{#if:{{{defaultsort|}}}|{{DEFAULTSORT:{{{defaultsort}}}}}|{{DEFAULTSORT:{{{title|}}}}}}}
<noinclude>
How to use this template:
How to use this template:
  <nowiki>
  <nowiki>
Line 75: Line 78:
| spoken on =
| spoken on =
| published_date =  
| published_date =  
| published_location =
| published_location =
| published_source =
| publisher =
| publisher =
| edition_date =
| edition =
| type =
| type =
| source =
| source =
| source_url =  
| source2 =
| source3 =
| source4 =
| pdf =
| pdf =
| libgen =
| libgen =
| audiobook =  
| audiobook =  
| defaultsort =
}}
}}
</nowiki>
</nowiki>
Line 95: Line 102:
"required": true
"required": true
},
},
"_subheader": {},
"author": {
"author": {
"label": "Author",
"label": "Author",
Line 131: Line 137:
"source": {
"source": {
"label": "Source",
"label": "Source",
"description": "URL of the work (non-PDF)",
"description": "Where the text was found (book, collection, etc.)",
"type": "url",
"type": "string",
"suggested": true
"suggested": true
},
},
        "pdf": {
"pdf": {
"label": "PDF",
"label": "PDF",
"description": "URL of a PDF of the work",
"description": "URL of a PDF of the work",
Line 141: Line 147:
"suggested": true
"suggested": true
},
},
        "libgen": {
"libgen": {
"label": "Libgen",
"label": "Libgen",
"description": "Link to the work on Libgen",
"description": "Link to the work on Libgen",
Line 166: Line 172:
},
},
"published_date": {
"published_date": {
"label": "First published",
"label": "First published date",
"description": "Date the book was first published",
"description": "Date the book was first published",
"type": "date",
"type": "date",
Line 172: Line 178:
},
},
"published_location": {
"published_location": {
"label": "Location published",
"label": "First published location",
"description": "Location the work was published",
"description": "Location the work was first published",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
Line 203: Line 209:
"description": "Adds a summary, which is used by external templates",
"description": "Adds a summary, which is used by external templates",
"type": "string"
"type": "string"
},
"published_source": {
"label": "First published source",
"description": "The document, book, newspaper where it was first published",
"type": "string",
"suggested": true
},
"defaultsort": {
"label": "Default sort",
"description": "Adding main sorting term for categories"
},
"edition": {
"label": "Edition"
},
"source2": {
"label": "Second source",
"description": "In case the work has multiple sources"
},
"source3": {
"label": "Third source",
"description": "In case the work has multiple sources"
},
"source4": {
"label": "Fourth source",
"description": "In case the work has multiple sources"
}
}
},
},
Line 217: Line 248:
"publisher",
"publisher",
"published_date",
"published_date",
"published_source",
"published_location",
"published_location",
"edition_date",
"edition_date",
Line 222: Line 254:
"isbn",
"isbn",
"source",
"source",
        "pdf",
"source2",
        "libgen",
"source3",
"source4",
"edition",
"pdf",
"libgen",
"audiobook",
"audiobook",
"_subheader",
"summary",
"defaultsort",
"image_upright",
"image_upright",
"image_alt",
"image_alt",
"image_size",
"image_size"
"summary"
]
]
}
}
</templatedata></noinclude>
</templatedata>
</noinclude>

Revision as of 19:08, 22 October 2024

Library work

How to use this template:

{{Library work
| title = 
| subtitle = 
| image =
| image_size =
| image_upright =
| image_alt =
| caption =
| author =
| written in =
| spoken on =
| published_date = 
| published_location = 
| published_source =
| publisher =
| edition =
| type =
| source =
| source2 =
| source3 =
| source4 =
| pdf =
| libgen =
| audiobook = 
| defaultsort =
}}

Adds a small infobox with information for Library works

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Titletitle

Title of the work

Stringrequired
Imageimage

Book cover

Filesuggested
Captioncaption

Caption of the image, usually for information about the edition of the cover

Stringoptional
Authorauthor

Author of the source work. No need to add link brackets [[ ]], the infobox checks for it.

Stringrequired
Written inwritten in

Date or period the work was written

Datesuggested
Spoken onspoken on

For speeches, the date it was spoken on

Stringsuggested
Translated Bytranslated by

The translator(s) who translated this work

Stringoptional
Original Languageoriginal language

The language this work was translated from

Stringoptional
Publishing housepublisher

Who published this edition

Stringsuggested
First published datepublished_date

Date the book was first published

Datesuggested
First published sourcepublished_source

The document, book, newspaper where it was first published

Stringsuggested
First published locationpublished_location

Location the work was first published

Stringsuggested
Editionedition_date

When was this edition printed

Stringsuggested
Typetype

Type of work

Example
Book, pamphlet, leaflet, speech, video
Stringsuggested
ISBNisbn

ISBN number of the work

Numbersuggested
Sourcesource

Where the text was found (book, collection, etc.)

Stringsuggested
Second sourcesource2

In case the work has multiple sources

Unknownoptional
Third sourcesource3

In case the work has multiple sources

Unknownoptional
Fourth sourcesource4

In case the work has multiple sources

Unknownoptional
Editionedition

no description

Unknownoptional
PDFpdf

URL of a PDF of the work

URLsuggested
Libgenlibgen

Link to the work on Libgen

URLsuggested
Audiobookaudiobook

URL of an audiobook reading of the work

URLsuggested
Summarysummary

Adds a summary, which is used by external templates

Stringoptional
Default sortdefaultsort

Adding main sorting term for categories

Unknownoptional
image_uprightimage_upright

no description

Unknownoptional
image_altimage_alt

no description

Unknownoptional
image_sizeimage_size

no description

Unknownoptional