Look and feel v6
This commit is contained in:
parent
71bd69a804
commit
5ebe711665
@ -221,29 +221,41 @@ if ( $object->fetch($id) > 0 )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_fiche_head($head, 'resource', $langs->trans("ResourceSingular"),0,'resource');
|
dol_fiche_head($head, 'resource', $langs->trans("ResourceSingular"), -1, 'resource');
|
||||||
|
|
||||||
|
$formconfirm = '';
|
||||||
|
|
||||||
// Confirm deleting resource line
|
// Confirm deleting resource line
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
print $form->formconfirm("card.php?&id=".$id,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResource"),"confirm_delete_resource",'','',1);
|
$formconfirm = $form->formconfirm("card.php?&id=".$id,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResource"),"confirm_delete_resource",'','',1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print form confirm
|
||||||
|
print $formconfirm;
|
||||||
|
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/resource/list.php' . (! empty($socid) ? '?id=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
/*---------------------------------------
|
/*---------------------------------------
|
||||||
* View object
|
* View object
|
||||||
*/
|
*/
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("ResourceFormLabel_ref").'</td><td>';
|
|
||||||
$linkback = $objet->ref.' <a href="list.php">'.$langs->trans("BackToList").'</a>';
|
|
||||||
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Resource type
|
// Resource type
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $object->type_label;
|
print $object->type_label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -267,10 +279,15 @@ if ( $object->fetch($id) > 0 )
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div><br>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -30,18 +30,19 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
|
|||||||
*/
|
*/
|
||||||
class Dolresource extends CommonObject
|
class Dolresource extends CommonObject
|
||||||
{
|
{
|
||||||
var $element='dolresource'; //!< Id that identify managed objects
|
public $element='dolresource'; //!< Id that identify managed objects
|
||||||
var $table_element='resource'; //!< Name of table without prefix where object is stored
|
public $table_element='resource'; //!< Name of table without prefix where object is stored
|
||||||
|
public $picto = 'resource';
|
||||||
|
|
||||||
var $resource_id;
|
public $resource_id;
|
||||||
var $resource_type;
|
public $resource_type;
|
||||||
var $element_id;
|
public $element_id;
|
||||||
var $element_type;
|
public $element_type;
|
||||||
var $busy;
|
public $busy;
|
||||||
var $mandatory;
|
public $mandatory;
|
||||||
var $fk_user_create;
|
public $fk_user_create;
|
||||||
var $type_label;
|
public $type_label;
|
||||||
var $tms='';
|
public $tms='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -974,4 +975,30 @@ class Dolresource extends CommonObject
|
|||||||
$result.=$link.$this->ref.$linkend;
|
$result.=$link.$this->ref.$linkend;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retourne le libelle du status d'un user (actif, inactif)
|
||||||
|
*
|
||||||
|
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
|
* @return string Label of status
|
||||||
|
*/
|
||||||
|
function getLibStatut($mode=0)
|
||||||
|
{
|
||||||
|
return $this->LibStatut($this->status,$mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the status
|
||||||
|
*
|
||||||
|
* @param int $status Id status
|
||||||
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 5=Long label + Picto
|
||||||
|
* @return string Label of status
|
||||||
|
*/
|
||||||
|
static function LibStatut($status,$mode=0)
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,23 +119,30 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
|
|
||||||
$head = resource_prepare_head($object);
|
$head = resource_prepare_head($object);
|
||||||
dol_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), 0, 'resource');
|
dol_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), -1, 'resource');
|
||||||
|
|
||||||
|
|
||||||
/*
|
$linkback = '<a href="' . DOL_URL_ROOT . '/resource/list.php' . (! empty($socid) ? '?id=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
* Resource synthese pour rappel
|
|
||||||
*/
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
|
||||||
|
// Object
|
||||||
|
|
||||||
print '<table width="100%" class="border">';
|
print '<table width="100%" class="border">';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("ResourceFormLabel_ref").'</td><td>';
|
|
||||||
$linkback = $objet->ref.' <a href="list.php">'.$langs->trans("BackToList").'</a>';
|
|
||||||
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Resource type
|
// Resource type
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $object->type_label;
|
print $object->type_label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -144,6 +151,8 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
if (! empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser=1;
|
if (! empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser=1;
|
||||||
|
|||||||
@ -89,7 +89,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$head=resource_prepare_head($object);
|
$head=resource_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("ResourceSingular"), 0, 'resource');
|
dol_fiche_head($head, 'documents', $langs->trans("ResourceSingular"), -1, 'resource');
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
@ -101,18 +101,24 @@ if ($object->id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/resource/list.php' . (! empty($socid) ? '?id=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("ResourceFormLabel_ref").'</td><td>';
|
|
||||||
$linkback = $objet->ref.' <a href="list.php">'.$langs->trans("BackToList").'</a>';
|
|
||||||
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Resource type
|
// Resource type
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $object->type_label;
|
print $object->type_label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -124,6 +130,8 @@ if ($object->id)
|
|||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'dolresource';
|
$modulepart = 'dolresource';
|
||||||
$permission = $user->rights->resource->write;
|
$permission = $user->rights->resource->write;
|
||||||
$param = '&id=' . $object->id;
|
$param = '&id=' . $object->id;
|
||||||
|
|||||||
@ -64,24 +64,35 @@ $form = new Form($db);
|
|||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$head = resource_prepare_head($object);
|
$head = resource_prepare_head($object);
|
||||||
dol_fiche_head($head, 'note', $langs->trans('ResourceSingular'), 0, 'resource');
|
dol_fiche_head($head, 'note', $langs->trans('ResourceSingular'), -1, 'resource');
|
||||||
|
|
||||||
|
$linkback = '<a href="' . DOL_URL_ROOT . '/resource/list.php' . (! empty($socid) ? '?id=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
$morehtmlref='<div class="refidno">';
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
|
||||||
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("ResourceFormLabel_ref").'</td><td>';
|
|
||||||
$linkback = $objet->ref.' <a href="list.php">'.$langs->trans("BackToList").'</a>';
|
|
||||||
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Resource type
|
// Resource type
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $object->type_label;
|
print $object->type_label;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'; print "</table>";
|
print '</tr>';
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
$permission=$user->rights->resource->write;
|
$permission=$user->rights->resource->write;
|
||||||
$cssclass='titlefield';
|
$cssclass='titlefield';
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user