Esempio n. 1
0
             if ($arFields["MARK"] != "X") {
                 $arFields["APPROVER"] = $USER->GetID();
                 $arFields["APPROVE"] = "Y";
                 $arFields["APPROVE_DATE"] = ConvertTimeStamp(time(), "FULL");
             } else {
                 $arFields["APPROVE"] = "N";
                 $arFields["APPROVER"] = 0;
                 $arFields["APPROVE_DATE"] = "";
             }
             CTimeManReportFull::Update($ID, $arFields);
             $CACHE_MANAGER->Clean(CUserReportFull::getInfoCacheId($USER_ID), 'timeman_report_info');
             CReportNotifications::MessageUpdate($ID, $rep, $arFields);
         }
     }
 } elseif ($_POST["mode"] && $OBJID > 0) {
     $arFields = array("UF_REPORT_PERIOD" => $_POST["mode"], "UF_TM_TIME" => IsAmPmMode() ? convertTimeToMilitary($_POST["time"], 'H:MI T', 'HH:MI') : $_POST["time"], "UF_TM_REPORT_DATE" => $_POST["date"], "UF_TM_DAY" => $_POST["day"], "ID" => $OBJID);
     if ($_POST["object"] == "user") {
         $bCanEdit = in_array($OBJID, $arAccessUsers["WRITE"]) && $OBJID != $USER->GetID() || $bCanEditAll || CTimeMan::IsAdmin();
         if ($bCanEdit) {
             $arReportUser = new CUserReportFull($OBJID);
             $res = $arReportUser->SetPeriod($arFields);
             $CACHE_MANAGER->Clean(CReportSettings::getSettingsCacheId($OBJID), 'timeman_report_settings');
             $CACHE_MANAGER->Clean(CUserReportFull::getInfoCacheId($OBJID), 'timeman_report_info');
         }
     } elseif ($_POST["object"] == "dep") {
         $arSubordination = CIntranetUtils::GetSubordinateDepartments($USER->GetID(), true);
         $bCanEdit = in_array($OBJID, $arSubordination) || CTimeMan::IsAdmin();
         if ($bCanEdit) {
             $res = CTimeManReportFull::SetPeriodSection($arFields);
             $CACHE_MANAGER->CleanDir('timeman_report_settings');
             $CACHE_MANAGER->CleanDir('timeman_report_info');
Esempio n. 2
0
} else {
    if ($task["DEADLINE"]) {
        ?>
				<span class="task-deadline-datetime">
					<span class="task-deadline-date">
					<?php 
        echo tasksFormatDate($task["DEADLINE"]);
        ?>
					</span>
				</span>

				<?php 
        if (convertTimeToMilitary($task["DEADLINE"], CSite::GetDateFormat(), "HH:MI") != "00:00") {
            ?>
<span class="task-deadline-time"><?php 
            echo convertTimeToMilitary($task["DEADLINE"], CSite::GetDateFormat(), CSite::GetTimeFormat());
            ?>
</span><?php 
        }
    } else {
        echo '&nbsp;';
    }
}
?>
	</td>
	<td class="task-responsible-column"><a class="task-responsible-link" target="_top" 
		href="<?php 
echo CComponentEngine::MakePathFromTemplate($arPaths["PATH_TO_USER_PROFILE"], array("user_id" => $task["RESPONSIBLE_ID"]));
?>
" 
		id="anchor_responsible_<?php 
Esempio n. 3
0
													callback_after: function(value) {
														tasks_funcOnChangeOfSomeDateFields(BX('task-deadline-hidden'));
													}
												});
												"<?php 
                        } else {
                            echo '"';
                        }
                        ?>
 
											id="task-detail-deadline"
											style="display:inline; line-height:19px;"><?php 
                        if ($arResult["TASK"]["DEADLINE"]) {
                            echo tasksFormatDate($arResult["TASK"]["DEADLINE"]);
                            if (convertTimeToMilitary($arResult["TASK"]["DEADLINE"], CSite::GetDateFormat(), "HH:MI") != "00:00") {
                                echo " " . convertTimeToMilitary($arResult["TASK"]["DEADLINE"], CSite::GetDateFormat(), CSite::GetTimeFormat());
                            }
                        } else {
                            echo GetMessage("TASKS_SIDEBAR_DEADLINE_NO");
                        }
                        ?>
</span><?php 
                        if ($arResult['ALLOWED_ACTIONS']['ACTION_EDIT'] || $arResult['ALLOWED_ACTIONS']['ACTION_CHANGE_DEADLINE']) {
                            ?>
<input type="text" style="display:none;" id="task-deadline-hidden" 
												value="<?php 
                            echo $arResult["TASK"]["DEADLINE"];
                            ?>
"
											/><span class="task-deadline-delete"<?php 
                            if (!$arResult["TASK"]["DEADLINE"]) {
Esempio n. 4
0
            case CTaskColumnList::COLUMN_CLOSED_DATE:
                if ($task['CLOSED_DATE']) {
                    ?>
					<span class="task-deadline-datetime">
						<span class="task-deadline-date">
						<?php 
                    echo tasksFormatDate($task['CLOSED_DATE']);
                    ?>
						</span>
					</span>

					<?php 
                    if (convertTimeToMilitary($task['CLOSED_DATE'], CSite::GetDateFormat(), 'HH:MI') != '00:00') {
                        ?>
<span class="task-deadline-time"><?php 
                        echo convertTimeToMilitary($task['CLOSED_DATE'], CSite::GetDateFormat(), CSite::GetTimeFormat());
                        ?>
</span><?php 
                    }
                } else {
                    echo '&nbsp;';
                }
                break;
            case CTaskColumnList::COLUMN_ALLOW_TIME_TRACKING:
                if ($task['ALLOW_TIME_TRACKING'] === 'Y') {
                    echo GetMessage('TASKS_LIST_ITEMS_YES');
                } else {
                    echo GetMessage('TASKS_LIST_ITEMS_NO');
                }
                break;
            case CTaskColumnList::COLUMN_ALLOW_CHANGE_DEADLINE: