summaryrefslogtreecommitdiff
path: root/templates/chimere/blocks/share_bar.html
blob: 32e8e82a3aca58f10bce3013409eb4ebc6ef7be5 (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
{% load i18n %}
    {% if share_networks %}
    {% if simple %}{% trans "Share on"%}{% for share_network in share_networks %}
    <a href='{{share_network.1}}'>{{share_network.0}}</a>
    {% endfor %}{%else%}
    <ul class='share'>
        <li class='share-send'><a class='share_link share_id_{{share_networks.0.0}}{% if email_only %}_single{%endif%}' href='{{share_networks.0.1}}'><img src="{{share_network.0.2}}" alt="{{share_network.0.0}}"/></a></li>
        {% if not email_only %}
        <li class="share-link-main">
            <a href="#">{% trans "Share" %}</a></li>
        {% for share_network in share_networks %}
        <li class='shared'><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>
    {% endfor %}
        {% if rss %}<li class='shared'><a href='{% url "chimere:feeds-global" %}'><img src='{{STATIC_URL}}chimere/img/feed.png' alt='Feeds'/></a></li>{% endif %}{%endif%}
    </ul>{% endif %}
    <script type='text/javascript'>
        <!--
        $(function(){
            share_link_update();
            $('.share-link-main').click(function(){
                update_permalink();
                var params = $('#permalink').attr('href').split('#')[1];
                var current_url = String(window.location.href).split('#')[0] +
                    "#" + params;
                var message = "{% trans 'Copy and paste this address to share this item: \n' %}";
                message += current_url;
                alert(message);
            });
        });
        // -->
    </script>
    {% endif %}