[Mapbender-commits] r9510 - trunk/mapbender/resources/db/pgsql/UTF-8/update

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jun 7 07:56:31 PDT 2016


Author: armin11
Date: 2016-06-07 07:56:31 -0700 (Tue, 07 Jun 2016)
New Revision: 9510

Modified:
   trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
Log:
Database change for wfs metadata editor

Modified: trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql
===================================================================
--- trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2016-06-07 14:55:39 UTC (rev 9509)
+++ trunk/mapbender/resources/db/pgsql/UTF-8/update/update_2.7.4_to_2.8_pgsql_UTF-8.sql	2016-06-07 14:56:31 UTC (rev 9510)
@@ -1045,3 +1045,73 @@
   ON external_api_log
   FOR EACH ROW
   EXECUTE PROCEDURE update_lastchanged_column();
+
+--create function to prepare searchtext for fulltext search
+
+-- Function: f_collect_searchtext_dataset_ts(integer)
+
+-- DROP FUNCTION f_collect_searchtext_dataset_ts(integer);
+
+CREATE OR REPLACE FUNCTION f_collect_searchtext_dataset_ts(integer)
+  RETURNS text AS
+$BODY$
+DECLARE
+    p_dataset_id ALIAS FOR $1;
+    
+    r_keywords RECORD;
+    l_result TEXT;
+BEGIN
+    l_result := '';
+    l_result := l_result || (SELECT COALESCE(title, '') || ' ' || COALESCE(abstract, '') FROM mb_metadata WHERE metadata_id = p_dataset_id);
+    FOR r_keywords IN SELECT DISTINCT keyword FROM
+        (SELECT keyword FROM mb_metadata_keyword L JOIN keyword K ON (K.keyword_id = L.fkey_keyword_id AND L.fkey_metadata_id = p_dataset_id)
+        ) AS __keywords__ LOOP
+        l_result := l_result || ' ' || COALESCE(r_keywords.keyword, '');
+    END LOOP;
+
+    RETURN l_result;
+END;
+$BODY$
+  LANGUAGE plpgsql VOLATILE
+  COST 100;
+ALTER FUNCTION f_collect_searchtext_dataset_ts(integer)
+  OWNER TO postgres;
+ 
+--change metadata addon editor for wfs metadataeditor to central one
+DELETE FROM gui_element WHERE fkey_gui_id = 'admin_wfs_metadata' AND e_id = 'mb_md_showMetadataAddonWfs';
+DELETE FROM gui_element WHERE fkey_gui_id = 'admin_wfs_metadata' AND e_id = 'mb_metadata_xml_import';
+
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin_wfs_metadata','mb_md_showMetadataAddon',2,1,'Show addon editor for metadata','Metadata Addon Editor','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'display:none;','','div','../plugins/mb_metadata_showMetadataAddon.js','','','jq_ui_dialog','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('admin_wfs_metadata', 'mb_md_showMetadataAddon', 'differentFromOriginalCss', '.differentFromOriginal{
+background-color:#FFFACD;
+}', 'css for class differentFromOriginal' ,'text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES('admin_wfs_metadata', 'mb_md_showMetadataAddon', 'inputs', '[
+    {
+        "method": "init",
+        "title": "initialize",
+        "linkedTo": [
+            {
+                "id": "mb_md_edit",
+                "event": "showOriginalMetadata",
+                "attr": "data" 
+            } 
+        ] 
+    },
+    {
+        "method": "initLayer",
+        "title": "initialize",
+        "linkedTo": [
+            {
+                "id": "mb_md_layer",
+                "event": "showOriginalLayerMetadata",
+                "attr": "data" 
+            } 
+        ] 
+    }
+]', '' ,'var');
+
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin_wfs_metadata','mb_metadata_xml_import',1,1,'','','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','div','../plugins/mb_metadata_xml_import.js','','','','');
+
+DELETE FROM gui_element WHERE fkey_gui_id = 'admin_wfs_metadata' AND e_id = 'mb_metadata_gml_import';
+
+INSERT INTO gui_element(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_title, e_element, e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires, e_url) VALUES('admin_wfs_metadata','mb_metadata_gml_import',1,1,'','','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','div','../plugins/mb_metadata_gml_import.js','','','','');



More information about the Mapbender_commits mailing list