mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Look and feel v6
This commit is contained in:
parent
71bd69a804
commit
5ebe711665
|
|
@ -221,29 +221,41 @@ if ( $object->fetch($id) > 0 )
|
|||
}
|
||||
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
|
||||
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
|
||||
*/
|
||||
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
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td>';
|
||||
print $object->type_label;
|
||||
print '</td>';
|
||||
|
|
@ -267,9 +279,14 @@ if ( $object->fetch($id) > 0 )
|
|||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div><br>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
|
|
|
|||
|
|
@ -30,18 +30,19 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php";
|
|||
*/
|
||||
class Dolresource extends CommonObject
|
||||
{
|
||||
var $element='dolresource'; //!< Id that identify managed objects
|
||||
var $table_element='resource'; //!< Name of table without prefix where object is stored
|
||||
|
||||
var $resource_id;
|
||||
var $resource_type;
|
||||
var $element_id;
|
||||
var $element_type;
|
||||
var $busy;
|
||||
var $mandatory;
|
||||
var $fk_user_create;
|
||||
var $type_label;
|
||||
var $tms='';
|
||||
public $element='dolresource'; //!< Id that identify managed objects
|
||||
public $table_element='resource'; //!< Name of table without prefix where object is stored
|
||||
public $picto = 'resource';
|
||||
|
||||
public $resource_id;
|
||||
public $resource_type;
|
||||
public $element_id;
|
||||
public $element_type;
|
||||
public $busy;
|
||||
public $mandatory;
|
||||
public $fk_user_create;
|
||||
public $type_label;
|
||||
public $tms='';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -974,4 +975,30 @@ class Dolresource extends CommonObject
|
|||
$result.=$link.$this->ref.$linkend;
|
||||
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);
|
||||
dol_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), 0, 'resource');
|
||||
dol_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), -1, 'resource');
|
||||
|
||||
|
||||
/*
|
||||
* Resource synthese pour rappel
|
||||
*/
|
||||
$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>';
|
||||
|
||||
|
||||
// Object
|
||||
|
||||
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
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td>';
|
||||
print $object->type_label;
|
||||
print '</td>';
|
||||
|
|
@ -144,6 +151,8 @@ if ($id > 0 || ! empty($ref))
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<br>';
|
||||
|
||||
if (! empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser=1;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ if ($object->id)
|
|||
|
||||
$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
|
||||
|
|
@ -100,19 +100,25 @@ if ($object->id)
|
|||
$totalsize+=$file['size'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$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 '<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
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td>';
|
||||
print $object->type_label;
|
||||
print '</td>';
|
||||
|
|
@ -124,6 +130,8 @@ if ($object->id)
|
|||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
$modulepart = 'dolresource';
|
||||
$permission = $user->rights->resource->write;
|
||||
$param = '&id=' . $object->id;
|
||||
|
|
|
|||
|
|
@ -64,24 +64,35 @@ $form = new Form($db);
|
|||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$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 '<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
|
||||
print '<tr>';
|
||||
print '<td>' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td class="titlefield">' . $langs->trans("ResourceType") . '</td>';
|
||||
print '<td>';
|
||||
print $object->type_label;
|
||||
print '</td>';
|
||||
print '</tr>'; print "</table>";
|
||||
print '</tr>';
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
print '</div>';
|
||||
|
||||
$permission=$user->rights->resource->write;
|
||||
$cssclass='titlefield';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user