当前位置: 首页>>代码示例>>PHP>>正文


PHP DocumentRevision::get_document_revision_name方法代码示例

本文整理汇总了PHP中DocumentRevision::get_document_revision_name方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentRevision::get_document_revision_name方法的具体用法?PHP DocumentRevision::get_document_revision_name怎么用?PHP DocumentRevision::get_document_revision_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DocumentRevision的用法示例。


在下文中一共展示了DocumentRevision::get_document_revision_name方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SubPanelTiles

$xtpl->assign("FILE_URL_NOIMAGE", $focus->file_url_noimage);
$xtpl->assign("LAST_REV_CREATOR", $focus->last_rev_created_name);
if (isset($focus->last_rev_create_date)) {
    $xtpl->assign("LAST_REV_DATE", $focus->last_rev_create_date);
} else {
    $xtpl->assign("LAST_REV_DATE", "");
}
$xtpl->assign("DOCUMENT_REVISION_ID", $focus->document_revision_id);
$detailView->processListNavigation($xtpl, "DOCUMENT", $offset);
$xtpl->parse("main.open_source");
if (!empty($focus->related_doc_id)) {
    $xtpl->assign("RELATED_DOCUMENT_NAME", Document::get_document_name($focus->related_doc_id));
}
if (!empty($focus->related_doc_rev_id)) {
    $xtpl->assign("RELATED_DOC_REV_ID", $focus->related_doc_rev_id);
    $xtpl->assign("RELATED_DOCUMENT_VERSION", DocumentRevision::get_document_revision_name($focus->related_doc_rev_id));
}
if (!empty($focus->is_template) && $focus->is_template == 1) {
    $xtpl->assign("IS_TEMPLATE_CHECKED", "checked");
}
if (!empty($focus->template_type)) {
    $xtpl->assign("TEMPLATE_TYPE", $app_list_strings['document_template_type_dom'][$focus->template_type]);
}
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
$xtpl->parse("main");
$xtpl->out("main");
require_once 'include/SubPanel/SubPanelTiles.php';
$subpanel = new SubPanelTiles($focus, 'Documents');
echo $subpanel->display();
require_once 'modules/SavedSearch/SavedSearch.php';
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:DetailView.php

示例2: fill_in_additional_detail_fields

 function fill_in_additional_detail_fields()
 {
     global $theme;
     global $current_language;
     global $timedate;
     global $locale;
     parent::fill_in_additional_detail_fields();
     $mod_strings = return_module_language($current_language, 'Documents');
     $query = "SELECT filename,revision,file_ext FROM document_revisions WHERE id='{$this->document_revision_id}'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     //popuplate filename
     if (isset($row['filename'])) {
         $this->filename = $row['filename'];
     }
     //$this->latest_revision = $row['revision'];
     if (isset($row['revision'])) {
         $this->revision = $row['revision'];
     }
     //populate the file url.
     //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions.
     //if file is not found then default image file will be used.
     global $img_name;
     global $img_name_bare;
     if (!empty($row['file_ext'])) {
         $img_name = SugarThemeRegistry::current()->getImageURL(strtolower($row['file_ext']) . "_image_inline.gif");
         $img_name_bare = strtolower($row['file_ext']) . "_image_inline";
     }
     //set default file name.
     if (!empty($img_name) && file_exists($img_name)) {
         $img_name = $img_name_bare;
     } else {
         $img_name = "def_image_inline";
         //todo change the default image.
     }
     if ($this->ACLAccess('DetailView')) {
         $this->file_url = "<a href='index.php?entryPoint=download&id=" . basename(UploadFile::get_url($this->filename, $this->document_revision_id)) . "&type=Documents' target='_blank'>" . SugarThemeRegistry::current()->getImage($img_name, 'alt="' . $mod_strings['LBL_LIST_VIEW_DOCUMENT'] . '"  border="0"') . "</a>";
         $this->file_url_noimage = basename(UploadFile::get_url($this->filename, $this->document_revision_id));
     } else {
         $this->file_url = "";
         $this->file_url_noimage = "";
     }
     //get last_rev_by user name.
     $query = "SELECT first_name,last_name, document_revisions.date_entered as rev_date FROM users, document_revisions WHERE users.id = document_revisions.created_by and document_revisions.id = '{$this->document_revision_id}'";
     $result = $this->db->query($query, true, "Eror fetching user name: ");
     $row = $this->db->fetchByAssoc($result);
     if (!empty($row)) {
         $this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
         $this->last_rev_create_date = $timedate->to_display_date_time($row['rev_date']);
     }
     global $app_list_strings;
     if (!empty($this->status_id)) {
         //_pp($this->status_id);
         $this->status = $app_list_strings['document_status_dom'][$this->status_id];
     }
     $this->related_doc_name = Document::get_document_name($this->related_doc_id);
     $this->related_doc_rev_number = DocumentRevision::get_document_revision_name($this->related_doc_rev_id);
     $this->save_file = basename($this->file_url_noimage);
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:59,代码来源:Document.php

示例3: testget_document_revision_name

 public function testget_document_revision_name()
 {
     $documentRevision = new DocumentRevision();
     $result = $documentRevision->get_document_revision_name(1);
     $this->assertEquals(null, $result);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:6,代码来源:DocumentRevisionTest.php

示例4: fill_in_additional_detail_fields

 function fill_in_additional_detail_fields()
 {
     global $theme;
     global $current_language;
     global $timedate;
     global $locale;
     parent::fill_in_additional_detail_fields();
     $mod_strings = return_module_language($current_language, 'Documents');
     if (!empty($this->document_revision_id)) {
         $query = "SELECT users.first_name AS first_name, users.last_name AS last_name, document_revisions.date_entered AS rev_date,\n            \t document_revisions.filename AS filename, document_revisions.revision AS revision,\n            \t document_revisions.file_ext AS file_ext, document_revisions.file_mime_type AS file_mime_type\n            \t FROM users, document_revisions\n            \t WHERE users.id = document_revisions.created_by AND document_revisions.id = '{$this->document_revision_id}'";
         $result = $this->db->query($query);
         $row = $this->db->fetchByAssoc($result);
         //populate name
         if (isset($this->document_name)) {
             $this->name = $this->document_name;
         }
         if (isset($row['filename'])) {
             $this->filename = $row['filename'];
         }
         //$this->latest_revision = $row['revision'];
         if (isset($row['revision'])) {
             $this->revision = $row['revision'];
         }
         //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions.
         //if file is not found then default image file will be used.
         global $img_name;
         global $img_name_bare;
         if (!empty($row['file_ext'])) {
             $img_name = SugarThemeRegistry::current()->getImageURL(strtolower($row['file_ext']) . "_image_inline.gif");
             $img_name_bare = strtolower($row['file_ext']) . "_image_inline";
         }
     }
     //set default file name.
     if (!empty($img_name) && file_exists($img_name)) {
         $img_name = $img_name_bare;
     } else {
         $img_name = "def_image_inline";
         //todo change the default image.
     }
     if ($this->ACLAccess('DetailView')) {
         if (!empty($this->doc_type) && $this->doc_type != 'Sugar' && !empty($this->doc_url)) {
             $file_url = "<a href='" . $this->doc_url . "' target='_blank'>" . SugarThemeRegistry::current()->getImage($this->doc_type . '_image_inline', 'border="0"', null, null, '.png', $mod_strings['LBL_LIST_VIEW_DOCUMENT']) . "</a>";
         } else {
             $file_url = "<a href='index.php?entryPoint=download&id={$this->document_revision_id}&type=Documents' target='_blank'>" . SugarThemeRegistry::current()->getImage($img_name, 'border="0"', null, null, '.gif', $mod_strings['LBL_LIST_VIEW_DOCUMENT']) . "</a>";
         }
         $this->file_url = $file_url;
         $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}";
     } else {
         $this->file_url = "";
         $this->file_url_noimage = "";
     }
     //get last_rev_by user name.
     if (!empty($row)) {
         $this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
         $this->last_rev_create_date = $timedate->to_display_date_time($this->db->fromConvert($row['rev_date'], 'datetime'));
         $this->last_rev_mime_type = $row['file_mime_type'];
     }
     global $app_list_strings;
     if (!empty($this->status_id)) {
         //_pp($this->status_id);
         $this->status = $app_list_strings['document_status_dom'][$this->status_id];
     }
     if (!empty($this->related_doc_id)) {
         $this->related_doc_name = Document::get_document_name($this->related_doc_id);
         $this->related_doc_rev_number = DocumentRevision::get_document_revision_name($this->related_doc_rev_id);
     }
 }
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:67,代码来源:Document.php

示例5: testRealteDocumentRevision

 /**
  * @group 61144
  */
 public function testRealteDocumentRevision()
 {
     $actual = $this->revision->get_document_revision_name($this->revision->id);
     $this->assertEquals($this->revision->revision, $actual, 'Revision is incorrect');
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:8,代码来源:Bug61144Test.php


注:本文中的DocumentRevision::get_document_revision_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。