Commit 27427b14 authored by agnez's avatar agnez

maps gasap et prod + contact form

parent 9bb4a5e8
......@@ -12,7 +12,7 @@ function gmwGoogleAddressAutocomplete( gacFields ) {
//for other avaliable options
//GASAP change var options = {};
var options = {
types: ['(cities)'],
//types: ['(cities)'],
componentRestrictions: {country: "be"}
};
......
......@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: GEO my WP v2.4.2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-03-01 16:18-1000\n"
"PO-Revision-Date: 2017-05-10 21:55+0100\n"
"PO-Revision-Date: 2017-05-12 20:13+0100\n"
"Last-Translator: Lore <lore@mipsum.be>\n"
"Language-Team: Eyal Fitoussi <info@geomywp.com>\n"
"Language: fr_FR\n"
......@@ -3673,11 +3673,11 @@ msgstr "Adresse format&eacute;e"
#: plugins/friends/includes/gmw-fl-location-tab.php:193
msgid "Street number"
msgstr ""
msgstr "Numéro"
#: plugins/friends/includes/gmw-fl-location-tab.php:204
msgid "Street name"
msgstr ""
msgstr "Rue"
# @ GMW
#: plugins/friends/includes/gmw-fl-location-tab.php:212
......@@ -4218,7 +4218,7 @@ msgstr "Num&eacute;ro de t&eacute;l&eacute;phone"
#: plugins/posts/includes/admin/gmw-pt-metaboxes.php:120
msgid "Fax Number"
msgstr ""
msgstr "Fax"
# @ GMW
#: plugins/posts/includes/admin/gmw-pt-metaboxes.php:128
......@@ -4365,7 +4365,7 @@ msgstr "Site Web : "
#: plugins/posts/includes/gmw-pt-template-functions.php:135
#, php-format
msgid "All %s"
msgstr "Montrer tout %s"
msgstr "%s"
# @ twentyfourteen
#: plugins/posts/search-results/twenty-fourteen/results.php:56
......
......@@ -7,3 +7,4 @@ assets/js/
map.min.js
includes/geo-my-wp-template-functions.php
plugins/posts/includes/gmw-pt-template-functions.php -> remplacer dropdowns par checkboxes dans recherche FONCTIONNE PAS, UTILISER ORIG
languages/FR
......@@ -404,7 +404,7 @@ main .uk-container{
padding: 15px;
}
h2.trouver{
margin: 0.5em .5em -1em;
margin: 0.5em 1em;
}
.mieuxcomprendre{
h4{
......@@ -441,11 +441,10 @@ main .uk-container{
padding:10px;
width: 100%;
h2.uk-accordion-title{
h3.uk-accordion-title{
margin-bottom: 0;
background-color: white;
text-align: left;
font-size: 25px;
text-align: left;
.uk-icon-caret-down{
display: none;
}
......@@ -458,6 +457,13 @@ main .uk-container{
}
}
}
.gmw-single-taxonomy-wrapper,
.gmw-single-taxonomy-wrapper{
display: inline-block;
}
.gmw-taxonomies-wrapper label{
display: none;
}
.checkbox {
background-color: @bleu-ciel;
border: 1px solid @global-border;
......
......@@ -2,7 +2,7 @@
<section id="snippet_la_carte">
<div class="uk-grid" id="uk-grid">
<div class="uk-width-1-1 uk-width-medium-2-3"><!-- left side -->
<h2 class="textegauche trouver"><?php esc_html_e( 'Trouvez', 'beans_gasap' ) ?>&nbsp;<?php esc_html_e( 'un GASAP ', 'beans_gasap' ) ?></h2>
<h2><?php esc_html_e( 'Trouvez', 'beans_gasap' ) ?>&nbsp;<?php esc_html_e( 'un GASAP ', 'beans_gasap' ) ?></h2>
<div>
<div class="largeur3 mieuxcomprendre">
<h4><?php esc_html_e( 'Mieux comprendre :', 'beans_gasap' ) ?></h4>
......
......@@ -48,7 +48,6 @@ function gasap_js_scripts() {
add_action( 'wp_ajax_gasap_activepost', 'gasap_get_activepost' );
add_action( 'wp_ajax_nopriv_gasap_activepost', 'gasap_get_activepost' );
//add_filter( 'gasap_get_activepost', 'gasap_get_activepost' );
function gasap_get_activepost() {
if(isset($_POST['postid'])) {
$activepost = $_POST['postid'];
......@@ -198,7 +197,7 @@ function gasap_no_results_show_map( $form ) {
add_filter( 'gmw_pt_map_icon', 'gasap_map_icon', 99, 2 );
function gasap_map_icon($post) {
$terms = get_the_terms( $post->ID, 'gasapstatus' );
$terms = get_the_terms( get_the_ID(), 'gasapstatus' );
if($terms != ''){
return get_stylesheet_directory_uri() . '/assets/img/map_picto_'.$terms[0]->slug.'.png';
}
......@@ -225,43 +224,17 @@ function gasap_posts_info_window( $output, $post, $gmw ) {
}
//add_filter( 'gmw_from_submit_fields', 'gasap_submit' );
function gasap_submit( $output, $gmw ) {
$submit_button = '<input type="submit" id="gmw-submit-'.$gmw['ID'].'" class="uk-button uk-button-success gmw-submit gmw-submit-'.$gmw['ID'].'" value="'.esc_attr( $subValue ).'" />';
$submit_button = apply_filters( 'gmw_form_submit_button', $submit_button, $gmw, $subValue );
return $output;
add_filter( 'shortcode_atts_wpcf7', 'custom_shortcode_atts_wpcf7_filter', 10, 3 );
function custom_shortcode_atts_wpcf7_filter( $out, $pairs, $atts ) {
$attr_mailreferent = 'email-referent';
$attr_nomgasap = 'nom-gasap';
if ( isset( $atts[$attr_mailreferent] ) ) {
$out[$attr_mailreferent] = $atts[$attr_mailreferent];
$out[$attr_nomgasap] = $atts[$attr_nomgasap];
}
return $out;
}
//add_filter( 'gmw_search_form_taxonomy', 'gasap_recherche_taxonomies' );
function gasap_recherche_taxonomies( $single_tax, $gmw, $args, $tag, $class, $tax, $taxonomy ) {
if ( apply_filters( 'gmw_pt_show_tax_label', true, $gmw, $taxonomy, $values ) ) {
$single_tax .= '<h4>' . apply_filters( 'gmw_pt_' . $gmw['ID'] . '_' . $tax . '_label', $taxonomy->labels->singular_name .':', $tax, $gmw ) . '</h4><div>';
}
$terms = get_terms(array('taxonomy' => $tax,'hide_empty' => true));
foreach($terms as $term)
{
if($term->term_id == $_GET['tax_' . $tax])
{
$cls = 'checked';
} else {
$cls = '';
}
$single_tax .= '<div class="checkbox"><label for="'.$term->slug.'">'.$term->name.'</label><input id="'.$term->slug.'" '.$cls.' class="ads" type="checkbox" name="tax_'.$term->taxonomy.'" value="'.$term->term_id.'"></div>';
}
$single_tax .= '</div></'.$subTag.'>';
$new_output = $single_tax;
return $new_output;
}
// -----------
......@@ -8,10 +8,9 @@ error_reporting(0);
*/
?>
<script>//start gasap
<script>
jQuery( document ).ready(function()
{
$.fn.extend({
equalHeights: function(){
var top=0;
......@@ -38,13 +37,11 @@ jQuery( document ).ready(function()
});
});
</script>
<?php //end gasap?>
<?php do_action( 'gmw_before_search_form_template', $gmw ); ?>
<div class="gmw-form-wrapper gmw-form-wrapper-<?php echo $gmw['ID']; ?> gmw-pt-form-wrapper gmw-pt-default-form-wrapper uk-accordion" data-uk-accordion="{showfirst: false}">
<?php //start gasap ?>
<h2 class="uk-accordion-title">
<h3 class="uk-accordion-title">
<?php
if(isset($_GET['lang']) == 'nl') { ?> Zoekfilters <?php
} else if(isset($_GET['lang']) == 'en'){ ?> Search Filters <?php
......@@ -52,63 +49,65 @@ jQuery( document ).ready(function()
} ?>
<i class="uk-icon-caret-down"></i>
<i class="uk-icon-caret-right"></i>
</h2>
</h3>
<div class="uk-accordion-content">
<?php //end gasap ?>
<?php do_action( 'gmw_before_search_form', $gmw ); ?>
<form class="gmw-form gmw-form-<?php echo $gmw['ID']; ?>" name="gmw_form" action="<?php echo $gmw['search_results']['results_page']; ?>" method="get">
<?php do_action( 'gmw_search_form_start', $gmw ); ?>
<div class="gmw-post-types-wrapper">
<!-- post types dropdown -->
<?php gmw_pt_form_post_types_dropdown( $gmw, false, false, false ); ?>
</div>
<?php do_action( 'gmw_search_form_before_taxonomies', $gmw ); ?>
<div class="gmw-taxonomies-wrapper">
<!-- Display taxonomies/categories -->
<?php gmw_pt_form_taxonomies( $gmw, 'div', $class='' ); ?>
</div>
<?php do_action( 'gmw_search_form_before_address', $gmw ); ?>
<!-- Address Field -->
<?php gmw_search_form_address_field( $gmw, $id='', $class='' ); ?>
<?php do_action( 'gmw_search_form_before_locator', $gmw ); ?>
<?php do_action( 'gmw_before_search_form', $gmw ); ?>
<!-- locator icon -->
<?php gmw_search_form_locator_icon( $gmw ); ?>
<form class="gmw-form gmw-form-<?php echo $gmw['ID']; ?>" name="gmw_form" action="<?php echo $gmw['search_results']['results_page']; ?>" method="get">
<?php do_action( 'gmw_search_form_start', $gmw ); ?>
<div class="clear"></div>
<?php do_action( 'gmw_search_form_before_distance', $gmw ); ?>
<div class="gmw-unit-distance-wrapper">
<div class="gmw-post-types-wrapper">
<!-- post types dropdown -->
<?php gmw_pt_form_post_types_dropdown( $gmw, false, false, false ); ?>
</div>
<?php do_action( 'gmw_search_form_before_taxonomies', $gmw ); ?>
<div class="gmw-radius-dropdown-wrapper">
<!--distance values -->
<?php gmw_search_form_radius_values( $gmw, $class='' ); ?>
<div class="gmw-taxonomies-wrapper">
<!-- Display taxonomies/categories -->
<?php gmw_pt_form_taxonomies( $gmw, 'div', $class='' ); ?>
</div>
<div class="gmw-units-dropdown-wrapper">
<!--distance units-->
<?php gmw_search_form_units( $gmw, $class='' ); ?>
</div>
<?php do_action( 'gmw_search_form_before_address', $gmw ); ?>
<fieldset data-uk-margin="" class="inline">
<!-- Address Field -->
<label><?php esc_html_e( 'Dans mon quartier :', 'beans_gasap' ); ?></label>
<?php gmw_search_form_address_field( $gmw, $id='', $class='' ); ?>
<?php do_action( 'gmw_search_form_before_locator', $gmw ); ?>
<!-- locator icon -->
<?php //gmw_search_form_locator_icon( $gmw ); ?>
<div class="clear"></div>
</div><!-- distance unit wrapper -->
<?php gmw_form_submit_fields( $gmw, false ); ?>
<?php do_action( 'gmw_search_form_end', $gmw ); ?>
<?php do_action( 'gmw_search_form_before_distance', $gmw ); ?>
<div class="gmw-unit-distance-wrapper">
<label><?php esc_html_e( 'Dans un rayon de :', 'beans_gasap' ); ?></label>
<div class="gmw-radius-dropdown-wrapper">
<!--distance values -->
<?php gmw_search_form_radius_values( $gmw, $class='' ); ?>
</div>
<div class="gmw-units-dropdown-wrapper">
<!--distance units-->
<?php gmw_search_form_units( $gmw, $class='' ); ?>
</div>
</div><!-- distance unit wrapper -->
</fieldset>
<?php gmw_form_submit_fields( $gmw, false ); ?>
<?php do_action( 'gmw_search_form_end', $gmw ); ?>
</form>
</form>
<?php do_action( 'gmw_after_search_form', $gmw ); ?>
<?php do_action( 'gmw_after_search_form', $gmw ); ?>
</div>
</div><!--form wrapper -->
......
......@@ -68,13 +68,19 @@
<div id="post_<?php echo $post->ID; ?>" class="uk-modal">
<div class="uk-modal-dialog">
<a class="uk-modal-close uk-close">x</a>
<h2><?php echo get_the_title($post->ID); ?></h2>
<?php echo get_post_field('post_content', $post->ID); ?>
<?php
$email = $post->post_author;
<h2><?php echo get_the_title($post->ID); ?></h2><?php
$content = get_post_field( 'post_content', get_the_ID() );
$content = apply_filters('the_content', $content);
echo $content;
$gasap = get_post_field('post_title', $post->ID) ;
$email = get_the_author_meta( 'user_email', $post->post_author );
$terms = wp_get_post_terms( $post->ID, 'gasapstatus' );
if($email != '' && ($terms[0]->slug != 'complet')){ echo do_shortcode('[contact-form-7 id="693" title="Contact producteurs fr"]'); }
?>
if ($email != '' && ($terms[0]->slug != 'complet')) {
echo do_shortcode('[contact-form-7 id="147" title="Contact GASAP fr" email-referent="'.$email.'" nom-gasap="'.$gasap.'"]');
}
elseif ($terms[0]->slug == 'complet') {
echo '<div><i>'.esc_html__( 'Ce GASAP est complet et ne peux pas être contacté via notre site.', 'beans_gasap' ).'</i></div>';
} ?>
</div>
</div>
......
......@@ -6,11 +6,38 @@ beans_add_attribute( 'beans_post_content', 'class', 'uk-column-medium-1-2' );
add_action( 'beans_post_before_markup', 'page_les_producteurs_before' );
function page_les_producteurs_before() {?>
<div id="snippet_p8"><?php
<div id="snippet_p8"><?php
}
add_action( 'beans_post_after_markup', 'add_contentpieces_after_les_producteurs' );
function add_contentpieces_after_les_producteurs() { ?>
function add_contentpieces_after_les_producteurs() {
?>
<article id="snippet_les_producteurs">
<div class="largeur2"><?php
$args_les_producteurs = array(
'post_type' => 'contentpiece',
'orderby'=> 'title',
'order' => 'DESC',
'tax_query' => array(
array(
'taxonomy' => 'contentpiecetype',
'field' => 'term_id',
'terms' => 85 //FIX db entry
)
)
);
$les_producteurs = new WP_Query( $args_les_producteurs );
?><div class="uk-grid"> <?php
while ( $les_producteurs->have_posts() ) : $les_producteurs->the_post();
?><div class="uk-width-1 uk-width-small-1-2">
<div><?php the_content(); ?></div>
<?php edit_post_link( esc_html__( 'Edit snippet', 'beans_gasap' ), '<span class="edit-link">', '</span>' );?>
</div><?php
endwhile;
wp_reset_postdata();?>
</div>
</div>
</article>
</div>
<article id="snippet_prod_comment">
<div class="largeur3"><?php
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment