';
+ print '
';
+ print '
';
+ print '
'."\n";
+
+ // Common attributes
+ //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field
+ //unset($object->fields['fk_project']); // Hide field already shown in banner
+ //unset($object->fields['fk_soc']); // Hide field already shown in banner
+ include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
+
+ // Other attributes. Fields from hook formObjectOptions and Extrafields.
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
+
+ print '
';
+ print '
';
+
+ print '
';
+
+ print dol_get_fiche_end();
+
+ // Buttons for actions
+
+ if ($action != 'presend') {
+ print '
'."\n";
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ if ($reshook < 0) {
+ setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+ }
+
+ if (empty($reshook)) {
+
+ if ($object->status == $object::STATUS_DRAFT) {
+ print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?socid='.$socid.'&action=edit', '', $permissiontoadd);
+ }
+
+ // Cancel
+ if ($permissiontoadd) {
+ if ($object->status == $object::STATUS_ACCEPTED) {
+ print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd);
+ }
+ }
+ }
+ print '
'."\n";
+ }
+
+
+ // Select mail models is same action as presend
+ if (GETPOST('modelselected')) {
+ $action = 'presend';
+ }
+
+ // if ($action != 'presend') {
+ // print '
';
+ // print '
'; // ancre
+
+ // $includedocgeneration = 0;
+
+ // // Documents
+ // if ($includedocgeneration) {
+ // $objref = dol_sanitizeFileName($object->ref);
+ // $relativepath = $objref.'/'.$objref.'.pdf';
+ // $filedir = $conf->partnership->dir_output.'/'.$object->element.'/'.$objref;
+ // $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
+ // $genallowed = $user->rights->partnership->read; // If you can read, you can build the PDF to read content
+ // $delallowed = $user->rights->partnership->write; // If you can create/edit, you can remove a file on card
+ // print $formfile->showdocuments('partnership:Partnership', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
+ // }
+
+ // // Show links to link elements
+ // $linktoelem = $form->showLinkToObjectBlock($object, null, array('partnership'));
+ // $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
+
+
+ // print '
';
+
+ // $MAXEVENT = 10;
+
+ // $morehtmlright = '
';
+ // $morehtmlright .= $langs->trans("SeeAll");
+ // $morehtmlright .= '';
+
+ // // List of actions on element
+ // include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
+ // $formactions = new FormActions($db);
+ // $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright);
+
+ // print '
';
+ // }
+
+ //Select mail models is same action as presend
+ if (GETPOST('modelselected')) {
+ $action = 'presend';
+ }
+
+ // Presend form
+ $modelmail = 'partnership';
+ $defaulttopic = 'InformationMessage';
+ $diroutput = $conf->partnership->dir_output;
+ $trackid = 'partnership'.$object->id;
+
+ include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
+}
+
+// End of page
+llxFooter();
+$db->close();