public static function onAfterTimeManagerDayStart($arData)
 {
     if (!(isset($arData['USER_ID'], $arData['MODIFIED_BY']) && $arData['USER_ID'] > 0 && $arData['MODIFIED_BY'] > 0 && $arData['MODIFIED_BY'] == $arData['USER_ID'] && IsModuleInstalled("im") && CModule::IncludeModule("im"))) {
         return;
     }
     $recipientId = (int) $arData['USER_ID'];
     try {
         $tasksCounter = CTaskListCtrl::getMainCounterForUser($recipientId);
         if ($tasksCounter <= 0) {
             return;
         }
         /** @noinspection PhpDeprecationInspection */
         CIMNotify::Add(array('FROM_USER_ID' => 0, 'TO_USER_ID' => $recipientId, 'NOTIFY_MODULE' => 'tasks', 'NOTIFY_EVENT' => 'notice', 'NOTIFY_TYPE' => IM_NOTIFY_SYSTEM, 'NOTIFY_TAG' => 'TASKS|COUNTERS_NOTICE|' . $recipientId, 'MESSAGE' => CTasksTools::getMessagePlural($tasksCounter, 'TASKS_COUNTERS_NOTICE_CONTENT_V2', array('#TASKS_COUNT#' => $tasksCounter, '#HREF#' => self::getTasksListLink($recipientId))), 'TITLE' => GetMessage('TASKS_COUNTERS_NOTICE_TITLE')));
     } catch (Exception $e) {
         CTaskAssert::logWarning('[0xb83d6845] unexpected exception in CTaskCountersNotifier::onAfterTimeManagerDayStart()' . ', file: ' . $e->getFile() . ', line: ' . $e->getLine() . ', code: ' . $e->getCode() . ', message: ' . $e->getMessage());
     }
 }
Beispiel #2
0
 function lambda_sgkrg457d_funcFormatForHumanMinutes($in, $bDataInSeconds = false)
 {
     if ($in === NULL) {
         return '';
     }
     if ($bDataInSeconds) {
         $minutes = (int) round($in / 60, 0);
     }
     $hours = (int) ($minutes / 60);
     if ($minutes < 60) {
         $duration = $minutes . ' ' . CTasksTools::getMessagePlural($minutes, 'TASKS_TASK_DURATION_MINUTES');
     } elseif ($minutesInResid = $minutes % 60) {
         $duration = $hours . ' ' . CTasksTools::getMessagePlural($hours, 'TASKS_TASK_DURATION_HOURS') . ' ' . (int) $minutesInResid . ' ' . CTasksTools::getMessagePlural((int) $minutesInResid, 'TASKS_TASK_DURATION_MINUTES');
     } else {
         $duration = $hours . ' ' . CTasksTools::getMessagePlural($hours, 'TASKS_TASK_DURATION_HOURS');
     }
     if ($bDataInSeconds && $in < 3600) {
         if ($secondsInResid = $in % 60) {
             $duration .= ' ' . (int) $secondsInResid . ' ' . CTasksTools::getMessagePlural((int) $secondsInResid, 'TASKS_TASK_DURATION_SECONDS');
         }
     }
     return $duration;
 }
Beispiel #3
0
"
											<?php 
            if ($arHead['PHOTO_SRC']) {
                ?>
style="background: url('<?php 
                echo $arHead['PHOTO_SRC'];
                ?>
') no-repeat center center;"<?php 
            }
            ?>
										></a><?php 
        }
        ?>
<span class="task-project-party"><?php 
        if ($arProject['NOT_HEADS_COUNT']) {
            echo CTasksTools::getMessagePlural($arProject['NOT_HEADS_COUNT'], 'TASKS_PROJECTS_MEMBERS', array('#SPAN#' => '<span id="' . $listId . '" class="task-project-party-list">', '#COUNT#' => $arProject['NOT_HEADS_COUNT'], '#/SPAN#' => '</span>'));
        }
        ?>
</span>
									<script type="text/javascript">
									(function(){
										var x1 = new tasksProjectsOverviewNS.userPopupList(<?php 
        echo $arProject['MEMBERS_FOR_JS'];
        ?>
);
										BX.bind(BX('<?php 
        echo $listId;
        ?>
'), "click", BX.proxy(x1.showEmployees, x1));
									})();
									</script>