Commit 489c6509 authored by Zosman's avatar Zosman
Browse files

finished modal, also used an atom plugin to better format the html

parent 12408b17
Pipeline #396 passed with stage
in 3 minutes and 24 seconds
{% load go_extras %} {% load go_extras %} {% load qr_tags %}
{% load qr_tags %}
<style> <style>
a.share:link {color:#000000;} a.share:link {
a.share:visited {color:#000000;} color: #000000;
a.share:hover {color:#000000;} }
a.share {text-decoration:none;}
a.share:visited {
a.button:link {color:#FFF;} color: #000000;
a.button:visited {color:#FFF;} }
a.button:hover {color:#FFF;}
a.share:hover {
legend { color: #000000;
font-size: inherit; }
}
pre { a.share {
font-family: inherit; text-decoration: none;
} }
a.button:link {
color: #FFF;
}
a.button:visited {
color: #FFF;
}
a.button:hover {
color: #FFF;
}
legend {
font-size: inherit;
}
pre {
font-family: inherit;
}
</style> </style>
<div class="container"> <div class="container">
<div class="col-md-8"> <div class="col-md-8">
<h3>Go Address:</h3> <h3>Go Address:</h3>
<a href="{{domain}}{{url.short}}">{{domain}}{{url.short}}</a> <a href="{{domain}}{{url.short}}">{{domain}}{{url.short}}</a>
<br></br> <br></br>
<h3>Address Details:</h3> <h3>Address Details:</h3>
<strong>Target URL:</strong> <strong>Target URL:</strong>
<br /> <br />
<a href="{{url.target}}">{{url.target}}</a> <a href="{{url.target}}">{{url.target}}</a>
<br /> {% if url.owner == request.user.registereduser and request.user.registereduser.approved == True %}
<strong>Clicks:</strong> {{url.clicks}}
<br />
<strong>QR Code Uses:</strong> {{url.qrclicks}}
<br />
<strong>Social Media Clicks:</strong> {{url.socialclicks}}
<br /> <br />
{% if url.owner == request.user.registereduser and request.user.registereduser.approved == True %} <strong>Expires:</strong> {{url.expires|default_if_none:"Never"}}
<strong>Clicks:</strong> <br></br>
{{url.clicks}} <a class="button btn btn-danger btn-sm fa" data-target="#deletionModal" data-toggle="modal">
<br /> <i class="fa fa-trash-o fa-lg"></i> Delete</a>
<!-- <a class="button btn btn-danger btn-sm fa" href="{{domain}}delete/{{url.short}}">
<strong>QR Code Uses:</strong> {{url.qrclicks}}
<br />
<strong>Social Media Clicks:</strong> {{url.socialclicks}}
<br />
<strong>Expires:</strong> {{url.expires|default_if_none:"Never"}}
<br></br>
<a class="button btn btn-danger btn-sm fa" data-target="#deletionModal" data-toggle="modal">
<i class="fa fa-trash-o fa-lg"></i> Delete</a>
<!-- <a class="button btn btn-danger btn-sm fa" href="{{domain}}delete/{{url.short}}">
<i class="fa fa-trash-o fa-lg"></i> Delete</a> --> <i class="fa fa-trash-o fa-lg"></i> Delete</a> -->
<a tabindex="0" class="button btn btn-info btn-sm fa" <a tabindex="0" class="button btn btn-info btn-sm fa" role="button" data-toggle="popover" title="Not Implemented Quite Yet :(" data-content="We are working on adding this feature in a future
role="button" data-toggle="popover" title="Not Implemented Quite Yet :("
data-content=
"We are working on adding this feature in a future
release of Go. If you'd like to check that progress or potentially release of Go. If you'd like to check that progress or potentially
contribute code, head to git.gmu.edu/srct/go"> contribute code, head to git.gmu.edu/srct/go">
<i class="fa fa-cog"></i> Edit</a> <i class="fa fa-cog"></i> Edit</a>
<div id="deletionModal" class="modal fade" role="dialog" tabindex="-1"> <div id="deletionModal" class="modal fade" role="dialog" tabindex="-1">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content" style="background-color:#f5f5f5;border-radius: 7px" > <div class="modal-content" style="background-color:#f5f5f5; border-radius: 7px">
<div class="modal-header" style="text-align:center;"> <div class="modal-header" style="text-align:center;">
<!-- <button type="button" class="close" data-dismiss="modal">&times;</button> --> <!-- <button type="button" class="close" data-dismiss="modal">&times;</button> -->
<span class="fa-stack fa-fw"> <!-- <span class="fa-stack fa-fw">
<i class="fa fa-circle fa-stack-2x"></i> <i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-times fa-stack-1x fa-inverse"></i> <i class="fa fa-times fa-stack-1x fa-inverse"></i>
</span> </span> -->
<h4 class="modal-title fa text-center" style="font-weight:bold; font-size: 21px !important;"><i class="fa">Are you sure you would like to <color style="color:red">delete</color> this link? </i></h4> <h4 class="modal-title fa text-center" style="font-weight:bold; font-size: 21px !important;">Are you sure you would like to <color style="color:red">delete</color> this link?</h4>
<h5 class="fa" style="color:red;font-weight:600;margin-top: 0px;margin-bottom: 0px;">Deleting a link is permenant and can not be undone!</h5> <h5 style="color:red;font-weight:500;margin-top: 0px;margin-bottom: 0px;">Deleting a link is permenant and can not be undone!</h5>
</div> </div>
<div class="modal-body" style="padding-bottom: 80px"> <div class="modal-body" style="padding-bottom: 80px">
<a type="button" class="btn btn-success btn-lg" style="border-width: 0px;float:left; width:49%; background-color: #A9B0AD; border-radius: 4px;" data-dismiss="modal">Cancel</a> <a type="button" class="btn btn-success btn-lg" style="border-width: 0px;float:left; width:49%; background-color: #A9B0AD; border-radius: 4px;" data-dismiss="modal">Cancel</a>
<a type="button" class="btn btn-danger btn-lg" href="{{domain}}delete/{{url.short}}" style="border-width: 0px; float:right; width:49%;background-color: #AC1D37; border-radius: 4px;">Delete</a> <a type="button" class="btn btn-danger btn-lg" href="{{domain}}delete/{{url.short}}" style="border-width: 0px; float:right; width:49%;background-color: #AC1D37; border-radius: 4px;">Delete</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
<br></br> <br></br>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
{% with domain|add:url.short as the_url %} {% with domain|add:url.short as the_url %} {% with the_url|add:"?qr" as qr_url%} {% qr_from_text qr_url 's' %} {% endwith %} {% with the_url|add:"?social" as social_url %}
{% with the_url|add:"?qr" as qr_url%} <a class="share" href="http://twitter.com/share?url={{ social_url }}" target="_blank" title="Share via Twitter">
{% qr_from_text qr_url 's' %} <i class="fa fa-twitter-square fa-3x"></i>
{% endwith %} </a>
{% with the_url|add:"?social" as social_url %} <a class="share" href="http://www.facebook.com/share.php?u={{ social_url }}" target="_blank" title="Share via Facebook">
<a class="share" href="http://twitter.com/share?url={{ social_url }}" target="_blank" title="Share via Twitter"> <i class="fa fa-facebook-square fa-3x"></i>
<i class="fa fa-twitter-square fa-3x"></i> </a>
</a>
<a class="share" href="https://plus.google.com/share?url={{ social_url }}" target="_blank" title="Share via Google+">
<a class="share" href="http://www.facebook.com/share.php?u={{ social_url }}" target="_blank" title="Share via Facebook"> <i class="fa fa-google-plus-square fa-3x"></i>
<i class="fa fa-facebook-square fa-3x"></i> </a>
</a>
<a class="share" href="http://www.linkedin.com/shareArticle?mini=true&amp;url={{ social_url }}&amp;ro=false&amp;summary=&amp;source=" target="_blank" title="Share via LinkedIn">
<a class="share" href="https://plus.google.com/share?url={{ social_url }}" target="_blank" title="Share via Google+"> <i class="fa fa-linkedin-square fa-3x"></i>
<i class="fa fa-google-plus-square fa-3x"></i> </a>
</a> {% endwith %} {% with the_url|add:"?qr" as qr_url %}
<pre><strong>QR Downloads:</strong>
<a class="share" href="http://www.linkedin.com/shareArticle?mini=true&amp;url={{ social_url }}&amp;ro=false&amp;summary=&amp;source=" target="_blank" title="Share via LinkedIn">
<i class="fa fa-linkedin-square fa-3x"></i>
</a>
{% endwith %}
{% with the_url|add:"?qr" as qr_url %}
<pre><strong>QR Downloads:</strong>
<a href="http://chart.googleapis.com/chart?cht=qr&chs=268x268&chl={{ qr_url }}" target="_blank">Small (268x268)</a> <a href="http://chart.googleapis.com/chart?cht=qr&chs=268x268&chl={{ qr_url }}" target="_blank">Small (268x268)</a>
<a href="http://chart.googleapis.com/chart?cht=qr&chs=383x383&chl={{ qr_url }}" target="_blank">Medium (383x383)</a> <a href="http://chart.googleapis.com/chart?cht=qr&chs=383x383&chl={{ qr_url }}" target="_blank">Medium (383x383)</a>
<a href="http://chart.googleapis.com/chart?cht=qr&chs=547x547&chl={{ qr_url }}" target="_blank">Large (547x547)</a> <a href="http://chart.googleapis.com/chart?cht=qr&chs=547x547&chl={{ qr_url }}" target="_blank">Large (547x547)</a>
</pre> </pre> {% endwith %} {% endwith %}
{% endwith %} </div>
{% endwith %}
</div>
</div> </div>
<script> <script>
$(function () { $(function() {
var option = {'trigger': 'hover'}; var option = {
$('[data-toggle="popover"]').popover( option ) 'trigger': 'hover'
}) };
$('[data-toggle="popover"]').popover(option)
})
</script> </script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment