clearwing

changeset 208:e1e12d1f9048

Changes to survey_globals.py needed for VPHAS release
author Stelios <stv@roe.ac.uk>
date Mon Nov 13 16:13:13 2017 +0200 (2017-11-13)
parents f6908bbffe58
children 61065c8da3b2
files src/survey_globals.py
line diff
     1.1 --- a/src/survey_globals.py	Tue Jun 13 22:19:51 2017 +0300
     1.2 +++ b/src/survey_globals.py	Mon Nov 13 16:13:13 2017 +0200
     1.3 @@ -1,4 +1,4 @@
     1.4 -from config import SURVEY_DB, FULL_SURVEYDBS, FULL_SURVEYDBS_INC_SYNC, PRIVATE_SURVEYDBS_VPHAS, PRIVATE_FULL_SURVEYDBS, PRIVATE_SURVEY_DB
     1.5 +from config import SURVEY_DB, FULL_SURVEYDBS, FULL_SURVEYDBS_INC_SYNC, PRIVATE_SURVEYDBS_VPHAS, PRIVATE_FULL_SURVEYDBS, PRIVATE_SURVEY_DB, PRIVATE_SURVEY_DB_VPHAS
     1.6  import logging
     1.7  ## Global HTML vars
     1.8  
     1.9 @@ -20,16 +20,28 @@
    1.10              <option value=""" + SURVEY_DB + """ selected>""" + SURVEY_DB + """</option>
    1.11              """       
    1.12  
    1.13 -for i in FULL_SURVEYDBS:
    1.14 -    db_options += '<option class="170" value="' + i + '">' + i + '</option>'  
    1.15 -    private_db_options += '<option class="170" value="' + i + '">' + i + '</option>' 
    1.16 -    region_db_options += '<option value="' + i + '">' + i + '</option>' 
    1.17 +private_db_options_vphas = db_options
    1.18  
    1.19 -private_db_options_vphas = db_options
    1.20  region_db_options_vphas = """
    1.21              <option value=""" + SURVEY_DB + """ selected>""" + SURVEY_DB + """</option>
    1.22              """    
    1.23  
    1.24 +for i in FULL_SURVEYDBS:
    1.25 +    if i==PRIVATE_SURVEY_DB_VPHAS:
    1.26 +        db_options += '<option class="170" value="' + i + '">' + i + '</option>'  
    1.27 +        private_db_options += '<option class="170" value="' + i + '">' + i + '</option>' 
    1.28 +        region_db_options += '<option value="' + i + '">' + i + '</option>' 
    1.29 +        private_db_options_vphas += '<option class="170" value="' + i + '" selected>' + i + '</option>'
    1.30 +        region_db_options_vphas += '<option class="170" value="' + i + '" selected>' + i + '</option>'
    1.31 +
    1.32 +    else:
    1.33 +        db_options += '<option class="170" value="' + i + '">' + i + '</option>'  
    1.34 +        private_db_options += '<option class="170" value="' + i + '">' + i + '</option>' 
    1.35 +        region_db_options += '<option value="' + i + '">' + i + '</option>' 
    1.36 +        private_db_options_vphas += '<option class="170" value="' + i + '">' + i + '</option>'
    1.37 +        region_db_options_vphas += '<option class="170" value="' + i + '">' + i + '</option>'
    1.38 +               
    1.39 +
    1.40  for i in PRIVATE_FULL_SURVEYDBS:
    1.41      if i==PRIVATE_SURVEY_DB:
    1.42          private_db_options = private_db_options.replace("selected", '')
    1.43 @@ -43,10 +55,9 @@
    1.44      private_db_options_inc_sync += '<option value="' + i + '">' + i + '</option>' 
    1.45  
    1.46  for i in PRIVATE_SURVEYDBS_VPHAS:
    1.47 -    private_db_options_vphas = private_db_options_vphas.replace("selected", '')
    1.48 -    region_db_options_vphas = region_db_options_vphas.replace("selected", '')
    1.49 -    private_db_options_vphas += '<option class="190" value="' + i + '"  selected>' + i + '</option>' 
    1.50 -    region_db_options_vphas +=  '<option class="190" value="' + i + '" selected>' + i + '</option>'
    1.51 +    private_db_options_vphas += '<option class="190" value="' + i + '">' + i + '</option>' 
    1.52 +    region_db_options_vphas +=  '<option class="190" value="' + i + '">' + i + '</option>'
    1.53 +
    1.54  
    1.55  programmes = """<tr><td align="right"><b>Programme: </td></b><td> ATLAS (VST ATLAS) <input value="170" name="programmeID" type="hidden" /></td></tr>"""
    1.56  #vphas_programmes = """<tr><td align="right"><b>Programme: </td></b><td> ATLAS (VST ATLAS) </td></tr>"""