link_box.html 1.62 KB
Newer Older
1
{% load go_extras %}
Jean Michel Rouly's avatar
Jean Michel Rouly committed
2
{% load qr_tags %}
3

Chris Reffett's avatar
Chris Reffett committed
4 5 6 7 8 9
<style>
a.share:link {color:#000000;}
a.share:visited {color:#000000;}
a.share:hover {color:#000000;}
</style>

10
<div class="link-box">
11 12

  <p class="link">
13 14 15 16 17 18
    <strong>Long:</strong> <a href="{{url.target}}">{{url.target}}</a>
    <br />

    <strong>Short:</strong> <a href="/{{url.short}}">{{url.short}}</a>
    <br />

19
    {% if url.owner = request.user and request.user|is_registered %}
20 21 22
    <strong>Clicks:</strong> {{url.clicks}}
    <br />

23
    <strong>Expires:</strong> {{url.expires|default_if_none:"Never"}}
24 25 26 27 28 29 30 31 32 33
    <br />

    <strong>
      <a href="{%url 'delete' url.short%}"
      onclick="return confirm('Are you sure you want to delete this link?');">
        Delete
      </a>
    </strong>
    {% endif %}
  </p>
34 35 36 37

  <p class="qr">
    {% qr_from_text url.get_absolute_url 100 %}
  </p>
Chris Reffett's avatar
Chris Reffett committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
  <p>
  <a class="share" href="http://twitter.com/share?url={{ url.get_absolute_url }}" target="_blank" title="Share via Twitter">
    <i class="fa fa-twitter-square fa-3x"></i>
  </a>

  <a class="share" href="http://www.facebook.com/share.php?u={{ url.get_absolute_url }}" target="_blank" title="Share via Facebook">
    <i class="fa fa-facebook-square fa-3x"></i>
  </a>

  <a class="share" href="https://plus.google.com/share?url={{ url.get_absolute_url }}" target="_blank" title="Share via Google+">
    <i class="fa fa-google-plus-square fa-3x"></i>
  </a>

  <a class="share" href="http://www.linkedin.com/shareArticle?mini=true&amp;url={{ url.get_absolute_url }}&amp;ro=false&amp;summary=&amp;source=" target="_blank" title="Share via LinkedIn">
    <i class="fa fa-linkedin-square fa-3x"></i>
  </a>
  </p>
55
</div>