From 1a3ead3619a73df5d09aa6c66a60dfd2d36572b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bi=C3=A1n=20Tam=C3=A1s=20L=C3=A1szl=C3=B3?= Date: Fri, 14 Jun 2013 07:38:24 +0200 Subject: [PATCH] Og info appears only if oembed isn't available --- app/assets/templates/mood_tpl.jst.hbs | 19 ++++++++++--------- app/assets/templates/opengraph_tpl.jst.hbs | 20 +++++++++++--------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/app/assets/templates/mood_tpl.jst.hbs b/app/assets/templates/mood_tpl.jst.hbs index 37b9d8a6e..739e23565 100644 --- a/app/assets/templates/mood_tpl.jst.hbs +++ b/app/assets/templates/mood_tpl.jst.hbs @@ -6,15 +6,16 @@ {{#if o_embed_cache.data}} {{{o_embed_cache.data.html}}} {{/if}} - {{/if}} - {{#if open_graph_cache}} -
- -

{{{open_graph_cache.title}}}

- -

{{open_graph_cache.description}}

-
-
+ {{else}} + {{#if open_graph_cache}} +
+ +

{{{open_graph_cache.title}}}

+ +

{{open_graph_cache.description}}

+
+
+ {{/if}} {{/if}}
{{{headline}}}
diff --git a/app/assets/templates/opengraph_tpl.jst.hbs b/app/assets/templates/opengraph_tpl.jst.hbs index 634c6b8d4..15da820eb 100644 --- a/app/assets/templates/opengraph_tpl.jst.hbs +++ b/app/assets/templates/opengraph_tpl.jst.hbs @@ -1,9 +1,11 @@ -{{#if open_graph_cache}} - -
- - {{open_graph_cache.title}} -

{{open_graph_cache.description}}

-
-
-{{/if}} +{{#unless o_embed_cache}} + {{#if open_graph_cache}} + +
+ + {{open_graph_cache.title}} +

{{open_graph_cache.description}}

+
+
+ {{/if}} +{{/unless}}