Template source: listing/interact/_interact_bar.html

{% load i18n %}
{% load flatpages %}

{# browse/static/coffee/interact_bar.coffee supplies the instrumentation for .interact-bar elements. #}

  <form
     action="{% url 'common.interact.views.social_interaction' %}" method="POST" class="fave-form" >{% csrf_token %}
    <input type="hidden" name="obj_type" value="listing" />
    <input type="hidden" name="obj_id" value="{{ listing.id }}" />
    <input type="hidden" name="source" value="button" />
    <input type="hidden" name="message" value="{% trans 'Check out this awesome listing!' %}" />

    <div class="btn-group">
      {% block layout %}
      <button
        {% if favourited %}
          i_type="unfave" title="{% trans 'Unfave' %}" class="interact_bar_button unfave btn active {{ btn_class }} function-uppercase"
        {% else %}
        i_type="fave" title="{{ brand_messages.FAVOURITE_VERB }}" class="interact_bar_button fave btn {{ btn_class }} function-uppercase"
        {% endif %}
          type="submit">
        {% if favourited %}
          <i class="ss-heart"></i> {% trans "Unfave" %}
        {% else %}
          <i class="ss-emptyheart"></i> {{ brand_messages.FAVOURITE_VERB }}
        {% endif %}
      </button>

      {% if auction.is_shareable %}
        <a rel="nofollow" title="{% trans 'Facebook' %}"
          class="btn {{ btn_class }} function-uppercase"
          target="_blank"
          href="{% url 'browse.views.listing.share.direct_facebook' listing.id %}">
          <i class="ss-social-regular ss-facebook"></i> {% trans "Facebook" %}
        </a>

        <a rel="nofollow" title="{% trans 'Twitter' %}"
          class="btn {{ btn_class }} function-uppercase"
          target="_blank"
          href="{% url 'browse.views.listing.share.direct_twitter' listing.id %}">
        <i class="ss-twitter ss-social-regular"></i> {% trans "Twitter" %}
        </a>

        <button title="{% trans 'Share' %}" class="btn trigger-modal share {{ btn_class }} function-uppercase"
          href="javascript:;" data-width="700" data-title="{% trans 'Share This Ad' %}"
          data-href="{% url 'browse.views.listing.share.by_id' listing.id 'email' %}">
        <i class="ss-redirect"></i> {% trans "Share" %}
        </button>
      {% else %}
        <style type="text/css">
            .popover {
                width:160px;
            }
        </style>
        {% get_flatpages '/popover/sharing/' as sharing_popover %}

        <a title="{% trans 'Facebook' %}"
           class="btn {{ btn_class }}"
           target="_blank">
          <i class="ss-social-regular ss-facebook ss-dark-grey ss-large lowercase"
            rel="popover"
            data-title="<span><i class='ss-help'></i> {{ sharing_popover.0.title|escape }}</span><a href='javascript:;' onclick='$(&quot;[rel=popover]&quot;).popover(&quot;hide&quot;);' class='close'><i class='ss-delete ss-dark-grey'></i></a>"
            data-content="{{ sharing_popover.0.content|escape }}"
            data-html="true"
            data-placement="bottom"></i>
        </a>

        <a title="{% trans 'Twitter' %}"
           class="btn {{ btn_class }}"
           target="_blank">
          <i class="ss-social-regular ss-twitter ss-dark-grey ss-large lowercase"
            rel="popover"
            data-title="<span><i class='ss-help'></i> {{ sharing_popover.0.title|escape }}</span><a href='javascript:;' onclick='$(&quot;[rel=popover]&quot;).popover(&quot;hide&quot;);' class='close'><i class='ss-delete ss-dark-grey'></i></a>"
            data-content="{{ sharing_popover.0.content|escape }}"
            data-html="true"
            data-placement="bottom"></i>
        </a>

        <a title="{% trans 'Share' %}"
          class="btn {{ btn_class }}"
          target="_blank">
          <i class="ss-redirect ss-dark-grey lowercase"
            rel="popover"
            data-title="<span><i class='ss-help'></i> {{ sharing_popover.0.title|escape }}</span><a href='javascript:;' onclick='$(&quot;[rel=popover]&quot;).popover(&quot;hide&quot;);' class='close'><i class='ss-delete ss-dark-grey'></i></a>"
            data-content="{{ sharing_popover.0.content|escape }}"
            data-html="true"
            data-placement="bottom"></i>
        </a>
      {% endif %}

      {% endblock %}
    </div>
  </form>