Ir al contenido

Wikinoticias:Asistente/add action-test/uso

De Wikinoticias, la fuente libre de noticias
.


This is a dialog-based Asistente for adding an entry to the table of tests for a dialog action.

The starting point for the Asistente is Wikinoticias:Asistente/add action-test/start.

The dialog action page name must have prefix "Wikinoticias:Diálogo/". The table page name appends "/test" to the action page name. The table consists of calls to {{Diálogo/action page/test top}}, {{Diálogo/action page/test entry}}, and {{Diálogo/action page/test bottom}}.

Access: viewable.

Inputs:

  • {{{subject}}} — if provided, the name of the table page.
  • {{{action-page}}} — if provided when subject isn't, the name of the action page.
  • {{{SUBJECT-CONTENT}}} — if available, content of the table page.
  • {{{not-subpage}}} — if non-blank, the test page is not a subpage of the table.
  • {{{reconsider}}} — if non-blank, treat the choice of action page as unsettled.
is dialog supported? no
unsupported
yes
do known parameters
identify a table?
no
start/get-action
yes no
start/table-named
does table exist?
no
does action exist?
yes yes
start/get-entry start/create-table

Inputs:

  • {{{intro}}} — paragraph to appear above the input box and button.
  • {{{subject}}} — if provided, possible table name.

Function:

Prompts for action-page; button sends it to start.

Inputs:

  • {{{subject}}} — name of the table page, with correct form.
  • {{{SUBJECT-CONTENT}}} — if available, content of the table page.
  • {{{not-subpage}}} — if non-blank, the test page is not a subpage of the table.

Function:

Implements part of the logic shown for start.

Inputs:

  • {{{subject}}} — name of the table page, valid but not yet created.

Function:

Prompts for go-ahead to create table page.

Subpages:

Inputs:

  • {{{subject}}} — name of the table page, known to exist.
  • {{{SUBJECT-CONTENT}}} — if available, content of the table page.
  • {{{not-subpage}}} — if non-blank, the test page is not a subpage of the table.

Function:

Prompts for test-page; button sends request to add-entry. If SUBJECT-CONTENT is used at all, it is used only for advice, not for constructing new page content. Data is entered in fields test-page, description, and not-subpage. If not-subpage is true (i.e., non-blank), test-page is the full name of the test page. If not-subpage is blank, test-page only specifies the subpage suffix to add to the table name, excluding slash. The test page must exist. description may be blank.
Access: viewable.

Inputs:

  • {{{subject}}} — name of the table page, ostensibly known to exist.
  • {{{SUBJECT-EXISTS}}} — non-blank to confirm that the table page exists.
  • {{{SUBJECT-CONTENT}}} — content of the table page.
  • {{{not-subpage}}} — if non-blank, the test page is not a subpage of the table.
  • {{{test-page}}} — name of the test page to be added to the table, omitting table-page prefix unless not-subpage.
  • {{{description}}} — description of the test page for use in the table.
add-entry/valid1
is the request valid?
no
add-entry/error
yes
add-entry/preview

Inputs:

  • {{{subject}}} — the full page name of the test table to which an entry is to be added.
  • {{{SUBJECT-EXISTS}}} — either true or false, depending on whether the test table page exists.
  • {{{SUBJECT-CONTENT}}} — the raw content of the test table page.
  • {{{test-fullpage}}} — the full name of the test page to be added to the table; needn't exist.
  • {{{description}}} — description of the test page for use in the table.

Function:

Takes input collected elsewhere (so the input only has to be template-expanded once), assesses it via add-entry/check, and passes the results on to add-entry-valid2 (so that add-entry/check only has to be called once).

Inputs:

  • {{{subject}}} — the full page name of the test table to which an entry is to be added; must begin with Wikinews:Diálogo/.
  • {{{SUBJECT-EXISTS}}} — either true or false, depending on whether the test table page exists.
  • {{{SUBJECT-CONTENT}}} — the raw content of the test table page.
  • {{{test-fullpage}}} — the full name of the test page to be added to the table; needn't exist.

Function:

This template checks that the table exists, that it contains exactly one call to {{Diálogo/action page/test bottom}}, and that it does not already contain a call to {{Diálogo/action page/test entry}} for test-fullpage. If any of these conditions is not met, generates an error message, otherwise generates the empty string.

Inputs:

  • {{{subject}}} — the full page name of the test table to which an entry is to be added.
  • {{{SUBJECT-CONTENT}}} — the raw content of the test table page.
  • {{{test-fullpage}}} — the full name of the test page to be added to the table; needn't exist.
  • {{{description}}} — description of the test page for use in the table.
  • {{{error-message}}} — the result from add-entry/check, blank if validated or non-blank if not validated.

Function:

Passes data from add-entry/valid1 to either add-entry/error or add-entry/preview.

Inputs:

  • {{{subject}}} — the full page name of the test table to which an entry is to be added.
  • {{{error-message}}} — the result from add-entry/check, blank if validated or non-blank if not validated.

Function:

Displays an error message and offers a button to return to start.

Inputs:

  • {{{subject}}} — the full page name of the test table to which an entry is to be added.
  • {{{SUBJECT-CONTENT}}} — the raw content of the test table page.
  • {{{test-fullpage}}} — the full name of the test page to be added to the table; needn't exist.
  • {{{description}}} — description of the test page for use in the table.

Function:

Provides a preview of the table via add-entry/add and offers button to commit or return to start. The preview is actually generated at add-entry since {{Diálogo/init}} has to appear directly on the displayed page.

Inputs:

  • {{{SUBJECT-CONTENT}}} — the raw content of the test table page.
  • {{{test-fullpage}}} — the full name of the test page to be added to the table; needn't exist.
  • {{{description}}} — description of the test page for use in the table.

Function:

This template adds the proposed new entry to the wiki markup of the test table page.

Inputs:

  • {{{subject}}} — the full page name of the test table to which an entry is to be added.
  • {{{test-fullpage}}} — the full name of the test page to be added to the table; needn't exist.
  • {{{description}}} — description of the test page for use in the table.

Function:

Edit form to add the entry.

Subpage: