コード例 #1
0
 /**
  * Build page
  */
 function _content($params)
 {
     $html = '';
     // True if there is sth to import in dst project.
     $sthToImport = false;
     $mdCmp = new Docman_MetadataComparator($this->srcGo->getGroupId(), $this->dstGo->getGroupId(), $params['theme_path']);
     $html .= $mdCmp->getMetadataCompareTable($sthToImport);
     $html .= $this->getImportForm($sthToImport);
     echo $html;
 }
コード例 #2
0
 function checkMdDifferences(&$mdDiffers)
 {
     $html = '';
     $mdCmp = new Docman_MetadataComparator($this->srcGo->getGroupId(), $this->dstGo->getGroupId(), $this->_controller->getThemePath());
     $cmpTable = $mdCmp->getMetadataCompareTable($sthToImport);
     if ($sthToImport) {
         $html .= '<h2>' . $GLOBALS['Language']->getText('plugin_docman', 'details_paste_mddiff_title') . '</h2>';
         $dPm =& Docman_PermissionsManager::instance($this->dstGo->getGroupId());
         if ($dPm->currentUserCanAdmin()) {
             $mdDiffers = 'admin';
             $html .= $cmpTable;
         } else {
             $mdDiffers = 'user';
             $docmanIcons = $this->_getDocmanIcons();
             $html .= $GLOBALS['Language']->getText('plugin_docman', 'details_paste_mddiff_noadmin', array($this->srcGo->getPublicName(), $this->dstGo->getPublicName(), $docmanIcons->getThemeIcon('warning.png')));
         }
     }
     return $html;
 }