';
+$out .= '
';
$out .= '
';
$out .= '
'.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).'
';
$out .= '
'.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'
';
-$out .= '
';
-$out .='
trans("Cancel").'" />';
+$out .= '
';
+$out .='';
$out .= '
';
$out .='';
@@ -40,6 +37,4 @@ $out .= '
';
print $out;
-
-
// FIN DU TPL
diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php
index 75a69996603..3b846e9314c 100644
--- a/htdocs/core/tpl/resource_view.tpl.php
+++ b/htdocs/core/tpl/resource_view.tpl.php
@@ -6,36 +6,32 @@ $form= new Form($db);
if( (array) $linked_resources && count($linked_resources) > 0)
{
- $var=false;
+ $var=true;
// TODO: DEBUT DU TPL
if($mode == 'edit' )
{
-
print '
';
-
}
else
{
-
print '
';
-
}
@@ -55,7 +51,7 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print '
'.$object_resource->type_label.'
';
print '
'.$object_resource->getNomUrl(1).'
';
- print '
'.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).'
';
+ print '
'.$form->selectyesno('busy',$linked_resource['busy']?1:0,1).'
';
print '
'.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'
';
print '
';
print '';
@@ -77,20 +73,20 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print $object_resource->getNomUrl(1);
print '
';
- print '
';
- print $linked_resource['busy']?1:0;
+ print '
';
+ print yn($linked_resource['busy']);
print '
';
- print '
';
- print $linked_resource['mandatory']?1:0;
+ print '
';
+ print yn($linked_resource['mandatory']);
print '
';
- print '
';
+ print '
';
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index 6b6b5553d72..123673654c9 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -72,6 +72,11 @@ $mandatory = GETPOST('mandatory','int');
$cancel = GETPOST('cancel','alpha');
$confirm = GETPOST('confirm','alpha');
+
+/*
+ * Actions
+ */
+
if($action == 'add_element_resource' && ! $cancel)
{
$objstat = fetchObjectByElement($element_id,$element);
@@ -147,19 +152,17 @@ $reshook=$hookmanager->executeHooks('getElementResources',$parameters,$object,$a
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
-/***************************************************
- * VIEW
-*
-* Put here all code to build page
-****************************************************/
+
+/*
+ * View
+ */
+
+$form=new Form($db);
$pagetitle=$langs->trans('ResourceElementPage');
llxHeader('',$pagetitle,'');
-$form=new Form($db);
-
-
// Load available resource, declared by modules
$ret = count($object->available_resources);
if($ret == -1) {
@@ -212,16 +215,17 @@ else
print '
| '.$langs->trans("Title").' | '.$act->label.' |
';
print '';
- print '
';
+ dol_fiche_end();
}
}
+
/*
* Specific to thirdparty module
*/
- if($element_id && $element == 'societe')
+ if ($element_id && $element == 'societe')
{
$socstatic = fetchObjectByElement($element_id,$element);
- if(is_object($socstatic)) {
+ if (is_object($socstatic)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
$head = societe_prepare_head($socstatic);
@@ -240,13 +244,13 @@ else
print '';
print '';
- print '
';
+ dol_fiche_end();
}
}
- print_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','resource.png@resource');
+ //print_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','');
@@ -257,7 +261,8 @@ else
{
$element_prop = getElementProperties($resource_obj);
- print_titre($langs->trans(ucfirst($element_prop['element']).'Singular'));
+
+
//print '/'.$modresources.'/class/'.$resource_obj.'.class.php
';
@@ -267,21 +272,21 @@ else
$linked_resources = $object->getElementResources($element,$element_id,$resource_obj);
- if ( $mode == 'add' && $resource_obj == $resource_type)
+
+ // If we have a specific template we use it
+ if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_add.tpl.php')))
{
- // If we have a specific template we use it
- if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_'.$mode.'.tpl.php')))
- {
- $res=include dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_'.$mode.'.tpl.php');
- }
- else
- {
- $res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php';
- }
+ $res=include dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_add.tpl.php');
}
else
{
- //print '/'.$element_prop['module'].'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php';
+ $res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_add.tpl.php';
+ }
+
+
+ if ($mode != 'add' || $resource_obj != $resource_type)
+ {
+ //print_titre($langs->trans(ucfirst($element_prop['element']).'Singular'));
// If we have a specific template we use it
if(file_exists(dol_buildpath($path.'/core/tpl/resource_'.$element_prop['element'].'_view.tpl.php')))
@@ -294,15 +299,6 @@ else
$res=include DOL_DOCUMENT_ROOT . '/core/tpl/resource_view.tpl.php';
}
}
-
- if($resource_obj!=$resource_type )
- {
- print '
';
- }
}
}
}
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index dd304dae7c1..6a7de1143bf 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -448,7 +448,17 @@ textarea.centpercent {
#formuserfile_link {
margin-left: 1px;
}
-
+/* Style to move picto into left of button */
+/*
+.buttonactionview {
+ padding-left: 15px;
+}
+.pictoactionview {
+ padding-left: 10px;
+ margin-right: -24px;
+ z-index: 999999;
+}
+*/
/* ============================================================================== */
/* Styles to hide objects */