Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8157 by aaron @ 1/16/2009 2:19 AM
This commit is contained in:
substantialnoninfringinguser 2009-05-13 05:29:31 +01:00
parent 93cd18e40d
commit f3db37711f
2 changed files with 11 additions and 12 deletions

View File

@ -309,8 +309,8 @@ def get_scan_path(instance, filename):
class ScannedImage(models.Model): class ScannedImage(models.Model):
file = models.ImageField(storage=scansFileStorage, upload_to=get_scan_path) file = models.ImageField(storage=scansFileStorage, upload_to=get_scan_path)
scannedBy = models.ForeignKey(Person,blank=True, null=True) scanned_by = models.ForeignKey(Person,blank=True, null=True)
scannedOn = models.DateField(null=True) scanned_on = models.DateField(null=True)
survey = models.ForeignKey('Survey') survey = models.ForeignKey('Survey')
contents = models.CharField(max_length=20,choices=(('notes','notes'),('plan','plan_sketch'),('elevation','elevation_sketch'))) contents = models.CharField(max_length=20,choices=(('notes','notes'),('plan','plan_sketch'),('elevation','elevation_sketch')))
number_in_wallet = models.IntegerField(null=True) number_in_wallet = models.IntegerField(null=True)
@ -327,9 +327,6 @@ class ScannedImage(models.Model):
def __str__(self): def __str__(self):
return get_scan_path(self,'') return get_scan_path(self,'')
class admin():
pass
class Survey(models.Model): class Survey(models.Model):
expedition_year = models.ForeignKey('Expedition') expedition_year = models.ForeignKey('Expedition')
wallet_number = models.IntegerField(blank=True,null=True) wallet_number = models.IntegerField(blank=True,null=True)

View File

@ -132,7 +132,9 @@ img.thumbnail {
} }
function unhighlight(div){ function unhighlight(div){
// div.style.backgroundColor="#EBEBEB"; if (div.style.backgroundColor=="#EBEBEB"){
div.style.backgroundColor="#EBEBEB";
}
} }
function choose(div){ function choose(div){
@ -191,15 +193,15 @@ img.thumbnail {
</div> </div>
<div id="mainContent"> <div id="mainContent">
<div id="notesContent" class="behind"> <div id="notesContent" class="behind">
There are {{ notes|length }} notes files for {{ current_survey }}. <h2>Scanned notes for {{ current_survey }}.</h2>
{% for noteItem in notes %} {% for noteItem in notes %}
<div class="figure"> <div class="figure">
<p> <p>
{{ noteItem.file.correctURL }} <img src="{{ noteItem.correctURL }}" class="thumbnail"> <img src="{{ noteItem.correctURL }}" class="thumbnail">
<p> <p>
File at: File at:
<a href="{{ noteItem.file.correctUrl }}"> <a href="{{ noteItem.correctURL }}">
{{ noteItem.file.name }} {{ noteItem.file.name }}
</a> <br /> </a> <br />
Scanned by: {{ noteItem.scanned_by }} <br /> Scanned by: {{ noteItem.scanned_by }} <br />
@ -220,15 +222,15 @@ img.thumbnail {
who entered by </div> who entered by </div>
<div id="printedCentrelineContent" class="behind"> centreline </div> <div id="printedCentrelineContent" class="behind"> centreline </div>
<div id="scannedPassageSketchContent" class="behind"> <div id="scannedPassageSketchContent" class="behind">
There are {{ planSketches|length }} plan sketch files for {{ current_survey }}. <h2>Scanned plan sketch files for {{ current_survey }}.</h2>
{% for sketchItem in planSketches %} {% for sketchItem in planSketches %}
<div class="figure"> <div class="figure">
<p> <p>
{{ sketchItem.file.correctURL }} <img src="{{ sketchItem.correctURL }}" class="thumbnail"> <img src="{{ sketchItem.correctURL }}" class="thumbnail">
<p> <p>
File at: File at:
<a href="{{ sketchItem.file.correctUrl }}"> <a href="{{ sketchItem.correctUrl }}">
{{ sketchItem.file.name }} {{ sketchItem.file.name }}
</a> <br /> </a> <br />
Scanned by: {{ sketchItem.scanned_by }} <br /> Scanned by: {{ sketchItem.scanned_by }} <br />