diff --git a/translators/tmgmt_local/tmgmt_local.module b/translators/tmgmt_local/tmgmt_local.module index 9821059..7d639d8 100644 --- a/translators/tmgmt_local/tmgmt_local.module +++ b/translators/tmgmt_local/tmgmt_local.module @@ -254,7 +254,7 @@ function tmgmt_local_tmgmt_translator_plugin_info() { function tmgmt_local_translation_access(TMGMTLocalTask $task, $account = NULL) { $job = $task->getJob(); - if (!$job->isActive()) { + if (!$job || !$job->isActive()) { return FALSE; } @@ -718,8 +718,10 @@ function tmgmt_local_get_translators_for_tasks($tasks) { function tmgmt_local_tmgmt_job_item_update(TMGMTJobItem $job_item) { if ($job_item->isAccepted() && !$job_item->original->isAccepted()) { $tltiid = db_query('SELECT tltiid FROM {tmgmt_local_task_item} ti INNER JOIN {tmgmt_local_task} t ON ti.tltid = t.tltid WHERE t.tjid = :tjid AND ti.tjiid = :tjiid', array(':tjid' => $job_item->tjid, ':tjiid' => $job_item->tjiid))->fetchField(); - $task_item = tmgmt_local_task_item_load($tltiid); - $task_item->completed(); - $task_item->save(); + if ($tltiid) { + $task_item = tmgmt_local_task_item_load($tltiid); + $task_item->completed(); + $task_item->save(); + } } } diff --git a/translators/tmgmt_local/views/tmgmt_local_task_overview.view.inc b/translators/tmgmt_local/views/tmgmt_local_task_overview.view.inc index fddc7f3..6b49edf 100644 --- a/translators/tmgmt_local/views/tmgmt_local_task_overview.view.inc +++ b/translators/tmgmt_local/views/tmgmt_local_task_overview.view.inc @@ -163,11 +163,11 @@ $handler->display->display_options['filters']['status']['expose']['remember_role 6 => 0, ); -/* Display: Unassigned and mine */ -$handler = $view->new_display('page', 'Unassigned and mine', 'unassigned'); +/* Display: Eligible and mine */ +$handler = $view->new_display('page', 'Eligible and mine', 'unassigned'); $handler->display->display_options['defaults']['title'] = FALSE; $handler->display->display_options['title'] = 'Translate'; -$handler->display->display_options['display_description'] = 'Shows elegible (unasigned) and mine tasks.'; +$handler->display->display_options['display_description'] = 'Shows elegible (unassigned) and mine tasks.'; $handler->display->display_options['defaults']['hide_admin_links'] = FALSE; $handler->display->display_options['defaults']['style_plugin'] = FALSE; $handler->display->display_options['style_plugin'] = 'table'; @@ -250,7 +250,7 @@ $handler->display->display_options['empty']['area']['id'] = 'area'; $handler->display->display_options['empty']['area']['table'] = 'views'; $handler->display->display_options['empty']['area']['field'] = 'area'; $handler->display->display_options['empty']['area']['empty'] = TRUE; -$handler->display->display_options['empty']['area']['content'] = 'You do not have eligible tasks.'; +$handler->display->display_options['empty']['area']['content'] = 'There are no eligible tasks.'; $handler->display->display_options['empty']['area']['format'] = 'filtered_html'; $handler->display->display_options['defaults']['relationships'] = FALSE; /* Relationship: Translation Task: Translation Job tjid */ @@ -410,6 +410,7 @@ $handler->display->display_options['menu']['context'] = 0; $handler->display->display_options['tab_options']['type'] = 'normal'; $handler->display->display_options['tab_options']['title'] = 'Translate'; $handler->display->display_options['tab_options']['weight'] = '0'; +$handler->display->display_options['tab_options']['name'] = 'user-menu'; /* Display: Elegible */ $handler = $view->new_display('page', 'Elegible', 'eligible'); @@ -2321,11 +2322,11 @@ $translatables['tmgmt_local_task_overview'] = array( t('Job item count'), t('Progress'), t('Status'), - t('Unassigned and mine'), + t('Eligible and mine'), t('Translate'), - t('Shows elegible (unasigned) and mine tasks.'), + t('Shows elegible (unassigned) and mine tasks.'), t('