当前位置: 首页>>代码示例>>PHP>>正文


PHP Task::getNomUrl方法代码示例

本文整理汇总了PHP中Task::getNomUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::getNomUrl方法的具体用法?PHP Task::getNomUrl怎么用?PHP Task::getNomUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Task的用法示例。


在下文中一共展示了Task::getNomUrl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: convertSecondToTime

     $username = $userstatic->getNomUrl(0, 0);
 }
 print "<tr " . $bc[$var] . ">";
 //print '<td>'.$username.'</td>';
 print '<td>';
 $projectstatic->id = $obj->projectid;
 $projectstatic->ref = $obj->ref;
 $projectstatic->title = $obj->title;
 print $projectstatic->getNomUrl(1, '', 16);
 //print '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$obj->projectid.'">'.$obj->title.'</a>';
 print '</td>';
 print '<td>';
 if (!empty($obj->taskid)) {
     $tasktmp->id = $obj->taskid;
     $tasktmp->ref = $obj->label;
     print $tasktmp->getNomUrl(1, 'withproject');
 } else {
     print $langs->trans("NoTasks");
 }
 print '</td>';
 print '<td>' . dol_print_date($db->jdate($obj->dateo), 'day') . '</td>';
 print '<td>' . dol_print_date($db->jdate($obj->datee), 'day') . '</td>';
 print '<td align="right"><a href="' . DOL_URL_ROOT . '/projet/tasks/time.php?id=' . $obj->taskid . '&withproject=1">';
 print convertSecondToTime($obj->planned_workload, 'all');
 print '</a></td>';
 print '<td align="right">';
 print $obj->taskid > 0 ? $obj->progress . '%' : '';
 print '</td>';
 print '<td align="right"><a href="' . DOL_URL_ROOT . '/projet/tasks/time.php?id=' . $obj->taskid . '&withproject=1">';
 print convertSecondToTime($obj->timespent, 'all');
 print '</a></td>';
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:index.php

示例2:

        			print '&nbsp;';
        		}
        		print '</td>';
        	}
        	// Status
        	if (! empty($arrayfields['p.fk_statut']['checked']))
        	{
        	    print '<td>';
        	    print $projectstatic->getLibStatut(1);
        	    print '</td>';
        	}
        	// Ref
        	if (! empty($arrayfields['t.ref']['checked']))
        	{
        	    print '<td>';
        	    print $taskstatic->getNomUrl(1,'withproject');
        	    print '</td>';
        	}        	 
    	    // Label
        	if (! empty($arrayfields['t.label']['checked']))
        	{
        	    print '<td>';
        	    print $taskstatic->label;
        	    print '</td>';
        	}
        	// Date start
        	if (! empty($arrayfields['t.dateo']['checked']))
        	{
				print '<td class="center">';
	    		print dol_print_date($db->jdate($obj->date_start),'day');
	    		print '</td>';
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:31,代码来源:list.php

示例3: PLines

/**
 * Show task lines with a particular parent
 * @param 	$inc				Counter that count number of lines legitimate to show (for return)
 * @param 	$parent				Id of parent task to start
 * @param 	$lines				Array of all tasks
 * @param 	$level				Level of task
 * @param 	$var				Color
 * @param 	$showproject		Show project columns
 * @param	$taskrole			Array of roles of user for each tasks
 * @param	$projectsListId		List of id of project allowed to user (separated with comma)
 */
function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId = '')
{
    global $user, $bc, $langs;
    $lastprojectid = 0;
    $projectstatic = new Project($db);
    $taskstatic = new Task($db);
    $projectsArrayId = explode(',', $projectsListId);
    $numlines = sizeof($lines);
    $total = 0;
    for ($i = 0; $i < $numlines; $i++) {
        if ($parent == 0) {
            $level = 0;
        }
        // Process line
        // print "i:".$i."-".$lines[$i]->fk_project.'<br>';
        if ($lines[$i]->fk_parent == $parent) {
            // Show task line.
            $showline = 1;
            $showlineingray = 0;
            // If there is filters to use
            if (is_array($taskrole)) {
                // If task not legitimate to show, search if a legitimate task exists later in tree
                if (!isset($taskrole[$lines[$i]->id]) && $lines[$i]->id != $lines[$i]->fk_parent) {
                    // So search if task has a subtask legitimate to show
                    $foundtaskforuserdeeper = 0;
                    SearchTaskInChild($foundtaskforuserdeeper, $lines[$i]->id, $lines, $taskrole);
                    //print '$foundtaskforuserpeeper='.$foundtaskforuserdeeper.'<br>';
                    if ($foundtaskforuserdeeper > 0) {
                        $showlineingray = 1;
                        // We will show line but in gray
                    } else {
                        $showline = 0;
                        // No reason to show line
                    }
                }
            }
            if ($showline) {
                // Break on a new project
                if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) {
                    $var = !$var;
                    $lastprojectid = $lines[$i]->fk_project;
                }
                print "<tr " . $bc[$var] . ">\n";
                // Project
                if ($showproject) {
                    print "<td>";
                    //var_dump($taskrole);
                    if ($showlineingray) {
                        print '<i>';
                    }
                    $projectstatic->id = $lines[$i]->fk_project;
                    $projectstatic->ref = $lines[$i]->projectref;
                    $projectstatic->public = $lines[$i]->public;
                    if ($lines[$i]->public || in_array($lines[$i]->fk_project, $projectsArrayId)) {
                        print $projectstatic->getNomUrl(1);
                    } else {
                        print $projectstatic->getNomUrl(1, 'nolink');
                    }
                    if ($showlineingray) {
                        print '</i>';
                    }
                    print "</td>";
                }
                // Ref of task
                print '<td>';
                if ($showlineingray) {
                    print '<i>' . img_object('', 'projecttask') . ' ' . $lines[$i]->id . '</i>';
                } else {
                    $taskstatic->id = $lines[$i]->id;
                    $taskstatic->ref = $lines[$i]->id;
                    $taskstatic->label = $taskrole[$lines[$i]->id] ? $langs->trans("YourRole") . ': ' . $taskrole[$lines[$i]->id] : '';
                    print $taskstatic->getNomUrl(1);
                }
                print '</td>';
                // Title of task
                print "<td>";
                if ($showlineingray) {
                    print '<i>';
                } else {
                    print '<a href="' . DOL_URL_ROOT . '/projet/tasks/task.php?id=' . $lines[$i]->id . '">';
                }
                for ($k = 0; $k < $level; $k++) {
                    print "&nbsp; &nbsp; &nbsp;";
                }
                print $lines[$i]->label;
                if ($showlineingray) {
                    print '</i>';
                } else {
                    print '</a>';
//.........这里部分代码省略.........
开发者ID:netors,项目名称:dolibarr,代码行数:101,代码来源:project.lib.php

示例4: convertSecondToTime

 //print '<a href="'.DOL_URL_ROOT.'/projet/card.php?id='.$obj->projectid.'">'.$obj->title.'</a>';
 print '</td>';
 if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
     print '<td>';
     $code = dol_getIdFromCode($db, $obj->opp_status, 'c_lead_status', 'rowid', 'code');
     if ($code) {
         print $langs->trans("OppStatus" . $code);
     }
     print '</td>';
 }
 print '<td>';
 if (!empty($obj->taskid)) {
     $tasktmp->id = $obj->taskid;
     $tasktmp->ref = $obj->ref;
     $tasktmp->label = $obj->label;
     print $tasktmp->getNomUrl(1, 'withproject', 'task', 1, '<br>');
 } else {
     print $langs->trans("NoTasks");
 }
 print '</td>';
 print '<td align="center">' . dol_print_date($db->jdate($obj->dateo), 'day') . '</td>';
 print '<td align="center">' . dol_print_date($db->jdate($obj->datee), 'day') . '</td>';
 print '<td align="right"><a href="' . DOL_URL_ROOT . '/projet/tasks/time.php?id=' . $obj->taskid . '&withproject=1">';
 print convertSecondToTime($obj->planned_workload, 'allhourmin');
 print '</a></td>';
 print '<td align="right">';
 print $obj->taskid > 0 ? $obj->progress . '%' : '';
 print '</td>';
 print '<td align="right"><a href="' . DOL_URL_ROOT . '/projet/tasks/time.php?id=' . $obj->taskid . '&withproject=1">';
 print convertSecondToTime($obj->timespent, 'allhourmin');
 print '</a></td>';
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:index.php

示例5: formObjectOptions


//.........这里部分代码省略.........
					});
					
				}
				
			</script>
			
			</td>
			</tr>
			<?php 
        } else {
            if (in_array('projectcard', explode(':', $parameters['context']))) {
                if ($object->id > 0) {
                    ?>
				<tr>
					<td>Fin de production prévisionnelle</td>
					<td rel="date_fin_prod">
				<?php 
                    $res = $db->query("SELECT MAX(date_estimated_end) as date_estimated_end \n\t\t\t\t\tFROM " . MAIN_DB_PREFIX . "projet_task t \n\t\t\t\t\tLEFT JOIN " . MAIN_DB_PREFIX . "projet_task_extrafields tex ON (tex.fk_object=t.rowid)\n\t\t\t\t\t\tWHERE t.fk_projet = " . $object->id);
                    if ($obj = $db->fetch_object($res)) {
                        $t = strtotime($obj->date_estimated_end);
                        if ($t != '-62169987208') {
                            print dol_print_date($t, 'day') . img_info('Temps actuel présent dans l\'ordonnancement. Attention, peut-être revu à tout moment');
                        } else {
                            print 'Pas de tâche ordonnancée';
                        }
                    } else {
                        print 'Pas de tâche ordonnancée';
                    }
                    ?>
				</td></tr>
				<?php 
                }
            } else {
                if (in_array('actioncard', explode(':', $parameters['context']))) {
                    $fk_task = 0;
                    if ($action != 'create') {
                        $object->fetchObjectLinked();
                        //var_dump($object->linkedObjectsIds['task']);
                        if (!empty($object->linkedObjectsIds['task'])) {
                            list($key, $fk_task) = each($object->linkedObjectsIds['task']);
                        }
                    }
                    if ($action == 'edit' || $action == 'create') {
                        ?>
				<script type="text/javascript">
					$('#projectid').after('<span rel="fk_task"></span>');
				
					$('#projectid').change(function() {
						
						var fk_project = $(this).val();
						
						$.ajax({
							url:"<?php 
                        echo dol_buildpath('/scrumboard/script/interface.php', 1);
                        ?>
"
							,data: {
								get:"select-task"
								,fk_task:<?php 
                        echo $fk_task;
                        ?>
								,fk_project : fk_project
							}
								
						}).done(function(data) {
							$('span[rel=fk_task]').html(data);	
						});
						
						
						
						
					});
					$('#projectid').change();
				</script>	
				<?php 
                    } else {
                        dol_include_once('/projet/class/task.class.php');
                        $task = new Task($db);
                        $task->fetch($fk_task);
                        if (!empty($task->id)) {
                            ?>
				<tr>
					<td><?php 
                            echo $langs->trans('Task');
                            ?>
</td>
					<td rel="fk_task">
					<?php 
                            echo $task->getNomUrl(1) . ' ' . $task->label;
                            ?>
					</td>
				</tr>
				<?php 
                        }
                    }
                }
            }
        }
        return 0;
    }
开发者ID:ATM-Consulting,项目名称:dolibarr_module_scrumboard,代码行数:101,代码来源:actions_scrumboard.class.php


注:本文中的Task::getNomUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。