mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 15:21:52 +00:00
[svn] Survey table improvements, added calendar to urls
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8201 by aaron @ 1/19/2009 7:19 AM
This commit is contained in:
parent
8de2573385
commit
aeef470c6d
@ -18,6 +18,10 @@ table, caption, tbody, tfoot, thead, tr, th, td
|
|||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.caption { font-size: 8pt; margin-bottom: 0pt; }
|
.caption { font-size: 8pt; margin-bottom: 0pt; }
|
||||||
.centre { text-align: center; }
|
.centre { text-align: center; }
|
||||||
@ -45,6 +49,9 @@ div#content
|
|||||||
margin: 50px;
|
margin: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
div#footer
|
div#footer
|
||||||
{
|
{
|
||||||
clear:both;
|
clear:both;
|
||||||
@ -160,6 +167,8 @@ p.indent
|
|||||||
opacity:.90; */
|
opacity:.90; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
hr{
|
hr{
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
@ -184,7 +193,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; }
|
h3 { color: #2c105e; text-align:left; border-bottom:thin solid black; margin-bottom:1em; margin-top:1em }
|
||||||
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;
|
||||||
@ -249,6 +258,7 @@ div.main {
|
|||||||
margin-bottom: 3em;
|
margin-bottom: 3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* You are not expected to understand this. It is necessary. */
|
/* You are not expected to understand this. It is necessary. */
|
||||||
table.centre { margin-left: auto; margin-right: auto; }
|
table.centre { margin-left: auto; margin-right: auto; }
|
||||||
table.centre td { text-align: left; }
|
table.centre td { text-align: left; }
|
||||||
@ -262,17 +272,6 @@ table#cavepage th#status { text-align: right; width: 25%; }
|
|||||||
.command { color: #FF0000; }
|
.command { color: #FF0000; }
|
||||||
.comment { color: #888888; font-style:italic;}
|
.comment { color: #888888; font-style:italic;}
|
||||||
|
|
||||||
/* Fron dreamweaver template */
|
|
||||||
body {
|
|
||||||
|
|
||||||
}
|
|
||||||
.twoColHybLtHdr #container {
|
|
||||||
width: 80%; /* this will create a container 80% of the browser width */
|
|
||||||
background: #FFFFFF;
|
|
||||||
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
|
|
||||||
border: 1px solid #000000;
|
|
||||||
text-align: left; /* this overrides the text-align: center on the body element. */
|
|
||||||
}
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
@ -285,52 +284,12 @@ td {
|
|||||||
padding:0px;
|
padding:0px;
|
||||||
border: thin solid silver;
|
border: thin solid silver;
|
||||||
}
|
}
|
||||||
.twoColHybLtHdr #header h1 {
|
|
||||||
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
|
|
||||||
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
|
#nav {
|
||||||
}
|
|
||||||
/* Tips for sidebar1:
|
|
||||||
1. Since we are working in relative units, it's best not to use padding on the sidebar. It will be added to the overall width for standards compliant browsers creating an unknown actual width.
|
|
||||||
2. Since em units are used for the sidebar value, be aware that its width will vary with different default text sizes.
|
|
||||||
3. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".twoColHybLtHdr #sidebar1 p" rule.
|
|
||||||
*/
|
|
||||||
.twoColHybLtHdr #sidebar1 {
|
|
||||||
float: left;
|
|
||||||
width: 12em; /* since this element is floated, a width must be given */
|
|
||||||
background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
|
|
||||||
padding: 15px 0; /* top and bottom padding create visual space within this div */
|
|
||||||
}
|
|
||||||
.twoColHybLtHdr #sidebar1 h3, .twoColHybLtHdr #sidebar1 p {
|
|
||||||
margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.twoColHybLtHdr #mainContent {
|
|
||||||
margin: 0 20px 0 13em; /* the right margin can be given in percentages or pixels. It creates the space down the right side of the page. */
|
|
||||||
}
|
|
||||||
.twoColHybLtHdr #footer {
|
|
||||||
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
|
|
||||||
background:#DDDDDD;
|
|
||||||
}
|
|
||||||
.twoColHybLtHdr #footer p {
|
|
||||||
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
|
|
||||||
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
|
|
||||||
}
|
|
||||||
/* Miscellaneous classes for reuse */
|
|
||||||
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
|
|
||||||
float: right;
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
.fltlft { /* this class can be used to float an element left in your page */
|
|
||||||
float: left;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
|
|
||||||
clear:both;
|
|
||||||
height:0;
|
|
||||||
font-size: 1px;
|
|
||||||
line-height: 0px;
|
|
||||||
}
|
|
||||||
.menuBarItem {
|
.menuBarItem {
|
||||||
font-variant: small-caps;
|
font-variant: small-caps;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@ -347,8 +306,7 @@ td {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
div.figure {
|
div.figure {
|
||||||
float: left;
|
width: 20%;
|
||||||
width: 25%;
|
|
||||||
border: thin silver solid;
|
border: thin silver solid;
|
||||||
margin: 0.5em;
|
margin: 0.5em;
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
@ -361,13 +319,3 @@ div.figure p {
|
|||||||
img.thumbnail {
|
img.thumbnail {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
|
||||||
[if IE]>
|
|
||||||
<style type="text/css">
|
|
||||||
/* place css fixes for all versions of IE in this conditional comment */
|
|
||||||
.twoColHybLtHdr #sidebar1 { padding-top: 30px; }
|
|
||||||
.twoColHybLtHdr #mainContent { zoom: 1; padding-top: 15px; }
|
|
||||||
/* the above proprietary zoom property gives IE the hasLayout it may need to avoid several bugs */
|
|
||||||
</style>
|
|
||||||
<![endif]
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
div#nav {
|
div#nav {
|
||||||
width: 12em;
|
width: 12em;
|
||||||
float: left;
|
float: left;
|
||||||
width: 12em;
|
background: rgb(153, 153, 153);
|
||||||
background: #EBEBEB;
|
|
||||||
padding: 15px 0;
|
padding: 15px 0;
|
||||||
height:100%
|
height:100%
|
||||||
}
|
}
|
||||||
|
|
||||||
div#content { style="margin-left:13em"}
|
div#content { margin-left:13em }
|
@ -7,7 +7,7 @@
|
|||||||
<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>
|
||||||
{% block javascript %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@ -29,17 +29,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div id="nav" style="float:left; top:200; background:#999; width:200; height:100%"> {% block nav %}
|
|
||||||
|
|
||||||
{% endblock %} </div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="content">
|
{% block nav %}
|
||||||
|
<!-- Use id="nav" for the left side menu -->
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div id="content" >
|
||||||
{% block content %}
|
{% block content %}
|
||||||
REPLACE : The content
|
REPLACE : The content
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
THE FOOTER
|
THE FOOTER
|
||||||
|
@ -3,26 +3,31 @@
|
|||||||
|
|
||||||
|
|
||||||
{% block title %}CUCC Virtual Survey Binder: {{ current_expedition }}{{ current_survey }}{%endblock%}
|
{% block title %}CUCC Virtual Survey Binder: {{ current_expedition }}{{ current_survey }}{%endblock%}
|
||||||
{% block javascript %}
|
{% block head %}
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/nav.css" />
|
||||||
|
|
||||||
<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)"
|
||||||
chosenColor = "rgb(102, 102, 102)"
|
chosenColor = "rgb(255, 255, 255)"
|
||||||
mnuItmLst=document.getElementsByClassName("menuBarItem")
|
mnuItmLst=document.getElementsByClassName("menuBarItem")
|
||||||
function highlight(div){
|
function highlight(div){
|
||||||
for (var i = 0, divIter; divIter = mnuItmLst[i]; i++) {
|
for (var i = 0, divIter; divIter = mnuItmLst[i]; i++) {
|
||||||
if (divIter.style.backgroundColor!="rgb(102, 102, 102)"){
|
/*loop though all menuitems. blank them except for the chosen one*/
|
||||||
|
if (divIter.style.backgroundColor!=chosenColor){
|
||||||
divIter.style.backgroundColor=blankColor;
|
divIter.style.backgroundColor=blankColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (div.style.backgroundColor!="rgb(102, 102, 102)"){
|
/*highlight the mouseovered div unless it is the chosen one*/
|
||||||
div.style.backgroundColor="#B0B0B0";
|
if (div.style.backgroundColor!=chosenColor){
|
||||||
|
div.style.backgroundColor=highlightedColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function unhighlight(div){
|
function unhighlight(div){
|
||||||
if (div.style.backgroundColor!=blankColor){
|
/*highlight the mouseovered div unless it is the chosen one*/
|
||||||
|
if (div.style.backgroundColor!=chosenColor){
|
||||||
div.style.backgroundColor=blankColor;
|
div.style.backgroundColor=blankColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -40,12 +45,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function redirectSurvey(){
|
function redirectSurvey(){
|
||||||
window.location = "{{ settings.URL_ROOT }}survey/" + document.getElementById("expeditionChooser").value + "%23" + document.getElementById("surveyChooser").value;
|
window.location = "{% url survey %}" + '/' + document.getElementById("expeditionChooser").value + "%23" + document.getElementById("surveyChooser").value;
|
||||||
document.getElementById("progressTableContent").style.display='hidden'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function redirectYear(){
|
function redirectYear(){
|
||||||
window.location = "{{ settings.URL_ROOT }}survey/" + document.getElementById("expeditionChooser").value + "%23"
|
window.location = "{% url survey %}" + '/' + document.getElementById("expeditionChooser").value + "%23";
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -61,27 +65,28 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block nav %}
|
{% block nav %}
|
||||||
<div id="sidebar1">
|
<div id="nav">
|
||||||
<br />
|
<br />
|
||||||
<select id="expeditionChooser" onchange="redirectYear()">
|
|
||||||
|
<h3>Choose a year</h3>
|
||||||
|
|
||||||
|
<select id="expeditionChooser" class="centre" onChange="redirectYear()">
|
||||||
|
|
||||||
{% for expedition in expeditions.reverse %}
|
{% for expedition in expeditions.reverse %}
|
||||||
|
|
||||||
<option label="{{ expedition }}" value="{{ expedition }}"
|
<option label="{{ expedition }}" value="{{ expedition }}" {% ifequal expedition current_expedition %}selected{% endifequal %}>
|
||||||
{% ifequal expedition current_expedition %}
|
|
||||||
selected
|
|
||||||
{% endifequal %} >
|
|
||||||
|
|
||||||
{{ expedition }}
|
{{ expedition }}
|
||||||
|
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="surveyChooser" onchange="redirectSurvey()">
|
<br>
|
||||||
|
|
||||||
|
<h3>Choose a wallet number</h3>
|
||||||
|
|
||||||
|
<select id="surveyChooser" class="centre" onChange="redirectSurvey()">
|
||||||
<option label="show all" value=""> {% for survey in current_expedition.survey_set.all %}
|
<option label="show all" value=""> {% for survey in current_expedition.survey_set.all %}
|
||||||
<option label="{{ survey }}" value="{{ survey.wallet_number }}"
|
<option label="{{ survey }}" value="{{ survey.wallet_number }}"
|
||||||
{% ifequal survey current_survey %}
|
{% ifequal survey current_survey %}
|
||||||
@ -89,30 +94,33 @@
|
|||||||
{% endifequal %} >
|
{% endifequal %} >
|
||||||
{{ survey }} </option>
|
{{ survey }} </option>
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
<option label="add" value="add">
|
<option label="add" value="add">
|
||||||
</select>
|
</select>
|
||||||
<div id="status">
|
<div id="status">
|
||||||
<div id="notes" class="menuBarItem" onmouseover="highlight(this)" onmouseout="unhighlight(this)" onclick="choose(this)"> {% if notes %}✓{% endif %}
|
<div id="notes" class="menuBarItem" onMouseOver="highlight(this)" onMouseOut="unhighlight(this)" onClick="choose(this)"> {% if notes %}✓{% endif %}
|
||||||
scanned notes </div>
|
scanned notes </div>
|
||||||
<div id="survexFile" class="menuBarItem" onmouseover="highlight(this)" onmouseout="unhighlight(this)" onclick="choose(this)"> {% if current_survey.survex_file %}✓{% endif %}
|
<div id="survexFile" class="menuBarItem" onMouseOver="highlight(this)" onMouseOut="unhighlight(this)" onClick="choose(this)"> {% if current_survey.survex_file %}✓{% endif %}
|
||||||
survex file </div>
|
survex file </div>
|
||||||
<div id="printedCentreline" class="menuBarItem" onmouseover="highlight(this)" onmouseout="unhighlight(this)" onclick="choose(this)"> {% if current_survey.centreline_printed_on %}✓{% endif %}
|
<div id="printedCentreline" class="menuBarItem" onMouseOver="highlight(this)" onMouseOut="unhighlight(this)" onClick="choose(this)"> {% if current_survey.centreline_printed_on %}✓{% endif %}
|
||||||
printed centreline </div>
|
printed centreline </div>
|
||||||
<div id="scannedPassageSketch" class="menuBarItem" onmouseover="highlight(this)" onmouseout="unhighlight(this)" onclick="choose(this)"> {% if planSketches %}✓{% endif %}
|
<div id="scannedPassageSketch" class="menuBarItem" onMouseOver="highlight(this)" onMouseOut="unhighlight(this)" onClick="choose(this)"> {% if planSketches %}✓{% endif %}
|
||||||
scanned passage sketch </div>
|
scanned passage sketch </div>
|
||||||
<div id="tunnelXMLfile" class="menuBarItem" onmouseover="highlight(this)" onmouseout="unhighlight(this)" onclick="choose(this)">tunnel xml file</div>
|
<div id="tunnelXMLfile" class="menuBarItem" onMouseOver="highlight(this)" onMouseOut="unhighlight(this)" onClick="choose(this)">tunnel xml file</div>
|
||||||
<div id="mainSketchIntegration" class="menuBarItem" onmouseover="highlight(this)" onmouseout="unhighlight(this)" onclick="choose(this)">add to main sketch</div>
|
<div id="mainSketchIntegration" class="menuBarItem" onMouseOver="highlight(this)" onMouseOut="unhighlight(this)" onClick="choose(this)">add to main sketch</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="mainContent">
|
<div id="mainContent">
|
||||||
<div id="progressTableContent" class="behind" style="display:block;">
|
|
||||||
<table>
|
<div id="progressTableContent" style="display:block; overflow:auto">
|
||||||
|
<h3>Survey progress table for {{ current_expedition }}</h3>
|
||||||
|
{% if current_expedition.survey_set.all %} <!-- if there are any surveys in the expedition, make the table -->
|
||||||
|
<table class="centre">
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
{% for survey in current_expedition.survey_set.all %}
|
{% for survey in current_expedition.survey_set.all %}
|
||||||
@ -147,6 +155,9 @@
|
|||||||
{% endif %} </td>
|
{% endif %} </td>
|
||||||
{% endfor %} </tr>
|
{% endfor %} </tr>
|
||||||
</table>
|
</table>
|
||||||
|
{% else %}
|
||||||
|
<center>[ There are no surveys in the database for this year. ]</center>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div id="notesContent" class="behind">
|
<div id="notesContent" class="behind">
|
||||||
<h3>Scanned notes for {{ current_survey }}.</h3>
|
<h3>Scanned notes for {{ current_survey }}.</h3>
|
||||||
|
4
urls.py
4
urls.py
@ -33,7 +33,9 @@ urlpatterns = patterns('',
|
|||||||
|
|
||||||
url(r'^statistics/?$', stats, name="stats"),
|
url(r'^statistics/?$', stats, name="stats"),
|
||||||
|
|
||||||
(r'^survey/?$', surveyindex),
|
url(r'^calendar/(?P<year>\d\d\d\d)?$', calendar, name="calendar"),
|
||||||
|
|
||||||
|
url(r'^survey/?$', surveyindex, name="survey"),
|
||||||
(r'^survey/(?P<year>\d\d\d\d)\#(?P<wallet_number>\d*)$', survey),
|
(r'^survey/(?P<year>\d\d\d\d)\#(?P<wallet_number>\d*)$', survey),
|
||||||
|
|
||||||
(r'^admin/doc/?', include('django.contrib.admindocs.urls')),
|
(r'^admin/doc/?', include('django.contrib.admindocs.urls')),
|
||||||
|
Loading…
Reference in New Issue
Block a user