mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
[svn] Interface improvements. Code will need some cleaning up.
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8331 by cucc @ 5/8/2009 8:16 PM
This commit is contained in:
parent
84d92115f3
commit
09a1539aef
@ -30,11 +30,27 @@ def frontpage(request):
|
|||||||
message = LoadAllSurvexBlocks()
|
message = LoadAllSurvexBlocks()
|
||||||
message = "Reloaded survexblocks"
|
message = "Reloaded survexblocks"
|
||||||
|
|
||||||
|
#'randSent':randSent.randomLogbookSentence(),
|
||||||
|
expeditions = Expedition.objects.order_by("-year")
|
||||||
|
logbookentry = LogbookEntry
|
||||||
|
cave = Cave
|
||||||
|
photo = Photo
|
||||||
|
return render_response(request,'frontpage.html', locals())
|
||||||
|
|
||||||
|
def todo(request):
|
||||||
|
message = "no test message" #reverse('personn', kwargs={"name":"hkjhjh"})
|
||||||
|
if "reloadexpos" in request.GET:
|
||||||
|
message = LoadPersonsExpos()
|
||||||
|
message = "Reloaded personexpos"
|
||||||
|
if "reloadsurvex" in request.POST:
|
||||||
|
message = LoadAllSurvexBlocks()
|
||||||
|
message = "Reloaded survexblocks"
|
||||||
|
|
||||||
#'randSent':randSent.randomLogbookSentence(),
|
#'randSent':randSent.randomLogbookSentence(),
|
||||||
expeditions = Expedition.objects.order_by("-year")
|
expeditions = Expedition.objects.order_by("-year")
|
||||||
totallogbookentries = LogbookEntry.objects.count()
|
totallogbookentries = LogbookEntry.objects.count()
|
||||||
return render_response(request,'index.html', {'expeditions':expeditions, 'all':'all', 'totallogbookentries':totallogbookentries, "message":message})
|
return render_response(request,'index.html', {'expeditions':expeditions, 'all':'all', 'totallogbookentries':totallogbookentries, "message":message})
|
||||||
|
|
||||||
def calendar(request,year):
|
def calendar(request,year):
|
||||||
week=['S','S','M','T','W','T','F']
|
week=['S','S','M','T','W','T','F']
|
||||||
if year:
|
if year:
|
||||||
|
@ -29,20 +29,6 @@ ul
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#footer
|
|
||||||
{
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
clear:both;
|
|
||||||
background-color:#999;
|
|
||||||
color:red;
|
|
||||||
text-align:center;
|
|
||||||
margin-left:auto;
|
|
||||||
margin-right:auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
div.logbookentry
|
div.logbookentry
|
||||||
{
|
{
|
||||||
text-align:left;
|
text-align:left;
|
||||||
@ -149,7 +135,7 @@ div.centre img { vertical-align: middle; }
|
|||||||
|
|
||||||
h1 { text-align: center; font-size: 210%; display: inline;}
|
h1 { text-align: center; font-size: 210%; display: inline;}
|
||||||
h2 { color: #009900; }
|
h2 { color: #009900; }
|
||||||
h3 { color: #2c105e; text-align:left; border-bottom:thin solid black; margin-bottom:1em; margin-top:1em }
|
h3 { color: #000 text-align:left; border-bottom:thin solid black; margin-bottom:1em; margin-top:1em; font-weight:bold}
|
||||||
h4 { color: #0d664c; }
|
h4 { color: #0d664c; }
|
||||||
h4.navbar {line-height: 0px;}
|
h4.navbar {line-height: 0px;}
|
||||||
img.onright, div.onright { vertical-align: top; float: right;
|
img.onright, div.onright { vertical-align: top; float: right;
|
||||||
@ -267,9 +253,6 @@ div.figure p {
|
|||||||
img.thumbnail {
|
img.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
br.clearfloat {
|
|
||||||
clear:both;
|
|
||||||
}
|
|
||||||
|
|
||||||
#error {
|
#error {
|
||||||
color: red;
|
color: red;
|
||||||
@ -299,19 +282,22 @@ div#editLinks {
|
|||||||
filter:alpha(opacity=75);
|
filter:alpha(opacity=75);
|
||||||
-moz-opacity:.75;
|
-moz-opacity:.75;
|
||||||
opacity:.75;
|
opacity:.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#editLinks a{
|
||||||
|
color:#FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#content {
|
div#content {
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
margin-left: 100px;
|
margin-left: 120px;
|
||||||
margin-right: 100px;
|
margin-right: 120px;
|
||||||
padding: 10px;
|
padding: 5em;
|
||||||
|
background:#CCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
img#banner {
|
.footer {
|
||||||
position:fixed;
|
position:fixed;
|
||||||
width:100%;
|
width:100%;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
@ -319,7 +305,7 @@ img#banner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color:#CCC;
|
background-color:#000;
|
||||||
padding-bottom:100px;
|
padding-bottom:100px;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -331,22 +317,24 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#rightMargin {
|
.rightMargin {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
z-index:-2;
|
z-index:-2;
|
||||||
width:100px;
|
width:130px;
|
||||||
right:0px;
|
right:0px;
|
||||||
top:0px;
|
top:0px;
|
||||||
clip: rect(auto,auto,auto,auto);
|
clip: rect(auto,auto,auto,auto);
|
||||||
|
background:#000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#leftMargin {
|
.leftMargin {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
z-index:-2;
|
z-index:-2;
|
||||||
width:100px;
|
width:130px;
|
||||||
top:0px;
|
top:0px;
|
||||||
left:0px;
|
left:0px;
|
||||||
clip: rect(auto,100px,auto,auto,);
|
clip: rect(auto,100px,auto,auto,);
|
||||||
|
background:#000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footerLinks{
|
#footerLinks{
|
||||||
@ -355,6 +343,24 @@ h1 {
|
|||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;
|
left:0;
|
||||||
width:100%;
|
width:100%;
|
||||||
background-color:#333
|
background-color:#000;
|
||||||
|
color:#999
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#footerLinks a{
|
||||||
|
color:#FFF
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.fadeIn {
|
||||||
|
display: none;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
#timeMachine {
|
||||||
|
width:auto;
|
||||||
|
right:0;
|
||||||
|
left:auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#col1 {
|
||||||
|
width:60%
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 249 KiB |
@ -5,56 +5,117 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/main3.css" />
|
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/main3.css" />
|
||||||
<title>{% block title %}THE TITLE{% endblock %}</title>
|
<title>{% block title %}THE TITLE{% endblock %}</title>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/base.js" type="text/javascript"></script>
|
<script src="{{ settings.MEDIA_URL }}js/base.js" type="text/javascript"></script>
|
||||||
<script src="{{ settings.MEDIA_URL }}js/jquery.js" type="text/javascript"></script>
|
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
|
||||||
|
<script src="http://ejohn.org/apps/livesearch/jquery.livesearch.js" type="text/javascript"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
$("#killEyeCandy").click(function () {
|
|
||||||
$("#leftMargin").fadeIn("slow");
|
|
||||||
|
$(".toggleEyeCandy").click(function () {
|
||||||
|
$(".leftMargin,.rightMargin").toggle("fade");
|
||||||
|
$(".toggleEyeCandy").toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".nav").css('opacity','7')
|
||||||
|
$(".eyeCandy").hide();
|
||||||
|
setTimeout("$('.leftMargin').fadeIn(3000);",2000);
|
||||||
|
setTimeout("$('.rightMargin').fadeIn(3000);",4000);
|
||||||
|
|
||||||
|
|
||||||
|
/*$("#footerLinks").hover(
|
||||||
|
function() {$(".footer").fadeIn("slow")},
|
||||||
|
function() {$(".footer").fadeOut("slow")}
|
||||||
|
);*/
|
||||||
|
$("#expoWebsiteLink").hover(
|
||||||
|
function() {$("#richardBanner").fadeIn("slow")},
|
||||||
|
function() {$("#richardBanner").fadeOut("slow")}
|
||||||
|
);
|
||||||
|
|
||||||
|
$("#cuccLink").hover(
|
||||||
|
function() {
|
||||||
|
|
||||||
|
$("#timeMachine").fadeIn("slow");
|
||||||
|
$(".rightMargin,.leftMargin").fadeTo("30","fast");
|
||||||
|
},
|
||||||
|
function() {$("#timeMachine").fadeOut("slow")}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
function contentHeight(){
|
||||||
|
setMaxHeight($(".rightMargin,#content,.leftMargin,#col2"),$("#content"));
|
||||||
|
};
|
||||||
|
|
||||||
|
function setMaxHeight(group, target) {
|
||||||
|
tallest = 0;
|
||||||
|
group.each(function() {
|
||||||
|
thisHeight = $(this).height();
|
||||||
|
if(thisHeight > tallest) {
|
||||||
|
tallest = thisHeight;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
target.height(tallest);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#q').liveUpdate('posts').focus();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onLoad="contentHeight();">
|
||||||
|
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<h1>CUCC Expeditions to Austria: 1976 - 2009</h1>
|
<h1>CUCC Expeditions to Austria: 1976 - 2009</h1>
|
||||||
<div id="editLinks"> {% block loginInfo %}
|
<div id="editLinks"> {% block loginInfo %}
|
||||||
{% if user.username %}
|
{% if user.username %}
|
||||||
You are logged in as {{ user.username }} {% if user.person %}<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>{% endif %}.
|
You are logged in as {{ user.username }} {% if user.person %}(<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>){% endif %}.
|
||||||
| <a href="{{ settings.URL_ROOT }}/accounts/logout/">Log out</a> {% else %} <a href="{{ settings.URL_ROOT }}/accounts/register">Sign up</a> | <a href="{{ settings.URL_ROOT }}/accounts/login/">Log in</a> {% endif %}
|
| <a href="{{ settings.URL_ROOT }}/accounts/logout/">Log out</a> {% else %} <a href="{{ settings.URL_ROOT }}/accounts/register">Sign up</a> | <a href="{{ settings.URL_ROOT }}/accounts/login/">Log in</a> {% endif %}
|
||||||
{% endblock%}
|
{% endblock%}
|
||||||
| <a href="{{ settings.URL_ROOT }}">Home </a> | <a href="#" id="killEyeCandy">Kill Eyecandy</a> |
|
| <a href="{{ settings.URL_ROOT }}">Home</a> | <a class="toggleEyeCandy">Kill Eyecandy</a><a class="toggleEyeCandy" style="display: none;">Show Eyecandy</a>
|
||||||
{% block editLink %}
|
{% block editLink %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="nav">
|
||||||
{% block nav %}
|
{% block nav %}
|
||||||
<!-- Use id="nav" for the left side menu -->
|
<!-- Use id="nav" for the left side menu -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div id="content" > {% block contentheader %}
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content" >
|
||||||
|
|
||||||
|
{% block contentheader %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
REPLACE : The content
|
REPLACE : The content
|
||||||
{% endblock %} <br class="clearfloat" />
|
{% endblock %}
|
||||||
<!--This is to ensure that the content div expands around floated objects*/-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="push"></div>
|
|
||||||
<div class="footer">
|
|
||||||
<img id="banner" src="{{ settings.MEDIA_URL }}expoBanner.gif"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<img id="leftMargin" src="{{ settings.MEDIA_URL }}eieshole.jpg">
|
<img id="richardBanner" class="footer eyeCandy" src="{{ settings.MEDIA_URL }}expoBanner.gif"/>
|
||||||
<img id="rightMargin" src="{{ settings.MEDIA_URL }}goesser.jpg">
|
<img id="timeMachine" class="footer eyeCandy" src="{{ settings.MEDIA_URL }}timemachine.gif"/>
|
||||||
|
<img class="caversLink eyeCandy" src="{{ settings.MEDIA_URL }}expoBanner.gif"/>
|
||||||
|
|
||||||
<div class="footer" id="footerLinks">
|
|
||||||
<a href="http://cucc.survex.com"> CUCC website</a>| <a href="http://cucc.survex.com/expo"> Expedition website </a>| <a href="{% url frontpage %}"> Troggle front page </a>| <a href="{% url caveindex %}"> All caves </a>| <a href="{% url personindex %}"> All cavers </a>| <a href="{% url caveindex %}"> Virtual survey binder </a>| <a href="{% url survey %}"> Expedition statistics </a>| <a href="{% url calendar 2007 %}"> Expedition calendar </a>
|
|
||||||
|
|
||||||
|
<div id="footerLinks">
|
||||||
|
<a id="cuccLink" href="http://cucc.survex.com">CUCC website</a> |
|
||||||
|
<a id="expoWebsiteLink" href="http://cucc.survex.com/expo">Expedition website</a> |
|
||||||
|
External links |
|
||||||
|
<a href="{% url frontpage %}">Troggle front page</a> |
|
||||||
|
<a href="{% url caveindex %}">Caves</a> |
|
||||||
|
<a id="caversLink" href="{% url personindex %}">Cavers</a> |
|
||||||
|
<a href="{% url survey %}"> Survey binder</a> |
|
||||||
|
<a href="{% url stats %}"> Statistics</a> |
|
||||||
|
<a href="{% url calendar 2007 %}">Expedition calendar</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% extends "cavebase.html" %}
|
{% extends "cavebase.html" %}
|
||||||
{% load wiki_markup %}
|
{% load wiki_markup %}
|
||||||
{% block editLink %}<a href={{cave.get_admin_url}}>Edit cave {{cave|wiki_to_html_short}}</a>{% endblock %}
|
{% block editLink %}| <a href={{cave.get_admin_url}}>Edit cave {{cave|wiki_to_html_short}}</a>{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="col2">
|
<div id="col2">
|
||||||
|
@ -13,7 +13,14 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h3>All caves</h3>
|
<h3>All caves</h3>
|
||||||
<ul>
|
|
||||||
|
<form method="get">
|
||||||
|
<div>
|
||||||
|
<input type="text" value="" name="q" id="q" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<ul id="posts">
|
||||||
{% for cave in caves %}
|
{% for cave in caves %}
|
||||||
<li> <a href="{{ cave.get_absolute_url }}">{{cave.official_name|wiki_to_html_short}} ({{cave}})</a> </li>
|
<li> <a href="{{ cave.get_absolute_url }}">{{cave.official_name|wiki_to_html_short}} ({{cave}})</a> </li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -6,10 +6,7 @@
|
|||||||
{% block head %}
|
{% block head %}
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/nav.css" />
|
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/nav.css" />
|
||||||
<!--<style type="text/css">
|
|
||||||
h4 { text-align:right; text-decoration:underline }
|
|
||||||
select { margin:0.5em }
|
|
||||||
</style>-->
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
blankColor = "rgb(153, 153, 153)"
|
blankColor = "rgb(153, 153, 153)"
|
||||||
highlightedColor = "rgb(125, 125, 125)"
|
highlightedColor = "rgb(125, 125, 125)"
|
||||||
|
9
urls.py
9
urls.py
@ -12,6 +12,7 @@ admin.autodiscover()
|
|||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
|
|
||||||
url(r'^$', views_other.frontpage, name="frontpage"),
|
url(r'^$', views_other.frontpage, name="frontpage"),
|
||||||
|
url(r'^todo/$', views_other.todo, name="todo"),
|
||||||
|
|
||||||
url(r'^caveindex/?$', views_caves.caveindex, name="caveindex"),
|
url(r'^caveindex/?$', views_caves.caveindex, name="caveindex"),
|
||||||
url(r'^personindex$', views_logbooks.personindex, name="personindex"),
|
url(r'^personindex$', views_logbooks.personindex, name="personindex"),
|
||||||
@ -31,11 +32,7 @@ urlpatterns = patterns('',
|
|||||||
|
|
||||||
url(r'^jgtfile/(.*)$', view_surveys.jgtfile, name="jgtfile"),
|
url(r'^jgtfile/(.*)$', view_surveys.jgtfile, name="jgtfile"),
|
||||||
url(r'^jgtuploadfile$', view_surveys.jgtuploadfile, name="jgtuploadfile"),
|
url(r'^jgtuploadfile$', view_surveys.jgtuploadfile, name="jgtuploadfile"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
url(r'^cave/(?P<cave_id>[^/]+)/?(?P<ent_letter>[^/])$', ent),
|
url(r'^cave/(?P<cave_id>[^/]+)/?(?P<ent_letter>[^/])$', ent),
|
||||||
#(r'^cave/(?P<cave_id>[^/]+)/edit/$', edit_cave),
|
#(r'^cave/(?P<cave_id>[^/]+)/edit/$', edit_cave),
|
||||||
#(r'^cavesearch', caveSearch),
|
#(r'^cavesearch', caveSearch),
|
||||||
@ -60,7 +57,7 @@ urlpatterns = patterns('',
|
|||||||
url(r'^survey/?$', surveyindex, name="survey"),
|
url(r'^survey/?$', surveyindex, name="survey"),
|
||||||
url(r'^survey/(?P<year>\d\d\d\d)\#(?P<wallet_number>\d*)$', survey, name="survey"),
|
url(r'^survey/(?P<year>\d\d\d\d)\#(?P<wallet_number>\d*)$', survey, name="survey"),
|
||||||
|
|
||||||
url(r'^controlpanel/?$', views_other.controlPanel, name="survey"),
|
url(r'^controlpanel/?$', views_other.controlPanel, name="controlpanel"),
|
||||||
|
|
||||||
(r'^admin/doc/?', include('django.contrib.admindocs.urls')),
|
(r'^admin/doc/?', include('django.contrib.admindocs.urls')),
|
||||||
(r'^admin/(.*)', admin.site.root),
|
(r'^admin/(.*)', admin.site.root),
|
||||||
|
Loading…
Reference in New Issue
Block a user