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

Consolidate template ansible deployment, add more templates

parent e2fdce5f
No related branches found
No related tags found
No related merge requests found
<div id="torque-explore--table-view">
{%- set top_proposals = [] %}
{%- set wildcard_proposals = [] %}
{%- set other_proposals = [] %}
{%- for proposal in proposal_data %}
{%- if "Achievement Level" in proposal %}
{%- if "Wildcard-Eligible" in proposal["Achievement Level"] %}
{{- '' if wildcard_proposals.append(proposal) }}
{%- elif "Top Proposal" in proposal["Achievement Level"] %}
{{- '' if top_proposals.append(proposal) }}
{%- else %}
{{- '' if other_proposals.append(proposal) }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- macro proposal_table(proposals, table_name) %}
{% if proposals %}
<h2>{{table_name}}</h2>
<table class="ots--table" cellpadding="0" cellspacing="0">
<colgroup>
<col style="width:auto">
<col style="width:auto">
<col style="width:auto">
<col style="width:auto">
<col style="width:auto;max-width:30%">
<col style="width:auto">
</colgroup>
<thead>
<tr>
<th>Rank</th>
<th>Organization Name</th>
<th>Organization Location</th>
<th>Primary Subject Area</th>
</tr>
</thead>
<tbody>
{%- for proposal in proposals %}
<tr>
<td>{{proposal["Rank"]}}</td>
<td><a href="/100Change2025/index.php/{{proposal["MediaWiki Title"] | e}}">{{proposal["Organization Name"]}}</a></td>
<td>{{proposal["Organization Location"]["City"]}},
{% if proposal["Organization Location"]["Country Code"] == "usa" %}
{{proposal["Organization Location"]["State/Province"]}}
{% else %}
{{proposal["Organization Location"]["Country"]}}
{% endif %}
</td>
<td>
{% if proposal['Primary Subject Area']['Level'] == 'Level 1' -%}
{{ proposal['Primary Subject Area']['Level 1'] }}
{% elif proposal['Primary Subject Area']['Level'] == 'Level 2' -%}
{{ proposal['Primary Subject Area']['Level 1'] }} >
{{ proposal['Primary Subject Area']['Level 2'] }}
{% elif proposal['Primary Subject Area']['Level'] == 'Level 3' -%}
{{ proposal['Primary Subject Area']['Level 1'] }} >
{{ proposal['Primary Subject Area']['Level 2'] }} >
{{ proposal['Primary Subject Area']['Level 3'] }}
{% elif proposal['Primary Subject Area']['Level'] == 'Level 4' -%}
{{ proposal['Primary Subject Area']['Level 1'] }} >
{{ proposal['Primary Subject Area']['Level 2'] }} >
{{ proposal['Primary Subject Area']['Level 3'] }} >
{{ proposal['Primary Subject Area']['Level 4'] }}
</span>
{% endif -%}
</td>
</tr>
{%- endfor %}
</tbody>
</table>
{%- endif %}
{%- endmacro %}
{{ proposal_table(top_proposals, "Top Proposals") }}
{{ proposal_table(wildcard_proposals, "Wildcard-Eligible") }}
{{ proposal_table(other_proposals, "Other") }}
</div>
......@@ -18,16 +18,28 @@
- name: Transfer 100Change2025 Templates
copy:
src: LFC_Analysis
dest: "{{ mediawiki_install_directory }}/LFC_Analysis"
- name: Install LFC_Analysis
raw: "php {{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/maintenance/edit.php -b TorqueConfig:100ChangeLFCAnalysis < {{ mediawiki_install_directory }}/LFC_Analysis"
- name: Remove LFC_Analysis
src: "{{ item }}"
dest: "{{ mediawiki_install_directory }}/{{ item }}"
loop:
- 100ChangeProposal
- LFC_Analysis
- 100Change2025ExploreTable
- name: Install 100Change2025 Templates
raw: "php {{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/maintenance/edit.php -b TorqueConfig:{{ item }} < {{ mediawiki_install_directory }}/{{ item }}"
loop:
- 100ChangeProposal
- LFC_Analysis
- 100Change2025ExploreTable
- name: Remove 100Change2025 Templates
file:
path: "{{ mediawiki_install_directory }}/LFC_Analysis"
path: "{{ mediawiki_install_directory }}/{{ item }}"
state: absent
loop:
- 100ChangeProposal
- LFC_Analysis
- 100Change2025ExploreTable
- name: Transfer 100Change2025 configuration
copy:
......@@ -41,7 +53,3 @@
block: |
include "{{ mediawiki_install_directory }}/mediawiki-{{ mediawiki_version }}/torque-sites-config/100Change2025.php";
- name: Remove 100Change2025 Proposal
file:
path: "{{ mediawiki_install_directory }}/100ChangeProposal"
state: absent
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