Skip to content

Commit

Permalink
Merge pull request #186 from OpenDevelopmentMekong/master
Browse files Browse the repository at this point in the history
merging to prod for releasing v2.4.4
  • Loading branch information
Alex Corbi authored Mar 12, 2018
2 parents 9c238bf + 8c5c0d8 commit fd6f288
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 21 deletions.
25 changes: 24 additions & 1 deletion css/profile-pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,29 @@ table.no-bgcolor tr{
margin: 3px 0 0;
}

.widget_download .nc_tweetContainer{
height: 35px !important;
}
.widget_download .button.download{
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;
}
.widget_download a.download i{
margin-right: 5px;
margin-left: 5px;

.full-width-content ul{
padding: 5px 0;
}
Expand Down Expand Up @@ -764,5 +787,5 @@ table.no-bgcolor tr{
.single #post-content .selected_option_ha,
.single #post-content .selected_option_per{
border: none;
padding: 0;
padding: 0;
}
27 changes: 19 additions & 8 deletions post-types/templates/single-profiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -46,21 +47,31 @@
<div class="align-right">
<?php echo_download_button_link_to_datapage($ckan_dataset_id) ?>
</div>
<?php endif;?>
<?php
endif;?>
<?php odm_title($post,array('date','categories','tags')); ?>
</div>
<?php
if(!empty($dataset) && !odm_screen_manager()->is_mobile()): ?>
if(!empty($dataset) && odm_screen_manager()->is_mobile()): ?>
<div class="four columns align-right">
<?php echo_download_button_link_to_datapage($ckan_dataset_id) ?>
</div>
<?php
elseif (odm_screen_manager()->is_desktop()): ?>
<div class="four columns">
<div class="widget share-widget">
<?php odm_get_template('social-share',array(),true); ?>
</div>
</div>
elseif (!empty($dataset) && odm_screen_manager()->is_desktop()): ?>
<div class="four columns align-right">
<div class="widget share-widget">
<div class="four columns">
<?php
if(!empty($dataset)) :?>
<?php echo_download_button_link_to_datapage($ckan_dataset_id) ?>
<?php
endif; ?>
</div>
<div class="twelve columns">
<?php odm_get_template('social-share',array(),true); ?>
</div>
</div>
</div>
<?php
endif;
?>
Expand Down
25 changes: 14 additions & 11 deletions utils/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,19 @@ function echo_metadata_button($dataset){
}

function echo_download_button_link_to_datapage($dataset_id){
?>
<a target="_blank" class="button download format" href="<?php echo get_bloginfo("url"); ?>/dataset/?id=<?php echo $dataset_id;?>">
<i class="fa fa-download"></i>
<?php
if (odm_screen_manager()->is_desktop()):
_e('Download and Metadata', 'wp-odm_profile_pages');
endif; ?>
</a>
?>
<div class="nc_socialPanel widget_download">
<div class="nc_tweetContainer swp_fb">
<a target="_blank" class="button download format" href="<?php echo get_bloginfo("url"); ?>/dataset/?id=<?php echo $dataset_id;?>"><i class="fa fa-download"></i>
<span>
<?php
if (odm_screen_manager()->is_desktop()):
_e('Download and Metadata', 'wp-odm_profile_pages');
endif; ?>
</span>
</a>
</div>
</div>
<?php
}


}
?>
2 changes: 1 addition & 1 deletion wp-odm_profile_pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.3
* Version: 2.4.4
* Author: Alex Corbi ([email protected])
* Author URI: http://www.lifeformapps.com
* License: GPLv3.
Expand Down

0 comments on commit fd6f288

Please sign in to comment.