Permalink
Browse files

added basic site navigation links

  • Loading branch information...
1 parent 6f84da5 commit 39691df2e09e35d37e5b53151b48937b76179bee @trey0 trey0 committed Aug 12, 2012
View
5 app.yaml
@@ -34,8 +34,13 @@ handlers:
- url: /static
static_dir: build/static
+- url: /admin/.*
+ script: submodules/geocamAppEngineLibs/main.py
+ login: admin
+
- url: /.*
script: submodules/geocamAppEngineLibs/main.py
+ login: required
env_variables:
DJANGO_SETTINGS_MODULE: 'settings'
View
2 apps/mapFastenApp/static/mapFasten/css/base.css
@@ -45,7 +45,7 @@ h3 {
}
#navBar {
- padding-top: 10px;
+ padding: 5px;
}
.navLink {
View
16 apps/mapFastenApp/templates/header.html
@@ -1 +1,17 @@
<img src="{{ STATIC_URL }}mapFasten/icons/mapFastenLogo.png" style="margin-left: 5px; margin-top: 5px;"/>
+<div id="navBar">
+ <span class="navLink"><a href="{% url mapFasten_home %}">Home</a></span>
+ <span class="navLink"><a href="{% url geocamTiePoint_overlayIndex %}">Map Overlays</a></span>
+ {% if user.is_authenticated %}
+ <a href="{{ logout_url }}"
+ title="Logout">
+ <span class="in" style="color: #008; font-weight: bold;">Logout</span>
+ </a>
+ <span style="font-weight: bold;">{{ user.first_name }}</span>
+ {% else %} <!-- user.is_authenticated -->
+ <a href="{{ login_url_with_next }}"
+ title="Login">
+ <span class="in" style="color: #008; font-weight: bold;">Login</span>
+ </a>
+ {% endif %} <!-- user.is_authenticated (else) -->
+</div>
View
19 apps/mapFastenApp/templates/mapFasten/home.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+{% block head %}
+<title>MapFasten</title>
+{% endblock head %}
+
+{% block contents %}
+
+<div style="max-width: 800px">
+
+<p>MapFasten helps you quickly align an image or PDF with a map,
+creating a shareable map overlay that you can display in the Google Maps
+API or in KML and combine with other layers.</p>
+
+<p><a class="welcomeEntry" href="{% url geocamTiePoint_overlayIndex %}">Let's get started &gt;&gt;</a></p>
+
+</div>
+
+{% endblock contents %}
View
14 apps/mapFastenApp/urls.py
@@ -0,0 +1,14 @@
+# __BEGIN_LICENSE__
+# Copyright (C) 2008-2010 United States Government as represented by
+# the Administrator of the National Aeronautics and Space Administration.
+# All Rights Reserved.
+# __END_LICENSE__
+
+from django.conf.urls.defaults import url, patterns
+
+urlpatterns = patterns(
+ 'mapFastenApp.views',
+
+ url(r'^$', 'home',
+ {}, 'mapFasten_home'),
+)
View
14 apps/mapFastenApp/views.py
@@ -0,0 +1,14 @@
+# __BEGIN_LICENSE__
+# Copyright (C) 2008-2010 United States Government as represented by
+# the Administrator of the National Aeronautics and Space Administration.
+# All Rights Reserved.
+# __END_LICENSE__
+
+from django.http import HttpResponse
+from django.shortcuts import render_to_response
+from django.template import RequestContext
+
+def home(request):
+ return render_to_response('mapFasten/home.html',
+ {},
+ context_instance=RequestContext(request))
View
1 siteSettings.py
@@ -155,6 +155,7 @@
}
}
DEFAULT_FILE_STORAGE = 'storage.AppEngineBlobStorage'
+ MIDDLEWARE_CLASSES += ('appEngineAuthMiddleware.AuthenticationMiddleware',)
else:
# running in development: use a local database.
DATABASES = {
2 submodules/geocamAppEngineLibs
@@ -1 +1 @@
-Subproject commit 2d69a0526888b7f134832851fbc9332b89dda601
+Subproject commit e7c98735607b9e0e416e8921e618d28af2737c72
View
1 urls.py
@@ -24,6 +24,7 @@
'logout'),
url(r'^', include('geocamTiePoint.urls')),
+ url(r'^', include('mapFastenApp.urls')),
)

0 comments on commit 39691df

Please sign in to comment.