Skip to content
Snippets Groups Projects
Commit e2fdce5f authored by Frank Duncan's avatar Frank Duncan
Browse files

Add 100Change2025 config.php, move some config from ansible task out

parent 95c583a3
No related branches found
No related tags found
No related merge requests found
<?php
$wgLFCExtraTabOverrides["FINALIST_CANDIDATE"] = function() {
global $wgUser;
if($wgUser->isSafeToLoad() && $wgUser->isAllowed("lfcanalysis")) {
return [
["", "Original Proposal"],
["Evaluations of ", "Evaluations"],
["LFC Analysis of ", "Analysis"],
];
} else {
return [
["", "Original Proposal"],
["Evaluations of ", "Evaluations"],
];
}
};
$tdcOverrideMessage = [
"rankedchoice-widget-select" => "Select this proposal",
];
$wgHooks['MessagesPreLoad'][] = function($title, &$message, $code) {
global $tdcOverrideMessage;
if(array_key_exists(strtolower($title), $tdcOverrideMessage)) {
$message = $tdcOverrideMessage[strtolower($title)];
}
};
$wgRankedChoiceChoices = [
"wildcard" => [
"value" => 1000,
"tag" => "Wildcard",
"table_tag" => "Wildcard",
"name" => "wildcard",
"class" => "wildcard"
],
"choice_1" => [
"value" => 5,
"tag" => "Choice #1",
"table_tag" => "1st",
"name" => "choice_1",
"class" => "choice_1"
],
"choice_2" => [
"value" => 4,
"tag" => "Choice #2",
"table_tag" => "2nd",
"name" => "choice_2",
"class" => "choice_2"
],
"choice_3" => [
"value" => 3,
"tag" => "Choice #3",
"table_tag" => "3rd",
"name" => "choice_3",
"class" => "choice_3"
],
"choice_4" => [
"value" => 2,
"tag" => "Choice #4",
"table_tag" => "4th",
"name" => "choice_4",
"class" => "choice_4"
],
"choice_5" => [
"value" => 1,
"tag" => "Choice #5",
"table_tag" => "5th",
"name" => "choice_5",
"class" => "choice_5"
],
];
?>
......@@ -16,28 +16,7 @@
path: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/LocalSettings.php"
line: $wgRawHtml = true;
- name: Install additional tab configurations
blockinfile:
path: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/LocalSettings.php"
marker: "## {mark} ANSIBLE ADDITIONAL TAB CONFIG"
block: |
$wgLFCExtraTabOverrides["FINALIST_CANDIDATE"] = function() {
global $wgUser;
if($wgUser->isSafeToLoad() && $wgUser->isAllowed("lfcanalysis")) {
return [
["", "Original Proposal"],
["Evaluations of ", "Evaluations"],
["LFC Analysis of ", "Analysis"],
];
} else {
return [
["", "Original Proposal"],
["Evaluations of ", "Evaluations"],
];
}
};
- name: Transfer LFC Analysis
- name: Transfer 100Change2025 Templates
copy:
src: LFC_Analysis
dest: "{{ mediawiki_install_directory }}/LFC_Analysis"
......@@ -50,13 +29,17 @@
path: "{{ mediawiki_install_directory }}/LFC_Analysis"
state: absent
- name: Transfer 100Change2025 Proposal
- name: Transfer 100Change2025 configuration
copy:
src: 100Change2025
dest: "{{ mediawiki_install_directory }}/100ChangeProposal"
src: 100Change2025.php
dest: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/torque-sites-config/"
- name: Install 100Change2025 Proposal
raw: "php {{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/maintenance/edit.php -b TorqueConfig:100ChangeProposal < {{ mediawiki_install_directory }}/100ChangeProposal"
- name: Enable 100Change2025 configuration
blockinfile:
path: "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/LocalSettings.php"
marker: "## {mark} ANSIBLE 100 Change 2025 CONFIG"
block: |
include "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/torque-sites-config/100Change2025.php";
- name: Remove 100Change2025 Proposal
file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment