Skip to content
Snippets Groups Projects
Commit 6f434c67 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#435 - new chart page: pre fill with default script; added link to wiki

parent e6445e30
No related branches found
No related tags found
No related merge requests found
...@@ -332,7 +332,9 @@ charts.default.categoryBudget=Verbrauch nach Kategorien ...@@ -332,7 +332,9 @@ charts.default.categoryBudget=Verbrauch nach Kategorien
chart.new.label.name=Name chart.new.label.name=Name
chart.new.label.script=Script chart.new.label.script=Script
chart.new.info.default=Diese mitgeliefert Diagrammvorlage kann nicht überschrieben werden, aber du kannst dir den Code ansehen. chart.new.info.default=Diese mitgelieferte Diagrammvorlage kann nicht überschrieben werden, aber du kannst dir den Code ansehen.
chart.new.info.wiki=Tutorial: <a href="https://github.com/deadlocker8/BudgetMaster/wiki/How-to-create-custom-charts">https://github.com/deadlocker8/BudgetMaster/wiki/How-to-create-custom-charts</a
chart.type=Typ chart.type=Typ
chart.actions=Aktionen chart.actions=Aktionen
chart.show=Diagramm anzeigen chart.show=Diagramm anzeigen
...@@ -343,3 +345,32 @@ chart.steps.second=Schritt 2: W ...@@ -343,3 +345,32 @@ chart.steps.second=Schritt 2: W
chart.steps.second.label.start=Startdatum chart.steps.second.label.start=Startdatum
chart.steps.second.label.end=Enddatum chart.steps.second.label.end=Enddatum
chart.steps.third=Schritt 3: Wende Filter an (optional) chart.steps.third=Schritt 3: Wende Filter an (optional)
chart.script.default=/* This list will be dynamically filled with all the transactions between\n \
* the start and and date you select on the "Show Chart" page\n \
* and filtered according to your specified filter.\n \
* An example entry for this list and tutorial about how to create custom charts ca be found in the BudgetMaster wiki:\n \
* https://github.com/deadlocker8/BudgetMaster/wiki/How-to-create-custom-charts\n \
*/\n \
var transactionData = '{''}';\n \
\n \
// Prepare your chart settings here (mandatory)\n \
var plotlyData = ['{'\n \
\tx: [],\n \
\ty: [],\n \
\ttype: 'bar'\n \
'}'];\n \
\n \
// Add your Plotly layout settings here (optional)\n \
var plotlyLayout = '{''}';\n \
\n \
// Add your Plotly configuration settings here (optional)\n \
var plotlyConfig = '{'\n \
\tshowSendToCloud: false,\n \
\tdisplaylogo: false,\n \
\tshowLink: false,\n \
\tresponsive: true\n \
'}';\n \
\n \
// Don't touch this line\n \
Plotly.newPlot('chart-canvas', plotlyData, plotlyLayout, plotlyConfig);
...@@ -109,7 +109,7 @@ info.database.import.or=or ...@@ -109,7 +109,7 @@ info.database.import.or=or
info.title.update=Update available info.title.update=Update available
info.text.update=An update for BudgetMaster is available<br><br>Installed: v{0}<br>Available: {1}<br><br>Would you like to update now?<br><br>Note: The update may take a while depending on your internet connection. The BudgetMaster server will be restarted automatically. Please do not make any changes to accounts, transactions, categories, etc. after starting the update. info.text.update=An update for BudgetMaster is available<br><br>Installed: v{0}<br>Available: {1}<br><br>Would you like to update now?<br><br>Note: The update may take a while depending on your internet connection. The BudgetMaster server will be restarted automatically. Please do not make any changes to accounts, transactions, categories, etc. after starting the update.
info.title.backup.reminder=Time for a backup info.title.backup.reminder=Time for a backup
info.text.backup.reminder=Have you ever thought about a backup?<br>You should back up your BudgetMaster database regularly.<br>This can be donee on the settings page.<br><br>(You don't want to see this reminder every month? Disable the backup reminder in the settings.) info.text.backup.reminder=Have you ever thought about a backup?<br>You should back up your BudgetMaster database regularly.<br>This can be donee on the settings page.<br><br>(You don''t want to see this reminder every month? Disable the backup reminder in the settings.)
info.button.backup.reminder=To the settings info.button.backup.reminder=To the settings
# WARNING # WARNING
...@@ -332,7 +332,8 @@ charts.default.categoryBudget=Consumption by categories ...@@ -332,7 +332,8 @@ charts.default.categoryBudget=Consumption by categories
chart.new.label.name=Name chart.new.label.name=Name
chart.new.label.script=Script chart.new.label.script=Script
chart.new.info.default=This default chart can\'t be overwritten but you can have a look on how it's implemented. chart.new.info.default=This default chart can''t be overwritten but you can have a look on how it''s implemented.
chart.new.info.wiki=Tutorial: <a href="https://github.com/deadlocker8/BudgetMaster/wiki/How-to-create-custom-charts">https://github.com/deadlocker8/BudgetMaster/wiki/How-to-create-custom-charts</a
chart.type=Type chart.type=Type
chart.actions=Actions chart.actions=Actions
chart.show=Show chart chart.show=Show chart
...@@ -343,3 +344,32 @@ chart.steps.second=Step 2: Choose a date range ...@@ -343,3 +344,32 @@ chart.steps.second=Step 2: Choose a date range
chart.steps.second.label.start=Start date chart.steps.second.label.start=Start date
chart.steps.second.label.end=End date chart.steps.second.label.end=End date
chart.steps.third=Step 3: Apply filters (optional) chart.steps.third=Step 3: Apply filters (optional)
chart.script.default=/* This list will be dynamically filled with all the transactions between\n \
* the start and and date you select on the "Show Chart" page\n \
* and filtered according to your specified filter.\n \
* An example entry for this list and tutorial about how to create custom charts ca be found in the BudgetMaster wiki:\n \
* https://github.com/deadlocker8/BudgetMaster/wiki/How-to-create-custom-charts\n \
*/\n \
var transactionData = '{''}';\n \
\n \
// Prepare your chart settings here (mandatory)\n \
var plotlyData = ['{'\n \
\tx: [],\n \
\ty: [],\n \
\ttype: 'bar'\n \
'}'];\n \
\n \
// Add your Plotly layout settings here (optional)\n \
var plotlyLayout = '{''}';\n \
\n \
// Add your Plotly configuration settings here (optional)\n \
var plotlyConfig = '{'\n \
\tshowSendToCloud: false,\n \
\tdisplaylogo: false,\n \
\tshowLink: false,\n \
\tresponsive: true\n \
'}';\n \
\n \
// Don't touch this line\n \
Plotly.newPlot('chart-canvas', plotlyData, plotlyLayout, plotlyConfig);
...@@ -9,3 +9,16 @@ ...@@ -9,3 +9,16 @@
<#return ""> <#return "">
</#if> </#if>
</#function> </#function>
<#macro infoMessage text>
<div class="row no-margin-bottom">
<div class="col s12 center-align">
<table class="text-color login-message no-border-table">
<tr>
<td><i class="material-icons">info</i></td>
<td>${text}</td>
</tr>
</table>
</div>
</div>
</#macro>
\ No newline at end of file
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
<#import "../helpers/navbar.ftl" as navbar> <#import "../helpers/navbar.ftl" as navbar>
<@navbar.navbar "charts" settings/> <@navbar.navbar "charts" settings/>
<#import "chartFunctions.ftl" as chartFunctions>
<main> <main>
<div class="card main-card background-color"> <div class="card main-card background-color">
<div class="container"> <div class="container">
...@@ -29,10 +31,15 @@ ...@@ -29,10 +31,15 @@
</div> </div>
</div> </div>
<!-- info message with link to wiki on how to create custom charts -->
<#if (chart.getType().name() == "CUSTOM")>
<@chartFunctions.infoMessage locale.getString("chart.new.info.wiki")/>
</#if>
<#-- script --> <#-- script -->
<div class="row"> <div class="row">
<div class="input-field col s12 m12 l8 offset-l2"> <div class="input-field col s12 m12 l8 offset-l2">
<textarea id="chart-script" name="script" <@validation.validation "script" "materialize-textarea"/>><#if chart.getScript()??>${chart.getScript()}</#if></textarea> <textarea id="chart-script" name="script" <@validation.validation "script" "materialize-textarea"/>><#if chart.getScript()??>${chart.getScript()}<#else>${locale.getString("chart.script.default")}</#if></textarea>
<label for="chart-script">${locale.getString("chart.new.label.script")}</label> <label for="chart-script">${locale.getString("chart.new.label.script")}</label>
</div> </div>
</div> </div>
...@@ -41,16 +48,7 @@ ...@@ -41,16 +48,7 @@
<#-- info message if chart is not editable --> <#-- info message if chart is not editable -->
<#if (chart.getType().name() == "DEFAULT")> <#if (chart.getType().name() == "DEFAULT")>
<div class="row no-margin-bottom"> <@chartFunctions.infoMessage locale.getString("chart.new.info.default")/>
<div class="col s12 center-align">
<table class="text-color login-message no-border-table">
<tr>
<td><i class="material-icons">info</i></td>
<td id="loginMessage">${locale.getString("chart.new.info.default")}</td>
</tr>
</table>
</div>
</div>
</#if> </#if>
<#-- buttons --> <#-- buttons -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment