Difference between revisions of "Home/ask/assignments"
m (d) |
m (moved over to named args) |
||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <div class="container-pcgwikitable" | + | <div class="container-pcgwikitable" style="overflow-x: inherit; width: inherit; max-width: inherit; -webkit-transform: inherit; transform: inherit"> |
− | + | ||
− | + | <div class="month-container"> | |
− | + | <div class="month"> | |
− | + | <p>'''Next 10 upcoming:'''</p> | |
− | + | </div> | |
− | {{#cargo_query: | + | <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;"> |
− | tables=Assignments | + | {{#cargo_query: |
− | |fields= | + | tables=Assignments |
− | | | + | |fields=Game,Status,Release_Date |
− | | | + | |where=DATEDIFF(Release_Date, '{{#time: Y-m-d | now }}') >= 0 |
− | | | + | |format=template |
− | |template=:Home/ask/assignments/row | + | |named args=yes |
− | + | |template=:Home/ask/assignments/row | |
− | |order by= | + | |order by=Release_Date ASC |
− | |more results text= | + | |limit=10 |
− | }} | + | |more results text= |
− | </table></div> | + | }} |
+ | </table> | ||
+ | </div> | ||
+ | |||
+ | <div class="month-container"> | ||
+ | <div class="month"> | ||
+ | <p>'''Last 10 released:'''</p> | ||
+ | </div> | ||
+ | <table style="max-width: 100%; min-width: 100%; margin: 0 auto; border: 0; border-spacing: 0 10px;"> | ||
+ | {{#cargo_query: | ||
+ | tables=Assignments | ||
+ | |fields=Game,Status,Release_Date | ||
+ | |where=DATEDIFF(Release_Date, '{{#time: Y-m-d | now }}') < 0 | ||
+ | |format=template | ||
+ | |named args=yes | ||
+ | |template=:Home/ask/assignments/row | ||
+ | |order by=Release_Date DESC | ||
+ | |limit=10 | ||
+ | |more results text= | ||
+ | }} | ||
+ | </table> | ||
+ | </div> | ||
+ | |||
+ | </div><noinclude>{{Documentation}}</noinclude> |
Latest revision as of 17:51, 7 April 2021
Next 10 upcoming:
Last 10 released:
Description
- Purge the home page to refresh the lists.
This page makes use of the #cargo_query function along with relevant #time parser function to query data from the Assignments
Cargo table (populated by the the Assignments/Table page) which is then transcluded unto Home. As part of the database query, the query makes use of the DATEDIFF() function to validate if the specified Release Date
(also set on the the Assignments/Table page) is between two dates, the first day of the month or the first day of the next month.
- The two future months listed first are ordered by the release date in ascending order. The bottom past month is ordered in descending order.