aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/_sidebar.rhtml
blob: 758387b09e31d9028b79872acb4209ad1ff54101 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<div id="right_column">
    <h2><%= _('Follow this request') %></h2>

    <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %>
    <p><%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %></p>
     <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :location => 'sidebar' } %>

    <h2><%= _("Act on what you've learnt") %></h2>

    <div class="act_link">
     <% tweet_link = "http://twitter.com/share?url=#{h(request.url)}&via=#{h(MySociety::Config.get('TWITTER_USERNAME', ''))}&text='#{h(@info_request.title)}'&related=#{_('alaveteli_foi:The software that runs {{site_name}}', :site_name => h(site_name))}" %>
        <%= link_to '<img src="/images/twitter-16.png" alt="twitter icon">', tweet_link %> 
        <%= link_to _("Tweet this request"), tweet_link %> 
    </div>
    <div class="act_link">
        <%= link_to '<img src="/images/wordpress.png" alt="" class="rss">', "http://wordpress.com/"%> 
        <%= link_to _("Start your own blog"), "http://wordpress.com/"%>
    </div>

    <%= render :partial => 'request/next_actions' %>

    <% view_cache :ttl => 1.day.to_i, :tag => ['similar', @info_request.id, I18n.locale] do %>
     <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %>
        <h2><%= _('Similar requests')%></h2>
        <% for result in @xapian_similar.results %>
            <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
        <% end %>
        <% if @xapian_similar_more %>
            <p><%= link_to _("More similar requests"), request_similar_url(@info_request) %></p>
        <% end %>
        <!-- Important terms: <%= @xapian_similar.important_terms.join(" ") %>  -->
     <% end %>
    <% end %>

    <p><%= link_to _('Event history details'), request_details_url(@info_request) %></p>

    <!-- this link with this wording is here for legal reasons, discuss with
    board and our lawyer before changing or removing it -->
    <p><small><%= _('<a href="%s">Are you the owner of
            any commercial copyright on this page?</a>') % [help_officers_path+"#copyright"] %></small></p>

</div>