コード例 #1
0
ファイル: WordTemplate.php プロジェクト: aldridged/gtg-sugar
 function fill_in_additional_detail_fields()
 {
     global $current_language, $theme;
     $mod_strings = return_module_language($current_language, "ZuckerWordTemplate");
     if (!empty($this->filename)) {
         $this->template_url = $this->get_resources_dir() . $this->filename;
         $this->extension = substr($this->filename, strrpos($this->filename, ".") + 1);
     }
     $this->action_module = $this->module_dir;
     $seed = new QueryTemplate();
     $this->querytemplate = $seed->retrieve($this->querytemplate_id);
     if (empty($this->querytemplate)) {
         $seed = new ListingTemplate();
         $this->querytemplate = $seed->retrieve($this->querytemplate_id);
     }
     if (!empty($this->querytemplate)) {
         $this->querytemplate_name = $this->querytemplate->name;
         $this->querytemplate_link = "index.php?module=" . $this->querytemplate->module_dir . "&action=DetailView&record=" . $this->querytemplate->id;
     }
     if ($this->extension == "stw" || $this->extension == "odt") {
         $this->type_desc = $mod_strings["LBL_OPENOFFICE"];
         $this->image_html = get_image("themes/" . $theme . "/images/ZuckerOpenOfficeTemplate", "alt=\"ZuckerOpenOfficeTemplate\"");
         $this->image_module = "ZuckerOpenOfficeTemplate";
     } else {
         if ($this->extension == "doc") {
             $this->type_desc = $mod_strings["LBL_WORD"];
             $this->image_html = get_image("themes/" . $theme . "/images/ZuckerWordTemplate", "alt=\"ZuckerWordTemplate\"");
             $this->image_module = "ZuckerWordTemplate";
         }
     }
     $this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
     $this->team_name = SimpleTeams::get_assigned_team_name($this);
 }
コード例 #2
0
 function get_summary_text()
 {
     global $current_language;
     $mod_strings = return_module_language($current_language, "ZuckerListingTemplate");
     $mod_list_strings = return_mod_list_strings_language($current_language, "ZuckerListingTemplate");
     $result = "";
     $result .= ListingTemplate::get_field_display_name($this->module_name, $this->field_name);
     $result .= ", ";
     $result .= $mod_list_strings["LISTING_ORDER_TYPES"][$this->order_type];
     return $result;
 }
コード例 #3
0
 function get_summary_text()
 {
     $result = "";
     $result .= ListingTemplate::get_field_display_name($this->module_name, $this->field_name);
     $result .= " " . $this->comparator . " ";
     if ($this->value_type == "parameter") {
         $result .= "'<< " . $this->rpl->name . " >>'";
     } else {
         $result .= "'" . $this->value . "'";
     }
     return $result;
 }
コード例 #4
0
ファイル: EditView.php プロジェクト: omusico/sugar_work
}
$assigned_user = get_user_array(TRUE, "Active", $focus->assigned_user_id);
asort($assigned_user);
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id($assigned_user, $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
/// Users Popup
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name'));
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
require_once 'modules/ZuckerReports/SimpleTeams.php';
$xtpl->assign("TEAM_SELECTION", SimpleTeams::xtplGetTeamSelection($xtpl, $focus));
$xtpl->assign("ERROR_MSG", $_REQUEST["ZR_ERROR_MSG"]);
$qtselect = array();
$qtseed = new QueryTemplate();
$qtlist = $qtseed->get_all("name");
if (!empty($qtlist)) {
    foreach ($qtlist as $qt) {
        $qtselect[$qt->id] = $qt->name;
    }
}
$ltseed = new ListingTemplate();
$ltlist = $ltseed->get_all("name");
if (!empty($ltlist)) {
    foreach ($ltlist as $lt) {
        $qtselect[$lt->id] = $lt->name;
    }
}
asort($qtselect);
$xtpl->assign("QUERYTEMPLATE_SELECTION", get_select_options_with_id($qtselect, $querytemplate_id));
$xtpl->parse("main");
$xtpl->out("main");
コード例 #5
0
ファイル: Delete.php プロジェクト: omusico/sugar_work
<?php

require_once 'include/formbase.php';
require_once 'include/upload_file.php';
require_once 'modules/ZuckerListingTemplate/ListingTemplate.php';
if (!empty($_REQUEST['record'])) {
    $template = new ListingTemplate();
    $template->retrieve($_REQUEST['record']);
    if (!$template->ACLAccess('Delete')) {
        ACLController::displayNoAccess(true);
        sugar_cleanup(true);
    }
    $template->mark_deleted($_REQUEST['record']);
}
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action'] . "&record=" . $_REQUEST['return_id']);
コード例 #6
0
ファイル: Save.php プロジェクト: omusico/sugar_work
<?php

require_once 'include/formbase.php';
require_once 'include/upload_file.php';
require_once 'modules/ZuckerListingTemplateFilter/ListingTemplateFilter.php';
if (!is_admin($current_user)) {
    sugar_die("only admin allowed");
}
$filter = new ListingTemplateFilter();
if (!empty($_REQUEST['record'])) {
    $filter->retrieve($_REQUEST['record']);
}
$filter = populateFromPost("filter_", $filter);
$lt = new ListingTemplate();
$lt->retrieve($filter->listing_template_id);
if (!empty($_REQUEST["filter_value_param"])) {
    $rp = new ReportParameter();
    $rp->retrieve($_REQUEST["filter_value_param"]);
    $rpl = new ReportParameterLink();
    $rpl->template_id = $lt->id;
    $rpl->parameter_id = $rp->id;
    $rpl->name = $rp->default_name;
    $rpl->default_value = $rp->default_value;
    $rpl->save();
    $filter->value = $rpl->id;
    $filter->value_type = "parameter";
} else {
    if (!empty($_REQUEST["filter_value_enum"])) {
        $filter->value = $_REQUEST["filter_value_enum"];
        $filter->value_type = "text";
    } else {
コード例 #7
0
 function mark_relationships_deleted($id)
 {
     parent::mark_relationships_deleted($id);
     ListingTemplate::mark_listingrelations_deleted($id);
 }