X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/mediawiki_extensions/wrreport.git/blobdiff_plain/b25465da6b30b2ea8cdf198db6d7c298c1650d8c..427cdb76ec84f14f1f6b11e61ceae5bfcec1f850:/wrreport_body.php?ds=sidebyside
diff --git a/wrreport_body.php b/wrreport_body.php
index 403f29a..2fe9119 100644
--- a/wrreport_body.php
+++ b/wrreport_body.php
@@ -1,6 +1,74 @@
+// Creates an overview table of all sledruns specified (one per line) in the tag.
+//
+//
+// Like but includes all sledruns that are in the region of the current page
+// or in the region specified by one of the following parameters:
+// (refers to region represented by the MediaWiki Title name)
+// (refers to id in the wrregion table)
+// (refers to name in the wrregion table)
+// This tag does not accept any contents.
+//
+//
+// Shows an overview of the sledrun reports of the current page.
+//
+//
+// Creates the form that is used to enter sledrun reports.
+//
+//
+// Generates a list of sledrun entries in a flexible way.
+// Each line (entry) either add sledruns or removes sledruns.
+// Without entries, the table contains no sledruns.
+//
+// Examples:
+// Empty list:
+//
+//
+// Sledrun "Rumer Alm" and sledrun "Juifenalm"
+//
+// Juifenalm
+// Rumer Alm
+//
+//
+// All sledruns in region Innsbruck thats entries are not "under construction".
+// The name of the region has to correspond to a name (column name)
+// in the table wrregion.
+//
+// Innsbruck
+//
+//
+// Same as above but excluding the sledrun "Rumer Alm":
+//
+// Innsbruck
+// Rumer Alm
+//
+//
+// All sledruns thats entries are "under construction"
+//
+//
+//
+//
+// Attributes:
+// * in_arbeit: values "ja", "nein" (default for and ), "*" (default for )
+// Just include the sledrun(s) if the condition is fulfilled.
+// * operation: values "+" (add the sledrun(s) to the set, default), "-" (subtract the sledrun(s) from the set)
+// Attributes that may be implemented later
+// * beleuchtungstage: values "0", "unknown" (is null), ">0" (excludes null), "7", "*" (includes null)
+// Just include the sledrun(s) if the condition is fulfilled.
+//
// Constants
@@ -280,7 +348,7 @@ function wrReportFormRender($hide_save_button = TRUE, $page_title = NULL, $date_
$td = $tr->appendElement('td');
$input = $td->appendElement('input', array('name' => 'preview', 'type' => 'submit'));
if ($hide_save_button)
- $input->setAttribute('value', wfMessage('wrreport-newreport-preview')->text() . ' & ' . wfMessage('wrreport-newreport-save')->text());
+ $input->setAttribute('value', wfMessage('wrreport-newreport-next')->text());
else {
$input->setAttribute('value', wfMessage('wrreport-newreport-preview')->text());
@@ -568,6 +636,16 @@ class WrReport {
// Parser Hook Functions
// ---------------------
+ public static function ParserFirstCallInitHook(&$parser) {
+ $parser->setHook('bahnberichtformular', 'WrReport::bahnberichtformularParserHook');
+ $parser->setHook('bahnberichte', 'WrReport::bahnberichteParserHook');
+ $parser->setHook('bahnentabelle', 'WrReport::bahnentabelleParserHook');
+ $parser->setHook('bahnenregiontabelle', 'WrReport::bahnenregiontabelleParserHook');
+ $parser->setHook('rodelbahntabelle', 'WrReport::rodelbahntabelleParserHook');
+ $parser->setHook('avatar', 'WrReport::avatarParserHook');
+ return true;
+ }
+
/// \brief Is called when the tag is encountered.
///
/// The current page name is taken.
@@ -1044,6 +1122,15 @@ class SpecialWrReport extends SpecialPage {
}
+ function LanguageGetSpecialPageAliasesHook(&$specialPageArray, $languageCode) {
+ $text = wfMessage('wrreport')->text(); // 'Bahnberichte'
+ $title = Title::newFromText($text); // 'Bahnberichte'
+ $specialPageArray['wrreport'][] = $title->getDBKey(); // 'Bahnberichte'
+ return true;
+ }
+
+
+
/// \param $par Possibilities:
/// - action == 'view' (default)
/// - action == 'preview': Preview new report