A plethora of fixes to make this more usable on non-mobile devices; should gracefully degrade a bit better now... if it can't get any GPS coordinates, the user can enter an address and bypass that requirement, and we'll do a reverse lookup and get some GPS coordinates based on said address. Users can also now view the checkin history of other people - someone wanna implement friendships/privacy? We have an open source 4Square here. ;D

This commit is contained in:
Ryan McGrath 2010-10-29 05:10:41 -04:00
parent c17458cc8a
commit d503e3fe08
11 changed files with 223 additions and 116 deletions

View file

@ -88,7 +88,7 @@ _GPS.getLocation = function() {
<input type="hidden" name="long" id="long" value="">
<div id="button_center">
<input type="submit" value="Add This Location" id="add_location_submit" class="button large">
<input type="submit" value="Add This Location" id="add_location_submit" class="button large rounded_6px">
</div>
</form>

View file

@ -26,7 +26,7 @@
</p>
<div id="button_center" style="margin-bottom: 14px;">
<input type="submit" value="Check In Here!" class="button large">
<input type="submit" value="Check In Here!" class="button large rounded_6px">
</div>
</form>
{% endblock %}

View file

@ -89,7 +89,7 @@ _GPS.getLocation = function() {
<input type="hidden" name="long" id="long" value="">
<div id="button_center">
<input type="submit" value="Add This Location" id="add_location_submit" class="button large">
<input type="submit" value="Add This Location" id="add_location_submit" class="button large rounded_6px">
</div>
<div id="bert" style="margin-bottom: 10px;">

View file

@ -8,7 +8,7 @@
<h2>Where all the DC Redditors at?</h2>
<p>
Check out where other DC Redditors are drinking! If you'd like to join in, register or log in using the buttons
at the top right of the screen.
at the top of the screen.
</p>
<p>
@ -21,13 +21,14 @@
<ul id="results">
{% for checkin in checkins.object_list %}
<li class="top_level">
<a href="/locations/{{ checkin.location.id }}/" class="go_location button">View</a>
<a href="/locations/{{ checkin.location.id }}/">
<span class="location_name">{{ checkin.location.name }}</span>
<ul>
<li><strong>{{ checkin.user.username }}</strong> checked in here {{ checkin.timestamp|timesince }} ago</li>
</ul>
</a>
<h3>{{ checkin.user.username }} <span class="checkin_list_timestamp">{{ checkin.timestamp|timesince }} ago</span></h3>
<a href="/locations/{{ checkin.location.id }}/" class="anchored_action button orange_button">View Location</a>
<a href="/redditor/{{ checkin.user.username }}/" class="anchored_action button">View User</a>
<ul>
<li><strong>Checked in at:</strong> {{ checkin.location.name }}</li>
<li><strong>Identify by:</strong> {{ checkin.identify_by }}</li>
<li><strong>Should be there for:</strong> {{ checkin.estimated_time_here }}</li>
</ul>
</li>
{% endfor %}
</ul>

View file

@ -21,7 +21,7 @@
</p>
<div id="button_center">
<input type="submit" value="Find Locations" id="search_btn" class="button large">
<input type="submit" value="Find Locations" id="search_btn" class="button large rounded_6px">
</div>
</form>
@ -32,16 +32,15 @@
<ul id="results">
{% for location in results.object_list %}
<li class="top_level">
<a href="/locations/{{ checkin.location.id }}/" class="go_location button">View</a>
<a href="/locations/{{ location.id }}/">
<span class="location_name">{{ location.name }}</span>
<ul>
<li><strong>Recent Checkins:</strong> {{ location.get_recent_checkins_count }}</li>
<li><strong>Address:</strong> {{ location.street_address|default:"No address set" }}</li>
<li><strong>Category:</strong> {{ location.category|default:"No category set" }}</li>
</ul>
</a>
<h3>{{ location.name }}</h3>
<a href="/locations/{{ location.id }}/" class="anchored_action button orange_button">View Location</a>
<ul>
<li><strong>Recent Checkins:</strong> {{ location.get_recent_checkins_count }}</li>
<li><strong>Address:</strong> {{ location.street_address|default:"No address set" }}</li>
<li><strong>Category:</strong> {{ location.category|default:"No category set" }}</li>
</ul>
</li>
{% endfor %}
</ul>

View file

@ -43,29 +43,29 @@
#checkin_here_link, #checked_in_already {
position: absolute;
top: 10px;
right: 10px;
top: 5px;
right: 8px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
text-decoration: none;
color: #fff;
font-weight: bold;
padding: 3px 7px !important;
font-size: 12px;
}
#checked_in_already { padding: 3px !important; font-size: 11px !important; top: 5px; /* I'm tired, hush */ }
#checkin_here_link {
background-color: #ff4500;
border: 1px solid #ff4500;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff9f7b), to(#ff4500));
font-size: 20px;
padding: 7px 12px;
}
#checked_in_already {
background-color: #cdcdcd;
border: 1px solid #8f8f8f;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f2f2f2), to(#cdcdcd));
font-size: 14px;
padding: 7px 10px;
color: #888;
}
@ -160,10 +160,13 @@
{% if recent_checkins %}
<ul id="checkins">
{% for checkin in recent_checkins %}
<li>
<span class="comment_header"><strong>{{ checkin.user.username }}</strong> <em>{{ checkin.timestamp|timesince }} ago</em></span>
<span class="pointers">Can be identified by:</span> {{ checkin.identify_by|default:"Doesn't want to be found. :(" }}<br>
<span class="pointers">Estimated time spent here:</span> {{ checkin.estimated_time_here|default:"They're flying by the seat of their vintage pants (no idea)."}}
<li class="top_level">
<h3>{{ checkin.user.username }} <span class="checkin_list_timestamp">{{ checkin.timestamp|timesince }} ago</span></h3>
<a href="/redditor/{{ checkin.user.username }}/" class="anchored_action button">View User</a>
<ul>
<li><strong>Identify by:</strong> {{ checkin.identify_by }}</li>
<li><strong>Should be there for:</strong> {{ checkin.estimated_time_here }}</li>
</ul>
</li>
{% endfor %}
</ul>
@ -171,13 +174,15 @@
<p class="none_yet">No checkins yet. You could be the first!</p>
{% endif %}
<div style="clear: both;"><!-- It's 5AM and I have better things to do with my time... like sleep. --></div>
{% if user.is_authenticated %}
<h2>Leave a Tip or Todo</h2>
<form action="/locations/{{ location.id }}/add_tip/" method="post" id="bert">
{% csrf_token %}
<textarea name="tip_body" id="tip_body"></textarea>
<input type="submit" value="Post Tip" id="submit_tip" class="button large">
<input type="submit" value="Post Tip" id="submit_tip" class="button large rounded_6px">
</form>
{% endif %}