".$this->Lang("error_noparent")."
"; } echo $this->EndTab(); } if( $has_advanced_perm || $this->GetPreference("tabdisplay_parcelle",false) || $this->CheckPermission("parcelle_manage_parcelle") ) { echo $this->StartTab("parcelle"); if($this->countsomething("lieuxdits") > 0){ $whereclause = array(); $filteroutput = false; if($filter){ $cur_filter = false; if(isset($params["parcelle_showonly"])){ $cur_filter = $params["parcelle_showonly"]; if($use_sessoin) $_SESSION["ctlmm_filter_parcelle"] = $params["parcelle_showonly"]; }elseif($use_session && isset($_SESSION["ctlmm_filter_parcelle"]) && $_SESSION["ctlmm_filter_parcelle"]){ $cur_filter = $_SESSION["ctlmm_filter_parcelle"]; } if($cur_filter && $cur_filter != ""){ $filteroptions = array_flip($this->get_options("lieuxdits")); $filteroutput = isset($filteroptions[$params["parcelle_showonly"]])?$this->Lang("showingonly").$filteroptions[$params["parcelle_showonly"]]." ":""; $filteroutput .= $this->CreateLink($id, "defaultadmin", $returnid, $this->Lang("showall"), array("active_tab" => "parcelle", "parcelle_showonly"=>false)); $whereclause = array("parent_id"=>$params["parcelle_showonly"]); }else{ if($use_hierarchy){ $filteroptions = $this->get_admin_hierarchyoptions("parcelle",true); }else{ $filteroptions = $this->get_options("lieuxdits"); } $filteroutput = $this->CreateFormStart($id, "defaultadmin", $returnid); $filteroutput .= $this->Lang("filterby_lieuxdits")." : "; $filteroutput .= $this->CreateInputDropdown($id, "parcelle_showonly", $filteroptions, -1); $filteroutput .= $this->CreateInputHidden($id, "active_tab", "parcelle"); $filteroutput .= " ".$this->CreateInputSubmit($id, "submit", lang("submit")); $filteroutput .= $this->CreateFormEnd(); } } $this->smarty->assign("filter", $filteroutput); $this->smarty->assign("instantsearch", $instantsearch?$this->Lang("searchthistable")." ".$this->CreateInputText($id, "searchtable_parcelle", "", 10, 64, ' onkeyup="ctlmm_search(this.value,\'parcelle_table\');"'):false); $this->smarty->assign("addnew", $this->CreateLink($id, "editparcel", $returnid, $admintheme->DisplayImage("icons/system/newobject.gif", "","","","systemicon")." ".$this->Lang("add_parcelle"))); $reorder_btn = false;if($has_advanced_perm || !$this->GetPreference("restrict_permissions",false) || $this->CheckPermission("parcelle_manage_parcelle")) $reorder_btn = $this->CreateLink($id, "reorder", $returnid, $admintheme->DisplayImage("icons/system/reorder.gif", "","","","systemicon")." ".$this->Lang("reorder")); $this->smarty->assign("reorder", $reorder_btn); $limit = false; if($adminpages){ $limit = ((isset($params["parcelle_page"])?$params["parcelle_page"]:0) * $adminpages).",".$adminpages; } $itemlist = $this->get_level_parcelle(isset($whereclause)?$whereclause:array(),true, $id, $returnid, false, $limit); $this->smarty->assign("tableid", "parcelle_table"); $this->smarty->assign("itemlist", $itemlist); $adminshow = array( array($this->Lang("name"),"editlink",false), array($this->Lang("parcelle_surface"),"surface",false), array($this->Lang("lieuxdits"),"parent_name",false), array($this->Lang("active"),"toggleactive",true), array($this->Lang("isdefault"),"toggledefault",true), array($this->Lang("reorder"),"movelinks",true), array($this->Lang("Actions"),"deletelink",true) ); if($instantsort && count($itemlist)>1){ $i = 0; while($i".$this->Lang("error_noparent")."
"; } echo $this->EndTab(); } $this->smarty->assign(array("nextpage"=>false,"previouspage"=>false,"pageinfo"=>false,"pages"=>false)); $this->smarty->assign(array("filter"=>false,"reorder"=>false,"instantsearch"=>false,"tableid"=>false)); if( $has_advanced_perm || $this->CheckPermission("Modify Templates") || $this->GetPreference("tabdisplay_templates",false) ) { echo $this->StartTab("templates"); echo "".$this->CreateInputSubmit($id, "submit", lang("submit"))."
"; echo $this->CreateFormEnd(); echo "".$admintheme->DisplayImage("icons/system/import.gif", "","","","systemicon")." "; echo $this->CreateLink($id, "export", $returnid, $this->Lang("export_title"))." | ".$this->CreateLink($id, "import", $returnid, $this->Lang("import_title"))."
"; echo $this->EndTab(); } echo $this->EndTabContent(); ?>