Difference between revisions of "Template:CHLine"

From Federation Space - Official Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<includeonly>{{-}} style="vertical-align:middle; height:32px;" | {{#if: {{{Assignment|}}}|[[{{{Assignment|}}}]]|}} || {{#switch: {{{Location|}}}
+
<includeonly>{{-!}}
 +
{{#if:{{{Assignment|}}}|{{!}} style="vertical-align:middle; height:32px;" {{#if:{{{rscol1|}}}|rowspan="{{{rscol1|}}}"|}}{{!}}[[{{{Assignment|}}}]]|}}
 +
{{#if:{{{Location|}}}|{{!}} style="vertical-align:middle; height:32px;" {{#if:{{{rscol2|}}}|rowspan="{{{rscol2|}}}"|}}{{!}}{{#switch:{{{Location|}}}
 
|[[IKV Dreamslayer]]
 
|[[IKV Dreamslayer]]
 
|IKV Dreamslayer={{IKV|Dreamslayer}}
 
|IKV Dreamslayer={{IKV|Dreamslayer}}
Line 94: Line 96:
 
|[[USS Yoritomo, DD-4019]]
 
|[[USS Yoritomo, DD-4019]]
 
|USS Yoritomo, DD-4019={{USS|Yoritomo|DD|4019}}
 
|USS Yoritomo, DD-4019={{USS|Yoritomo|DD|4019}}
|{{{Location|}}} }} || {{#if: {{{StardateEnd|}}}|{{{Stardate|}}} - {{{StardateEnd|}}}|{{#if: {{{Stardate|}}}|{{{Stardate|}}}|}}}} || {{#if: {{{Text|}}} | {{#ifeq: {{{Text|}}} |Promoted|Promoted to {{#switch: {{{Event|}}}
+
|{{{Location|}}}}}|}}
 +
{{#if:{{{Stardate|}}}|{{!}} style="vertical-align:middle; height:32px;" {{#if:{{{rscol3|}}}|rowspan="{{{rscol3|}}}"|}}{{!}}{{#if:{{{StardateEnd|}}}|{{{Stardate|}}} – {{{StardateEnd|}}}|{{{Stardate|}}}}}|}}
 +
{{#if:{{{Text|}}}|{{!}} style="vertical-align:middle; height:32px;" {{#if:{{{Event|}}}|{{#if:{{EventImage|{{{Event|}}}|{{{Department|}}}}}|colspan="1"|colspan="2"}}|colspan="2"}} {{!}}{{#ifeq:{{{Text|}}}|Promoted|Promoted to {{#switch:{{{Event|}}}
 
|General CinC=General Commander in Chief
 
|General CinC=General Commander in Chief
 
|Petty Officer 1st Class=Petty Officer First Class
 
|Petty Officer 1st Class=Petty Officer First Class
Line 100: Line 104:
 
|Petty Officer 3rd Class=Petty Officer Third Class
 
|Petty Officer 3rd Class=Petty Officer Third Class
 
|Graduated=Graduate
 
|Graduated=Graduate
|{{{Event|}}} }}| {{#ifeq: {{{Text|}}} |Awarded|Awarded {{#switch: {{{Event|}}}
+
|{{{Event|}}}}}|{{#ifeq:{{{Text|}}}|Awarded|Awarded {{#switch:{{{Event|}}}
 
|Star Fleet Academy Graduation Ribbon=Star Fleet Academy Graduate Ribbon
 
|Star Fleet Academy Graduation Ribbon=Star Fleet Academy Graduate Ribbon
 
|Marine Corps Academy Graduation Ribbon=Marine Corps Academy Graduate Ribbon
 
|Marine Corps Academy Graduation Ribbon=Marine Corps Academy Graduate Ribbon
Line 114: Line 118:
 
|President's Medal=President’s Medal
 
|President's Medal=President’s Medal
 
|Sword of the OPFOR=Sword of the Opposing Force
 
|Sword of the OPFOR=Sword of the Opposing Force
|{{{Event|}}} }}| {{{Text|}}} }} }} | {{#switch: {{{Event|}}}
+
|{{{Event|}}}}}|{{{Text|}}}}}}}|{{#if:{{{Event|}}}|{{!}} style="vertical-align:middle; height:32px;" {{#if:{{EventImage|{{{Event|}}}|{{{Department|}}}}}|colspan="1"|colspan="2"}} {{!}}{{#switch:{{{Event|}}}
 
|General CinC=General Commander in Chief
 
|General CinC=General Commander in Chief
 
|Petty Officer 1st Class=Petty Officer First Class
 
|Petty Officer 1st Class=Petty Officer First Class
Line 133: Line 137:
 
|President's Medal=President’s Medal
 
|President's Medal=President’s Medal
 
|Sword of the OPFOR=Sword of the Opposing Force
 
|Sword of the OPFOR=Sword of the Opposing Force
|{{{Event|}}} }} }} || {{#if: {{{Event|}}}|{{EventImage|{{{Event|}}}|{{{Department|}}}}}{{EventVariables|{{{Event|}}}}}|}}</includeonly><noinclude>__NOEDITSECTION__
+
|{{{Event|}}}}}|{{!}} style="vertical-align:middle; height:32px;" colspan="2" {{!}} &nbsp; }}}}
 +
{{#if:{{{Event|}}}|{{#if:{{EventImage|{{{Event|}}}|{{{Department|}}}}}|{{!}} style="vertical-align:middle; height:32px;" {{!}}{{EventImage|{{{Event|}}}|{{{Department|}}}}}{{EventVariables|{{{Event|}}}}}|}} <!--{{!}} style="vertical-align:middle; height:32px;" {{!}}{{#lst:Medal Graphics|blank}}--> |}}</includeonly><noinclude>__NOEDITSECTION__
 
This template provides each history line of the “Career History” table of all STAR FLEET PERSONNEL COMMAND files; that is, biographies.
 
This template provides each history line of the “Career History” table of all STAR FLEET PERSONNEL COMMAND files; that is, biographies.
  
Line 150: Line 155:
 
:<code><nowiki>}}</nowiki></code><br />
 
:<code><nowiki>}}</nowiki></code><br />
  
For notes about each item, above, see under the “[[Template:{{PAGENAME}}#Details—Item By Item|Details—Item By Item]]” heading, below.
+
For notes about each item, above, see under the “[[Template:{{PAGENAME}}#Details—Item By Item|Details—Item By Item]]” heading, below. See also under the “[[Template:{{PAGENAME}}#Advanced Table Format|Advanced Table Format]]” heading, below, for advanced table layout options.
  
 
== First Line ==
 
== First Line ==
Line 231: Line 236:
 
::*Note that the character’s actual department must replace “Science.” Examples of departments include <code>Marine</code>, <code>Medical</code>, and <code>Support</code>. To avoid display errors because of missing or incorrect rank images, enter the correct wiki rank in <code>|Event=Rank</code> and the correct wiki department in <code>|Department=Department</code>.
 
::*Note that the character’s actual department must replace “Science.” Examples of departments include <code>Marine</code>, <code>Medical</code>, and <code>Support</code>. To avoid display errors because of missing or incorrect rank images, enter the correct wiki rank in <code>|Event=Rank</code> and the correct wiki department in <code>|Department=Department</code>.
 
::::See [[Template:EventImage]] for a list of actual wiki rank, department, and medal names.
 
::::See [[Template:EventImage]] for a list of actual wiki rank, department, and medal names.
 +
 +
== Advanced Table Layout ==
 +
See below for notes about advanced table layout options:
 +
 +
=== Merging Cells—Rowspan ===
 +
:<code>|rscol1=1</code> This advanced item is optional and merges cells in the first column—Assignment (Position)—of the Career History table.<br />
 +
:<code>|rscol2=2</code> This advanced item is optional and merges cells in the second column—Location (Assignment)—of the Career History table.<br />
 +
:<code>|rscol3=3</code> This advanced item is optional and merges cells in the third column—Date(s)—of the Career History table.<br />
 +
::*Note that the above “rscol” items insert “rowspan” wiki markups into the Career History table, and the actual number of cells to merge must replace the number following the equals sign in each of the examples, above. To avoid display errors because of misaligned cells, the corresponding number of lines below the line that includes the “rscol” item must leave blank their corresponding items, as illustrated in the example, below:
 +
 +
{|
 +
|valign="top"|'''Standard Layout'''
 +
:<code>{{CHLine</code>
 +
:<code><nowiki>|Location=[[Star Fleet Academy]]</nowiki></code>
 +
:<code>|Assignment=Cadet</code>
 +
:<code>|Stardate=21509.11</code>
 +
:<code>|StardateEnd=</code>
 +
:<code>|Event=Star Fleet Academy Graduation Ribbon</code>
 +
:<code>|Text=Awarded</code>
 +
:<code>|Department=</code>
 +
:<code>}}</code>
 +
:<code>{{CHLine</code>
 +
:<code><nowiki>|Location=[[Star Fleet Academy]]</nowiki></code>
 +
:<code>|Assignment=Security Officer</code>
 +
:<code>|Stardate=21509.11</code>
 +
:<code>|StardateEnd=</code>
 +
:<code>|Event=Midshipman</code>
 +
:<code>|Text=Promoted</code>
 +
:<code>|Department=Security</code>
 +
:<code>}}</code>
 +
| valign="top" | '''Advanced Layout'''
 +
:<code>{{CHLine</code>
 +
:<code>|rscol2=2</code> This “rscol2” item will expand “Star Fleet Academy” to include two “CHLine” lines (this one and the next).<br />
 +
:<code>|rscol3=2</code> This “rscol3” item will expand the Stardate to include two “CHLine” lines (this one and the next).<br />
 +
:<code><nowiki>|Location=[[Star Fleet Academy]]</nowiki></code>
 +
:<code>|Assignment=Cadet</code>
 +
:<code>|Stardate=21509.11</code>
 +
:<code>|StardateEnd=</code>
 +
:<code>|Event=Star Fleet Academy Graduation Ribbon</code>
 +
:<code>|Text=Awarded</code>
 +
:<code>|Department=</code>
 +
:<code>}}</code>
 +
:<code>{{CHLine</code>
 +
:<code><nowiki>|Location=</nowiki></code> This item must be left blank in order to merge with the “rscol2” item, above.<br />
 +
:<code>|Assignment=Security Officer</code>
 +
:<code>|Stardate=</code> This item must be left blank in order to merge with the “rscol3” item, above.<br />
 +
:<code>|StardateEnd=</code>
 +
:<code>|Event=Midshipman</code>
 +
:<code>|Text=Promoted</code>
 +
:<code>|Department=Security</code>
 +
:<code>}}</code>
 +
|}
  
  

Revision as of 01:18, 9 November 2015

This template provides each history line of the “Career History” table of all STAR FLEET PERSONNEL COMMAND files; that is, biographies.

(You might be looking for Template:CHHead; that is, the template that provides the table header of the “Career History” section of biographies.)

To make use of this history line template, Template:CHLine, the biography must include the following line within its |CHist= section; that is, it must include the entire set of codes, as illustrated, below, which represents one line of history in the “Career History” table of the biography:

{{CHLine
|Location={{USS|Yeager|FSC|28018}}
|Assignment=Science Officer
|Stardate=21509.01
|StardateEnd=
|Event=Ensign
|Text=
|Department=Science
}}

For notes about each item, above, see under the “Details—Item By Item” heading, below. See also under the “Advanced Table Format” heading, below, for advanced table layout options.

First Line

Note that the first line, and only the first line, should immediately follow the |CHist= item and {{CHHead|Character Name|UFP}} table header line, as illustrated, below:

|CHist=
{{CHHead|Character Name|UFP}}
{{CHLine
|Location={{USS|Yeager|FSC|28018}}
|Assignment=Science Officer
|Stardate=21509.01
|StardateEnd=
|Event=Ensign
|Text=
|Department=Science
}}

Additional Lines

To avoid display errors because of too much space, include sequential lines so that they follow each other immediately without additional space between them, as illustrated, below:

{{CHLine
|Location={{USS|Yeager|FSC|28018}}
|Assignment=Science Officer
|Stardate=21509.01
|StardateEnd=
|Event=Ensign
|Text=
|Department=Science
}}
{{CHLine
|Location={{USS|Yeager|FSC|28018}}
|Assignment=Science Officer
|Stardate=21509.18
|StardateEnd=
|Event=Role Player of the Month
|Text=
|Department=Science
}}

Details—Item By Item

See below for notes about each history line item:

Location (Assignment)

|Location={{USS|Yeager|FSC|28018}} This item is required.
  • For starship assignments, replace “Yeager” with the character starship’s actual name, replace “FSC” with the character starship’s actual prefix, and replace “28018” with the character starship’s actual suffix. Examples of other starship assignments include {{IKV|Dreamslayer}} and {{RIS|Shadowhawk}}.
  • For other assignments for which a wiki page exists, replace “{{USS|Yeager|FSC|28018}}” with the page name inside double square brackets to provide a wiki link to the appropriate page. Examples of such assignments include [[Area 42]], [[Star Base Alpha]], and [[Star Fleet Academy]]. To avoid display errors because of a broken wiki link, try one of three things: (1) Check the assignment for correct spelling. (2) Search the wiki for the same assignment but with a different name to discover the appropriate name to use. (3) Create a wiki page with the same name as the assignment.
  • For other assignments for which a wiki page does not and will not exist, replace “{{USS|Yeager|FSC|28018}}” with the name of the assignment, but without double square brackets, to prevent a broken wiki link.

Assignment (Position)

|Assignment=Science Officer This item is required.
  • Note that the character’s actual position must replace “Science Officer.” Examples of positions include Cadet, Tactical Officer, and Acting Commanding Officer, etc. To avoid display errors because of double square brackets, do not include double square brackets along with the position. To avoid display errors because of a broken wiki link, try one of three things: (1) Check the position for correct spelling. (2) Search the wiki for the same position but with a different name to discover the appropriate name to use. (3) Create a wiki page with the same name as the position.

Stardate(s)

|Stardate=21509.01 This item is required.
|StardateEnd= This item is optional.
  • Simply replace “21509.01” with or include the actual Stardate or range of Stardates, in Federation Space format, according to the best recollection of events.

Event

|Event=Ensign This item is required.
  • Note that the character’s actual event, whether a rank, medal, or other event, must replace “Ensign.” To avoid display errors because of double square brackets, do not include double square brackets along with the event. To avoid display errors because of missing images, use the actual wiki rank or medal name—not necessarily the rank or medal’s proper name, and do not include additional text along with “Event.” For example, |Event=Ensign is correct; |Event=Promoted to Ensign is incorrect. However, compare the “Text” heading, below.
See Template:EventImage for a list of actual wiki rank, department, and medal names.
  • Examples of non-rank and non-medal events include Promoted or Reassigned, for a change in assignment (position) or department; Transferred, for a change in location (assignment); and Retired, for retired characters or for the characters of inactive players.

Text

|Text= This item is optional.
  • Use this item to provide a more descriptive event. Consider the following example:
|Event=Ensign
|Text=Promoted to Ensign
  • In the example, above, “Promoted to Ensign,” as provided by |Text=Promoted to Ensign, replaces “Ensign,” as provided by |Event=Ensign, in the “Event” column of the “Career History” section of the biography. WARNING: “Text” only replaces text and does not replace the other important functions of “Event.” To avoid display errors because of missing images, do not remove |Event=Event and do not leave it blank. See the “Event” heading, above.
  • While full descriptive text may be included, rank and medal event shortcuts are available, as illustrated, below:
|Event=Midshipman
|Text=Promoted Note: not “Promoted to.”
  • In the example, above, “Promoted to Midshipman” replaces “Midshipman.”
|Event=Star Fleet Academy Graduation Ribbon
|Text=Awarded
  • In the example, above, “Awarded Star Fleet Academy Graduate Ribbon” replaces “Star Fleet Academy Graduate Ribbon.”

Department

|Department=Science This item is required for rank images; it retrieves rank images from the appropriate department.
  • Note that the character’s actual department must replace “Science.” Examples of departments include Marine, Medical, and Support. To avoid display errors because of missing or incorrect rank images, enter the correct wiki rank in |Event=Rank and the correct wiki department in |Department=Department.
See Template:EventImage for a list of actual wiki rank, department, and medal names.

Advanced Table Layout

See below for notes about advanced table layout options:

Merging Cells—Rowspan

|rscol1=1 This advanced item is optional and merges cells in the first column—Assignment (Position)—of the Career History table.
|rscol2=2 This advanced item is optional and merges cells in the second column—Location (Assignment)—of the Career History table.
|rscol3=3 This advanced item is optional and merges cells in the third column—Date(s)—of the Career History table.
  • Note that the above “rscol” items insert “rowspan” wiki markups into the Career History table, and the actual number of cells to merge must replace the number following the equals sign in each of the examples, above. To avoid display errors because of misaligned cells, the corresponding number of lines below the line that includes the “rscol” item must leave blank their corresponding items, as illustrated in the example, below:
Standard Layout
{{CHLine
|Location=[[Star Fleet Academy]]
|Assignment=Cadet
|Stardate=21509.11
|StardateEnd=
|Event=Star Fleet Academy Graduation Ribbon
|Text=Awarded
|Department=
}}
{{CHLine
|Location=[[Star Fleet Academy]]
|Assignment=Security Officer
|Stardate=21509.11
|StardateEnd=
|Event=Midshipman
|Text=Promoted
|Department=Security
}}
Advanced Layout
{{CHLine
|rscol2=2 This “rscol2” item will expand “Star Fleet Academy” to include two “CHLine” lines (this one and the next).
|rscol3=2 This “rscol3” item will expand the Stardate to include two “CHLine” lines (this one and the next).
|Location=[[Star Fleet Academy]]
|Assignment=Cadet
|Stardate=21509.11
|StardateEnd=
|Event=Star Fleet Academy Graduation Ribbon
|Text=Awarded
|Department=
}}
{{CHLine
|Location= This item must be left blank in order to merge with the “rscol2” item, above.
|Assignment=Security Officer
|Stardate= This item must be left blank in order to merge with the “rscol3” item, above.
|StardateEnd=
|Event=Midshipman
|Text=Promoted
|Department=Security
}}