summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-03-22 18:44:45 -0400
committerFrederic Guillot <fred@kanboard.net>2015-03-22 18:44:45 -0400
commit72de621d77dc1e0fc21a2409d310d6dcdc3eee9e (patch)
treeccfe5d7c21961a60c60938c41dd30c16a6ecfd5d /app
parent373537efe2f893f91f11c04436073bbb2c2732dd (diff)
Add budget graph
Diffstat (limited to 'app')
-rw-r--r--app/Controller/Budget.php4
-rw-r--r--app/Locale/da_DK/translations.php29
-rw-r--r--app/Locale/de_DE/translations.php29
-rw-r--r--app/Locale/es_ES/translations.php29
-rw-r--r--app/Locale/fi_FI/translations.php29
-rw-r--r--app/Locale/fr_FR/translations.php28
-rw-r--r--app/Locale/hu_HU/translations.php29
-rw-r--r--app/Locale/it_IT/translations.php29
-rw-r--r--app/Locale/ja_JP/translations.php29
-rw-r--r--app/Locale/nl_NL/translations.php78
-rw-r--r--app/Locale/pl_PL/translations.php29
-rw-r--r--app/Locale/pt_BR/translations.php29
-rw-r--r--app/Locale/ru_RU/translations.php29
-rw-r--r--app/Locale/sr_Latn_RS/translations.php98
-rw-r--r--app/Locale/sv_SE/translations.php29
-rw-r--r--app/Locale/th_TH/translations.php29
-rw-r--r--app/Locale/tr_TR/translations.php29
-rw-r--r--app/Locale/zh_CN/translations.php29
-rw-r--r--app/Model/Budget.php51
-rw-r--r--app/Template/analytic/layout.php2
-rw-r--r--app/Template/board/filters.php4
-rw-r--r--app/Template/budget/index.php28
22 files changed, 675 insertions, 24 deletions
diff --git a/app/Controller/Budget.php b/app/Controller/Budget.php
index b8279f19..2c56c79d 100644
--- a/app/Controller/Budget.php
+++ b/app/Controller/Budget.php
@@ -20,7 +20,7 @@ class Budget extends Base
$project = $this->getProject();
$this->response->html($this->projectLayout('budget/index', array(
- 'total' => $this->budget->getTotal($project['id']),
+ 'daily_budget' => $this->budget->getDailyBudgetBreakdown($project['id']),
'project' => $project,
'title' => t('Budget')
)));
@@ -40,7 +40,7 @@ class Budget extends Base
->setMax(30)
->setOrder('start')
->setDirection('DESC')
- ->setQuery($this->budget->getBreakdown($project['id']))
+ ->setQuery($this->budget->getSubtaskBreakdown($project['id']))
->calculate();
$this->response->html($this->projectLayout('budget/breakdown', array(
diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php
index 42381e27..1732e7bb 100644
--- a/app/Locale/da_DK/translations.php
+++ b/app/Locale/da_DK/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index eea3fdd2..3ab31d97 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php
index 36f4b699..f186dfc8 100644
--- a/app/Locale/es_ES/translations.php
+++ b/app/Locale/es_ES/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php
index b1774fe4..f235cc12 100644
--- a/app/Locale/fi_FI/translations.php
+++ b/app/Locale/fi_FI/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index 7c405a08..1aadb393 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -778,4 +778,32 @@ return array(
'Files' => 'Fichiers',
'Images' => 'Images',
'Private project' => 'Projet privé',
+ 'Amount' => 'Montant',
+ 'AUD - Australian Dollar' => 'AUD - Dollar australien',
+ 'Budget' => 'Budget',
+ 'Budget line' => 'Ligne budgétaire',
+ 'Budget line removed successfully.' => 'Ligne budgétaire supprimée avec succès.',
+ 'Budget lines' => 'Lignes budgétaire',
+ 'CAD - Canadian Dollar' => 'CAD - Dollar canadien',
+ 'CHF - Swiss Francs' => 'CHF - Franc suisse',
+ 'Cost' => 'Coût',
+ 'Cost breakdown' => 'Détail des coûts',
+ 'Custom Stylesheet' => 'Feuille de style personalisée',
+ 'download' => 'télécharger',
+ 'Do you really want to remove this budget line?' => 'Voulez-vous vraiment supprimer cette ligne budgétaire ?',
+ 'EUR - Euro' => 'EUR - Euro',
+ 'Expenses' => 'Dépenses',
+ 'GBP - British Pound' => 'GBP - Livre sterling',
+ 'INR - Indian Rupee' => 'INR - Roupie indienne',
+ 'JPY - Japanese Yen' => 'JPY - Yen',
+ 'New budget line' => 'Nouvelle ligne budgétaire',
+ 'NZD - New Zealand Dollar' => 'NZD - Dollar néo-zélandais',
+ 'Remove a budget line' => 'Supprimer une ligne budgétaire',
+ 'Remove budget line' => 'Supprimer une ligne budgétaire',
+ 'RSD - Serbian dinar' => 'RSD - Dinar serbe',
+ 'The budget line have been created successfully.' => 'La ligne de budgétaire a été créee avec succès.',
+ 'Unable to create the budget line.' => 'Impossible de créer cette ligne budgétaire.',
+ 'Unable to remove this budget line.' => 'Impossible de supprimer cette ligne budgétaire.',
+ 'USD - US Dollar' => 'USD - Dollar américain',
+ 'Remaining' => 'Restant',
);
diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php
index 5c2cd7d7..75cdbebc 100644
--- a/app/Locale/hu_HU/translations.php
+++ b/app/Locale/hu_HU/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php
index c13ebdf5..d5fd6902 100644
--- a/app/Locale/it_IT/translations.php
+++ b/app/Locale/it_IT/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php
index fc0dd04e..6e3c14c8 100644
--- a/app/Locale/ja_JP/translations.php
+++ b/app/Locale/ja_JP/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php
index 3b043a6f..2b434d53 100644
--- a/app/Locale/nl_NL/translations.php
+++ b/app/Locale/nl_NL/translations.php
@@ -1,6 +1,8 @@
<?php
return array(
+ // 'number.decimals_separator' => '',
+ // 'number.thousands_separator' => '',
'None' => 'Geen',
'edit' => 'bewerken',
'Edit' => 'Bewerken',
@@ -375,7 +377,7 @@ return array(
'Unable to unlink your GitHub Account.' => 'Verwijdern van de link met uw Github Account niet gelukt.',
'Login with my GitHub Account' => 'Login met mijn Github Account',
'Link my GitHub Account' => 'Link met mijn Github',
- 'Unlink my GitHub Account' => 'Link met mijn Github verwijderen',
+ 'Unlink my GitHub Account' => 'Link met mijn Github verwijderen',
'Created by %s' => 'Aangemaakt door %s',
'Last modified on %B %e, %Y at %k:%M %p' => 'Laatst gewijzigd op %d/%m/%Y à %H:%M',
'Tasks Export' => 'Taken exporteren',
@@ -410,10 +412,8 @@ return array(
'List of due tasks for the project "%s"' => 'Lijst van taken die binnenkort voltooid moeten worden voor project « %s »',
'New attachment' => 'Nieuwe bijlage',
'New comment' => 'Nieuw commentaar',
- 'Comment updated' => 'Commentaar aangepast',
'New subtask' => 'Nieuwe subtaak',
'Subtask updated' => 'Subtaak aangepast',
- 'New task' => 'Nieuwe taak',
'Task updated' => 'Taak aangepast',
'Task closed' => 'Taak gesloten',
'Task opened' => 'Taak geopend',
@@ -550,7 +550,7 @@ return array(
'My tasks' => 'Mijn taken',
'Activity stream' => 'Activiteiten',
'Dashboard' => 'Dashboard',
- 'Bevestiging' => 'Confirmation',
+ // 'Confirmation' => '',
'Allow everybody to access to this project' => 'Geef iedereen toegang tot dit project',
'Everybody have access to this project.' => 'Iedereen heeft toegang tot dit project.',
'Webhooks' => 'Webhooks',
@@ -581,7 +581,7 @@ return array(
'Edit Project' => 'Project aanpassen',
'Github Issue' => 'Github issue',
'Not enough data to show the graph.' => 'Niet genoeg data om de grafiek te laten zien.',
- 'Vorige' => 'Précédent',
+ // 'Previous' => '',
'The id must be an integer' => 'Het id moet een integer zijn',
'The project id must be an integer' => 'Het project id moet een integer zijn',
'The status must be an integer' => 'De status moet een integer zijn',
@@ -736,4 +736,72 @@ return array(
'Filter recently updated' => 'Filter recent aangepast',
'since %B %e, %Y at %k:%M %p' => 'sinds %d/%m/%Y à %H:%M',
'More filters' => 'Meer filters',
+ // 'Compact view' => '',
+ // 'Horizontal scrolling' => '',
+ // 'Compact/wide view' => '',
+ // 'No results match:' => '',
+ // 'Remove hourly rate' => '',
+ // 'Do you really want to remove this hourly rate?' => '',
+ // 'Hourly rates' => '',
+ // 'Hourly rate' => '',
+ // 'Currency' => '',
+ // 'Effective date' => '',
+ // 'Add new rate' => '',
+ // 'Rate removed successfully.' => '',
+ // 'Unable to remove this rate.' => '',
+ // 'Unable to save the hourly rate.' => '',
+ // 'Hourly rate created successfully.' => '',
+ // 'Start time' => '',
+ // 'End time' => '',
+ // 'Comment' => '',
+ // 'All day' => '',
+ // 'Day' => '',
+ // 'Manage timetable' => '',
+ // 'Overtime timetable' => '',
+ // 'Time off timetable' => '',
+ // 'Timetable' => '',
+ // 'Work timetable' => '',
+ // 'Week timetable' => '',
+ // 'Day timetable' => '',
+ // 'From' => '',
+ // 'To' => '',
+ // 'Time slot created successfully.' => '',
+ // 'Unable to save this time slot.' => '',
+ // 'Time slot removed successfully.' => '',
+ // 'Unable to remove this time slot.' => '',
+ // 'Do you really want to remove this time slot?' => '',
+ // 'Remove time slot' => '',
+ // 'Add new time slot' => '',
+ // 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
+ // 'Files' => '',
+ // 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php
index 51382137..4bee7c42 100644
--- a/app/Locale/pl_PL/translations.php
+++ b/app/Locale/pl_PL/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php
index 0cd63ce5..edba2cae 100644
--- a/app/Locale/pt_BR/translations.php
+++ b/app/Locale/pt_BR/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php
index e53efee0..6a2ed073 100644
--- a/app/Locale/ru_RU/translations.php
+++ b/app/Locale/ru_RU/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php
index cd8b4afd..83d6eaa3 100644
--- a/app/Locale/sr_Latn_RS/translations.php
+++ b/app/Locale/sr_Latn_RS/translations.php
@@ -1,6 +1,8 @@
<?php
return array(
+ // 'number.decimals_separator' => '',
+ // 'number.thousands_separator' => '',
'None' => 'None',
'edit' => 'izmeni',
'Edit' => 'Izmeni',
@@ -527,9 +529,9 @@ return array(
'Refresh interval for private board' => 'Interval osvežavanja privatnih tabli',
'Refresh interval for public board' => 'Interval osvežavanja javnih tabli',
'Task highlight period' => 'Task highlight period',
-// 'Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)' => 'Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)',
-// 'Frequency in second (60 seconds by default)' => 'Częstotliwosć w sekundach (domyślnie 60 sekund)',
-// 'Frequency in second (0 to disable this feature, 10 seconds by default)' => 'Częstotliwość w sekundach (0 aby zablokować, domyślnie 10 sekund)',
+ // 'Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)' => '',
+ // 'Frequency in second (60 seconds by default)' => '',
+ // 'Frequency in second (0 to disable this feature, 10 seconds by default)' => '',
'Application URL' => 'Adres URL aplikacji',
'Example: http://example.kanboard.net/ (used by email notifications)' => 'Primer: http://example.kanboard.net/ (koristi se u obaveštenjima putem mail-a)',
'Token regenerated.' => 'Token wygenerowany ponownie.',
@@ -556,7 +558,7 @@ return array(
'Integration' => 'Integracja',
// 'Github webhooks' => '',
// 'Help on Github webhooks' => '',
-// 'Create a comment from an external provider' => 'Kreiraj komentarz od zewnętrznego dostawcy',
+ // 'Create a comment from an external provider' => '',
// 'Github issue comment created' => '',
'Configure' => 'Podesi',
'Project management' => 'Uređivanje projekata',
@@ -597,7 +599,7 @@ return array(
'Daily project summary export' => 'Izvoz zbirnog pregleda po danima',
'Daily project summary export for "%s"' => 'Izvoz zbirnig pregleda po danima za "%s"',
'Exports' => 'Izvoz',
-// 'This export contains the number of tasks per column grouped per day.' => 'Ten eksport zawiera ilość zadań zgrupowanych w kolumnach na dzień',
+ // 'This export contains the number of tasks per column grouped per day.' => '',
'Nothing to preview...' => 'Ništa za prikazivanje...',
'Preview' => 'Pregled',
'Write' => 'Piši',
@@ -617,10 +619,10 @@ return array(
'Swimlane removed successfully.' => 'Razdelnik uspešno uklonjen.',
'Swimlanes' => 'Razdelnici',
'Swimlane updated successfully.' => 'Razdelnik zaktualizowany pomyślnie.',
-// 'The default swimlane have been updated successfully.' => 'Domyślny razdelnik zaktualizowany pomyślnie.',
-// 'Unable to create your swimlane.' => 'Nie można utworzyć razdelniku.',
-// 'Unable to remove this swimlane.' => 'Nie można usunąć razdelniku.',
-// 'Unable to update this swimlane.' => 'Nie można zaktualizować razdelniku.',
+ // 'The default swimlane have been updated successfully.' => '',
+ // 'Unable to create your swimlane.' => '',
+ // 'Unable to remove this swimlane.' => '',
+ // 'Unable to update this swimlane.' => '',
'Your swimlane have been created successfully.' => 'Razdelnik je uspešno kreiran.',
'Example: "Bug, Feature Request, Improvement"' => 'Npr: "Greška, Zahtev za izmenama, Poboljšanje"',
'Default categories for new projects (Comma-separated)' => 'Osnovne kategorije za projekat',
@@ -634,7 +636,7 @@ return array(
'Role for this project' => 'Uloga u ovom projektu',
'Project manager' => 'Manadžer projekta',
'Project member' => 'Učesnik projekta',
-// 'A project manager can change the settings of the project and have more privileges than a standard user.' => 'Menadżer projektu może zmieniać ustawienia projektu i posiada większe uprawnienia od zwykłego użytkownika',
+ // 'A project manager can change the settings of the project and have more privileges than a standard user.' => '',
// 'Gitlab Issue' => '',
'Subtask Id' => 'ID pod-zadania',
'Subtasks' => 'Pod-zadataka',
@@ -666,8 +668,8 @@ return array(
// 'Enable time tracking for subtasks' => '',
// 'Select the new status of the subtask: "%s"' => '',
// 'Subtask timesheet' => '',
- 'There is nothing to show.' => 'Nema podataka',
- 'Time Tracking' => 'Praćenje vremena',
+ 'There is nothing to show.' => 'Nema podataka',
+ 'Time Tracking' => 'Praćenje vremena',
// 'You already have one subtask in progress' => '',
'Which parts of the project do you want to duplicate?' => 'Koje delove projekta želite da kopirate',
// 'Change dashboard view' => '',
@@ -677,7 +679,7 @@ return array(
// 'Show/hide tasks' => '',
// 'Disable login form' => '',
// 'Show/hide calendar' => '',
- 'Korsički kalendar' => '',
+ // 'User calendar' => '',
// 'Bitbucket commit received' => '',
// 'Bitbucket webhooks' => '',
// 'Help on Bitbucket webhooks' => '',
@@ -686,7 +688,7 @@ return array(
// 'Task age in days' => '',
// 'Days in this column' => '',
// '%dd' => '',
- 'Add a link' => 'Dodaj link',
+ 'Add a link' => 'Dodaj link',
// 'Add a new link' => '',
// 'Do you really want to remove this link: "%s"?' => '',
// 'Do you really want to remove this link with task #%d?' => '',
@@ -734,4 +736,72 @@ return array(
// 'Filter recently updated' => '',
// 'since %B %e, %Y at %k:%M %p' => '',
// 'More filters' => '',
+ // 'Compact view' => '',
+ // 'Horizontal scrolling' => '',
+ // 'Compact/wide view' => '',
+ // 'No results match:' => '',
+ // 'Remove hourly rate' => '',
+ // 'Do you really want to remove this hourly rate?' => '',
+ // 'Hourly rates' => '',
+ // 'Hourly rate' => '',
+ // 'Currency' => '',
+ // 'Effective date' => '',
+ // 'Add new rate' => '',
+ // 'Rate removed successfully.' => '',
+ // 'Unable to remove this rate.' => '',
+ // 'Unable to save the hourly rate.' => '',
+ // 'Hourly rate created successfully.' => '',
+ // 'Start time' => '',
+ // 'End time' => '',
+ // 'Comment' => '',
+ // 'All day' => '',
+ // 'Day' => '',
+ // 'Manage timetable' => '',
+ // 'Overtime timetable' => '',
+ // 'Time off timetable' => '',
+ // 'Timetable' => '',
+ // 'Work timetable' => '',
+ // 'Week timetable' => '',
+ // 'Day timetable' => '',
+ // 'From' => '',
+ // 'To' => '',
+ // 'Time slot created successfully.' => '',
+ // 'Unable to save this time slot.' => '',
+ // 'Time slot removed successfully.' => '',
+ // 'Unable to remove this time slot.' => '',
+ // 'Do you really want to remove this time slot?' => '',
+ // 'Remove time slot' => '',
+ // 'Add new time slot' => '',
+ // 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
+ // 'Files' => '',
+ // 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php
index 5516b90e..5b3b31c3 100644
--- a/app/Locale/sv_SE/translations.php
+++ b/app/Locale/sv_SE/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php
index 5b127162..4b41e625 100644
--- a/app/Locale/th_TH/translations.php
+++ b/app/Locale/th_TH/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php
index 82321bdd..488526f0 100644
--- a/app/Locale/tr_TR/translations.php
+++ b/app/Locale/tr_TR/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php
index 0d2d551e..31d63632 100644
--- a/app/Locale/zh_CN/translations.php
+++ b/app/Locale/zh_CN/translations.php
@@ -775,4 +775,33 @@ return array(
// 'This timetable is used when the checkbox "all day" is checked for scheduled time off and overtime.' => '',
// 'Files' => '',
// 'Images' => '',
+ // 'Private project' => '',
+ // 'Amount' => '',
+ // 'AUD - Australian Dollar' => '',
+ // 'Budget' => '',
+ // 'Budget line' => '',
+ // 'Budget line removed successfully.' => '',
+ // 'Budget lines' => '',
+ // 'CAD - Canadian Dollar' => '',
+ // 'CHF - Swiss Francs' => '',
+ // 'Cost' => '',
+ // 'Cost breakdown' => '',
+ // 'Custom Stylesheet' => '',
+ // 'download' => '',
+ // 'Do you really want to remove this budget line?' => '',
+ // 'EUR - Euro' => '',
+ // 'Expenses' => '',
+ // 'GBP - British Pound' => '',
+ // 'INR - Indian Rupee' => '',
+ // 'JPY - Japanese Yen' => '',
+ // 'New budget line' => '',
+ // 'NZD - New Zealand Dollar' => '',
+ // 'Remove a budget line' => '',
+ // 'Remove budget line' => '',
+ // 'RSD - Serbian dinar' => '',
+ // 'The budget line have been created successfully.' => '',
+ // 'Unable to create the budget line.' => '',
+ // 'Unable to remove this budget line.' => '',
+ // 'USD - US Dollar' => '',
+ // 'Remaining' => '',
);
diff --git a/app/Model/Budget.php b/app/Model/Budget.php
index 827182a3..84cadf6e 100644
--- a/app/Model/Budget.php
+++ b/app/Model/Budget.php
@@ -2,6 +2,8 @@
namespace Model;
+use DateInterval;
+use DateTime;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
@@ -52,7 +54,7 @@ class Budget extends Base
* @param integer $project_id
* @return \PicoDb\Table
*/
- public function getBreakdown($project_id)
+ public function getSubtaskBreakdown($project_id)
{
return $this->db
->table(SubtaskTimeTracking::TABLE)
@@ -77,6 +79,53 @@ class Budget extends Base
}
/**
+ * Gather necessary information to display the budget graph
+ *
+ * @access public
+ * @param integer $project_id
+ * @return array
+ */
+ public function getDailyBudgetBreakdown($project_id)
+ {
+ $out = array();
+ $in = $this->db->hashtable(self::TABLE)->eq('project_id', $project_id)->gt('amount', 0)->asc('date')->getAll('date', 'amount');
+ $time_slots = $this->getSubtaskBreakdown($project_id)->findAll();
+
+ foreach ($time_slots as $slot) {
+ $date = date('Y-m-d', $slot['start']);
+
+ if (! isset($out[$date])) {
+ $out[$date] = 0;
+ }
+
+ $out[$date] += $slot['cost'];
+ }
+
+ $start = key($in) ?: key($out);
+ $end = new DateTime;
+ $left = 0;
+ $serie = array();
+
+ for ($today = new DateTime($start); $today <= $end; $today->add(new DateInterval('P1D'))) {
+
+ $date = $today->format('Y-m-d');
+ $today_in = isset($in[$date]) ? (int) $in[$date] : 0;
+ $today_out = isset($out[$date]) ? (int) $out[$date] : 0;
+ $left += $today_in;
+ $left -= $today_out;
+
+ $serie[] = array(
+ 'date' => $date,
+ 'in' => $today_in,
+ 'out' => -$today_out,
+ 'left' => $left,
+ );
+ }
+
+ return $serie;
+ }
+
+ /**
* Filter callback to apply the rate according to the effective date
*
* @access public
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php
index 8c946699..c6e3a962 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.php
@@ -1,5 +1,5 @@
<?= $this->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
-<?= $this->js('assets/js/vendor/dimple.v2.1.0.min.js') ?>
+<?= $this->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
<section id="main">
<div class="page-header">
diff --git a/app/Template/board/filters.php b/app/Template/board/filters.php
index 2dd559b9..47304d7d 100644
--- a/app/Template/board/filters.php
+++ b/app/Template/board/filters.php
@@ -48,6 +48,10 @@
<?= $this->a(t('Analytics'), 'analytic', 'tasks', array('project_id' => $project['id'])) ?>
</li>
<li>
+ <i class="fa fa-pie-chart fa-fw"></i>
+ <?= $this->a(t('Budget'), 'budget', 'index', array('project_id' => $project['id'])) ?>
+ </li>
+ <li>
<i class="fa fa-cog fa-fw"></i>
<?= $this->a(t('Configure'), 'project', 'show', array('project_id' => $project['id'])) ?>
</li>
diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php
index bdeda781..442a6b64 100644
--- a/app/Template/budget/index.php
+++ b/app/Template/budget/index.php
@@ -1,3 +1,6 @@
+<?= $this->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
+<?= $this->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
+
<div class="page-header">
<h2><?= t('Budget') ?></h2>
<ul>
@@ -6,4 +9,27 @@
</ul>
</div>
-<p><?= t('Current budget: ') ?><strong><?= n($total) ?></strong></p>
+<?php if (! empty($daily_budget)): ?>
+<div id="budget-chart">
+ <div id="chart"
+ data-serie='<?= json_encode($daily_budget) ?>'
+ data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type'))) ?>'></div>
+</div>
+<hr/>
+<table class="table-fixed table-stripped">
+ <tr>
+ <th><?= t('Date') ?></td>
+ <th><?= t('Budget line') ?></td>
+ <th><?= t('Expenses') ?></td>
+ <th><?= t('Remaining') ?></td>
+ </tr>
+ <?php foreach ($daily_budget as $line): ?>
+ <tr>
+ <td><?= $this->e($line['date']) ?></td>
+ <td><?= n($line['in']) ?></td>
+ <td><?= n($line['out']) ?></td>
+ <td><?= n($line['left']) ?></td>
+ </tr>
+ <?php endforeach ?>
+</table>
+<?php endif ?>