Difference between revisions of "Template:Assignment/row"
m (seriesbox -> assignment) |
m (piped variables) |
||
(30 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><tr class="template-infotable-body table-assignment-body-row"> | + | <includeonly><tr class="template-infotable-body table-assignment-body-row">{{#if: {{{disableAppliedLinks|}}}{{#var:disableAppliedLinksGlobal|}} | {{#vardefine:disableAppliedLinksLocal|true}} }} |
− | <td class="table-assignment-body-game"> [[{{{1}}}]] </td> | + | <td class="table-assignment-body-game"> [[{{{1|}}}]] </td> |
<td class="table-assignment-body-status" data-sort-value="{{{2|}}}">{{Assignment/tickcross|{{{2|}}}}}</td> | <td class="table-assignment-body-status" data-sort-value="{{{2|}}}">{{Assignment/tickcross|{{{2|}}}}}</td> | ||
− | + | <td class="table-availability-body-DRM" data-sort-value="{{{3|}}}">{{#if: {{{3|}}} |{{#arraymaptemplate:{{{3|}}}|Availability/DRM|,|}}|{{Availability/DRM}}}}</td> | |
− | + | <td class="table-assignment-body-release-date" style="text-align: center">{{#if: {{{4|}}} | {{#time: F j, Y | {{{4|}}} }} }}</td> | |
− | + | <td class="table-assignment-body-applied">{{#if: {{{5|}}}|{{#arraymap:{{{5|}}}|,|x|[[User:x|x]] ([[User talk:x|t]]{{!}}[[Special:Contributions/x|c]]{{#ifeq: {{#var:disableAppliedLinksLocal|}} | true | |{{!}}[{{PCGamingWiki:Assignments/Assignees/row/allApplied|x}} a]}})|<br/>}}}}</td> | |
− | + | <td class="table-assignment-body-completion-date" style="text-align: center">{{#if: {{{6|}}} | {{#time: F j, Y | {{{6|}}} }} }}</td> | |
− | + | <td class="table-assignment-body-assigned">{{#if: {{{7|}}}|{{#arraymap:{{{7|}}}|,|x|[[User:x|x]] ([[User talk:x|t]]{{!}}[[Special:Contributions/x|c]]{{#ifeq: {{#var:disableAppliedLinksLocal|}} | true | |{{!}}[{{PCGamingWiki:Assignments/Assignees/row/allApplied|x}} a]}})|<br/>}}}}</td> | |
− | + | <td class="table-assignment-body-notes">{{{8|}}}</td> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | <td class="table-assignment-body-release-date">{{{ | ||
− | <td class="table-assignment-body-applied">{{#if: {{{ | ||
− | <td class="table-assignment-body-completion-date">{{{ | ||
− | <td class="table-assignment-body-assigned">{{#if: {{{ | ||
− | <td class="table-assignment-body-notes">{{{ | ||
</tr></includeonly><noinclude>{{#cargo_declare: | </tr></includeonly><noinclude>{{#cargo_declare: | ||
_table=Assignments | _table=Assignments | ||
|Game=String | |Game=String | ||
|Status=String | |Status=String | ||
− | |||
|Platform=List (,) of String | |Platform=List (,) of String | ||
|Release_Date=Date | |Release_Date=Date | ||
Line 37: | Line 17: | ||
|Completion_Date=Date | |Completion_Date=Date | ||
|Assigned=List (,) of String | |Assigned=List (,) of String | ||
− | |Notes=String | + | |Notes=Wikitext |
− | }}</noinclude><includeonly>{{#cargo_store: | + | |EncodedName=String |
+ | }}</noinclude><includeonly>{{#ifeq: {{NAMESPACE}} | PCGamingWiki | {{#cargo_store: | ||
_table=Assignments | _table=Assignments | ||
|Game={{{1|}}} | |Game={{{1|}}} | ||
|Status={{{2|}}} | |Status={{{2|}}} | ||
− | | | + | |Platform={{{3|}}} |
− | | | + | |Release_Date={{{4|}}} |
− | | | + | |Applied={{{5|}}} |
− | | | + | |Completion_Date={{{6|}}} |
− | | | + | |Assigned={{{7|}}} |
− | | | + | |Notes={{{8|}}} |
− | | | + | |EncodedName={{urlencode:{{PAGENAME:{{{1|}}}}}|PATH}} |
− | }}</includeonly> | + | }}}}{{#vardefine:disableAppliedLinksLocal|null}}</includeonly><noinclude>{{Documentation}}</noinclude> |
Latest revision as of 17:28, 7 April 2021
This template defines the table "Assignments". View table.
Description
Template used to define and store data in the cargo table Assignments. A call to this template with the appropriate parameters set will automatically store a new row in the table. Beyond that, it also displays the data in a table row with the relevant data separated in columns.
Because of {{PAGENAME}}
does not necessarily output the same final text as just copy/pasting the page name manually, the template actually retrieves the exact {{PAGENAME}}
value of a page before encoding it and storing it in the Cargo table in the EncodedName column. The exact call is as follows: {{urlencode:{{PAGENAME:{{{1|}}}}}|PATH}}
. This approach was necessary to circumvent situations where e.g. ;
would cause the call from {{Assignment/checkAvailable}} to fail because of a mismatch between the stored game name and the actual page name as returned by {{PAGENAME}}
. It also makes the check compatible with quotation marks and various special characters. See Aemony's userpage for more information.
Notes
- This row-based table tries to cheat and re-use as much stuff from Template:Availability/DRM as possible.
- For displaying rows as a part of
{{#cargo_query}}
, use Template:Assignment/row/displayonly instead to prevent duplicate rows from being created.
Syntax
{{Assignment/row| title | state | platform | release_date | applied | completion_date | assigned | notes }}
title
should match the name of the PCGW article of the game.state
can be various states, but the common ones are available, assigned, complete, and not available. Visit Template:Assignment/tickcross to see all possible states.platform
works the same as the DRM column of the Availability table.release_date
expects the typical MMMM DD, YYYY format (e.g. January 1, 1970). Might or might not work with other date formats.applied
is a list of users (comma-delimited) whom have applied for the assignment so far.completion_date
is the date when the assignment was completed by the assigned user(s).assigned
is a list of users (comma-delimited) whom have been assigned to perform the assignment.notes
is for notes that might apply.