dates in uv map page menue entry replaced by last/next
authorTim Zimmermann
Fri, 11 Mar 2016 13:47:03 +0100
changeset 501bc348dd68c65
parent 498 a4f39dc4db6a
child 504 e163180b5abe
dates in uv map page menue entry replaced by last/next
eskp.py
     1.1 --- a/eskp.py	Fri Mar 11 10:00:23 2016 +0100
     1.2 +++ b/eskp.py	Fri Mar 11 13:47:03 2016 +0100
     1.3 @@ -108,16 +108,24 @@
     1.4      dates = get_valid_dates(FILES)
     1.5      ndates = len(dates)
     1.6      ind = dates.index(date_show)
     1.7 +    textdates = []
     1.8      if ind ==0 :
     1.9          chosendates = [dates[ind+1]]
    1.10 +        textdates.append('next ->')
    1.11 +
    1.12      elif ind >= ndates - 1:
    1.13          chosendates= [dates[ind-1]]
    1.14 +        textdates.append('<- last')
    1.15      else:
    1.16          chosendates = [dates[ind-1], dates[ind+1]]
    1.17 +        textdates.append('<- last')
    1.18 +        textdates.append('next ->')
    1.19      menue = []
    1.20 -    for date in chosendates:
    1.21 -        text_date = date[-2:] + '.' + date[-4:-2] + '.'
    1.22 -        menue.append(('/ozoneloss/uvmap/' + date, _(text_date)))
    1.23 +
    1.24 +    for i in range(len(chosendates)):
    1.25 +        date = chosendates[i]
    1.26 +        textdate = textdates[i]
    1.27 +        menue.append(('/ozoneloss/uvmap/' + date, _(textdate)))
    1.28      return menue
    1.29  
    1.30  
Impressum Datenschutzerklärung