diff options
Diffstat (limited to 'tmpl')
-rw-r--r-- | tmpl/donations.html | 108 | ||||
-rw-r--r-- | tmpl/donations_all.html | 14 | ||||
-rw-r--r-- | tmpl/donations_by_month.html | 38 | ||||
-rw-r--r-- | tmpl/donations_by_pa.html | 38 | ||||
-rw-r--r-- | tmpl/donations_by_year.html | 78 | ||||
-rw-r--r-- | tmpl/donations_who.html | 12 | ||||
-rw-r--r-- | tmpl/index.html | 426 | ||||
-rw-r--r-- | tmpl/transactions_by_ac.html | 44 | ||||
-rw-r--r-- | tmpl/transactions_by_ca.html | 50 | ||||
-rw-r--r-- | tmpl/transactions_by_month.html | 74 | ||||
-rw-r--r-- | tmpl/transactions_by_pa.html | 50 | ||||
-rw-r--r-- | tmpl/transactions_by_year.html | 306 |
12 files changed, 619 insertions, 619 deletions
diff --git a/tmpl/donations.html b/tmpl/donations.html index ab53424..dd17368 100644 --- a/tmpl/donations.html +++ b/tmpl/donations.html @@ -10,70 +10,70 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » donations</h1> <div class="content"> - <div class="section"> - [%- USE date(format='%Y/%m/%d') -%] - <h1>Mageia.Org donations</h1> - [% donations.total_30 %] Euros have been donated to Mageia.org in the last 30 days. - </div> + <div class="section"> + [%- USE date(format='%Y/%m/%d') -%] + <h1>Mageia.Org donations</h1> + [% donations.total_30 %] Euros have been donated to Mageia.org in the last 30 days. + </div> - <div class="section"> - [%- l = 10 -%] - <h2>Last [% l %] donations <a href="donations.rss"><img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a></h2> - <ul> - [%- i=0 -%] - [%- FOR don IN donations.donations.sort('date').reverse -%] - [%- i = i + 1 -%] - [%- LAST IF i > l -%] - <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %]</li> - [%- END -%] - </ul> - </div> + <div class="section"> + [%- l = 10 -%] + <h2>Last [% l %] donations <a href="donations.rss"><img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a></h2> + <ul> + [%- i=0 -%] + [%- FOR don IN donations.donations.sort('date').reverse -%] + [%- i = i + 1 -%] + [%- LAST IF i > l -%] + <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %]</li> + [%- END -%] + </ul> + </div> - <div class="section"> - <h2>Donations per year</h2> + <div class="section"> + <h2>Donations per year</h2> - <canvas id="donations_history_bar_chart" height="250" width="[% 80 + donations.by_year.keys.size * 65 %]"></canvas> + <canvas id="donations_history_bar_chart" height="250" width="[% 80 + donations.by_year.keys.size * 65 %]"></canvas> - <script> + <script> - var barChartData = { - labels : ["[% donations.by_year.keys.sort.reverse.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR year IN donations.by_year.keys.sort.reverse -%] - [%- donations.by_year.$year.total -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] - } + var barChartData = { + labels : ["[% donations.by_year.keys.sort.reverse.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR year IN donations.by_year.keys.sort.reverse -%] + [%- donations.by_year.$year.total -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] + } - var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); + var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); - </script> + </script> - <ul> - [%- FOR year IN donations.by_year.keys.sort.reverse %] - <li><a href="donations_y_[% year %].html">[% year %]: [% donations.by_year.$year.total %] Euros</a></li> - [%- END %] - </ul> - </div> + <ul> + [%- FOR year IN donations.by_year.keys.sort.reverse %] + <li><a href="donations_y_[% year %].html">[% year %]: [% donations.by_year.$year.total %] Euros</a></li> + [%- END %] + </ul> + </div> - <div class="section"> - <h2>Donations list</h2> - <p> - The list of donations received is available <a href="donations_all.html">on this page</a>. - </p> - </div> + <div class="section"> + <h2>Donations list</h2> + <p> + The list of donations received is available <a href="donations_all.html">on this page</a>. + </p> + </div> - <div class="section"> - <p> - <small>Last update: [% date.format(last_update, format => '%Y/%m/%d %H:%M:%S') %]</small> - </p> - </div> + <div class="section"> + <p> + <small>Last update: [% date.format(last_update, format => '%Y/%m/%d %H:%M:%S') %]</small> + </p> + </div> </div> </body> </html> diff --git a/tmpl/donations_all.html b/tmpl/donations_all.html index fbd9c2c..e9171e7 100644 --- a/tmpl/donations_all.html +++ b/tmpl/donations_all.html @@ -9,13 +9,13 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » <a href="donations.html">donations</a> » all</h1> <div class="content"> - <h1>Mageia.Org donations list</h1> - <ul> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR don IN donations.donations.sort('date').reverse %] - <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li> - [%- END -%] - </ul> + <h1>Mageia.Org donations list</h1> + <ul> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR don IN donations.donations.sort('date').reverse %] + <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li> + [%- END -%] + </ul> </div> </body> </html> diff --git a/tmpl/donations_by_month.html b/tmpl/donations_by_month.html index 4e93fff..68c8fd7 100644 --- a/tmpl/donations_by_month.html +++ b/tmpl/donations_by_month.html @@ -9,25 +9,25 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » <a href="donations.html">donations</a> » month [% month %]</h1> <div class="content"> - <h1>Mageia.Org donations for month [% month %]</h1> - <h2>Summary</h2> - <ul> - <li> - <b>Total</b>: [% donations.by_month.$month.total %] Euros - </li> - [% FOR type IN donations.by_month.$month.type.keys %] - <li> - <b>[% type %]</b>: [% donations.by_month.$month.type.$type %] Euros - </li> - [%- END -%] - </ul> - <h2>Donations list</h2> - <ul> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR don IN donations.by_month.$month.donations.sort('date').reverse %] - <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li> - [%- END -%] - </ul> + <h1>Mageia.Org donations for month [% month %]</h1> + <h2>Summary</h2> + <ul> + <li> + <b>Total</b>: [% donations.by_month.$month.total %] Euros + </li> + [% FOR type IN donations.by_month.$month.type.keys %] + <li> + <b>[% type %]</b>: [% donations.by_month.$month.type.$type %] Euros + </li> + [%- END -%] + </ul> + <h2>Donations list</h2> + <ul> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR don IN donations.by_month.$month.donations.sort('date').reverse %] + <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li> + [%- END -%] + </ul> </div> </body> </html> diff --git a/tmpl/donations_by_pa.html b/tmpl/donations_by_pa.html index faddf48..d0e6f2c 100644 --- a/tmpl/donations_by_pa.html +++ b/tmpl/donations_by_pa.html @@ -9,25 +9,25 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » <a href="donations.html">donations</a> » <a href="donations_who.html">who</a> » [% who %]</h1> <div class="content"> - <h1>Mageia.Org donations received from [% who %]</h1> - <h2>Summary</h2> - <ul> - <li> - <b>Total</b>: [% donations.by_pa.$pa.total %] Euros - </li> - [% FOR type IN donations.by_pa.$pa.type.keys %] - <li> - <b>[% type %]</b>: [% donations.by_pa.$pa.type.$type %] Euros - </li> - [%- END -%] - </ul> - <h2>Donations list</h2> - <ul> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR don IN donations.by_pa.$pa.donations %] - <li><b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li> - [%- END -%] - </ul> + <h1>Mageia.Org donations received from [% who %]</h1> + <h2>Summary</h2> + <ul> + <li> + <b>Total</b>: [% donations.by_pa.$pa.total %] Euros + </li> + [% FOR type IN donations.by_pa.$pa.type.keys %] + <li> + <b>[% type %]</b>: [% donations.by_pa.$pa.type.$type %] Euros + </li> + [%- END -%] + </ul> + <h2>Donations list</h2> + <ul> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR don IN donations.by_pa.$pa.donations %] + <li><b>[% don.amount %]</b> Euros on [% date.format(don.date) %] ([% don.sc_name %])</li> + [%- END -%] + </ul> </div> </body> </html> diff --git a/tmpl/donations_by_year.html b/tmpl/donations_by_year.html index 7d26e7c..ffbcdaf 100644 --- a/tmpl/donations_by_year.html +++ b/tmpl/donations_by_year.html @@ -10,52 +10,52 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » <a href="donations.html">donations</a> » year [% year %]</h1> <div class="content"> - <h1>Mageia.Org donations for year [% year %]</h1> - <h2>Summary</h2> - <ul> - <li> - <b>Total</b>: [% donations.by_year.$year.total %] Euros - </li> - [%- FOR type IN donations.by_year.$year.type.keys -%] - <li> - <b>[% type %]</b>: [% donations.by_year.$year.type.$type %] Euros - </li> - [%- END -%] - </ul> - <h2>Donations for each month</h2> + <h1>Mageia.Org donations for year [% year %]</h1> + <h2>Summary</h2> + <ul> + <li> + <b>Total</b>: [% donations.by_year.$year.total %] Euros + </li> + [%- FOR type IN donations.by_year.$year.type.keys -%] + <li> + <b>[% type %]</b>: [% donations.by_year.$year.type.$type %] Euros + </li> + [%- END -%] + </ul> + <h2>Donations for each month</h2> - [% IF donations.by_year.$year.months.size > 1 %] - <canvas id="donations_history_bar_chart" height="250" width="[% 80 + donations.by_year.$year.months.size * 65 %]"></canvas> + [% IF donations.by_year.$year.months.size > 1 %] + <canvas id="donations_history_bar_chart" height="250" width="[% 80 + donations.by_year.$year.months.size * 65 %]"></canvas> - <script> + <script> - var barChartData = { - labels : ["[% donations.by_year.$year.months.sort.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR month IN donations.by_year.$year.months.sort -%] - [%- donations.by_month.$month.total -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] + var barChartData = { + labels : ["[% donations.by_year.$year.months.sort.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR month IN donations.by_year.$year.months.sort -%] + [%- donations.by_month.$month.total -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] } - ] - } - var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); + var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); - </script> - [% END %] + </script> + [% END %] - <ul> - [%- FOR month IN donations.by_month.keys.sort -%] - [%- IF donations.by_month.$month.year == year -%] - <li><a href="donations_m_[% month %].html">[% month %]: [% donations.by_month.$month.total %] Euros</a></li> - [%- END -%] - [%- END -%] - </ul> + <ul> + [%- FOR month IN donations.by_month.keys.sort -%] + [%- IF donations.by_month.$month.year == year -%] + <li><a href="donations_m_[% month %].html">[% month %]: [% donations.by_month.$month.total %] Euros</a></li> + [%- END -%] + [%- END -%] + </ul> </div> </body> </html> diff --git a/tmpl/donations_who.html b/tmpl/donations_who.html index 3d1f6e0..5027585 100644 --- a/tmpl/donations_who.html +++ b/tmpl/donations_who.html @@ -9,13 +9,13 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » <a href="donations.html">donations</a> » who</h1> <div class="content"> - <h1>List of people who donated money to Mageia.Org</h1> + <h1>List of people who donated money to Mageia.Org</h1> - <ul> - [%- FOR pa IN donations.sorted_pa_by_total -%] - <li><a href="donations_p_[% pa %].html">[% donations.by_pa.$pa.who %]</a>: [% donations.by_pa.$pa.total %] Euros</li> - [%- END -%] - </ul> + <ul> + [%- FOR pa IN donations.sorted_pa_by_total -%] + <li><a href="donations_p_[% pa %].html">[% donations.by_pa.$pa.who %]</a>: [% donations.by_pa.$pa.total %] Euros</li> + [%- END -%] + </ul> </div> </body> </html> diff --git a/tmpl/index.html b/tmpl/index.html index e6f4f4b..2f1dc38 100644 --- a/tmpl/index.html +++ b/tmpl/index.html @@ -11,226 +11,226 @@ <h1 id='mgnavt'>treasurer.mageia.og</h1> <div class="content"> - <div class="section"> - <h2>Donations</h2> - - <a href="donations.rss"><img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a> - [%- l = 3 -%] - Last [% l %] donations received : - <ul> - [%- i=0 -%] - [%- FOR don IN donations.donations.sort('date').reverse -%] - [%- i = i + 1 -%] - [%- LAST IF i > l -%] - <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %]</li> - [%- END -%] - </ul> - - <a href="donations.html">See more about donations</a>. - </div> - - <div class="section"> - <h2>Accounts status</h2> - - <ul> - <li>Global balances: [% transactions.balance %] Euros</li> - [%- FOR ac IN transactions.by_ac.keys -%] - <li><a href="a_[% ac %].html">[% transactions.by_ac.$ac.account %]</a>: [% transactions.by_ac.$ac.balance %] Euros</li> - [%- END -%] - </ul> - </div> - - <div class="section"> - <h2>Expenses and revenues by category</h2> - - [%- - SET ca_expenses = []; - SET ca_expenses_names = []; - SET ca_revenues = []; - SET ca_revenues_names = []; - - FOREACH ca IN transactions.by_ca.keys.sort; - IF transactions.by_ca.$ca.expenses != 0; - ca_expenses.push(ca); - ca_expenses_names.push(transactions.by_ca.$ca.c_name); + <div class="section"> + <h2>Donations</h2> + + <a href="donations.rss"><img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a> + [%- l = 3 -%] + Last [% l %] donations received : + <ul> + [%- i=0 -%] + [%- FOR don IN donations.donations.sort('date').reverse -%] + [%- i = i + 1 -%] + [%- LAST IF i > l -%] + <li><b><a href="donations_p_[% don.pa %].html">[% don.who %]</a></b> donated <b>[% don.amount %]</b> Euros on [% date.format(don.date) %]</li> + [%- END -%] + </ul> + + <a href="donations.html">See more about donations</a>. + </div> + + <div class="section"> + <h2>Accounts status</h2> + + <ul> + <li>Global balances: [% transactions.balance %] Euros</li> + [%- FOR ac IN transactions.by_ac.keys -%] + <li><a href="a_[% ac %].html">[% transactions.by_ac.$ac.account %]</a>: [% transactions.by_ac.$ac.balance %] Euros</li> + [%- END -%] + </ul> + </div> + + <div class="section"> + <h2>Expenses and revenues by category</h2> + + [%- + SET ca_expenses = []; + SET ca_expenses_names = []; + SET ca_revenues = []; + SET ca_revenues_names = []; + + FOREACH ca IN transactions.by_ca.keys.sort; + IF transactions.by_ca.$ca.expenses != 0; + ca_expenses.push(ca); + ca_expenses_names.push(transactions.by_ca.$ca.c_name); + END; + IF transactions.by_ca.$ca.revenues != 0; + ca_revenues.push(ca); + ca_revenues_names.push(transactions.by_ca.$ca.c_name); + END; END; - IF transactions.by_ca.$ca.revenues != 0; - ca_revenues.push(ca); - ca_revenues_names.push(transactions.by_ca.$ca.c_name); - END; - END; - -%] - - <h3>Expenses</h3> - [% IF ca_expenses.size > 1 %] - <canvas id="expenses_ca_bar_chart" height="300" width="[% 80 + ca_expenses.size * 65 %]"></canvas> - - <script> - - var barChartDataExpenses = { - labels : ["[% ca_expenses_names.join('","') %]"], - datasets : [ - { - fillColor : "#e51b1b", - strokeColor : "#f11111", - data: [ - [%- FOR ca IN ca_expenses -%] - [%- transactions.by_ca.$ca.expenses -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] + -%] + + <h3>Expenses</h3> + [% IF ca_expenses.size > 1 %] + <canvas id="expenses_ca_bar_chart" height="300" width="[% 80 + ca_expenses.size * 65 %]"></canvas> + + <script> + + var barChartDataExpenses = { + labels : ["[% ca_expenses_names.join('","') %]"], + datasets : [ + { + fillColor : "#e51b1b", + strokeColor : "#f11111", + data: [ + [%- FOR ca IN ca_expenses -%] + [%- transactions.by_ca.$ca.expenses -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] - } - - var myLine = new Chart(document.getElementById("expenses_ca_bar_chart").getContext("2d")).Bar(barChartDataExpenses); - - </script> - [% END %] - <ul> - [%- FOR ca IN ca_expenses %] - <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_ca.$ca.expenses %] Euros</li> - [%- END -%] - </ul> - - <h3>Revenues</h3> - [% IF ca_revenues.size > 1 %] - <canvas id="revenues_ca_bar_chart" height="300" width="[% 80 + ca_revenues.size * 65 %]"></canvas> - - <script> - - var barChartDataRevenues = { - labels : ["[% ca_revenues_names.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data: [ - [%- FOR ca IN ca_revenues -%] - [%- transactions.by_ca.$ca.revenues -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] + } + + var myLine = new Chart(document.getElementById("expenses_ca_bar_chart").getContext("2d")).Bar(barChartDataExpenses); + + </script> + [% END %] + <ul> + [%- FOR ca IN ca_expenses %] + <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_ca.$ca.expenses %] Euros</li> + [%- END -%] + </ul> + + <h3>Revenues</h3> + [% IF ca_revenues.size > 1 %] + <canvas id="revenues_ca_bar_chart" height="300" width="[% 80 + ca_revenues.size * 65 %]"></canvas> + + <script> + + var barChartDataRevenues = { + labels : ["[% ca_revenues_names.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data: [ + [%- FOR ca IN ca_revenues -%] + [%- transactions.by_ca.$ca.revenues -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] - } - - var myLine = new Chart(document.getElementById("revenues_ca_bar_chart").getContext("2d")).Bar(barChartDataRevenues); + } + + var myLine = new Chart(document.getElementById("revenues_ca_bar_chart").getContext("2d")).Bar(barChartDataRevenues); + + </script> + [% END %] + <ul> + [%- FOR ca IN ca_revenues %] + <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_ca.$ca.revenues %] Euros</li> + [%- END -%] + </ul> + </div> + + <div class="section"> + <h2>Accounts history</h2> + + <canvas id="accounts_history_bar_chart" height="250" width="[% 80 + transactions.by_year.keys.size * 100 %]"></canvas> + + <script> + + var barChartData = { + labels : ["[% transactions.by_year.keys.sort.reverse.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR year IN transactions.by_year.keys.sort.reverse -%] + [%- transactions.by_year.$year.revenues -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + }, + { + fillColor : "#e51b1b", + strokeColor : "#f11111", + data: [ + [%- FOR year IN transactions.by_year.keys.sort.reverse -%] + [%- transactions.by_year.$year.expenses -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] + } + + var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); - </script> - [% END %] - <ul> - [%- FOR ca IN ca_revenues %] - <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_ca.$ca.revenues %] Euros</li> - [%- END -%] - </ul> - </div> - - <div class="section"> - <h2>Accounts history</h2> + </script> - <canvas id="accounts_history_bar_chart" height="250" width="[% 80 + transactions.by_year.keys.size * 100 %]"></canvas> - <script> - - var barChartData = { - labels : ["[% transactions.by_year.keys.sort.reverse.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR year IN transactions.by_year.keys.sort.reverse -%] - [%- transactions.by_year.$year.revenues -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - }, - { - fillColor : "#e51b1b", - strokeColor : "#f11111", - data: [ + <ul> [%- FOR year IN transactions.by_year.keys.sort.reverse -%] - [%- transactions.by_year.$year.expenses -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] - } - - var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); - - </script> - - - <ul> - [%- FOR year IN transactions.by_year.keys.sort.reverse -%] - <li><a href="y_[% year %].html">[%- year -%]</a> - Expenses: [% transactions.by_year.$year.expenses %] Revenues: [% transactions.by_year.$year.revenues %]</li> - [%- END -%] - </ul> - </div> - - <div class="section"> - <h2>Who donated money</h2> - - You can find <a href="donations_who.html">a list of people who donated to Mageia.Org</a>. - </div> - - <div class="section"> - <h2>RSS Feeds</h2> - <p><a href="donations.rss">Donations RSS Feed <img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a></p> - <p><a href="transactions.rss">Transactions RSS Feed <img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a></p> - </div> - - <div class="section"> - <h2>JSON data</h2> - - Some data is available in json format : - <ul> - <li><a href="index.json">index.json</a>: balance, donations received in - the last 30 days, time of last update and the list of the last 10 - donations</li> - <li><a href="donations_who.json">donations_who.json</a>: list of people - who donated money to Mageia.Org.</li> - </ul> - </div> - - <div class="section"> - <h2>Grisbi</h2> - <p> - Mageia.Org accounts are managed using <a href="http://grisbi.org/">grisbi</a>. - For more details about Mageia.Org accounts, you can download - <a href="mageia-accounts.gsb">this file</a>, and open it with grisbi. - </p> - - <p> - If you want to receive an email notification when it is updated, you - can subscribe to the <a href="https://ml.mageia.org/l/info/treasurer-commits">treasurer-commits</a> - mailing list. - </p> - </div> - - <div class="section"> - <h2>Questions</h2> - For any question related to Mageia.Org accounts or donations you can - send an email to <a href="mailto:treasurer@mageia.org">treasurer@mageia.org</a>. - </div> - - <div class="section"> - <h2>Source code</h2> - Source code for the tools used to generate this website is available on - Mageia svn repository : - - <p> - <code> - $ svn co <a href="http://svnweb.mageia.org/soft/mga-treasurer/trunk/"> - svn://svn.mageia.org/svn/soft/mga-treasurer/trunk/</a> mga-treasurer - </code> - </p> - </div> - - <div class="section"> - <small>Last update: [% date.format(last_update, format => '%Y/%m/%d %H:%M:%S') %]</small> - </div> + <li><a href="y_[% year %].html">[%- year -%]</a> - Expenses: [% transactions.by_year.$year.expenses %] Revenues: [% transactions.by_year.$year.revenues %]</li> + [%- END -%] + </ul> + </div> + + <div class="section"> + <h2>Who donated money</h2> + + You can find <a href="donations_who.html">a list of people who donated to Mageia.Org</a>. + </div> + + <div class="section"> + <h2>RSS Feeds</h2> + <p><a href="donations.rss">Donations RSS Feed <img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a></p> + <p><a href="transactions.rss">Transactions RSS Feed <img src="[% config.staticdir_url %]/feed-16x16.png" alt="RSS feed" /></a></p> + </div> + + <div class="section"> + <h2>JSON data</h2> + + Some data is available in json format : + <ul> + <li><a href="index.json">index.json</a>: balance, donations received in + the last 30 days, time of last update and the list of the last 10 + donations</li> + <li><a href="donations_who.json">donations_who.json</a>: list of people + who donated money to Mageia.Org.</li> + </ul> + </div> + + <div class="section"> + <h2>Grisbi</h2> + <p> + Mageia.Org accounts are managed using <a href="http://grisbi.org/">grisbi</a>. + For more details about Mageia.Org accounts, you can download + <a href="mageia-accounts.gsb">this file</a>, and open it with grisbi. + </p> + + <p> + If you want to receive an email notification when it is updated, you + can subscribe to the <a href="https://ml.mageia.org/l/info/treasurer-commits">treasurer-commits</a> + mailing list. + </p> + </div> + + <div class="section"> + <h2>Questions</h2> + For any question related to Mageia.Org accounts or donations you can + send an email to <a href="mailto:treasurer@mageia.org">treasurer@mageia.org</a>. + </div> + + <div class="section"> + <h2>Source code</h2> + Source code for the tools used to generate this website is available on + Mageia svn repository : + + <p> + <code> + $ svn co <a href="http://svnweb.mageia.org/soft/mga-treasurer/trunk/"> + svn://svn.mageia.org/svn/soft/mga-treasurer/trunk/</a> mga-treasurer + </code> + </p> + </div> + + <div class="section"> + <small>Last update: [% date.format(last_update, format => '%Y/%m/%d %H:%M:%S') %]</small> + </div> </div> </body> diff --git a/tmpl/transactions_by_ac.html b/tmpl/transactions_by_ac.html index caf0cbb..ea4aee9 100644 --- a/tmpl/transactions_by_ac.html +++ b/tmpl/transactions_by_ac.html @@ -9,28 +9,28 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » [% account %]</h1> <div class="content"> - <h1>Mageia.Org transactions for [% account %]</h1> - <h2>Summary</h2> - <ul> - <li> - <b>Balance</b>: [% transactions.by_ac.$ac.balance %] Euros - </li> - </ul> - <h2>Details</h2> - <table border="1"> - <tr> - <th>Date</th> - <th>Amount</th> - <th>Account</th> - <th>Who</th> - <th>Notes</th> - <th>Category</th> - </tr> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR tra IN transactions.by_ac.$ac.transactions.sort('date').reverse %] - [%- INCLUDE tra_row.html %] - [%- END -%] - </table> + <h1>Mageia.Org transactions for [% account %]</h1> + <h2>Summary</h2> + <ul> + <li> + <b>Balance</b>: [% transactions.by_ac.$ac.balance %] Euros + </li> + </ul> + <h2>Details</h2> + <table border="1"> + <tr> + <th>Date</th> + <th>Amount</th> + <th>Account</th> + <th>Who</th> + <th>Notes</th> + <th>Category</th> + </tr> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR tra IN transactions.by_ac.$ac.transactions.sort('date').reverse %] + [%- INCLUDE tra_row.html %] + [%- END -%] + </table> </div> </body> </html> diff --git a/tmpl/transactions_by_ca.html b/tmpl/transactions_by_ca.html index 4e28cda..49b6804 100644 --- a/tmpl/transactions_by_ca.html +++ b/tmpl/transactions_by_ca.html @@ -9,31 +9,31 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » category : [% c_name %]</h1> <div class="content"> - <h1>Mageia.Org transactions for category [% c_name %]</h1> - <h2>Summary</h2> - <ul> - [% IF transactions.by_ca.$ca.revenues != 0 %] - <li><b>Revenues</b>: [% transactions.by_ca.$ca.revenues %] Euros</li> - [% END %] - [% IF transactions.by_ca.$ca.expenses != 0 %] - <li><b>Expenses</b>: [% transactions.by_ca.$ca.expenses %] Euros</li> - [% END %] - </ul> - <h2>Details</h2> - <table border="1"> - <tr> - <th>Date</th> - <th>Amount</th> - <th>Account</th> - <th>Who</th> - <th>Notes</th> - <th>Category</th> - </tr> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR tra IN transactions.by_ca.$ca.transactions.sort('date').reverse %] - [%- INCLUDE tra_row.html %] - [%- END -%] - </table> + <h1>Mageia.Org transactions for category [% c_name %]</h1> + <h2>Summary</h2> + <ul> + [% IF transactions.by_ca.$ca.revenues != 0 %] + <li><b>Revenues</b>: [% transactions.by_ca.$ca.revenues %] Euros</li> + [% END %] + [% IF transactions.by_ca.$ca.expenses != 0 %] + <li><b>Expenses</b>: [% transactions.by_ca.$ca.expenses %] Euros</li> + [% END %] + </ul> + <h2>Details</h2> + <table border="1"> + <tr> + <th>Date</th> + <th>Amount</th> + <th>Account</th> + <th>Who</th> + <th>Notes</th> + <th>Category</th> + </tr> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR tra IN transactions.by_ca.$ca.transactions.sort('date').reverse %] + [%- INCLUDE tra_row.html %] + [%- END -%] + </table> </div> </body> </html> diff --git a/tmpl/transactions_by_month.html b/tmpl/transactions_by_month.html index 926b9de..e9d48b9 100644 --- a/tmpl/transactions_by_month.html +++ b/tmpl/transactions_by_month.html @@ -9,43 +9,43 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » month : [% month %]</h1> <div class="content"> - <h1>Mageia.Org accounts transactions for month [% month %]</h1> - <h2>Summary</h2> - <ul> - <li> - <b>Start balance</b>: [% transactions.by_month.$month.start_balance %] Euros - </li> - <li> - <b>End balance</b>: [% transactions.by_month.$month.end_balance %] Euros - </li> - <li> - <b>Revenues</b>: [% transactions.by_month.$month.revenues %] Euros - </li> - <li> - <b>Expenses</b>: [% transactions.by_month.$month.expenses %] Euros - </li> - </ul> - <h2>By category</h2> - <ul> - [% FOR ca IN transactions.by_month.$month.ca_balance.keys %] - <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_month.$month.ca_balance.$ca %] Euros</b></li> - [%- END -%] - </ul> - <h2>Details</h2> - <table border="1"> - <tr> - <th>Date</th> - <th>Amount</th> - <th>Account</th> - <th>Who</th> - <th>Notes</th> - <th>Category</th> - </tr> - [%- USE date(format='%Y/%m/%d') -%] - [%- FOR tra IN transactions.by_month.$month.transactions.sort('date').reverse %] - [%- INCLUDE tra_row.html %] - [%- END -%] - </table> + <h1>Mageia.Org accounts transactions for month [% month %]</h1> + <h2>Summary</h2> + <ul> + <li> + <b>Start balance</b>: [% transactions.by_month.$month.start_balance %] Euros + </li> + <li> + <b>End balance</b>: [% transactions.by_month.$month.end_balance %] Euros + </li> + <li> + <b>Revenues</b>: [% transactions.by_month.$month.revenues %] Euros + </li> + <li> + <b>Expenses</b>: [% transactions.by_month.$month.expenses %] Euros + </li> + </ul> + <h2>By category</h2> + <ul> + [% FOR ca IN transactions.by_month.$month.ca_balance.keys %] + <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_month.$month.ca_balance.$ca %] Euros</b></li> + [%- END -%] + </ul> + <h2>Details</h2> + <table border="1"> + <tr> + <th>Date</th> + <th>Amount</th> + <th>Account</th> + <th>Who</th> + <th>Notes</th> + <th>Category</th> + </tr> + [%- USE date(format='%Y/%m/%d') -%] + [%- FOR tra IN transactions.by_month.$month.transactions.sort('date').reverse %] + [%- INCLUDE tra_row.html %] + [%- END -%] + </table> </div> </body> </html> diff --git a/tmpl/transactions_by_pa.html b/tmpl/transactions_by_pa.html index 9611515..62ea6a6 100644 --- a/tmpl/transactions_by_pa.html +++ b/tmpl/transactions_by_pa.html @@ -9,31 +9,31 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » who : [% who %]</h1> <div class="content"> - <h1>Mageia.Org transactions for [% who %]</h1> - <h2>Summary</h2> - <ul> - [% IF transactions.by_pa.$pa.revenues != 0 %] - <li><b>Revenues</b>: [% transactions.by_pa.$pa.revenues %] Euros</li> - [% END %] - [% IF transactions.by_pa.$pa.expenses != 0 %] - <li><b>Expenses</b>: [% transactions.by_pa.$pa.expenses %] Euros</li> - [% END %] - </ul> - <h2>Details</h2> - <table border="1"> - <tr> - <th>Date</th> - <th>Amount</th> - <th>Account</th> - <th>Who</th> - <th>Notes</th> - <th>Category</th> - </tr> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR tra IN transactions.by_pa.$pa.transactions.sort('date').reverse %] - [%- INCLUDE tra_row.html %] - [%- END -%] - </table> + <h1>Mageia.Org transactions for [% who %]</h1> + <h2>Summary</h2> + <ul> + [% IF transactions.by_pa.$pa.revenues != 0 %] + <li><b>Revenues</b>: [% transactions.by_pa.$pa.revenues %] Euros</li> + [% END %] + [% IF transactions.by_pa.$pa.expenses != 0 %] + <li><b>Expenses</b>: [% transactions.by_pa.$pa.expenses %] Euros</li> + [% END %] + </ul> + <h2>Details</h2> + <table border="1"> + <tr> + <th>Date</th> + <th>Amount</th> + <th>Account</th> + <th>Who</th> + <th>Notes</th> + <th>Category</th> + </tr> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR tra IN transactions.by_pa.$pa.transactions.sort('date').reverse %] + [%- INCLUDE tra_row.html %] + [%- END -%] + </table> </div> </body> </html> diff --git a/tmpl/transactions_by_year.html b/tmpl/transactions_by_year.html index d82127b..4c6d373 100644 --- a/tmpl/transactions_by_year.html +++ b/tmpl/transactions_by_year.html @@ -10,162 +10,162 @@ <h1 id='mgnavt'><a href="index.html">treasurer</a> » year : [% year %]</h1> <div class="content"> - <h1>Mageia.Org accounts transactions for year [% year %]</h1> - <h2>Summary</h2> - <ul> - <li> - <b>Start balance</b>: [% transactions.by_year.$year.start_balance %] Euros - </li> - <li> - <b>End balance</b>: [% transactions.by_year.$year.end_balance %] Euros - </li> - <li> - <b>Revenues</b>: [% transactions.by_year.$year.revenues %] Euros - </li> - <li> - <b>Expenses</b>: [% transactions.by_year.$year.expenses %] Euros - </li> - </ul> - <h2>By category</h2> - - [%- - SET ca_expenses = []; - SET ca_expenses_names = []; - SET ca_revenues = []; - SET ca_revenues_names = []; - - IF transactions.by_year.$year.ca_revenues; - FOREACH ca IN transactions.by_year.$year.ca_revenues.keys; - ca_revenues.push(ca); - ca_revenues_names.push(transactions.by_ca.$ca.c_name); - END; - END; - IF transactions.by_year.$year.ca_expenses; - FOREACH ca IN transactions.by_year.$year.ca_expenses.keys; - ca_expenses.push(ca); - ca_expenses_names.push(transactions.by_ca.$ca.c_name); - END; - END; - -%] - <h3>Expenses</h3> - [% IF ca_expenses.size > 1 %] - <canvas id="expenses_ca_bar_chart" height="300" width="[% 80 + ca_expenses.size * 65 %]"></canvas> - - <script> - - var barChartDataExpenses = { - labels : ["[% ca_expenses_names.join('","') %]"], - datasets : [ - { - fillColor : "#e51b1b", - strokeColor : "#f11111", - data: [ - [%- FOR ca IN ca_expenses -%] - [%- transactions.by_year.$year.ca_expenses.$ca -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] + <h1>Mageia.Org accounts transactions for year [% year %]</h1> + <h2>Summary</h2> + <ul> + <li> + <b>Start balance</b>: [% transactions.by_year.$year.start_balance %] Euros + </li> + <li> + <b>End balance</b>: [% transactions.by_year.$year.end_balance %] Euros + </li> + <li> + <b>Revenues</b>: [% transactions.by_year.$year.revenues %] Euros + </li> + <li> + <b>Expenses</b>: [% transactions.by_year.$year.expenses %] Euros + </li> + </ul> + <h2>By category</h2> + + [%- + SET ca_expenses = []; + SET ca_expenses_names = []; + SET ca_revenues = []; + SET ca_revenues_names = []; + + IF transactions.by_year.$year.ca_revenues; + FOREACH ca IN transactions.by_year.$year.ca_revenues.keys; + ca_revenues.push(ca); + ca_revenues_names.push(transactions.by_ca.$ca.c_name); + END; + END; + IF transactions.by_year.$year.ca_expenses; + FOREACH ca IN transactions.by_year.$year.ca_expenses.keys; + ca_expenses.push(ca); + ca_expenses_names.push(transactions.by_ca.$ca.c_name); + END; + END; + -%] + <h3>Expenses</h3> + [% IF ca_expenses.size > 1 %] + <canvas id="expenses_ca_bar_chart" height="300" width="[% 80 + ca_expenses.size * 65 %]"></canvas> + + <script> + + var barChartDataExpenses = { + labels : ["[% ca_expenses_names.join('","') %]"], + datasets : [ + { + fillColor : "#e51b1b", + strokeColor : "#f11111", + data: [ + [%- FOR ca IN ca_expenses -%] + [%- transactions.by_year.$year.ca_expenses.$ca -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] } - ] - } - - var myLine = new Chart(document.getElementById("expenses_ca_bar_chart").getContext("2d")).Bar(barChartDataExpenses); - - </script> - [% END %] - <ul> - [%- FOR ca IN ca_expenses %] - <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_expenses.$ca %] Euros</li> - [%- END -%] - </ul> - - <h3>Revenues</h3> - [% IF ca_revenues.size > 1 %] - <canvas id="revenues_ca_bar_chart" height="300" width="[% 80 + ca_revenues.size * 65 %]"></canvas> - - <script> - var barChartDataRevenues = { - labels : ["[% ca_revenues_names.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data: [ - [%- FOR ca IN ca_revenues -%] - [%- transactions.by_year.$year.ca_revenues.$ca -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] + + var myLine = new Chart(document.getElementById("expenses_ca_bar_chart").getContext("2d")).Bar(barChartDataExpenses); + + </script> + [% END %] + <ul> + [%- FOR ca IN ca_expenses %] + <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_expenses.$ca %] Euros</li> + [%- END -%] + </ul> + + <h3>Revenues</h3> + [% IF ca_revenues.size > 1 %] + <canvas id="revenues_ca_bar_chart" height="300" width="[% 80 + ca_revenues.size * 65 %]"></canvas> + + <script> + var barChartDataRevenues = { + labels : ["[% ca_revenues_names.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data: [ + [%- FOR ca IN ca_revenues -%] + [%- transactions.by_year.$year.ca_revenues.$ca -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] } - ] - } - - var myLine = new Chart(document.getElementById("revenues_ca_bar_chart").getContext("2d")).Bar(barChartDataRevenues); - - </script> - [% END %] - <ul> - [%- FOR ca IN ca_revenues %] - <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_revenues.$ca %] Euros</li> - [%- END -%] - </ul> - - <h2>Monthly reports</h2> - - <canvas id="accounts_history_bar_chart" height="250" width="[% 80 + transactions.by_year.$year.months.size * 65 %]"></canvas> - - <script> - - var barChartData = { - labels : ["[% transactions.by_year.$year.months.sort.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR month IN transactions.by_year.$year.months.sort -%] - [%- transactions.by_month.$month.revenues -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - }, - { - fillColor : "#e51b1b", - strokeColor : "#f11111", - data: [ - [%- FOR month IN transactions.by_year.$year.months.sort -%] - [%- transactions.by_month.$month.expenses -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] + + var myLine = new Chart(document.getElementById("revenues_ca_bar_chart").getContext("2d")).Bar(barChartDataRevenues); + + </script> + [% END %] + <ul> + [%- FOR ca IN ca_revenues %] + <li><b><a href="c_[% ca %].html">[% transactions.by_ca.$ca.c_name %]</a></b>: [% transactions.by_year.$year.ca_revenues.$ca %] Euros</li> + [%- END -%] + </ul> + + <h2>Monthly reports</h2> + + <canvas id="accounts_history_bar_chart" height="250" width="[% 80 + transactions.by_year.$year.months.size * 65 %]"></canvas> + + <script> + + var barChartData = { + labels : ["[% transactions.by_year.$year.months.sort.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR month IN transactions.by_year.$year.months.sort -%] + [%- transactions.by_month.$month.revenues -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + }, + { + fillColor : "#e51b1b", + strokeColor : "#f11111", + data: [ + [%- FOR month IN transactions.by_year.$year.months.sort -%] + [%- transactions.by_month.$month.expenses -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + } + ] + } - ] - - } - - var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); - - </script> - - <ul> - [%- FOR month IN transactions.by_month.keys.sort -%] - [%- IF transactions.by_month.$month.year == year -%] - <li><a href="m_[% month %].html">[% month %]</a></li> - - [%- END -%] - [%- END -%] - </ul> - <h2>Details</h2> - <table border="1"> - <tr> - <th>Date</th> - <th>Amount</th> - <th>Account</th> - <th>Who</th> - <th>Notes</th> - <th>Category</th> - </tr> - [%- USE date(format='%Y/%m/%d') -%] - [% FOR tra IN transactions.by_year.$year.transactions.sort('date').reverse %] - [%- INCLUDE tra_row.html %] - [%- END -%] - </table> + + var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); + + </script> + + <ul> + [%- FOR month IN transactions.by_month.keys.sort -%] + [%- IF transactions.by_month.$month.year == year -%] + <li><a href="m_[% month %].html">[% month %]</a></li> + + [%- END -%] + [%- END -%] + </ul> + <h2>Details</h2> + <table border="1"> + <tr> + <th>Date</th> + <th>Amount</th> + <th>Account</th> + <th>Who</th> + <th>Notes</th> + <th>Category</th> + </tr> + [%- USE date(format='%Y/%m/%d') -%] + [% FOR tra IN transactions.by_year.$year.transactions.sort('date').reverse %] + [%- INCLUDE tra_row.html %] + [%- END -%] + </table> </div> </body> </html> |