<?php

global $conf;

// Project
if (! empty($conf->projet->enabled))
{

	global $formproject, $langs, $object, $maxlength, $soc;

	$projectid = GETPOST('projectid')?GETPOST('projectid'):$object->fk_project;

	$langs->load("projects");
	$output.='<tr>';
	$output.='<td>'.$langs->trans('Project') . '</td>';
	$output.='<td>'.$formproject->select_projects($object->socid, $projectid, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
	$output.=' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">' . $langs->trans("AddProject") . '</span><span class="fa fa-plus-circle valignmiddle"></span></a>';
	$output.='</td>';
	$output.='</tr>';
}