Created
November 26, 2012 22:50
-
-
Save Aaron1011/4151188 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block title %}Messages{% endblock %} | |
{% block css %} | |
.lead { | |
text-align:center; | |
} | |
{% endblock %} | |
{% block content %} | |
<div id="smsModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h3 id="myModalLabel">Claim this Message</h3> | |
</div> | |
<div class="modal-body"> | |
<p>To verify that you sent this message, please enter in the phone number you used to send it below:</p> | |
</div> | |
<div class="modal-footer"> | |
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> | |
<button class="btn btn-primary">Save changes</button> | |
</div> | |
</div> | |
<div id="tweetModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | |
<h3 id="myModalLabel">Claim this Message</h3> | |
</div> | |
<div class="modal-body"> | |
<p>Please log in with your Twitter account below to verify that you sent this message:</p> | |
<a href="/authenticate"> | |
<img src="{% static "messages/img/sign-in-with-twitter-gray.png" %}"> | |
</a> | |
</div> | |
<div class="modal-footer"> | |
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> | |
<button class="btn btn-primary">Save changes</button> | |
</div> | |
</div> | |
<p class="lead">{{ messages.0.wall.hashtag|cut:"#"|capfirst }} Messages</p> | |
<table class="table table-striped span12"> | |
<tr> | |
<th>Sender</th> | |
<th>Message</th> | |
<th>Time sent</th> | |
<th>Phone Number</th> | |
<th>Twitter Account</th> | |
</tr> | |
{% for message in messages %} | |
<tr> | |
{% if message.sender %} | |
<td> | |
<div class="media"> | |
<a class="pull-left" href={{ message.sender.image_url }}> | |
<img class="media-object" src={{ message.sender.image_url }}> | |
</a> | |
<div class-"media-body"> | |
<p>{{ message.sender }}</p> | |
</div> | |
</div> | |
</td> | |
{% else %} | |
<td> | |
{% if user.is_superuser %} | |
{% if message.phone_number %} | |
<a href="#smsModal" class="btn" data-toggle="modal">Claim Message</a> | |
{% else %} | |
<a href="#tweetModal" class="btn" data-toggle="modal">Claim Message</a> | |
{% endif %} | |
{% endif %} | |
</td> | |
{% endif %} | |
<td>{{ message.message }}</td> | |
<td>{{ message.time_sent }}</td> | |
<td>{{ message.phone_number }}</td> | |
<td>{{ message.twitter_account }}</td> | |
</tr | |
{% endfor %} | |
</table> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment