GeotrekCE / Geotrek-mobile

Cross-platform native app
https://geotrek.fr
BSD 2-Clause "Simplified" License
24 stars 10 forks source link

Duration displays for days and minutes #173

Closed camillemonchicourt closed 8 years ago

camillemonchicourt commented 8 years ago

The filter doesnt work. On GTE app, there are only results when choosing filter >7j, even treks that are 3 or 5 days. <3j and 3to7j result nothing.

camillemonchicourt commented 8 years ago

The filter is working well. It is due to how days are calculated based on duration which is a value in hour. In day is actually considerated as 8 hours but for multi-day we actually put 24h = 1 day which is not implemented. We need a global rule.

camillemonchicourt commented 8 years ago

Indeed if a trek duration is less than 1 day, we need to display duration in hours. If the duration is more than 1 day, we need to display it in days. But the actual solution is not consistent as sometimes based on 8 hours and sometimes on 24 hours. But with a setting from TREK_DAY_DURATION. FIRST COMMIT : https://github.com/makinacorpus/Geotrek/commit/5b9016d1160814eb0f766d15cb11b1cc034728da Setting : https://github.com/makinacorpus/Geotrek/commit/bae508b291120fc01f312f53361850c66994d4da And https://github.com/makinacorpus/Geotrek/commit/69c66255dd6a0cdc4930e1045b88b208dae59c09 Issue - https://github.com/makinacorpus/Geotrek/issues/880

camillemonchicourt commented 8 years ago

History - https://github.com/makinacorpus/Geotrek/commits/master/geotrek/trekking/templatetags/trekking_tags.py

camillemonchicourt commented 8 years ago

Also writing MORE THAN 8 DAYS for treks that are more than 8 days dont really make sense anymore with ITINERANCY that are often long treks. It is important to know how long they are (15 days, 23 days...) and not just mention More than 8 days. All these points must be consistent in ADMIN, RANDO and MOBILE. About RANDO, in V1, it was intially in code (https://github.com/makinacorpus/Geotrek-rando/issues/34) and was then change as a setting for label and value - https://github.com/makinacorpus/Geotrek-rando/pull/179/files In RANDO V2, it looks like it is just a setting for labels - https://github.com/makinacorpus/Geotrek-rando/blob/master/SETTINGS.md#main-options-2

camillemonchicourt commented 8 years ago

Voila ce qu'on a vu avec le PnCevennes. En effet il faut bien se baser sur une base de 24h pour définir une journée. Pour qu'une rando soit affichée en tant que 2 jours, il faut la saisir en DUREE = 48h. C'est le fonctionnement actuel pour l'affichage des durées. Du coup le filtre DUREE doit se baser sur 24h aussi. Si j'ai un filtre Plus de 3 jours, celui-ci va retourner toutes les randos qui ont une durée supérieure à 72h.

Concernant l'affichage de la durée des randos, pour simplifier, on peut faire en sorte que celle-ci soit affichée en heures si elle est inférieure à 24h et en jour(s) si elle est égale ou supérieure à 24h.

On est d'accord aussi sur le fait qu'il ne faut pas afficher "Plus de 8 jours" pour une rando qui en fait 13 (312h) mais bien "13 jours".

camillemonchicourt commented 8 years ago

Done in Geotrek-admin 2.7.1 - https://github.com/makinacorpus/Geotrek/releases/tag/2.7.1