From 4bfe7829092cb886704f3f35988418da57527ac1 Mon Sep 17 00:00:00 2001 From: Alex Corbi Date: Mon, 5 Jun 2017 12:42:38 +0200 Subject: [PATCH 1/7] Fixes #155 --- post-types/templates/single-profiles.php | 15 ++++++++++----- wp-odm_profile_pages.php | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/post-types/templates/single-profiles.php b/post-types/templates/single-profiles.php index 6aa5da4..86ff212 100644 --- a/post-types/templates/single-profiles.php +++ b/post-types/templates/single-profiles.php @@ -39,24 +39,29 @@
-
+

-
+ if(!empty($dataset)) :?> +
+
+ +
+ else: ?>
diff --git a/wp-odm_profile_pages.php b/wp-odm_profile_pages.php index d48eed5..b41b9ec 100644 --- a/wp-odm_profile_pages.php +++ b/wp-odm_profile_pages.php @@ -3,7 +3,7 @@ * Plugin Name: ODM Profile Pages * Plugin URI: http://github.com/OpenDevelopmentMekong/odm_profile_pages * Description: Internal wordpress plugin for exposing custom content type for profile pages - * Version: 2.2.0 + * Version: 2.2.1 * Author: Alex Corbi (mail@lifeformapps.com) * Author URI: http://www.lifeformapps.com * License: GPLv3. From 3e9b4035eeb0707889d21ebc1b0c4e19f79a3ddf Mon Sep 17 00:00:00 2001 From: Alex Corbi Date: Mon, 5 Jun 2017 12:47:17 +0200 Subject: [PATCH 2/7] Fixes #155 --- post-types/templates/single-profiles.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/post-types/templates/single-profiles.php b/post-types/templates/single-profiles.php index 86ff212..a1054d6 100644 --- a/post-types/templates/single-profiles.php +++ b/post-types/templates/single-profiles.php @@ -39,23 +39,23 @@
-
+

-
+
-
+
-
+
From 6c5a3a6f6af02ee3ec0580a04fd478a38e0131fd Mon Sep 17 00:00:00 2001 From: Alex Corbi Date: Mon, 5 Jun 2017 15:23:10 +0200 Subject: [PATCH 3/7] Fixes #155 --- post-types/templates/single-profiles.php | 30 ++++++++---------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/post-types/templates/single-profiles.php b/post-types/templates/single-profiles.php index a1054d6..51567ac 100644 --- a/post-types/templates/single-profiles.php +++ b/post-types/templates/single-profiles.php @@ -43,26 +43,16 @@

- -
- -
-
- -
- -
- -
- +
+ + + + +
From 0ac8d712275ebc9cc93d4cb1b24f6d903dfd984e Mon Sep 17 00:00:00 2001 From: Alex Corbi Date: Mon, 5 Jun 2017 15:24:33 +0200 Subject: [PATCH 4/7] Fixes #155 --- post-types/templates/single-profiles.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post-types/templates/single-profiles.php b/post-types/templates/single-profiles.php index 51567ac..54a6450 100644 --- a/post-types/templates/single-profiles.php +++ b/post-types/templates/single-profiles.php @@ -39,7 +39,7 @@
-
+

From 06dc69cb774cb71e001627872b62d20660ea643e Mon Sep 17 00:00:00 2001 From: huyeng Date: Thu, 8 Mar 2018 18:32:42 +0700 Subject: [PATCH 5/7] Add social media icons on profile and show donwload icon next to it. The 'Download and metadata' will be shown on hover. --- css/profile-pages.css | 18 ++++++++++++++++++ post-types/templates/single-profiles.php | 21 +++++++++++++-------- utils/utils.php | 6 +++++- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/css/profile-pages.css b/css/profile-pages.css index bbf8d82..18885ca 100644 --- a/css/profile-pages.css +++ b/css/profile-pages.css @@ -651,3 +651,21 @@ table.no-bgcolor tr{ .od-submenu h1{ margin: 3px 0 0; } + +.widget_download .nc_tweetContainer{ + height: 35px !important; +} +.widget_download .button.download{ + padding: 10px 6px !important; + border-radius: 2px; +} +.widget_download a.download span{ + display: none; +} +.widget_download a.download:hover span{ + display: initial; +} +.widget_download a.download i{ + margin-right: 5px; + margin-left: 5px; +} diff --git a/post-types/templates/single-profiles.php b/post-types/templates/single-profiles.php index 54a6450..000d38b 100644 --- a/post-types/templates/single-profiles.php +++ b/post-types/templates/single-profiles.php @@ -30,6 +30,7 @@ $ckan_dataset_exploded_by_dataset = explode('/dataset/', $ckan_dataset ); $ckan_dataset_exploded_by_resource = explode('/resource/', $ckan_dataset_exploded_by_dataset[1]); $ckan_dataset_id = $ckan_dataset_exploded_by_resource[0]; + $dataset = wpckan_api_package_show(wpckan_get_ckan_domain(),$ckan_dataset_id); } @@ -39,19 +40,23 @@
-
+

-
+
- - -
diff --git a/utils/utils.php b/utils/utils.php index f9e1198..fad65c0 100644 --- a/utils/utils.php +++ b/utils/utils.php @@ -271,7 +271,11 @@ function echo_metadata_button($dataset){ function echo_download_button_link_to_datapage($dataset_id){ ?> - /dataset/?id="> +
+ +
Date: Thu, 8 Mar 2018 18:33:08 +0700 Subject: [PATCH 6/7] update version --- wp-odm_profile_pages.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-odm_profile_pages.php b/wp-odm_profile_pages.php index b41b9ec..ec95096 100644 --- a/wp-odm_profile_pages.php +++ b/wp-odm_profile_pages.php @@ -3,7 +3,7 @@ * Plugin Name: ODM Profile Pages * Plugin URI: http://github.com/OpenDevelopmentMekong/odm_profile_pages * Description: Internal wordpress plugin for exposing custom content type for profile pages - * Version: 2.2.1 + * Version: 2.2.2 * Author: Alex Corbi (mail@lifeformapps.com) * Author URI: http://www.lifeformapps.com * License: GPLv3. From c58ed911cc1d5af7333a3317f3cf73a202f8954a Mon Sep 17 00:00:00 2001 From: huyeng Date: Thu, 8 Mar 2018 22:44:33 +0700 Subject: [PATCH 7/7] Update styling of download button --- css/profile-pages.css | 8 +++++++- post-types/templates/single-profiles.php | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/css/profile-pages.css b/css/profile-pages.css index 18885ca..ce6d07b 100644 --- a/css/profile-pages.css +++ b/css/profile-pages.css @@ -656,12 +656,18 @@ table.no-bgcolor tr{ height: 35px !important; } .widget_download .button.download{ - padding: 10px 6px !important; + padding: 8px 6px 0 !important; border-radius: 2px; + position: absolute; + right: 215px; } .widget_download a.download span{ display: none; } + +.widget_download a.download:hover{ + right: 215px; +} .widget_download a.download:hover span{ display: initial; } diff --git a/post-types/templates/single-profiles.php b/post-types/templates/single-profiles.php index 000d38b..5f8cd79 100644 --- a/post-types/templates/single-profiles.php +++ b/post-types/templates/single-profiles.php @@ -40,20 +40,20 @@
-
+

-
+