function getMetaDataValuesTable($groupId, $mdId, $vals)
 {
     $mdf = new Docman_MetadataFactory($groupId);
     $mdLabel = $mdf->getLabelFromId($mdId);
     $mlvef = new Docman_MetadataListOfValuesElementFactory($mdId);
     $mlveIter = $mlvef->getIteratorByFieldId($mdId, $mdLabel, true);
     $html = '<h3>' . $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_confidentiality_field_values') . '</h3>';
     $html .= '<p>' . $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_select_field_values');
     $html .= '<form name="metadata_field_values" method="post" action="?group_id=' . $groupId . '&action=admin_set_watermark_metadata_values">';
     $titles = array();
     $titles[] = $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_use_watermark');
     $titles[] = $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_values');
     $mlveIter->rewind();
     $iter_empty = 1;
     if ($mlveIter->valid()) {
         $iter_empty = 0;
         $html .= html_build_list_table_top($titles, false, false, false);
     }
     $i = 1;
     while ($mlveIter->valid()) {
         $mdv = $mlveIter->current();
         $id = $mdv->getId();
         if (isset($vals['value_id'])) {
             $posValue = array_search($id, $vals['value_id']);
         } else {
             $posValue = false;
         }
         // exclude status field and None Value
         if ($id != 100 && $mdv->getName() != 'Status') {
             $name = $mdv->getName();
             $html .= '<tr class="' . html_get_alt_row_color($i) . '"><td align="center"><input type="checkbox" name="chk_' . $id . '"';
             if ($vals['watermark'][$posValue] == 1 && $posValue !== false) {
                 $html .= ' checked ';
             }
             $html .= '/></td>';
             $html .= '<td><b>' . $name . '</b></td>';
             $html .= '</tr>';
             $i++;
         }
         $mlveIter->next();
     }
     if (!$iter_empty) {
         $html .= '</table>';
         $html .= '<input name="submit_metadatafield_value" type="submit" value="' . $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_save_settings') . '">';
     } else {
         $html .= '<b>' . $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_disabled') . '</b>';
     }
     $html .= '</form>';
     return $html;
 }
 /**
  * Public Method to create the watermark metadata map in the target project (customized for the import purpose)
  * @param  Docman_Metadata object dm: the metadata object to be checked
  * @return array ('md' => int matched metadataId, 'love' => related loves)
  */
 public function getWatermarkMetadataMap($md)
 {
     // get the metadata iterator from target project
     $dmd = new Docman_MetadataDao(CodendiDataAccess::instance());
     $dar = $dmd->searchByName($this->targetProjectId, $md->getName());
     // if the name doesn't match then return md = 0
     $dar->rewind();
     if (!$dar->valid()) {
         return array('md' => 0, 'love' => array());
     } else {
         // check metadata properties type, useIt, AllowMultipleValue if it doesn't much then return md = 0
         while ($dar->valid()) {
             $row = $dar->current();
             if ($row['use_it'] == $md->isUsed() && $row['data_type'] == $md->getType() && $row['mul_val_ok'] == $md->isMultipleValuesAllowed()) {
                 // it seams that the metadata is ok
                 // check now if source Metadata values already exist
                 $dmlovef = new Docman_MetadataListOfValuesElementFactory($md->getId());
                 $loveIter = $dmlovef->getIteratorByFieldId($md->getId(), $md->getLabel(), true);
                 $dmloveft = new Docman_MetadataListOfValuesElementFactory($row['field_id']);
                 $loveIter->rewind();
                 $i = 0;
                 $loves = array();
                 while ($loveIter->valid()) {
                     $love = $loveIter->current();
                     $lovetIter = $dmloveft->getByName($love->getName(), $row['field_id'], true);
                     $lovetIter->rewind();
                     if (!$lovetIter->valid()) {
                         return array('md' => 0, 'love' => array());
                     }
                     $lovet = $lovetIter->current();
                     $dwmdvf = new DocmanWatermark_MetadataValueFactory();
                     $loves[$i]['value_id'] = $lovet->getId();
                     $loves[$i]['watermark'] = $dwmdvf->isWatermarkedOnValue($love->getId());
                     $i++;
                     $loveIter->next();
                 }
                 return array('md' => $row['field_id'], 'love' => $loves);
             }
             $dar->next();
         }
         return array('md' => 0, 'love' => array());
     }
 }
Пример #3
0
 /**
  * Should be transfered in Docman_Metadata
  * @param DOMDocument $doc
  * @return DOMNode
  */
 public function getMetadataDef(DOMDocument $doc)
 {
     $propdefs = $doc->createElement('propdefs');
     $mdFactory = new Docman_MetadataFactory($this->groupId);
     foreach ($mdFactory->getRealMetadataList() as $metadata) {
         $propdef = $doc->createElement('propdef');
         $propdef->setAttribute('name', $metadata->getName());
         switch ($metadata->getType()) {
             case PLUGIN_DOCMAN_METADATA_TYPE_TEXT:
                 $type = 'text';
                 break;
             case PLUGIN_DOCMAN_METADATA_TYPE_STRING:
                 $type = 'string';
                 break;
             case PLUGIN_DOCMAN_METADATA_TYPE_DATE:
                 $type = 'date';
                 break;
             case PLUGIN_DOCMAN_METADATA_TYPE_LIST:
                 $type = 'list';
                 break;
         }
         $propdef->setAttribute('type', $type);
         $propdef->setAttribute('multivalue', $metadata->getIsMultipleValuesAllowed() ? 'true' : 'false');
         $propdef->setAttribute('empty', $metadata->getIsEmptyAllowed() ? 'true' : 'false');
         if ($metadata->getType() == PLUGIN_DOCMAN_METADATA_TYPE_LIST) {
             $loveFactory = new Docman_MetadataListOfValuesElementFactory($metadata->getId());
             foreach ($loveFactory->getListByFieldId($metadata->getId(), $metadata->getLabel(), true) as $love) {
                 if ($love->getId() != 100) {
                     $value = $doc->createElement('value');
                     $value->appendChild($doc->createTextNode($love->getName()));
                     $propdef->appendChild($value);
                 }
             }
         }
         $propdefs->appendChild($propdef);
     }
     return $propdefs;
 }
 function delete($md)
 {
     $deleted = false;
     // Delete Md
     $dao =& $this->getDao();
     $delMd = $dao->delete($md->getId());
     if ($delMd) {
         // Delete LoveElements if needed
         $delLove = false;
         if ($md->getType() == PLUGIN_DOCMAN_METADATA_TYPE_LIST) {
             $loveFactory = new Docman_MetadataListOfValuesElementFactory($md->getId());
             $delLove = $loveFactory->deleteByMetadataId();
         } else {
             $delLove = true;
         }
         if ($delLove) {
             $deleted = true;
             // Delete corresponding values
             //$mdvFactory = new Docman_MetadataValueFactory($this->groupId);
             //$deleted = $mdvFactory->deleteByMetadata($md);
         }
     }
     return $deleted;
 }
 function _dispatch($view)
 {
     $user = $this->getUser();
     $dpm = Docman_PermissionsManager::instance($this->getGroupId());
     switch ($view) {
         case 'admin_watermark':
             $group_id = $this->request->get('group_id');
             $dwmdf = new DocmanWatermark_MetadataFactory();
             $md_id = $dwmdf->getMetadataIdFromGroupId($group_id);
             $this->_viewParams['md_id'] = $md_id;
             $this->_viewParams['group_id'] = $group_id;
             $md_arr = array();
             $dmf = new Docman_MetadataFactory($group_id);
             $mdIter = $dmf->getMetadataForGroup(true);
             $mdIter->rewind();
             while ($mdIter->valid()) {
                 $md = $mdIter->current();
                 $md_arr[] = $md->getId();
                 $mdIter->next();
             }
             if ($md_id != 0 && !in_array($md_id, $md_arr)) {
                 $this->feedback->log('warning', $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_metadata_deleted'));
             }
             $this->view = 'AdminWatermark';
             break;
         case 'admin_set_watermark_metadata':
             $group_id = $this->request->get('group_id');
             $id = $this->request->get('md_id');
             $this->_actionParams['group_id'] = $group_id;
             $this->_actionParams['md_id'] = $id;
             $dwm = new DocmanWatermark_Metadata();
             $dwm->setId($id);
             $dwm->setGroupId($group_id);
             $this->action = 'setup_metadata';
             $this->feedback->log('info', $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_update_metadata'));
             $this->_viewParams['redirect_to'] = '?group_id=' . $group_id . '&action=admin_watermark';
             $this->view = 'RedirectAfterCrud';
             break;
         case 'admin_set_watermark_metadata_values':
             $mdf = new Docman_MetadataFactory($this->request->get('group_id'));
             $dwmf = new DocmanWatermark_MetadataFactory();
             $md_id = $dwmf->getMetadataIdFromGroupId($this->request->get('group_id'));
             $mdLabel = $mdf->getLabelFromId($md_id);
             $mlvef = new Docman_MetadataListOfValuesElementFactory($md_id);
             $mlveIter = $mlvef->getIteratorByFieldId($md_id, $mdLabel, true);
             $mlveIter->rewind();
             $arrValues = array();
             $arrVals = array();
             while ($mlveIter->valid()) {
                 $dmv = $mlveIter->current();
                 $dwmv = new DocmanWatermark_MetadataValue();
                 if ($this->request->exist('chk_' . $dmv->getId())) {
                     $watermark = 1;
                 } else {
                     $watermark = 0;
                 }
                 $dwmv->setValueId($dmv->getId());
                 $dwmv->setWatermark($watermark);
                 $arrValues[] = $dwmv;
                 $arrVals['value_id'][] = $dmv->getId();
                 $arrVals['watermark'][] = $watermark;
                 $mlveIter->next();
             }
             $iterValues = new ArrayIterator($arrValues);
             $this->_actionParams['group_id'] = $this->request->get('group_id');
             $this->_actionParams['md_values'] = $iterValues;
             $this->action = 'setup_metadata_values';
             $this->feedback->log('info', $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_update_metadata_values'));
             $this->_viewParams['redirect_to'] = '?group_id=' . $this->request->get('group_id') . '&action=admin_watermark';
             $this->view = 'RedirectAfterCrud';
             break;
         case 'admin_import_from_project':
             $this->_actionParams['src_group_id'] = $this->request->get('project');
             $this->_actionParams['target_group_id'] = $this->request->get('group_id');
             $dwmif = new DocmanWatermark_MetadataImportFactory();
             $dwmif->setSrcProjectId($this->request->get('project'));
             $dwmif->setTargetProjectId($this->request->get('group_id'));
             $dmf = new Docman_MetadataFactory($this->request->get('project'));
             $dwmf = new DocmanWatermark_MetadataFactory();
             $md_id = $dwmf->getMetadataIdFromGroupId($dwmif->getSrcProjectId());
             $mdIter = $dmf->findByName($dwmf->getMetadataNameFromId($md_id));
             $mdIter->rewind();
             $md = $mdIter->current();
             $this->_actionParams['md'] = $md;
             $mdMap = $dwmif->getWatermarkMetadataMap($md);
             if ($mdMap['md'] != 0) {
                 $this->action = 'import_from_project';
                 $this->feedback->log('info', $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_imported_from_project'));
                 $this->_viewParams['md_id'] = $md_id;
                 $this->_viewParams['redirect_to'] = '?group_id=' . $this->request->get('group_id') . '&action=admin_watermark';
             } else {
                 $this->feedback->log('info', $GLOBALS['Language']->getText('plugin_docmanwatermark', 'admin_import_from_project_not_match'));
                 $this->_viewParams['redirect_to'] = '?group_id=' . $this->request->get('group_id') . '&action=admin_import_metadata_check&import_group_id=' . $this->request->get('project');
             }
             $this->view = 'RedirectAfterCrud';
             break;
         case 'docmanwatermark_toggle_item':
             $this->action = 'docmanwatermark_toggle_item';
             break;
         default:
             die(htmlspecialchars($view) . ' is not supported');
             break;
     }
 }
 function validateLove($loveId, $md, &$love)
 {
     $valid = false;
     $loveFactory = new Docman_MetadataListOfValuesElementFactory($md->getId());
     $_love =& $loveFactory->getByElementId($loveId, $md->getLabel());
     if ($_love !== null) {
         // Still Need to verify that $love belong to $md
         $valid = true;
         $love = $_love;
     }
     return $valid;
 }
 function admin_update_love()
 {
     $md = $this->_controler->_actionParams['md'];
     $love = $this->_controler->_actionParams['love'];
     $loveFactory = new Docman_MetadataListOfValuesElementFactory($md->getId());
     $updated = $loveFactory->update($love);
     if ($updated) {
         $this->_controler->feedback->log('info', $GLOBALS['Language']->getText('plugin_docman', 'admin_metadata_element_update'));
         $this->_controler->view = 'RedirectAfterCrud';
         $this->_controler->_viewParams['default_url_params'] = array('action' => 'admin_md_details', 'md' => $md->getLabel());
     } else {
         $this->_controler->feedback->log('error', $GLOBALS['Language']->getText('plugin_docman', 'admin_metadata_element_not_update'));
         $this->_controler->view = 'RedirectAfterCrud';
         $this->_controler->_viewParams['default_url_params'] = array('action' => 'admin_display_love', 'md' => $md->getLabel(), 'loveid' => $love->getId());
     }
 }
 /**
  * Returns the list of values for the given list metadata.
  */
 function getMetadataListOfValues()
 {
     $request =& $this->_controler->request;
     $groupId = $request->get('group_id');
     $metadataFactory = new Docman_MetadataFactory($groupId);
     $metadataLovFactory = new Docman_MetadataListOfValuesElementFactory();
     $label = $request->get('label');
     $md = $metadataFactory->getFromLabel($label);
     $res = array();
     if ($md->getType() == PLUGIN_DOCMAN_METADATA_TYPE_LIST) {
         foreach ($metadataLovFactory->getListByFieldId($md->id, $md->label, true) as $val) {
             $res[] = $val;
         }
     }
     $this->_controler->_viewParams['action_result'] = $res;
 }
 /**
  * Try to find matching values between 2 metadata
  */
 function getLoveMapping($md, $dstMdId, &$metadataMapping)
 {
     // Special treatement for value 'Any' that is not recorded in the DB but
     // that is always 0.
     $metadataMapping['love'][0] = 0;
     $loveArray = $this->getListByFieldId($md->getId(), $md->getLabel(), true);
     $loveIter = new ArrayIterator($loveArray);
     $loveIter->rewind();
     while ($loveIter->valid()) {
         $love = $loveIter->current();
         $dstLoveFactory = new Docman_MetadataListOfValuesElementFactory($dstMdId);
         $ei = $dstLoveFactory->getByName($love->getName(), $md->getLabel());
         if ($ei->count() == 1) {
             // Found exactly one name that match
             $ei->rewind();
             $dstLove = $ei->current();
             // Mapping in both sense to make the usage of the map
             // easier
             $metadataMapping['love'][$love->getId()] = $dstLove->getId();
             $metadataMapping['love'][$dstLove->getId()] = $love->getId();
         }
         $loveIter->next();
     }
 }
Пример #10
0
 function fetchLogsForItem($item_id, $display_access_logs)
 {
     $html = '';
     $uh = UserHelper::instance();
     $hp = Codendi_HTMLPurifier::instance();
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs') . '</h3>';
     $dar = $this->dao->searchByItemIdOrderByTimestamp($item_id);
     if ($dar && !$dar->isError()) {
         if ($dar->valid()) {
             $titles = array();
             $titles[] = $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_when');
             $titles[] = $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_who');
             $titles[] = $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_what');
             $titles[] = $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_old_value');
             $titles[] = $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_new_value');
             $html .= html_build_list_table_top($titles, false, false, false);
             $odd_even = array('boxitem', 'boxitemalt');
             $i = 0;
             $_previous_date = -1;
             $_previous_auth = -1;
             while ($dar->valid()) {
                 $row = $dar->current();
                 if ($row['type'] != PLUGIN_DOCMAN_EVENT_ACCESS || $display_access_logs) {
                     $user = $row['user_id'] ? $hp->purify($uh->getDisplayNameFromUserId($row['user_id'])) : $GLOBALS['Language']->getText('plugin_docman', 'details_history_anonymous');
                     $html .= '<tr class="' . $odd_even[$i++ % count($odd_even)] . '">';
                     $html .= '<td>' . html_time_ago($row['time']) . '</td>';
                     $html .= '<td>' . $user . '</td>';
                     if ($row['type'] == PLUGIN_DOCMAN_EVENT_METADATA_UPDATE) {
                         $_old_v = $row['old_value'];
                         $_new_v = $row['new_value'];
                         $mdFactory = new Docman_MetadataFactory($row['group_id']);
                         $md =& $mdFactory->getFromLabel($row['field']);
                         if ($md->getType() == PLUGIN_DOCMAN_METADATA_TYPE_LIST) {
                             $mdlovebo = new Docman_MetadataListOfValuesElementFactory();
                             $_old_e =& $mdlovebo->getByElementId($row['old_value'], $md->getLabel());
                             $_new_e =& $mdlovebo->getByElementId($row['new_value'], $md->getLabel());
                             if ($_old_e !== null) {
                                 $_old_v = $_old_e->getName();
                             }
                             if ($_new_e !== null) {
                                 $_new_v = $_new_e->getName();
                             }
                         } else {
                             if ($md->getType() == PLUGIN_DOCMAN_METADATA_TYPE_DATE) {
                                 $_old_v = format_date($GLOBALS['Language']->getText('system', 'datefmt'), $_old_v);
                                 $_new_v = format_date($GLOBALS['Language']->getText('system', 'datefmt'), $_new_v);
                             }
                         }
                         $html .= '<td>' . $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_change_field', array($md->getName())) . '</td>';
                         $html .= '<td>' . $_old_v . '</td>';
                         $html .= '<td>' . $_new_v . '</td>';
                     } elseif ($row['type'] == PLUGIN_DOCMAN_EVENT_WIKIPAGE_UPDATE) {
                         $old_version = $row['old_value'];
                         $new_version = $row['new_value'];
                         $dIF = $this->_getItemFactory($row['group_id']);
                         $pagename = $dIF->getItemFromDb($item_id)->getPageName();
                         $difflink = '/wiki/index.php?group_id=' . $row['group_id'];
                         $difflink .= '&pagename=' . urlencode($pagename) . '&action=diff';
                         $difflink .= '&versions%5b%5d=' . $old_version . '&versions%5b%5d=' . $new_version;
                         $html .= '<td colspan>' . $this->getText($row['type']) . '</td>';
                         $html .= '<td colspan="2" align="center"><a href=' . $difflink . '>diffs</a>';
                     } elseif ($row['type'] == PLUGIN_DOCMAN_EVENT_SET_VERSION_AUTHOR) {
                         $newUser = $row['new_value'];
                         $html .= '<td>' . $this->getText($row['type']) . '</td>';
                         $html .= "<td>&nbsp;</td>";
                         $html .= "<td>{$newUser}</td>";
                     } elseif ($row['type'] == PLUGIN_DOCMAN_EVENT_SET_VERSION_DATE) {
                         $newDate = format_date($GLOBALS['Language']->getText('system', 'datefmt'), $row['new_value']);
                         $html .= '<td>' . $this->getText($row['type']) . '</td>';
                         $html .= "<td>&nbsp;</td>";
                         $html .= "<td>{$newDate}</td>";
                     } elseif ($row['type'] == PLUGIN_DOCMAN_EVENT_DEL_VERSION) {
                         $old_version = $row['old_value'];
                         $html .= '<td>' . $this->getText($row['type']) . '</td>';
                         $html .= '<td colspan="2" align="center">' . $old_version . '</td>';
                     } elseif ($row['type'] == PLUGIN_DOCMAN_EVENT_RESTORE_VERSION) {
                         $versionNumber = $row['old_value'];
                         $html .= '<td>' . $this->getText($row['type']) . '</td>';
                         $html .= '<td colspan="2" align="center">' . $versionNumber . '</td>';
                     } else {
                         $html .= '<td colspan>' . $this->getText($row['type']) . '</td><td colspan="2">&nbsp;</td>';
                     }
                     $html .= '</tr>';
                     $_previous_date = $row['time'];
                     $_previous_auth = $row['user_id'];
                 }
                 $dar->next();
             }
             $html .= '</table>';
         } else {
             $html .= '<div>' . $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_no') . '</div>';
         }
     } else {
         $html .= '<div>' . $GLOBALS['Language']->getText('plugin_docman', 'details_history_logs_error') . '</div>';
         $html .= $dar->isError();
     }
     return $html;
 }
Пример #11
0
 public function getHardCodedMetadataValue($label)
 {
     $value = null;
     switch ($label) {
         case 'title':
             $value = $this->getTitle();
             break;
         case 'description':
             $value = $this->getDescription();
             break;
         case 'owner':
             $value = $this->getOwnerId();
             break;
         case 'create_date':
             $value = $this->getCreateDate();
             break;
         case 'update_date':
             $value = $this->getUpdateDate();
             break;
         case 'status':
             $status = $this->getStatus();
             $status_list = array();
             if ($status !== null) {
                 $status_list[] = Docman_MetadataListOfValuesElementFactory::getStatusList($status);
             }
             $value = new ArrayIterator($status_list);
             break;
         case 'obsolescence_date':
             $value = $this->getObsolescenceDate();
             break;
         case 'rank':
             $value = $this->getRank();
             break;
     }
     return $value;
 }
 /**
  *
  * Same algo used in Docman_View_ItemDetailsSectionPaste::_checkLoveToImport
  */
 function getLoveCompareTable($srcMd, $dstMd, $mdMap, &$sthToImport)
 {
     $html = '';
     if ($srcMd->getLabel() == 'status') {
         // No differences possible with status.
         return $html;
     }
     // Get list of ListOfValues elements from dst project
     $srcLoveFactory = new Docman_MetadataListOfValuesElementFactory($srcMd->getId());
     $srcLoveIter = $srcLoveFactory->getIteratorByFieldId($srcMd->getId(), $srcMd->getLabel(), true);
     // Get list of ListOfValues elements from dst project
     $dstLoveFactory = new Docman_MetadataListOfValuesElementFactory($dstMd->getId());
     $dstLoveIter = $dstLoveFactory->getIteratorByFieldId($dstMd->getId(), $dstMd->getLabel(), true);
     $dstLoveArray = $this->getArrayFromIterator($dstLoveIter, 'getId');
     $maxRow = max($srcLoveIter->count(), $dstLoveIter->count());
     // Keep a trace of matching love
     $matchingLove = array();
     while ($srcLoveIter->valid()) {
         $srcLove = $srcLoveIter->current();
         $rowStyle = 'missing';
         // Compute the differences
         $dstLove = false;
         if (isset($mdMap['love'][$srcLove->getId()])) {
             $dstLove = $dstLoveArray[$mdMap['love'][$srcLove->getId()]];
             $matchingLove[$dstLove->getId()] = true;
             $rowStyle = 'equals';
         } else {
             $sthToImport = true;
         }
         $html .= "<tr>\n";
         // Name
         $html .= "<td style=\"padding-left: 2em;\"></td>\n";
         $html .= "<td>" . Docman_MetadataHtmlList::_getElementName($srcLove) . "</td>\n";
         // Presence in source project
         $html .= '<td align="center"><img src="' . $this->docmanIcons->getThemeIcon('tick.png') . '" /></td>';
         // Presence in destination project
         $html .= "<td align=\"center\">";
         switch ($rowStyle) {
             case 'equals':
                 $html .= '<img src="' . $this->docmanIcons->getThemeIcon('tick.png') . '" />';
                 break;
         }
         $html .= "</td>\n";
         // Differences
         $html .= "<td class=\"docman_md_" . $rowStyle . "\">";
         switch ($rowStyle) {
             case 'missing':
                 $html .= $GLOBALS['Language']->getText('plugin_docman', 'admin_md_import_tbl_status_' . $rowStyle);
         }
         $html .= "</td>\n";
         // Action
         $html .= "<td>";
         switch ($rowStyle) {
             case 'missing':
                 $html .= $GLOBALS['Language']->getText('plugin_docman', 'admin_md_import_tbl_act_import_love', array($srcLove->getName()));
         }
         $html .= "</td\n>";
         $html .= "</tr>\n";
         $srcLoveIter->next();
     }
     // Append to the table the list of values elements in the dst project
     // that where not present in the src project.
     foreach ($dstLoveArray as $love) {
         if (!isset($matchingLove[$love->getId()])) {
             $html .= "<tr>\n";
             // Name
             $html .= "<td>&nbsp;</td>\n";
             $html .= "<td>" . $love->getName() . "</td>\n";
             // Presence in source project
             $html .= "<td></td>\n";
             // Presence in destination project
             $html .= '<td align="center"><img src="' . $this->docmanIcons->getThemeIcon('tick.png') . '" /></td>';
             // Differences
             $html .= "<td></td>\n";
             // Action
             $html .= "<td></td>\n";
             $html .= "</tr>\n";
         }
     }
     return $html;
 }