Ejemplo n.º 1
0
 function RenderListOptions()
 {
     global $Security, $Language, $objForm;
     $this->ListOptions->LoadDefault();
     // "view"
     $oListOpt =& $this->ListOptions->Items["view"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewView\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewLink")) . "\" href=\"" . ew_HtmlEncode($this->ViewUrl) . "\">" . $Language->Phrase("ViewLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "edit"
     $oListOpt =& $this->ListOptions->Items["edit"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewEdit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("EditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("EditLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "copy"
     $oListOpt =& $this->ListOptions->Items["copy"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewCopy\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("CopyLink")) . "\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("CopyLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "delete"
     $oListOpt =& $this->ListOptions->Items["delete"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewDelete\"" . "" . " data-caption=\"" . ew_HtmlTitle($Language->Phrase("DeleteLink")) . "\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("DeleteLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "checkbox"
     $oListOpt =& $this->ListOptions->Items["checkbox"];
     $oListOpt->Body = "<label class=\"checkbox\"><input type=\"checkbox\" name=\"key_m[]\" value=\"" . ew_HtmlEncode($this->id->CurrentValue) . "\" onclick='ew_ClickMultiCheckbox(event, this);'></label>";
     $this->RenderListOptionsExt();
     // Call ListOptions_Rendered event
     $this->ListOptions_Rendered();
 }
Ejemplo n.º 2
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option =& $options["action"];
     // Edit
     $item =& $option->Add("edit");
     $item->Body = "<a class=\"ewAction ewEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
     $item->Visible = $this->EditUrl != "" && $Security->CanEdit() && $this->ShowOptionLink('edit');
     // Set up action default
     $option =& $options["action"];
     $option->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     $option->UseImageAndText = TRUE;
     $option->UseDropDownButton = FALSE;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
 function RenderOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     if ($this->CurrentAction != "gridadd" && $this->CurrentAction != "gridedit") {
         // Not grid add/edit mode
         $option =& $options["action"];
         foreach ($this->CustomActions as $action => $name) {
             // Add custom action
             $item =& $option->Add("custom_" . $action);
             $item->Body = "<a class=\"ewAction ewCustomAction\" href=\"\" onclick=\"ew_SubmitSelected(document.fseguimiento_tramiteslist, '" . ew_CurrentUrl() . "', null, '" . $action . "');return false;\">" . $name . "</a>";
         }
         // Hide grid edit, multi-delete and multi-update
         if ($this->TotalRecs <= 0) {
             $option =& $options["addedit"];
             $item =& $option->GetItem("gridedit");
             if ($item) {
                 $item->Visible = FALSE;
             }
             $option =& $options["action"];
             $item =& $option->GetItem("multidelete");
             if ($item) {
                 $item->Visible = FALSE;
             }
             $item =& $option->GetItem("multiupdate");
             if ($item) {
                 $item->Visible = FALSE;
             }
         }
     } else {
         // Grid add/edit mode
         // Hide all options first
         foreach ($options as &$option) {
             $option->HideAllOptions();
         }
         if ($this->CurrentAction == "gridadd") {
             if ($this->AllowAddDeleteRow) {
                 // Add add blank row
                 $option =& $options["addedit"];
                 $option->UseDropDownButton = FALSE;
                 $option->UseImageAndText = TRUE;
                 $item =& $option->Add("addblankrow");
                 $item->Body = "<a class=\"ewAddEdit ewAddBlankRow\" title=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" href=\"javascript:void(0);\" onclick=\"ew_AddGridRow(this);\">" . $Language->Phrase("AddBlankRow") . "</a>";
                 $item->Visible = FALSE;
             }
             $option =& $options["action"];
             $option->UseDropDownButton = FALSE;
             $option->UseImageAndText = TRUE;
             // Add grid insert
             $item =& $option->Add("gridinsert");
             $item->Body = "<a class=\"ewAction ewGridInsert\" title=\"" . ew_HtmlTitle($Language->Phrase("GridInsertLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridInsertLink")) . "\" href=\"\" onclick=\"return ewForms(this).Submit();\">" . $Language->Phrase("GridInsertLink") . "</a>";
             // Add grid cancel
             $item =& $option->Add("gridcancel");
             $item->Body = "<a class=\"ewAction ewGridCancel\" title=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" href=\"" . $this->PageUrl() . "a=cancel\">" . $Language->Phrase("GridCancelLink") . "</a>";
         }
         if ($this->CurrentAction == "gridedit") {
             if ($this->AllowAddDeleteRow) {
                 // Add add blank row
                 $option =& $options["addedit"];
                 $option->UseDropDownButton = FALSE;
                 $option->UseImageAndText = TRUE;
                 $item =& $option->Add("addblankrow");
                 $item->Body = "<a class=\"ewAddEdit ewAddBlankRow\" title=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" href=\"javascript:void(0);\" onclick=\"ew_AddGridRow(this);\">" . $Language->Phrase("AddBlankRow") . "</a>";
                 $item->Visible = FALSE;
             }
             $option =& $options["action"];
             $option->UseDropDownButton = FALSE;
             $option->UseImageAndText = TRUE;
             $item =& $option->Add("gridsave");
             $item->Body = "<a class=\"ewAction ewGridSave\" title=\"" . ew_HtmlTitle($Language->Phrase("GridSaveLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridSaveLink")) . "\" href=\"\" onclick=\"return ewForms(this).Submit();\">" . $Language->Phrase("GridSaveLink") . "</a>";
             $item =& $option->Add("gridcancel");
             $item->Body = "<a class=\"ewAction ewGridCancel\" title=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" href=\"" . $this->PageUrl() . "a=cancel\">" . $Language->Phrase("GridCancelLink") . "</a>";
         }
     }
 }
Ejemplo n.º 4
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option =& $options["action"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAction ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageAddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageAddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("ViewPageAddLink") . "</a>";
     $item->Visible = $this->AddUrl != "" && $Security->CanAdd();
     // Edit
     $item =& $option->Add("edit");
     $item->Body = "<a class=\"ewAction ewEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
     $item->Visible = $this->EditUrl != "" && $Security->CanEdit() && $this->ShowOptionLink('edit');
     // Copy
     $item =& $option->Add("copy");
     $item->Body = "<a class=\"ewAction ewCopy\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageCopyLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("ViewPageCopyLink") . "</a>";
     $item->Visible = $this->CopyUrl != "" && $Security->CanAdd() && $this->ShowOptionLink('add');
     // Delete
     $item =& $option->Add("delete");
     $item->Body = "<a class=\"ewAction ewDelete\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageDeleteLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageDeleteLink")) . "\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("ViewPageDeleteLink") . "</a>";
     $item->Visible = $this->DeleteUrl != "" && $Security->CanDelete() && $this->ShowOptionLink('delete');
     // Show detail edit/copy
     if ($this->getCurrentDetailTable() != "") {
         // Detail Edit
         $item =& $option->Add("detailedit");
         $item->Body = "<a class=\"ewAction ewDetailEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=" . $this->getCurrentDetailTable())) . "\">" . $Language->Phrase("MasterDetailEditLink") . "</a>";
         $item->Visible = $Security->CanEdit() && $this->ShowOptionLink('delete');
         // Detail Copy
         $item =& $option->Add("detailcopy");
         $item->Body = "<a class=\"ewAction ewDetailCopy\" title=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=" . $this->getCurrentDetailTable())) . "\">" . $Language->Phrase("MasterDetailCopyLink") . "</a>";
         $item->Visible = $Security->CanAdd() && $this->ShowOptionLink('delete');
     }
     $option =& $options["detail"];
     $DetailTableLink = "";
     $DetailViewTblVar = "";
     $DetailCopyTblVar = "";
     $DetailEditTblVar = "";
     // "detail_detalle_deudas"
     $item =& $option->Add("detail_detalle_deudas");
     $body = $Language->Phrase("DetailLink") . $Language->TablePhrase("detalle_deudas", "TblCaption");
     $body .= str_replace("%c", $this->detalle_deudas_Count, $Language->Phrase("DetailCount"));
     $body = "<a class=\"btn btn-default btn-sm ewRowLink ewDetail\" data-action=\"list\" href=\"" . ew_HtmlEncode("cciag_detalle_deudaslist.php?" . EW_TABLE_SHOW_MASTER . "=deudas&fk_id=" . strval($this->id->CurrentValue) . "") . "\">" . $body . "</a>";
     $links = "";
     if ($GLOBALS["detalle_deudas_grid"] && $GLOBALS["detalle_deudas_grid"]->DetailView && $Security->CanView() && $this->ShowOptionLink('view') && $Security->AllowView(CurrentProjectID() . 'detalle_deudas')) {
         $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=detalle_deudas")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         if ($DetailViewTblVar != "") {
             $DetailViewTblVar .= ",";
         }
         $DetailViewTblVar .= "detalle_deudas";
     }
     if ($GLOBALS["detalle_deudas_grid"] && $GLOBALS["detalle_deudas_grid"]->DetailEdit && $Security->CanEdit() && $this->ShowOptionLink('edit') && $Security->AllowEdit(CurrentProjectID() . 'detalle_deudas')) {
         $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=detalle_deudas")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailEditLink")) . "</a></li>";
         if ($DetailEditTblVar != "") {
             $DetailEditTblVar .= ",";
         }
         $DetailEditTblVar .= "detalle_deudas";
     }
     if ($GLOBALS["detalle_deudas_grid"] && $GLOBALS["detalle_deudas_grid"]->DetailAdd && $Security->CanAdd() && $this->ShowOptionLink('add') && $Security->AllowAdd(CurrentProjectID() . 'detalle_deudas')) {
         $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=detalle_deudas")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailCopyLink")) . "</a></li>";
         if ($DetailCopyTblVar != "") {
             $DetailCopyTblVar .= ",";
         }
         $DetailCopyTblVar .= "detalle_deudas";
     }
     if ($links != "") {
         $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewDetail\" data-toggle=\"dropdown\"><b class=\"caret\"></b></button>";
         $body .= "<ul class=\"dropdown-menu\">" . $links . "</ul>";
     }
     $body = "<div class=\"btn-group\">" . $body . "</div>";
     $item->Body = $body;
     $item->Visible = $Security->AllowList(CurrentProjectID() . 'pagos') && $this->ShowOptionLink();
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "detalle_deudas";
     }
     if ($this->ShowMultipleDetails) {
         $item->Visible = FALSE;
     }
     // "detail_pagos"
     $item =& $option->Add("detail_pagos");
     $body = $Language->Phrase("DetailLink") . $Language->TablePhrase("pagos", "TblCaption");
     $body .= str_replace("%c", $this->pagos_Count, $Language->Phrase("DetailCount"));
     $body = "<a class=\"btn btn-default btn-sm ewRowLink ewDetail\" data-action=\"list\" href=\"" . ew_HtmlEncode("cciag_pagoslist.php?" . EW_TABLE_SHOW_MASTER . "=deudas&fk_id=" . strval($this->id->CurrentValue) . "") . "\">" . $body . "</a>";
     $links = "";
     if ($GLOBALS["pagos_grid"] && $GLOBALS["pagos_grid"]->DetailView && $Security->CanView() && $this->ShowOptionLink('view') && $Security->AllowView(CurrentProjectID() . 'pagos')) {
         $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=pagos")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         if ($DetailViewTblVar != "") {
             $DetailViewTblVar .= ",";
         }
         $DetailViewTblVar .= "pagos";
     }
     if ($GLOBALS["pagos_grid"] && $GLOBALS["pagos_grid"]->DetailEdit && $Security->CanEdit() && $this->ShowOptionLink('edit') && $Security->AllowEdit(CurrentProjectID() . 'pagos')) {
         $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=pagos")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailEditLink")) . "</a></li>";
         if ($DetailEditTblVar != "") {
             $DetailEditTblVar .= ",";
         }
         $DetailEditTblVar .= "pagos";
     }
     if ($GLOBALS["pagos_grid"] && $GLOBALS["pagos_grid"]->DetailAdd && $Security->CanAdd() && $this->ShowOptionLink('add') && $Security->AllowAdd(CurrentProjectID() . 'pagos')) {
         $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=pagos")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailCopyLink")) . "</a></li>";
         if ($DetailCopyTblVar != "") {
             $DetailCopyTblVar .= ",";
         }
         $DetailCopyTblVar .= "pagos";
     }
     if ($links != "") {
         $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewDetail\" data-toggle=\"dropdown\"><b class=\"caret\"></b></button>";
         $body .= "<ul class=\"dropdown-menu\">" . $links . "</ul>";
     }
     $body = "<div class=\"btn-group\">" . $body . "</div>";
     $item->Body = $body;
     $item->Visible = $Security->AllowList(CurrentProjectID() . 'pagos') && $this->ShowOptionLink();
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "pagos";
     }
     if ($this->ShowMultipleDetails) {
         $item->Visible = FALSE;
     }
     // Multiple details
     if ($this->ShowMultipleDetails) {
         $body = $Language->Phrase("MultipleMasterDetails");
         $body = "<div class=\"btn-group\">";
         $links = "";
         if ($DetailViewTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailViewTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         }
         if ($DetailEditTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailEditTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailEditLink")) . "</a></li>";
         }
         if ($DetailCopyTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailCopyTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailCopyLink")) . "</a></li>";
         }
         if ($links != "") {
             $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewMasterDetail\" title=\"" . ew_HtmlTitle($Language->Phrase("MultipleMasterDetails")) . "\" data-toggle=\"dropdown\">" . $Language->Phrase("MultipleMasterDetails") . "<b class=\"caret\"></b></button>";
             $body .= "<ul class=\"dropdown-menu ewMenu\">" . $links . "</ul>";
         }
         $body .= "</div>";
         // Multiple details
         $oListOpt =& $option->Add("details");
         $oListOpt->Body = $body;
     }
     // Set up detail default
     $option =& $options["detail"];
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $option->UseImageAndText = TRUE;
     $ar = explode(",", $DetailTableLink);
     $cnt = count($ar);
     $option->UseDropDownButton = $cnt > 1;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
     // Set up action default
     $option =& $options["action"];
     $option->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     $option->UseImageAndText = TRUE;
     $option->UseDropDownButton = FALSE;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
Ejemplo n.º 5
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "";
     $option = $options["action"];
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     // Filter button
     $item =& $this->FilterOptions->Add("savecurrentfilter");
     $item->Body = "<a class=\"ewSaveFilter\" data-form=\"fnewslistsrch\" href=\"#\">" . $Language->Phrase("SaveCurrentFilter") . "</a>";
     $item->Visible = FALSE;
     $item =& $this->FilterOptions->Add("deletefilter");
     $item->Body = "<a class=\"ewDeleteFilter\" data-form=\"fnewslistsrch\" href=\"#\">" . $Language->Phrase("DeleteFilter") . "</a>";
     $item->Visible = FALSE;
     $this->FilterOptions->UseDropDownButton = TRUE;
     $this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;
     $this->FilterOptions->DropDownButtonPhrase = $Language->Phrase("Filters");
     // Add group option item
     $item =& $this->FilterOptions->Add($this->FilterOptions->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
 function RenderOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     if (($this->CurrentMode == "add" || $this->CurrentMode == "copy" || $this->CurrentMode == "edit") && $this->CurrentAction != "F") {
         // Check add/copy/edit mode
         if ($this->AllowAddDeleteRow) {
             $option =& $options["addedit"];
             $option->UseDropDownButton = FALSE;
             $option->UseImageAndText = TRUE;
             $item =& $option->Add("addblankrow");
             $item->Body = "<a class=\"ewAddEdit ewAddBlankRow\" title=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" href=\"javascript:void(0);\" onclick=\"ew_AddGridRow(this);\">" . $Language->Phrase("AddBlankRow") . "</a>";
             $item->Visible = TRUE;
             $this->ShowOtherOptions = $item->Visible;
         }
     }
 }
Ejemplo n.º 7
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "" && $Security->CanAdd();
     $option = $options["action"];
     // Add multi update
     $item =& $option->Add("multiupdate");
     $item->Body = "<a class=\"ewAction ewMultiUpdate\" title=\"" . ew_HtmlTitle($Language->Phrase("UpdateSelectedLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("UpdateSelectedLink")) . "\" href=\"\" onclick=\"ew_SubmitSelected(document.fusuarioslist, '" . $this->MultiUpdateUrl . "');return false;\">" . $Language->Phrase("UpdateSelectedLink") . "</a>";
     $item->Visible = $Security->CanEdit();
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
 }
Ejemplo n.º 8
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option =& $options["action"];
     $option =& $options["detail"];
     $DetailTableLink = "";
     $DetailViewTblVar = "";
     $DetailCopyTblVar = "";
     $DetailEditTblVar = "";
     // "detail_in_bodegaubicaciones"
     $item =& $option->Add("detail_in_bodegaubicaciones");
     $body = $Language->Phrase("ViewPageDetailLink") . $Language->TablePhrase("in_bodegaubicaciones", "TblCaption");
     $body = "<a class=\"btn btn-default btn-sm ewRowLink ewDetail\" data-action=\"list\" href=\"" . ew_HtmlEncode("in_bodegaubicacioneslist.php?" . EW_TABLE_SHOW_MASTER . "=in_bodegas&fk_codigo_bodega=" . urlencode(strval($this->codigo_bodega->CurrentValue)) . "") . "\">" . $body . "</a>";
     $links = "";
     if ($GLOBALS["in_bodegaubicaciones_grid"] && $GLOBALS["in_bodegaubicaciones_grid"]->DetailView && $Security->CanView() && $Security->AllowView(CurrentProjectID() . 'in_bodegaubicaciones')) {
         $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=in_bodegaubicaciones")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         if ($DetailViewTblVar != "") {
             $DetailViewTblVar .= ",";
         }
         $DetailViewTblVar .= "in_bodegaubicaciones";
     }
     if ($links != "") {
         $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewDetail\" data-toggle=\"dropdown\"><b class=\"caret\"></b></button>";
         $body .= "<ul class=\"dropdown-menu\">" . $links . "</ul>";
     }
     $body = "<div class=\"btn-group\">" . $body . "</div>";
     $item->Body = $body;
     $item->Visible = $Security->AllowList(CurrentProjectID() . 'in_bodegaubicaciones');
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "in_bodegaubicaciones";
     }
     if ($this->ShowMultipleDetails) {
         $item->Visible = FALSE;
     }
     // Multiple details
     if ($this->ShowMultipleDetails) {
         $body = $Language->Phrase("MultipleMasterDetails");
         $body = "<div class=\"btn-group\">";
         $links = "";
         if ($DetailViewTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailViewTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         }
         if ($DetailEditTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailEditTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailEditLink")) . "</a></li>";
         }
         if ($DetailCopyTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailCopyTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailCopyLink")) . "</a></li>";
         }
         if ($links != "") {
             $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewMasterDetail\" title=\"" . ew_HtmlTitle($Language->Phrase("MultipleMasterDetails")) . "\" data-toggle=\"dropdown\">" . $Language->Phrase("MultipleMasterDetails") . "<b class=\"caret\"></b></button>";
             $body .= "<ul class=\"dropdown-menu ewMenu\">" . $links . "</ul>";
         }
         $body .= "</div>";
         // Multiple details
         $oListOpt =& $option->Add("details");
         $oListOpt->Body = $body;
     }
     // Set up detail default
     $option =& $options["detail"];
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $option->UseImageAndText = TRUE;
     $ar = explode(",", $DetailTableLink);
     $cnt = count($ar);
     $option->UseDropDownButton = $cnt > 1;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
     // Set up action default
     $option =& $options["action"];
     $option->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     $option->UseImageAndText = TRUE;
     $option->UseDropDownButton = TRUE;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
Ejemplo n.º 9
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "";
     $option = $options["detail"];
     $DetailTableLink = "";
     $item =& $option->Add("detailadd_sub_category");
     $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=sub_category") . "\">" . $Language->Phrase("Add") . "&nbsp;" . $this->TableCaption() . "/" . $GLOBALS["sub_category"]->TableCaption() . "</a>";
     $item->Visible = $GLOBALS["sub_category"]->DetailAdd;
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "sub_category";
     }
     // Add multiple details
     if ($this->ShowMultipleDetails) {
         $item =& $option->Add("detailsadd");
         $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=" . $DetailTableLink) . "\">" . $Language->Phrase("AddMasterDetailLink") . "</a>";
         $item->Visible = $DetailTableLink != "";
         // Hide single master/detail items
         $ar = explode(",", $DetailTableLink);
         $cnt = count($ar);
         for ($i = 0; $i < $cnt; $i++) {
             if ($item =& $option->GetItem("detailadd_" . $ar[$i])) {
                 $item->Visible = FALSE;
             }
         }
     }
     $option = $options["action"];
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     // Filter button
     $item =& $this->FilterOptions->Add("savecurrentfilter");
     $item->Body = "<a class=\"ewSaveFilter\" data-form=\"fcategorylistsrch\" href=\"#\">" . $Language->Phrase("SaveCurrentFilter") . "</a>";
     $item->Visible = TRUE;
     $item =& $this->FilterOptions->Add("deletefilter");
     $item->Body = "<a class=\"ewDeleteFilter\" data-form=\"fcategorylistsrch\" href=\"#\">" . $Language->Phrase("DeleteFilter") . "</a>";
     $item->Visible = TRUE;
     $this->FilterOptions->UseDropDownButton = TRUE;
     $this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;
     $this->FilterOptions->DropDownButtonPhrase = $Language->Phrase("Filters");
     // Add group option item
     $item =& $this->FilterOptions->Add($this->FilterOptions->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
Ejemplo n.º 10
0
            ?>
"<?php 
            echo $selwrk;
            ?>
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<button type="button" title="<?php 
    echo ew_HtmlTitle($Language->Phrase("AddLink")) . "&nbsp;" . $localidades->id_provincia->FldCaption();
    ?>
" onclick="ew_AddOptDialogShow({lnk:this,el:'x_id_provincia',url:'provinciasaddopt.php'});" class="ewAddOptBtn btn btn-default btn-sm" id="aol_x_id_provincia"><span class="glyphicon glyphicon-plus ewIcon"></span><span class="hide"><?php 
    echo $Language->Phrase("AddLink");
    ?>
&nbsp;<?php 
    echo $localidades->id_provincia->FldCaption();
    ?>
</span></button>
<?php 
    $sSqlWrk = "SELECT `codigo`, `provincia` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincias`";
    $sWhereWrk = "";
    // Call Lookup selecting
    $localidades->Lookup_Selecting($localidades->id_provincia, $sWhereWrk);
    if ($sWhereWrk != "") {
        $sSqlWrk .= " WHERE " . $sWhereWrk;
Ejemplo n.º 11
0
 function RenderListOptions()
 {
     global $Security, $Language, $objForm;
     $this->ListOptions->LoadDefault();
     // "view"
     $oListOpt =& $this->ListOptions->Items["view"];
     if ($Security->CanView() && $this->ShowOptionLink('view')) {
         $oListOpt->Body = "<a class=\"ewRowLink ewView\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewLink")) . "\" href=\"" . ew_HtmlEncode($this->ViewUrl) . "\">" . $Language->Phrase("ViewLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "edit"
     $oListOpt =& $this->ListOptions->Items["edit"];
     if ($Security->CanEdit() && $this->ShowOptionLink('edit')) {
         $oListOpt->Body = "<a class=\"ewRowLink ewEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("EditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("EditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("EditLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "checkbox"
     $oListOpt =& $this->ListOptions->Items["checkbox"];
     $oListOpt->Body = "<input type=\"checkbox\" name=\"key_m[]\" value=\"" . ew_HtmlEncode($this->id->CurrentValue) . "\" onclick='ew_ClickMultiCheckbox(event, this);'>";
     $this->RenderListOptionsExt();
     // Call ListOptions_Rendered event
     $this->ListOptions_Rendered();
 }
Ejemplo n.º 12
0
>
<span id="el_user_password">
<div class="input-group" id="ig_x_password">
<input type="text" data-password-strength="pst_x_password" data-password-generated="pgt_x_password" data-table="user" data-field="x_password" name="x_password" id="x_password" value="<?php 
    echo $user->password->EditValue;
    ?>
" size="30" maxlength="200" placeholder="<?php 
    echo ew_HtmlEncode($user->password->getPlaceHolder());
    ?>
"<?php 
    echo $user->password->EditAttributes();
    ?>
>
<span class="input-group-btn">
	<button type="button" class="btn btn-default ewPasswordGenerator" title="<?php 
    echo ew_HtmlTitle($Language->Phrase("GeneratePassword"));
    ?>
" data-password-field="x_password" data-password-confirm="c_password" data-password-strength="pst_x_password" data-password-generated="pgt_x_password"><?php 
    echo $Language->Phrase("GeneratePassword");
    ?>
</button>
</span>
</div>
<span class="help-block" id="pgt_x_password" style="display: none;"></span>
<div class="progress ewPasswordStrengthBar" id="pst_x_password" style="display: none;">
	<div class="progress-bar" role="progressbar"></div>
</div>
</span>
<?php 
    echo $user->password->CustomMsg;
    ?>
Ejemplo n.º 13
0
 function RenderListOptionsExt()
 {
     global $Security, $Language;
     $links = "";
     $btngrps = "";
     $sSqlWrk = "[codigo_bodega]='" . ew_AdjustSql($this->codigo_bodega->CurrentValue) . "'";
     // Column "detail_in_bodegaubicaciones"
     $link = "";
     $option =& $this->ListOptions->Items["detail_in_bodegaubicaciones"];
     $url = "in_bodegaubicacionespreview.php?t=in_bodegas&f=" . ew_Encrypt($sSqlWrk);
     $btngrp = "<div data-table=\"in_bodegaubicaciones\" data-url=\"" . $url . "\" class=\"btn-group\">";
     if ($Security->IsLoggedIn()) {
         $label = $Language->TablePhrase("in_bodegaubicaciones", "TblCaption");
         $link = "<li><a href=\"#\" data-toggle=\"tab\" data-table=\"in_bodegaubicaciones\" data-url=\"" . $url . "\">" . $label . "</a></li>";
         $links .= $link;
         $detaillnk = ew_JsEncode3("in_bodegaubicacioneslist.php?" . EW_TABLE_SHOW_MASTER . "=in_bodegas&fk_codigo_bodega=" . urlencode(strval($this->codigo_bodega->CurrentValue)) . "");
         $btngrp .= "<button type=\"button\" class=\"btn btn-default btn-sm\" title=\"" . $Language->TablePhrase("in_bodegaubicaciones", "TblCaption") . "\" onclick=\"window.location='" . $detaillnk . "'\">" . $Language->Phrase("MasterDetailListLink") . "</button>";
     }
     if ($GLOBALS["in_bodegaubicaciones_grid"]->DetailView && $Security->CanView() && $Security->IsLoggedIn()) {
         $btngrp .= "<button type=\"button\" class=\"btn btn-default btn-sm\" title=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" onclick=\"window.location='" . $this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=in_bodegaubicaciones") . "'\">" . $Language->Phrase("MasterDetailViewLink") . "</button>";
     }
     $btngrp .= "</div>";
     if ($link != "") {
         $btngrps .= $btngrp;
         $option->Body .= "<div class=\"hide ewPreview\">" . $link . $btngrp . "</div>";
     }
     // Hide detail items if necessary
     $this->ListOptions->HideDetailItemsForDropDown();
     // Column "preview"
     $option =& $this->ListOptions->GetItem("preview");
     if (!$option) {
         // Add preview column
         $option =& $this->ListOptions->Add("preview");
         $option->OnLeft = FALSE;
         if ($option->OnLeft) {
             $option->MoveTo($this->ListOptions->ItemPos("checkbox") + 1);
         } else {
             $option->MoveTo($this->ListOptions->ItemPos("checkbox"));
         }
         $option->Visible = !($this->Export != "" || $this->CurrentAction == "gridadd" || $this->CurrentAction == "gridedit");
         $option->ShowInDropDown = FALSE;
         $option->ShowInButtonGroup = FALSE;
     }
     if ($option) {
         $option->Body = "<span class=\"ewPreviewRowBtn icon-expand\"></span>";
         $option->Body .= "<div class=\"hide ewPreview\">" . $links . $btngrps . "</div>";
         if ($option->Visible) {
             $option->Visible = $link != "";
         }
     }
     // Column "details" (Multiple details)
     $option =& $this->ListOptions->GetItem("details");
     if ($option) {
         $option->Body .= "<div class=\"hide ewPreview\">" . $links . $btngrps . "</div>";
         if ($option->Visible) {
             $option->Visible = $links != "";
         }
     }
 }
Ejemplo n.º 14
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "" && $Security->CanAdd();
     // Inline Add
     $item =& $option->Add("inlineadd");
     $item->Body = "<a class=\"ewAddEdit ewInlineAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("InlineAddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("InlineAddLink")) . "\" href=\"" . ew_HtmlEncode($this->InlineAddUrl) . "\">" . $Language->Phrase("InlineAddLink") . "</a>";
     $item->Visible = $this->InlineAddUrl != "" && $Security->CanAdd();
     $option = $options["detail"];
     $DetailTableLink = "";
     $item =& $option->Add("detailadd_detalle_deudas");
     $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=detalle_deudas") . "\">" . $Language->Phrase("Add") . "&nbsp;" . $this->TableCaption() . "/" . $GLOBALS["detalle_deudas"]->TableCaption() . "</a>";
     $item->Visible = $GLOBALS["detalle_deudas"]->DetailAdd && $Security->AllowAdd(CurrentProjectID() . 'detalle_deudas') && $Security->CanAdd();
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "detalle_deudas";
     }
     $item =& $option->Add("detailadd_pagos");
     $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=pagos") . "\">" . $Language->Phrase("Add") . "&nbsp;" . $this->TableCaption() . "/" . $GLOBALS["pagos"]->TableCaption() . "</a>";
     $item->Visible = $GLOBALS["pagos"]->DetailAdd && $Security->AllowAdd(CurrentProjectID() . 'pagos') && $Security->CanAdd();
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "pagos";
     }
     // Add multiple details
     if ($this->ShowMultipleDetails) {
         $item =& $option->Add("detailsadd");
         $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=" . $DetailTableLink) . "\">" . $Language->Phrase("AddMasterDetailLink") . "</a>";
         $item->Visible = $DetailTableLink != "" && $Security->CanAdd();
         // Hide single master/detail items
         $ar = explode(",", $DetailTableLink);
         $cnt = count($ar);
         for ($i = 0; $i < $cnt; $i++) {
             if ($item =& $option->GetItem("detailadd_" . $ar[$i])) {
                 $item->Visible = FALSE;
             }
         }
     }
     $option = $options["action"];
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
 }
Ejemplo n.º 15
0
                ?>
"<?php 
                echo $selwrk;
                ?>
>
<?php 
                echo $arwrk[$rowcntwrk][1];
                ?>
</option>
<?php 
            }
        }
        ?>
</select>
<button type="button" title="<?php 
        echo ew_HtmlTitle($Language->Phrase("AddLink")) . "&nbsp;" . $gastos_mantenimientos->id_tipo_gasto->FldCaption();
        ?>
" onclick="ew_AddOptDialogShow({lnk:this,el:'x_id_tipo_gasto',url:'tipo_gastosaddopt.php'});" class="ewAddOptBtn btn btn-default btn-sm" id="aol_x_id_tipo_gasto"><span class="glyphicon glyphicon-plus ewIcon"></span><span class="hide"><?php 
        echo $Language->Phrase("AddLink");
        ?>
&nbsp;<?php 
        echo $gastos_mantenimientos->id_tipo_gasto->FldCaption();
        ?>
</span></button>
<?php 
        $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
        $sWhereWrk = "";
        $lookuptblfilter = "`clase`='M'";
        if (strval($lookuptblfilter) != "") {
            ew_AddFilter($sWhereWrk, $lookuptblfilter);
        }
Ejemplo n.º 16
0
 function RenderOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     if ($this->CurrentAction != "gridadd" && $this->CurrentAction != "gridedit") {
         // Not grid add/edit mode
         $option =& $options["action"];
         // Set up list action buttons
         foreach ($this->ListActions->Items as $listaction) {
             if ($listaction->Select == EW_ACTION_MULTIPLE) {
                 $item =& $option->Add("custom_" . $listaction->Action);
                 $caption = $listaction->Caption;
                 $icon = $listaction->Icon != "" ? "<span class=\"" . ew_HtmlEncode($listaction->Icon) . "\" data-caption=\"" . ew_HtmlEncode($caption) . "\"></span> " : $caption;
                 $item->Body = "<a class=\"ewAction ewListAction\" title=\"" . ew_HtmlEncode($caption) . "\" data-caption=\"" . ew_HtmlEncode($caption) . "\" href=\"\" onclick=\"ew_SubmitAction(event,jQuery.extend({f:document.fimageslist}," . $listaction->ToJson(TRUE) . "));return false;\">" . $icon . "</a>";
                 $item->Visible = $listaction->Allow;
             }
         }
         // Hide grid edit and other options
         if ($this->TotalRecs <= 0) {
             $option =& $options["addedit"];
             $item =& $option->GetItem("gridedit");
             if ($item) {
                 $item->Visible = FALSE;
             }
             $option =& $options["action"];
             $option->HideAllOptions();
         }
     } else {
         // Grid add/edit mode
         // Hide all options first
         foreach ($options as &$option) {
             $option->HideAllOptions();
         }
         if ($this->CurrentAction == "gridadd") {
             if ($this->AllowAddDeleteRow) {
                 // Add add blank row
                 $option =& $options["addedit"];
                 $option->UseDropDownButton = FALSE;
                 $option->UseImageAndText = TRUE;
                 $item =& $option->Add("addblankrow");
                 $item->Body = "<a class=\"ewAddEdit ewAddBlankRow\" title=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" href=\"javascript:void(0);\" onclick=\"ew_AddGridRow(this);\">" . $Language->Phrase("AddBlankRow") . "</a>";
                 $item->Visible = $Security->IsLoggedIn();
             }
             $option =& $options["action"];
             $option->UseDropDownButton = FALSE;
             $option->UseImageAndText = TRUE;
             // Add grid insert
             $item =& $option->Add("gridinsert");
             $item->Body = "<a class=\"ewAction ewGridInsert\" title=\"" . ew_HtmlTitle($Language->Phrase("GridInsertLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridInsertLink")) . "\" href=\"\" onclick=\"return ewForms(this).Submit();\">" . $Language->Phrase("GridInsertLink") . "</a>";
             // Add grid cancel
             $item =& $option->Add("gridcancel");
             $item->Body = "<a class=\"ewAction ewGridCancel\" title=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" href=\"" . $this->PageUrl() . "a=cancel\">" . $Language->Phrase("GridCancelLink") . "</a>";
         }
         if ($this->CurrentAction == "gridedit") {
             if ($this->AllowAddDeleteRow) {
                 // Add add blank row
                 $option =& $options["addedit"];
                 $option->UseDropDownButton = FALSE;
                 $option->UseImageAndText = TRUE;
                 $item =& $option->Add("addblankrow");
                 $item->Body = "<a class=\"ewAddEdit ewAddBlankRow\" title=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddBlankRow")) . "\" href=\"javascript:void(0);\" onclick=\"ew_AddGridRow(this);\">" . $Language->Phrase("AddBlankRow") . "</a>";
                 $item->Visible = $Security->IsLoggedIn();
             }
             $option =& $options["action"];
             $option->UseDropDownButton = FALSE;
             $option->UseImageAndText = TRUE;
             $item =& $option->Add("gridsave");
             $item->Body = "<a class=\"ewAction ewGridSave\" title=\"" . ew_HtmlTitle($Language->Phrase("GridSaveLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridSaveLink")) . "\" href=\"\" onclick=\"return ewForms(this).Submit();\">" . $Language->Phrase("GridSaveLink") . "</a>";
             $item =& $option->Add("gridcancel");
             $item->Body = "<a class=\"ewAction ewGridCancel\" title=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("GridCancelLink")) . "\" href=\"" . $this->PageUrl() . "a=cancel\">" . $Language->Phrase("GridCancelLink") . "</a>";
         }
     }
 }
Ejemplo n.º 17
0
        if ($emptywrk && strval($vl_media_list->vl_media_type->CurrentValue) != "") {
            ?>
<option value="<?php 
            echo ew_HtmlEncode($vl_media_list->vl_media_type->CurrentValue);
            ?>
" selected><?php 
            echo $vl_media_list->vl_media_type->CurrentValue;
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<button type="button" title="<?php 
    echo ew_HtmlTitle($Language->Phrase("AddLink")) . "&nbsp;" . $vl_media_list->vl_media_type->FldCaption();
    ?>
" onclick="ew_AddOptDialogShow({lnk:this,el:'x_vl_media_type',url:'vl_media_type_listaddopt.php'});" class="ewAddOptBtn btn btn-default btn-sm" id="aol_x_vl_media_type"><span class="glyphicon glyphicon-plus ewIcon"></span><span class="hide"><?php 
    echo $Language->Phrase("AddLink");
    ?>
&nbsp;<?php 
    echo $vl_media_list->vl_media_type->FldCaption();
    ?>
</span></button>
<?php 
    $sSqlWrk = "SELECT `vl_media_type_id`, `vl_media_type_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vl_media_type_list`";
    $sWhereWrk = "";
    $vl_media_list->vl_media_type->LookupFilters = array("s" => $sSqlWrk, "d" => "");
    $vl_media_list->vl_media_type->LookupFilters += array("f0" => "`vl_media_type_id` = {filter_value}", "t0" => "3", "fn0" => "");
    $sSqlWrk = "";
    $vl_media_list->Lookup_Selecting($vl_media_list->vl_media_type, $sWhereWrk);
Ejemplo n.º 18
0
 function RenderDropDownButton($body, $pos)
 {
     // Get all hidden inputs
     // format: <input type="hidden" ...>
     $inputs = array();
     if (preg_match_all('/<input\\s+([^>]*)>/i', $body, $inputmatches, PREG_SET_ORDER)) {
         foreach ($inputmatches as $inputmatch) {
             $body = str_replace($inputmatch[0], '', $body);
             if (preg_match('/\\s+type\\s*=\\s*[\'"]hidden[\'"]/i', $inputmatch[0])) {
                 // Match type='hidden'
                 $inputs[] = $inputmatch[0];
             }
         }
     }
     // Remove all <div class="hide ewPreview">...</div>
     $previewlinks = "";
     if (preg_match_all('/<div\\s+class\\s*=\\s*[\'"]hide\\s+ewPreview[\'"]>([\\s\\S]*?)(<div([^>]*)>([\\s\\S]*?)<\\/div\\s*>)+([\\s\\S]*?)<\\/div\\s*>/i', $body, $inputmatches, PREG_SET_ORDER)) {
         foreach ($inputmatches as $inputmatch) {
             $body = str_replace($inputmatch[0], '', $body);
             $previewlinks .= $inputmatch[0];
         }
     }
     // Remove toggle button first <button ... data-toggle="dropdown">...</button>
     if (preg_match_all('/<button\\s+([\\s\\S]*?)data-toggle\\s*=\\s*[\'"]dropdown[\'"]\\s*>([\\s\\S]*?)<\\/button\\s*>/i', $body, $btnmatches, PREG_SET_ORDER)) {
         foreach ($btnmatches as $btnmatch) {
             $body = str_replace($btnmatch[0], '', $body);
         }
     }
     // Get all links/buttons <a ...>...</a> / <button ...>...</button>
     if (!preg_match_all('/<(a|button)([^>]*)>([\\s\\S]*?)<\\/(a|button)\\s*>/i', $body, $matches, PREG_SET_ORDER)) {
         return '';
     }
     $links = '';
     $submenu = FALSE;
     $submenulink = "";
     $submenulinks = "";
     foreach ($matches as $match) {
         $tag = $match[1];
         if (preg_match('/\\s+data-action\\s*=\\s*[\'"]([\\s\\S]*?)[\'"]/i', $match[2], $actionmatches)) {
             // Match data-action='action'
             $action = $actionmatches[1];
         } else {
             $action = '';
         }
         if (preg_match('/\\s+class\\s*=\\s*[\'"]([\\s\\S]*?)[\'"]/i', $match[2], $submatches)) {
             // Match class='class'
             $class = preg_replace('/btn[\\S]*\\s+/i', '', $submatches[1]);
             $attrs = str_replace($submatches[0], '', $match[2]);
         } else {
             $class = '';
             $attrs = $match[2];
         }
         $attrs = preg_replace('/\\s+title\\s*=\\s*[\'"]([\\s\\S]*?)[\'"]/i', '', $attrs);
         // Remove title='title'
         if (preg_match('/\\s+data-caption\\s*=\\s*[\'"]([\\s\\S]*?)[\'"]/i', $attrs, $submatches)) {
             // Match data-caption='caption'
             $caption = $submatches[1];
         } else {
             $caption = '';
         }
         $attrs = ' class="' . $class . '" ' . $attrs;
         if (strtolower($tag) == "button") {
             // Add href for button
             $attrs .= ' href="javascript:void(0);"';
         }
         if ($this->UseImageAndText) {
             // Image and text
             if (preg_match('/<img([^>]*)>/i', $match[3], $submatch)) {
                 // <img> tag
                 $caption = $submatch[0] . '&nbsp;&nbsp;' . $caption;
             } elseif (preg_match('/<span([^>]*)>([\\s\\S]*?)<\\/span\\s*>/i', $match[3], $submatch)) {
                 // <span class='class'></span> tag
                 if (preg_match('/\\s+class\\s*=\\s*[\'"]([\\s\\S]*?)[\'"]/i', $submatch[1], $submatches)) {
                     // Match class='class'
                     $caption = $submatch[0] . '&nbsp;&nbsp;' . $caption;
                 }
             }
         }
         if ($caption == '') {
             $caption = $match[3];
         }
         $link = '<a' . $attrs . '>' . $caption . '</a>';
         if ($action == 'list') {
             // Start new submenu
             if ($submenu) {
                 // End previous submenu
                 if ($submenulinks != '') {
                     // Set up submenu
                     $links .= '<li class="dropdown-submenu">' . $submenulink . '<ul class="dropdown-menu">' . $submenulinks . '</ul></li>';
                 } else {
                     $links .= '<li>' . $submenulink . '</li>';
                 }
             }
             $submenu = TRUE;
             $submenulink = $link;
             $submenulinks = "";
         } else {
             if ($action == '' && $submenu) {
                 // End previous submenu
                 if ($submenulinks != '') {
                     // Set up submenu
                     $links .= '<li class="dropdown-submenu">' . $submenulink . '<ul class="dropdown-menu">' . $submenulinks . '</ul></li>';
                 } else {
                     $links .= '<li>' . $submenulink . '</li>';
                 }
                 $submenu = FALSE;
             }
             if ($submenu) {
                 $submenulinks .= '<li>' . $link . '</li>';
             } else {
                 $links .= '<li>' . $link . '</li>';
             }
         }
     }
     if ($links != "") {
         if ($submenu) {
             // End previous submenu
             if ($submenulinks != '') {
                 // Set up submenu
                 $links .= '<li class="dropdown-submenu">' . $submenulink . '<ul class="dropdown-menu">' . $submenulinks . '</ul></li>';
             } else {
                 $links .= '<li>' . $submenulink . '</li>';
             }
         }
         $buttonclass = "dropdown-toggle btn btn-default";
         if ($this->ButtonClass != "") {
             ew_AppendClass($buttonclass, $this->ButtonClass);
         }
         $buttontitle = ew_HtmlTitle($this->DropDownButtonPhrase);
         $buttontitle = $this->DropDownButtonPhrase != $buttontitle ? ' title="' . $buttontitle . '"' : '';
         $button = '<button class="' . $buttonclass . '"' . $buttontitle . ' data-toggle="dropdown">' . $this->DropDownButtonPhrase . '<b class="caret"></b></button><ul class="dropdown-menu ' . ($pos == 'right' ? 'dropdown-menu-right ' : '') . 'ewMenu">' . $links . '</ul>';
         if ($pos == "bottom") {
             // Use dropup
             $btndropdown = '<div class="btn-group dropup ewButtonDropdown">' . $button . '</div>';
         } else {
             $btndropdown = '<div class="btn-group ewButtonDropdown">' . $button . '</div>';
         }
     } else {
         $btndropdown = "";
     }
     foreach ($inputs as $input) {
         $btndropdown .= $input;
     }
     $btndropdown .= $previewlinks;
     return $btndropdown;
 }
Ejemplo n.º 19
0
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            if ($arwrk[$rowcntwrk][2] != "") {
                echo ew_ValueSeparator(1, $vehiculos->id_marca);
                echo $arwrk[$rowcntwrk][2];
            }
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<button type="button" title="<?php 
    echo ew_HtmlTitle($Language->Phrase("AddLink")) . "&nbsp;" . $vehiculos->id_marca->FldCaption();
    ?>
" onclick="ew_AddOptDialogShow({lnk:this,el:'x_id_marca',url:'marcasaddopt.php'});" class="ewAddOptBtn btn btn-default btn-sm" id="aol_x_id_marca"><span class="glyphicon glyphicon-plus ewIcon"></span><span class="hide"><?php 
    echo $Language->Phrase("AddLink");
    ?>
&nbsp;<?php 
    echo $vehiculos->id_marca->FldCaption();
    ?>
</span></button>
<?php 
    $sSqlWrk = "SELECT `codigo`, `marca` AS `DispFld`, `modelo` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `marcas`";
    $sWhereWrk = "";
    // Call Lookup selecting
    $vehiculos->Lookup_Selecting($vehiculos->id_marca, $sWhereWrk);
    if ($sWhereWrk != "") {
        $sSqlWrk .= " WHERE " . $sWhereWrk;
Ejemplo n.º 20
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "" && $Security->CanAdd();
     $option = $options["action"];
     // Add multi delete
     $item =& $option->Add("multidelete");
     $item->Body = "<a class=\"ewAction ewMultiDelete\" title=\"" . ew_HtmlTitle($Language->Phrase("DeleteSelectedLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("DeleteSelectedLink")) . "\" href=\"\" onclick=\"ew_SubmitAction(event,{f:document.fair_portlist,url:'" . $this->MultiDeleteUrl . "'});return false;\">" . $Language->Phrase("DeleteSelectedLink") . "</a>";
     $item->Visible = $Security->CanDelete();
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     // Filter button
     $item =& $this->FilterOptions->Add("savecurrentfilter");
     $item->Body = "<a class=\"ewSaveFilter\" data-form=\"fair_portlistsrch\" href=\"#\">" . $Language->Phrase("SaveCurrentFilter") . "</a>";
     $item->Visible = TRUE;
     $item =& $this->FilterOptions->Add("deletefilter");
     $item->Body = "<a class=\"ewDeleteFilter\" data-form=\"fair_portlistsrch\" href=\"#\">" . $Language->Phrase("DeleteFilter") . "</a>";
     $item->Visible = TRUE;
     $this->FilterOptions->UseDropDownButton = TRUE;
     $this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;
     $this->FilterOptions->DropDownButtonPhrase = $Language->Phrase("Filters");
     // Add group option item
     $item =& $this->FilterOptions->Add($this->FilterOptions->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
Ejemplo n.º 21
0
function ew_HtmlImageAndText($name)
{
    if (preg_match('/<span([^>]*)>([\\s\\S]*?)<\\/span\\s*>/i', $name) || preg_match('/<img([^>]*)>/i', $name)) {
        $title = ew_HtmlTitle($name);
    } else {
        $title = $name;
    }
    return $title != $name ? $name . "&nbsp;" . $title : $name;
}
Ejemplo n.º 22
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option =& $options["action"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAction ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageAddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageAddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("ViewPageAddLink") . "</a>";
     $item->Visible = $this->AddUrl != "" && $Security->CanAdd();
     // Edit
     $item =& $option->Add("edit");
     $item->Body = "<a class=\"ewAction ewEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
     $item->Visible = $this->EditUrl != "" && $Security->CanEdit();
     // Copy
     $item =& $option->Add("copy");
     $item->Body = "<a class=\"ewAction ewCopy\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageCopyLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("ViewPageCopyLink") . "</a>";
     $item->Visible = $this->CopyUrl != "" && $Security->CanAdd();
     // Delete
     $item =& $option->Add("delete");
     $item->Body = "<a class=\"ewAction ewDelete\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageDeleteLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageDeleteLink")) . "\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("ViewPageDeleteLink") . "</a>";
     $item->Visible = $this->DeleteUrl != "" && $Security->CanDelete();
     // Set up action default
     $option =& $options["action"];
     $option->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     $option->UseImageAndText = TRUE;
     $option->UseDropDownButton = FALSE;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
Ejemplo n.º 23
0
 function RenderListOptions()
 {
     global $Security, $Language, $objForm;
     $this->ListOptions->LoadDefault();
     // "view"
     $oListOpt =& $this->ListOptions->Items["view"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewView\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewLink")) . "\" href=\"" . ew_HtmlEncode($this->ViewUrl) . "\">" . $Language->Phrase("ViewLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "edit"
     $oListOpt =& $this->ListOptions->Items["edit"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewEdit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("EditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("EditLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "copy"
     $oListOpt =& $this->ListOptions->Items["copy"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewCopy\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("CopyLink")) . "\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("CopyLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // "delete"
     $oListOpt =& $this->ListOptions->Items["delete"];
     if ($Security->IsLoggedIn()) {
         $oListOpt->Body = "<a class=\"ewRowLink ewDelete\"" . "" . " data-caption=\"" . ew_HtmlTitle($Language->Phrase("DeleteLink")) . "\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("DeleteLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     $DetailViewTblVar = "";
     $DetailCopyTblVar = "";
     $DetailEditTblVar = "";
     // "detail_detail_nilai"
     $oListOpt =& $this->ListOptions->Items["detail_detail_nilai"];
     if ($Security->IsLoggedIn()) {
         $body = $Language->Phrase("DetailLink") . $Language->TablePhrase("detail_nilai", "TblCaption");
         $body = "<a class=\"btn btn-small ewRowLink ewDetailList\" data-action=\"list\" href=\"" . ew_HtmlEncode("detail_nilailist.php?" . EW_TABLE_SHOW_MASTER . "=nilai&nilai_id=" . strval($this->nilai_id->CurrentValue) . "") . "\">" . $body . "</a>";
         $links = "";
         if ($GLOBALS["detail_nilai_grid"]->DetailView && $Security->IsLoggedIn() && $Security->IsLoggedIn()) {
             $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=detail_nilai")) . "\">" . $Language->Phrase("MasterDetailViewLink") . "</a></li>";
             if ($DetailViewTblVar != "") {
                 $DetailViewTblVar .= ",";
             }
             $DetailViewTblVar .= "detail_nilai";
         }
         if ($GLOBALS["detail_nilai_grid"]->DetailEdit && $Security->IsLoggedIn() && $Security->IsLoggedIn()) {
             $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=detail_nilai")) . "\">" . $Language->Phrase("MasterDetailEditLink") . "</a></li>";
             if ($DetailEditTblVar != "") {
                 $DetailEditTblVar .= ",";
             }
             $DetailEditTblVar .= "detail_nilai";
         }
         if ($GLOBALS["detail_nilai_grid"]->DetailAdd && $Security->IsLoggedIn() && $Security->IsLoggedIn()) {
             $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=detail_nilai")) . "\">" . $Language->Phrase("MasterDetailCopyLink") . "</a></li>";
             if ($DetailCopyTblVar != "") {
                 $DetailCopyTblVar .= ",";
             }
             $DetailCopyTblVar .= "detail_nilai";
         }
         if ($links != "") {
             $body .= "<button class=\"btn btn-small dropdown-toggle\" data-toggle=\"dropdown\"><b class=\"caret\"></b></button>";
             $body .= "<ul class=\"dropdown-menu\">" . $links . "</ul>";
         }
         $body = "<div class=\"btn-group\">" . $body . "</div>";
         $oListOpt->Body = $body;
         if ($this->ShowMultipleDetails) {
             $oListOpt->Visible = FALSE;
         }
     }
     if ($this->ShowMultipleDetails) {
         $body = $Language->Phrase("MultipleMasterDetails");
         $body = "<div class=\"btn-group\">" . "<a class=\"btn btn-small ewRowLink ewDetailView\" data-action=\"list\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailViewTblVar)) . "\">" . $body . "</a>";
         $links = "";
         if ($DetailViewTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailViewTblVar)) . "\">" . $Language->Phrase("MasterDetailViewLink") . "</a></li>";
         }
         if ($DetailEditTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailEditTblVar)) . "\">" . $Language->Phrase("MasterDetailEditLink") . "</a></li>";
         }
         if ($DetailCopyTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailCopyTblVar)) . "\">" . $Language->Phrase("MasterDetailCopyLink") . "</a></li>";
         }
         if ($links != "") {
             $body .= "<button class=\"btn btn-small dropdown-toggle\" data-toggle=\"dropdown\">&nbsp;<b class=\"caret\"></b></button>";
             $body .= "<ul class=\"dropdown-menu\">" . $links . "</ul>";
         }
         $body .= "</div>";
         // Multiple details
         $oListOpt =& $this->ListOptions->Items["details"];
         $oListOpt->Body = $body;
     }
     // "checkbox"
     $oListOpt =& $this->ListOptions->Items["checkbox"];
     $oListOpt->Body = "<label class=\"checkbox\"><input type=\"checkbox\" name=\"key_m[]\" value=\"" . ew_HtmlEncode($this->nilai_id->CurrentValue) . "\" onclick='ew_ClickMultiCheckbox(event, this);'></label>";
     $this->RenderListOptionsExt();
     // Call ListOptions_Rendered event
     $this->ListOptions_Rendered();
 }
Ejemplo n.º 24
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "" && $Security->CanAdd();
     $option = $options["action"];
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
 }
Ejemplo n.º 25
0
 function RenderListOptions()
 {
     global $Security, $Language, $objForm;
     $this->ListOptions->LoadDefault();
     // "edit"
     $oListOpt =& $this->ListOptions->Items["edit"];
     if ($Security->CanEdit() && $this->ShowOptionLink('edit')) {
         $oListOpt->Body = "<a class=\"ewRowLink ewEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("EditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("EditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("EditLink") . "</a>";
     } else {
         $oListOpt->Body = "";
     }
     // Set up list action buttons
     $oListOpt =& $this->ListOptions->GetItem("listactions");
     if ($oListOpt) {
         $body = "";
         $links = array();
         foreach ($this->ListActions->Items as $listaction) {
             if ($listaction->Select == EW_ACTION_SINGLE && $listaction->Allow) {
                 $action = $listaction->Action;
                 $caption = $listaction->Caption;
                 $icon = $listaction->Icon != "" ? "<span class=\"" . ew_HtmlEncode(str_replace(" ewIcon", "", $listaction->Icon)) . "\" data-caption=\"" . ew_HtmlTitle($caption) . "\"></span> " : "";
                 $links[] = "<li><a class=\"ewAction ewListAction\" data-action=\"" . ew_HtmlEncode($action) . "\" data-caption=\"" . ew_HtmlTitle($caption) . "\" href=\"\" onclick=\"ew_SubmitAction(event,jQuery.extend({key:" . $this->KeyToJson() . "}," . $listaction->ToJson(TRUE) . "));return false;\">" . $icon . $listaction->Caption . "</a></li>";
                 if (count($links) == 1) {
                     // Single button
                     $body = "<a class=\"ewAction ewListAction\" data-action=\"" . ew_HtmlEncode($action) . "\" title=\"" . ew_HtmlTitle($caption) . "\" data-caption=\"" . ew_HtmlTitle($caption) . "\" href=\"\" onclick=\"ew_SubmitAction(event,jQuery.extend({key:" . $this->KeyToJson() . "}," . $listaction->ToJson(TRUE) . "));return false;\">" . $Language->Phrase("ListActionButton") . "</a>";
                 }
             }
         }
         if (count($links) > 1) {
             // More than one buttons, use dropdown
             $body = "<button class=\"dropdown-toggle btn btn-default btn-sm ewActions\" title=\"" . ew_HtmlTitle($Language->Phrase("ListActionButton")) . "\" data-toggle=\"dropdown\">" . $Language->Phrase("ListActionButton") . "<b class=\"caret\"></b></button>";
             $content = "";
             foreach ($links as $link) {
                 $content .= "<li>" . $link . "</li>";
             }
             $body .= "<ul class=\"dropdown-menu" . ($oListOpt->OnLeft ? "" : " dropdown-menu-right") . "\">" . $content . "</ul>";
             $body = "<div class=\"btn-group\">" . $body . "</div>";
         }
         if (count($links) > 0) {
             $oListOpt->Body = $body;
             $oListOpt->Visible = TRUE;
         }
     }
     // "checkbox"
     $oListOpt =& $this->ListOptions->Items["checkbox"];
     $oListOpt->Body = "<input type=\"checkbox\" name=\"key_m[]\" value=\"" . ew_HtmlEncode($this->USER_ID->CurrentValue) . "\" onclick='ew_ClickMultiCheckbox(event);'>";
     $this->RenderListOptionsExt();
     // Call ListOptions_Rendered event
     $this->ListOptions_Rendered();
 }
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("AddLink") . "</a>";
     $item->Visible = $this->AddUrl != "";
     $option = $options["detail"];
     $DetailTableLink = "";
     $item =& $option->Add("detailadd_servicio_medico_prestado");
     $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=servicio_medico_prestado") . "\">" . $Language->Phrase("Add") . "&nbsp;" . $this->TableCaption() . "/" . $GLOBALS["servicio_medico_prestado"]->TableCaption() . "</a>";
     $item->Visible = $GLOBALS["servicio_medico_prestado"]->DetailAdd;
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "servicio_medico_prestado";
     }
     $item =& $option->Add("detailadd_consulta");
     $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=consulta") . "\">" . $Language->Phrase("Add") . "&nbsp;" . $this->TableCaption() . "/" . $GLOBALS["consulta"]->TableCaption() . "</a>";
     $item->Visible = $GLOBALS["consulta"]->DetailAdd;
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "consulta";
     }
     $item =& $option->Add("detailadd_internado_diario");
     $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=internado_diario") . "\">" . $Language->Phrase("Add") . "&nbsp;" . $this->TableCaption() . "/" . $GLOBALS["internado_diario"]->TableCaption() . "</a>";
     $item->Visible = $GLOBALS["internado_diario"]->DetailAdd;
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "internado_diario";
     }
     // Add multiple details
     if ($this->ShowMultipleDetails) {
         $item =& $option->Add("detailsadd");
         $item->Body = "<a class=\"ewDetailAddGroup ewDetailAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddMasterDetailLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl() . "?" . EW_TABLE_SHOW_DETAIL . "=" . $DetailTableLink) . "\">" . $Language->Phrase("AddMasterDetailLink") . "</a>";
         $item->Visible = $DetailTableLink != "";
         // Hide single master/detail items
         $ar = explode(",", $DetailTableLink);
         $cnt = count($ar);
         for ($i = 0; $i < $cnt; $i++) {
             if ($item =& $option->GetItem("detailadd_" . $ar[$i])) {
                 $item->Visible = FALSE;
             }
         }
     }
     $option = $options["action"];
     // Set up options default
     foreach ($options as &$option) {
         $option->UseImageAndText = TRUE;
         $option->UseDropDownButton = FALSE;
         $option->UseButtonGroup = TRUE;
         $option->ButtonClass = "btn-sm";
         // Class for button group
         $item =& $option->Add($option->GroupOptionName);
         $item->Body = "";
         $item->Visible = FALSE;
     }
     $options["addedit"]->DropDownButtonPhrase = $Language->Phrase("ButtonAddEdit");
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $options["action"]->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
 }
Ejemplo n.º 27
0
>
<?php 
            echo $arwrk[$rowcntwrk][1];
            if ($arwrk[$rowcntwrk][2] != "") {
                echo ew_ValueSeparator(1, $hoja_rutas->id_tipo_carga);
                echo $arwrk[$rowcntwrk][2];
            }
            ?>
</option>
<?php 
        }
    }
    ?>
</select>
<button type="button" title="<?php 
    echo ew_HtmlTitle($Language->Phrase("AddLink")) . "&nbsp;" . $hoja_rutas->id_tipo_carga->FldCaption();
    ?>
" onclick="ew_AddOptDialogShow({lnk:this,el:'x_id_tipo_carga',url:'tipo_cargasaddopt.php'});" class="ewAddOptBtn btn btn-default btn-sm" id="aol_x_id_tipo_carga"><span class="glyphicon glyphicon-plus ewIcon"></span><span class="hide"><?php 
    echo $Language->Phrase("AddLink");
    ?>
&nbsp;<?php 
    echo $hoja_rutas->id_tipo_carga->FldCaption();
    ?>
</span></button>
<?php 
    $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_cargas`";
    $sWhereWrk = "";
    // Call Lookup selecting
    $hoja_rutas->Lookup_Selecting($hoja_rutas->id_tipo_carga, $sWhereWrk);
    if ($sWhereWrk != "") {
        $sSqlWrk .= " WHERE " . $sWhereWrk;
Ejemplo n.º 28
0
 function SetupOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option =& $options["action"];
     // Add
     $item =& $option->Add("add");
     $item->Body = "<a class=\"ewAction ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageAddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageAddLink")) . "\" href=\"" . ew_HtmlEncode($this->AddUrl) . "\">" . $Language->Phrase("ViewPageAddLink") . "</a>";
     $item->Visible = $this->AddUrl != "";
     // Edit
     $item =& $option->Add("edit");
     $item->Body = "<a class=\"ewAction ewEdit\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageEditLink")) . "\" href=\"" . ew_HtmlEncode($this->EditUrl) . "\">" . $Language->Phrase("ViewPageEditLink") . "</a>";
     $item->Visible = $this->EditUrl != "";
     // Copy
     $item =& $option->Add("copy");
     $item->Body = "<a class=\"ewAction ewCopy\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageCopyLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->CopyUrl) . "\">" . $Language->Phrase("ViewPageCopyLink") . "</a>";
     $item->Visible = $this->CopyUrl != "";
     // Delete
     $item =& $option->Add("delete");
     $item->Body = "<a class=\"ewAction ewDelete\" title=\"" . ew_HtmlTitle($Language->Phrase("ViewPageDeleteLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("ViewPageDeleteLink")) . "\" href=\"" . ew_HtmlEncode($this->DeleteUrl) . "\">" . $Language->Phrase("ViewPageDeleteLink") . "</a>";
     $item->Visible = $this->DeleteUrl != "";
     $option =& $options["detail"];
     $DetailTableLink = "";
     $DetailViewTblVar = "";
     $DetailCopyTblVar = "";
     $DetailEditTblVar = "";
     // "detail_products"
     $item =& $option->Add("detail_products");
     $body = $Language->Phrase("ViewPageDetailLink") . $Language->TablePhrase("products", "TblCaption");
     $body = "<a class=\"btn btn-default btn-sm ewRowLink ewDetail\" data-action=\"list\" href=\"" . ew_HtmlEncode("productslist.php?" . EW_TABLE_SHOW_MASTER . "=sub_category&fk_scat_id=" . urlencode(strval($this->scat_id->CurrentValue)) . "") . "\">" . $body . "</a>";
     $links = "";
     if ($GLOBALS["products_grid"] && $GLOBALS["products_grid"]->DetailView) {
         $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=products")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         if ($DetailViewTblVar != "") {
             $DetailViewTblVar .= ",";
         }
         $DetailViewTblVar .= "products";
     }
     if ($GLOBALS["products_grid"] && $GLOBALS["products_grid"]->DetailEdit) {
         $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=products")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailEditLink")) . "</a></li>";
         if ($DetailEditTblVar != "") {
             $DetailEditTblVar .= ",";
         }
         $DetailEditTblVar .= "products";
     }
     if ($GLOBALS["products_grid"] && $GLOBALS["products_grid"]->DetailAdd) {
         $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=products")) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailCopyLink")) . "</a></li>";
         if ($DetailCopyTblVar != "") {
             $DetailCopyTblVar .= ",";
         }
         $DetailCopyTblVar .= "products";
     }
     if ($links != "") {
         $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewDetail\" data-toggle=\"dropdown\"><b class=\"caret\"></b></button>";
         $body .= "<ul class=\"dropdown-menu\">" . $links . "</ul>";
     }
     $body = "<div class=\"btn-group\">" . $body . "</div>";
     $item->Body = $body;
     $item->Visible = TRUE;
     if ($item->Visible) {
         if ($DetailTableLink != "") {
             $DetailTableLink .= ",";
         }
         $DetailTableLink .= "products";
     }
     if ($this->ShowMultipleDetails) {
         $item->Visible = FALSE;
     }
     // Multiple details
     if ($this->ShowMultipleDetails) {
         $body = $Language->Phrase("MultipleMasterDetails");
         $body = "<div class=\"btn-group\">";
         $links = "";
         if ($DetailViewTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailView\" data-action=\"view\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailViewLink")) . "\" href=\"" . ew_HtmlEncode($this->GetViewUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailViewTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailViewLink")) . "</a></li>";
         }
         if ($DetailEditTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailEdit\" data-action=\"edit\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailEditLink")) . "\" href=\"" . ew_HtmlEncode($this->GetEditUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailEditTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailEditLink")) . "</a></li>";
         }
         if ($DetailCopyTblVar != "") {
             $links .= "<li><a class=\"ewRowLink ewDetailCopy\" data-action=\"add\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("MasterDetailCopyLink")) . "\" href=\"" . ew_HtmlEncode($this->GetCopyUrl(EW_TABLE_SHOW_DETAIL . "=" . $DetailCopyTblVar)) . "\">" . ew_HtmlImageAndText($Language->Phrase("MasterDetailCopyLink")) . "</a></li>";
         }
         if ($links != "") {
             $body .= "<button class=\"dropdown-toggle btn btn-default btn-sm ewMasterDetail\" title=\"" . ew_HtmlTitle($Language->Phrase("MultipleMasterDetails")) . "\" data-toggle=\"dropdown\">" . $Language->Phrase("MultipleMasterDetails") . "<b class=\"caret\"></b></button>";
             $body .= "<ul class=\"dropdown-menu ewMenu\">" . $links . "</ul>";
         }
         $body .= "</div>";
         // Multiple details
         $oListOpt =& $option->Add("details");
         $oListOpt->Body = $body;
     }
     // Set up detail default
     $option =& $options["detail"];
     $options["detail"]->DropDownButtonPhrase = $Language->Phrase("ButtonDetails");
     $option->UseImageAndText = TRUE;
     $ar = explode(",", $DetailTableLink);
     $cnt = count($ar);
     $option->UseDropDownButton = $cnt > 1;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
     // Set up action default
     $option =& $options["action"];
     $option->DropDownButtonPhrase = $Language->Phrase("ButtonActions");
     $option->UseImageAndText = TRUE;
     $option->UseDropDownButton = FALSE;
     $option->UseButtonGroup = TRUE;
     $item =& $option->Add($option->GroupOptionName);
     $item->Body = "";
     $item->Visible = FALSE;
 }
 function RenderOtherOptions()
 {
     global $Language, $Security;
     $options =& $this->OtherOptions;
     $option = $options["addedit"];
     // Add
     $item =& $option->GetItem("add");
     $item->Body = "<a class=\"btn btn-default btn-sm ewAddEdit ewAdd\" title=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" data-caption=\"" . ew_HtmlTitle($Language->Phrase("AddLink")) . "\" href=\"" . ew_HtmlEncode($this->GetAddUrl($this->MasterKeyUrl())) . "\">" . $Language->Phrase("AddLink") . "</a>";
 }