Selaa lähdekoodia

Logiciel: Evolution #1017: Boutons sociaux: simplifier

Bastien Sevajol 11 vuotta sitten
vanhempi
commit
b352920669

+ 13 - 21
src/Muzich/CoreBundle/Resources/views/SearchElement/element.html.twig Näytä tiedosto

@@ -412,34 +412,26 @@
412 412
       
413 413
       {% endif %}
414 414
       
415
-      {% if display_social_buttons and app.environment == 'prod' %}
415
+      {% if display_social_buttons %}
416
+        {% set permalink = 'https:' ~ url('element_show_one', {
417
+          'element_id' : element.id,
418
+          'element_slug' : element.slug
419
+        }, true) %}
420
+       {% set element_title = 'Muzich - ' ~ element.name %}
421
+
416 422
         <div class="social_buttons">
417 423
           <ul>
418 424
             <li class="facebook">
419
-              {{ facebookButton( {
420
-                'locale': 'fr_FR', 
421
-                'url': 'http:' ~ url('element_show_one', {
422
-                  'element_id' : element.id,
423
-                  'element_slug' : element.slug
424
-                }, true) })
425
-              }}
425
+               <a target="_blank" title="Facebook" href="https://www.facebook.com/sharer.php?u={{ permalink }}&t={{ element_title }}" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=500,width=700');return false;"><img src="{{ asset('/img/1387489343_facebook_square.png') }}" alt="Facebook" /></a>
426 426
             </li>
427 427
             <li class="twitter">
428
-              {{ twitterButton( {
429
-                'locale': 'fr_FR', 
430
-                'url': 'http:' ~ url('element_show_one', {
431
-                  'element_id' : element.id
432
-                }, true) }) 
433
-              }}
428
+              <a target="_blank" title="Twitter" href="https://twitter.com/share?url={{ permalink }}&text={{ element_title }}&via=korben" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=700');return false;"><img src="{{ asset('/img/1387489330_twitter_square.png') }}" alt="Twitter" /></a>
434 429
             </li>
435 430
             <li class="googleplus">
436
-              {{ googlePlusButton( {
437
-                'locale': 'fr_FR', 'url': 
438
-                'http:' ~ url('element_show_one', {
439
-                  'element_id' : element.id,
440
-                  'element_slug' : element.slug
441
-                }, true) }) 
442
-              }}
431
+               <a target="_blank" title="Google +" href="https://plus.google.com/share?url={{ permalink }}&hl=fr" rel="nofollow" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=450,width=650');return false;"><img src="{{ asset('/img/1387489316_google_square.png') }}" alt="Google Plus" /></a>
432
+            </li>
433
+            <li class="mail">
434
+               <a target="_blank" title="Envoyer par mail" href="mailto:?subject={{ element_title }}&body={{ permalink }}" rel="nofollow"><img src="{{ asset('/img/1387489139_aiga_mail.png') }}" alt="email" /></a>
443 435
             </li>
444 436
           </ul>
445 437
         </div>

BIN
web/img/1387489139_aiga_mail.png Näytä tiedosto


BIN
web/img/1387489316_google_square.png Näytä tiedosto


BIN
web/img/1387489330_twitter_square.png Näytä tiedosto


BIN
web/img/1387489343_facebook_square.png Näytä tiedosto