« Modèle:BooksQuery » : différence entre les versions
De Semantic MediaWiki - Sandbox
(chg) |
(form) Balise : Éditeur de wikicode 2017 |
||
(2 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
<noinclude> | <noinclude> | ||
This is the query template corresponding to the [[Form:BooksQuery|"BooksQuery" form]]. | This is the query template corresponding to the [[Form:BooksQuery|"BooksQuery" form]]. | ||
== Template Code == | |||
<pre> | |||
<div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div><br> | |||
{{#ask: | |||
[[Category:Books]] | |||
{{#if: {{{title|}}} | |||
|[[Has book title::{{{title|}}}]] | |||
}} | |||
{{#if: {{{author|}}} | |||
|[[Has book author::{{{author|}}}]] | |||
}} | |||
{{#if: {{{publisher|}}} | |||
|[[Has book publisher::{{{publisher|}}}]] | |||
}} | |||
{{#if: {{{country|}}} | |||
|[[Has book publishing country::{{{country|}}}]] | |||
}} | |||
{{#if: {{{year|}}} | |||
|[[Has book publishing year::{{{year|}}}]] | |||
}} | |||
{{#if: {{{rating|}}} | |||
|[[Has book rating::{{{rating|}}}]] | |||
}} | |||
|?=title|+width=40% | |||
|?Has book author=author |+width=40% | |||
|?Has book publishing year=year |+align=center |+width=5% | |||
|?Has book ISBN=ISBN |+align=center |+width=10% | |||
|?Has book rating=rating |+align=center |+width=5% | |||
|mainlabel=- | |||
|headers=plain | |||
|sort=Has book author | |||
|order=ascending | |||
|format=table | |||
|class=datatable | |||
|default=<b>No books match your criteria.</b> | |||
|intro=<b>This table shows the books matching your criteria:</b> | |||
}} | |||
<div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div> | |||
</pre> | |||
[[Category:Query template]]</noinclude><includeonly> | [[Category:Query template]]</noinclude><includeonly> | ||
<div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div><br> | <div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div><br> | ||
{{#ask: | {{#ask: | ||
[[Category: | [[Category:Books]] | ||
{{#if: {{{title|}}} | [[Has book title::{{{title|}}}]] }} | {{#if: {{{title|}}} | ||
{{#if: {{{author|}}} | [[Has book author::{{{author|}}}]] }} | |[[Has book title::{{{title|}}}]] | ||
{{#if: {{{publisher|}}} | [[Has book publisher::{{{publisher|}}}]] }} | }} | ||
{{#if: {{{country|}}} | [[Has book publishing country::{{{country|}}}]] }} | {{#if: {{{author|}}} | ||
{{#if: {{{year|}}} | [[Has book publishing year::{{{year|}}}]] }} | |[[Has book author::{{{author|}}}]] | ||
{{#if: {{{rating|}}} | [[Has book rating::{{{rating|}}}]] }} | }} | ||
{{#if: {{{publisher|}}} | |||
|[[Has book publisher::{{{publisher|}}}]] | |||
}} | |||
{{#if: {{{country|}}} | |||
|[[Has book publishing country::{{{country|}}}]] | |||
}} | |||
{{#if: {{{year|}}} | |||
|[[Has book publishing year::{{{year|}}}]] | |||
}} | |||
{{#if: {{{rating|}}} | |||
|[[Has book rating::{{{rating|}}}]] | |||
}} | |||
|?=title|+width=40% | |?=title|+width=40% | ||
|?Has book author=author|+width=40% | |?Has book author=author |+width=40% | ||
|?Has book publishing year=year|+align=center|+width=5% | |?Has book publishing year=year |+align=center |+width=5% | ||
|?Has book ISBN=ISBN|+align=center|+width=10% | |?Has book ISBN=ISBN |+align=center |+width=10% | ||
|?Has book rating=rating|+align=center|+width=5% | |?Has book rating=rating |+align=center |+width=5% | ||
|mainlabel=- | |mainlabel=- | ||
|headers=plain | |headers=plain | ||
Ligne 25 : | Ligne 76 : | ||
|class=datatable | |class=datatable | ||
|default=<b>No books match your criteria.</b> | |default=<b>No books match your criteria.</b> | ||
|intro=<b>This table shows the books matching your criteria:</b> | |||
}} | }} | ||
<div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div></includeonly> | <div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div></includeonly> |
Dernière version du 27 avril 2018 à 10:36
This is the query template corresponding to the "BooksQuery" form.
Template Code
<div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div><br> {{#ask: [[Category:Books]] {{#if: {{{title|}}} |[[Has book title::{{{title|}}}]] }} {{#if: {{{author|}}} |[[Has book author::{{{author|}}}]] }} {{#if: {{{publisher|}}} |[[Has book publisher::{{{publisher|}}}]] }} {{#if: {{{country|}}} |[[Has book publishing country::{{{country|}}}]] }} {{#if: {{{year|}}} |[[Has book publishing year::{{{year|}}}]] }} {{#if: {{{rating|}}} |[[Has book rating::{{{rating|}}}]] }} |?=title|+width=40% |?Has book author=author |+width=40% |?Has book publishing year=year |+align=center |+width=5% |?Has book ISBN=ISBN |+align=center |+width=10% |?Has book rating=rating |+align=center |+width=5% |mainlabel=- |headers=plain |sort=Has book author |order=ascending |format=table |class=datatable |default=<b>No books match your criteria.</b> |intro=<b>This table shows the books matching your criteria:</b> }} <div style="float: right"><big>→ Back to the overview page on '''[[books]]'''</big></div>