summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Api/Middleware/AuthenticationApiMiddleware.php7
-rw-r--r--app/Api/SubtaskTimeTrackingApi.php34
-rw-r--r--app/Locale/de_DE/translations.php2
-rw-r--r--app/Locale/it_IT/translations.php82
-rw-r--r--app/Model/ProjectModel.php2
-rw-r--r--app/ServiceProvider/ApiProvider.php2
-rw-r--r--app/Template/dashboard/projects.php5
7 files changed, 92 insertions, 42 deletions
diff --git a/app/Api/Middleware/AuthenticationApiMiddleware.php b/app/Api/Middleware/AuthenticationApiMiddleware.php
index 5f63e1a1..b16e10b8 100644
--- a/app/Api/Middleware/AuthenticationApiMiddleware.php
+++ b/app/Api/Middleware/AuthenticationApiMiddleware.php
@@ -32,13 +32,20 @@ class AuthenticationApiMiddleware extends Base implements MiddlewareInterface
'getDefaultTaskColors',
'getColorList',
'getProjectById',
+ 'getSubTask',
'getTask',
'getTaskByReference',
+ 'getTimeSpent',
'getAllTasks',
+ 'getAllSubTasks',
+ 'hasTimer',
+ 'logStartTime',
+ 'logEndTime',
'openTask',
'closeTask',
'moveTaskPosition',
'createTask',
+ 'createSubtask',
'updateTask',
'getBoard',
'getProjectActivity',
diff --git a/app/Api/SubtaskTimeTrackingApi.php b/app/Api/SubtaskTimeTrackingApi.php
new file mode 100644
index 00000000..0e700b31
--- /dev/null
+++ b/app/Api/SubtaskTimeTrackingApi.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Kanboard\Api;
+
+use Kanboard\Core\Base;
+
+/**
+ * Subtask Time Tracking API controller
+ *
+ * @package api
+ * @author Nikolaos Georgakis
+ */
+class SubtaskTimeTrackingApi extends Base
+{
+ public function hasTimer($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->hasTimer($subtask_id,$user_id);
+ }
+
+ public function logStartTime($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->logStartTime($subtask_id,$user_id);
+ }
+
+ public function logEndTime($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->logEndTime($subtask_id,$user_id);
+ }
+
+ public function getTimeSpent($subtask_id,$user_id)
+ {
+ return $this->subtaskTimeTrackingModel->getTimeSpent($subtask_id,$user_id);
+ }
+}
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index 2a55c124..e76100c1 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -961,7 +961,7 @@ return array(
'Add group member' => 'Gruppenmitglied hinzufügen',
'Do you really want to remove this group: "%s"?' => 'Wollen Sie die Gruppe "%s" wirklich löschen?',
'There is no user in this group.' => 'Es gibt keinen Benutzer in dieser Gruppe.',
- 'Remove this user' => 'Diesen Benutzer löschen',
+ 'Remove this user' => 'Diesen Benutzer entfernen',
'Permissions' => 'Berechtigungen',
'Allowed Users' => 'Berechtigte Benutzer',
'No user have been allowed specifically.' => 'Keine Benutzer mit ausdrücklicher Berechtigung.',
diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php
index 0ccaa426..261cd82c 100644
--- a/app/Locale/it_IT/translations.php
+++ b/app/Locale/it_IT/translations.php
@@ -1160,46 +1160,46 @@ return array(
'Projects where "%s" is member' => 'Progetti all\'interno dei quali "%s" è membro',
'Open tasks assigned to "%s"' => 'Task aperti assegnati a "%s"',
'Closed tasks assigned to "%s"' => 'Task chiusi assegnati a "%s"',
- // 'Assign automatically a color based on a priority' => '',
- // 'Overdue tasks for the project(s) "%s"' => '',
- // 'Upload files' => '',
- // 'Installed Plugins' => '',
- // 'Plugin Directory' => '',
- // 'Plugin installed successfully.' => '',
- // 'Plugin updated successfully.' => '',
- // 'Plugin removed successfully.' => '',
- // 'Subtask converted to task successfully.' => '',
- // 'Unable to convert the subtask.' => '',
- // 'Unable to extract plugin archive.' => '',
- // 'Plugin not found.' => '',
- // 'You don\'t have the permission to remove this plugin.' => '',
- // 'Unable to download plugin archive.' => '',
- // 'Unable to write temporary file for plugin.' => '',
- // 'Unable to open plugin archive.' => '',
- // 'There is no file in the plugin archive.' => '',
- // 'Create tasks in bulk' => '',
- // 'Your Kanboard instance is not configured to install plugins from the user interface.' => '',
- // 'There is no plugin available.' => '',
- // 'Install' => '',
- // 'Update' => '',
- // 'Up to date' => '',
- // 'Not available' => '',
- // 'Remove plugin' => '',
- // 'Do you really want to remove this plugin: "%s"?' => '',
- // 'Uninstall' => '',
- // 'Listing' => '',
- // 'Metadata' => '',
- // 'Manage projects' => '',
- // 'Convert to task' => '',
- // 'Convert sub-task to task' => '',
- // 'Do you really want to convert this sub-task to a task?' => '',
- // 'My task title' => '',
- // 'Enter one task by line.' => '',
- // 'Number of failed login:' => '',
- // 'Account locked until:' => '',
- // 'Email settings' => '',
- // 'Email sender address' => '',
- // 'Email transport' => '',
+ 'Assign automatically a color based on a priority' => 'Assegna automaticamente un colore in base alla priorità',
+ 'Overdue tasks for the project(s) "%s"' => 'Task scaduti per il progetto "%s"',
+ 'Upload files' => 'Carica file',
+ 'Installed Plugins' => 'Plugin installati',
+ 'Plugin Directory' => 'Directory dei plugin',
+ 'Plugin installed successfully.' => 'Plugin installato con successo.',
+ 'Plugin updated successfully.' => 'Plugin aggiornato con successo.',
+ 'Plugin removed successfully.' => 'Plugin rimosso con successo.',
+ 'Subtask converted to task successfully.' => 'Sotto-task converito in task con successo.',
+ 'Unable to convert the subtask.' => 'Impossibile convertire il sotto-task.',
+ 'Unable to extract plugin archive.' => 'Impossibile estrarre l\' archivio del plugin.',
+ 'Plugin not found.' => 'Plugin non trovato.',
+ 'You don\'t have the permission to remove this plugin.' => 'Non hai i permessi per rimuovere questo plugin.',
+ 'Unable to download plugin archive.' => 'Impossibile scaricare l\'archivo del plugin',
+ 'Unable to write temporary file for plugin.' => 'Impossibile scrivere il file temporaneo per il plugin.',
+ 'Unable to open plugin archive.' => 'Impossibile aprire l\'archivio del plugin.',
+ 'There is no file in the plugin archive.' => 'Non ci sono file nell\' archivio del plugin.',
+ 'Create tasks in bulk' => 'Creazione massiva di task',
+ 'Your Kanboard instance is not configured to install plugins from the user interface.' => 'La tua installazione Kanboard non è configurata per installare plugin tramite l\'interfaccia utente.',
+ 'There is no plugin available.' => 'Non ci sono plugin disponibili.',
+ 'Install' => 'Installa',
+ 'Update' => 'Aggiorna',
+ 'Up to date' => 'Aggiornato',
+ 'Not available' => 'Non disponibile',
+ 'Remove plugin' => 'Disinstalla plugin',
+ 'Do you really want to remove this plugin: "%s"?' => 'Vuoi davvero rimuovere questo plugin: "%s"?',
+ 'Uninstall' => 'Disinstalla',
+ 'Listing' => 'Elenco',
+ 'Metadata' => 'Metadati',
+ 'Manage projects' => 'Gestione progetti',
+ 'Convert to task' => 'Converti in task',
+ 'Convert sub-task to task' => 'Converti il sotto-task in task',
+ 'Do you really want to convert this sub-task to a task?' => 'Vuoi davvero convertire questo sotto-task in un task?',
+ 'My task title' => 'Titolo del mio task',
+ 'Enter one task by line.' => 'Inserisci un task per ogni riga.',
+ 'Number of failed login:' => 'Numero di login falliti:',
+ 'Account locked until:' => 'Account bloccato fino al:',
+ 'Email settings' => 'Impostazioni Email',
+ 'Email sender address' => 'Indirizzo Email mittente',
+ 'Email transport' => 'Trasporto Email',
// 'Webhook token' => '',
- // 'Imports' => '',
+ 'Imports' => 'Importa',
);
diff --git a/app/Model/ProjectModel.php b/app/Model/ProjectModel.php
index 34e11c13..7382537e 100644
--- a/app/Model/ProjectModel.php
+++ b/app/Model/ProjectModel.php
@@ -294,10 +294,12 @@ class ProjectModel extends Base
public function getColumnStats(array &$project)
{
$project['columns'] = $this->columnModel->getAll($project['id']);
+ $project['nb_active_tasks'] = 0;
$stats = $this->boardModel->getColumnStats($project['id']);
foreach ($project['columns'] as &$column) {
$column['nb_tasks'] = isset($stats[$column['id']]) ? $stats[$column['id']] : 0;
+ $project['nb_active_tasks'] += $column['nb_tasks'];
}
return $project;
diff --git a/app/ServiceProvider/ApiProvider.php b/app/ServiceProvider/ApiProvider.php
index 19d945f6..93b3c7f5 100644
--- a/app/ServiceProvider/ApiProvider.php
+++ b/app/ServiceProvider/ApiProvider.php
@@ -18,6 +18,7 @@ use Kanboard\Api\Middleware\AuthenticationApiMiddleware;
use Kanboard\Api\ProjectApi;
use Kanboard\Api\ProjectPermissionApi;
use Kanboard\Api\SubtaskApi;
+use Kanboard\Api\SubtaskTimeTrackingApi;
use Kanboard\Api\SwimlaneApi;
use Kanboard\Api\TaskApi;
use Kanboard\Api\TaskLinkApi;
@@ -60,6 +61,7 @@ class ApiProvider implements ServiceProviderInterface
->withObject(new ProjectApi($container))
->withObject(new ProjectPermissionApi($container))
->withObject(new SubtaskApi($container))
+ ->withObject(new SubtaskTimeTrackingApi($container))
->withObject(new SwimlaneApi($container))
->withObject(new TaskApi($container))
->withObject(new TaskLinkApi($container))
diff --git a/app/Template/dashboard/projects.php b/app/Template/dashboard/projects.php
index 5bf92980..962e4d83 100644
--- a/app/Template/dashboard/projects.php
+++ b/app/Template/dashboard/projects.php
@@ -9,6 +9,7 @@
<th class="column-5"><?= $paginator->order('Id', 'id') ?></th>
<th class="column-3"><?= $paginator->order('<i class="fa fa-lock fa-fw" title="'.t('Private project').'"></i>', 'is_private') ?></th>
<th class="column-25"><?= $paginator->order(t('Project'), \Kanboard\Model\ProjectModel::TABLE.'.name') ?></th>
+ <th class="column-10"><?= t('Tasks') ?></th>
<th><?= t('Columns') ?></th>
</tr>
<?php foreach ($paginator->getCollection() as $project): ?>
@@ -36,12 +37,16 @@
</span>
<?php endif ?>
</td>
+ <td>
+ <?= $project['nb_active_tasks'] ?>
+ </td>
<td class="dashboard-project-stats">
<?php foreach ($project['columns'] as $column): ?>
<strong title="<?= t('Task count') ?>"><?= $column['nb_tasks'] ?></strong>
<span><?= $this->text->e($column['title']) ?></span>
<?php endforeach ?>
</td>
+
</tr>
<?php endforeach ?>
</table>