aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-06-08 16:05:58 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-06-08 16:05:58 +0100
commitff121145944c14a09b87fc94b69636a2ca30976f (patch)
tree39ea2b77a2031951c3ec42d4ade9aee09323c81a
parent0accc40da18c0672a4eadb75d4df0eb999c15d1d (diff)
[UK] Switch Like button to more modern Share.
-rw-r--r--templates/web/base/report/display_tools.html14
-rw-r--r--templates/web/bromley/report/display.html29
2 files changed, 13 insertions, 30 deletions
diff --git a/templates/web/base/report/display_tools.html b/templates/web/base/report/display_tools.html
index c1413d9c7..ed9537184 100644
--- a/templates/web/base/report/display_tools.html
+++ b/templates/web/base/report/display_tools.html
@@ -22,9 +22,19 @@
[% IF c.cobrand.moniker == 'fixmystreet' %]
<div id="report-share" class="hidden-js" align="center">
+ <div id="fb-root"></div>
<a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported &lsquo;[% problem.title_safe | html %]&rsquo;" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a>
-<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
- <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+
+ <script>(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6";
+ fjs.parentNode.insertBefore(js, fjs);
+ }(document, 'script', 'facebook-jssdk'));</script>
+ <div style="line-height:1" class="fb-share-button" data-layout="button" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?src=sdkpreparse">Share</a></div>
+
</div>
[% END %]
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html
index 06db8f001..d46d310cd 100644
--- a/templates/web/bromley/report/display.html
+++ b/templates/web/bromley/report/display.html
@@ -21,34 +21,7 @@
[% INCLUDE 'report/banner.html' %]
[% INCLUDE 'report/_main.html' %]
-
-<div class="shadow-wrap">
- <ul id="key-tools">
- <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse') %]</a></li>
- <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
- <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
- </ul>
-
-<div id="report-updates-data" class="hidden-js">
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
- <p><a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right">
- </a></p>
- <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <fieldset>
- <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
- <div class="form-txt-submit-box">
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
- <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
- </div>
- <input type="hidden" name="id" value="[% problem.id %]">
- <input type="hidden" name="type" value="updates">
- </fieldset>
- </form>
-</div>
-
-</div>
-
+[% INCLUDE 'report/display_tools.html' %]
[% INCLUDE 'report/updates.html' %]
<div id="update_form">