diff --git a/jm2l/__init__.py b/jm2l/__init__.py index a294324..bc33bfb 100644 --- a/jm2l/__init__.py +++ b/jm2l/__init__.py @@ -18,12 +18,14 @@ from apscheduler.schedulers.background import BackgroundScheduler from pyramid.request import Request from mako.template import Template from .models import User -import logging +from jm2l.const import CurrentYear +import logging def add_renderer_globals(event): event['mytrip'] = Sejour_helpers(event) event['myorga'] = Orga_helpers(event) + event['CurrentYear'] = CurrentYear #@sched.scheduled_job('cron', day_of_week='sun', hour=22, minute=07) def mailer_tasks(config): diff --git a/jm2l/const.py b/jm2l/const.py new file mode 100644 index 0000000..01b0230 --- /dev/null +++ b/jm2l/const.py @@ -0,0 +1 @@ +CurrentYear = 2017 \ No newline at end of file diff --git a/jm2l/helpers.py b/jm2l/helpers.py index cd75013..0391e47 100644 --- a/jm2l/helpers.py +++ b/jm2l/helpers.py @@ -2,6 +2,7 @@ from .models import DBSession, JM2L_Year, Sejour from datetime import timedelta, datetime import itertools +from jm2l.const import CurrentYear class DummySejour(object): diff --git a/jm2l/models.py b/jm2l/models.py index e573454..ec6800a 100644 --- a/jm2l/models.py +++ b/jm2l/models.py @@ -31,12 +31,11 @@ from sqlalchemy.orm import ( ) from zope.sqlalchemy import ZopeTransactionExtension +from jm2l.const import CurrentYear DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) Base = declarative_base() -CurrentYear = 2015 - class TasksArea(Base): __tablename__ = 'staff_tasks_area' uid = Column(Integer, primary_key=True) @@ -174,19 +173,19 @@ class User(Base): return None @property - def is_Intervenant(self, year=2015): + def is_Intervenant(self, year=CurrentYear): """ This property will return if User do an event on specified year """ return DBSession.query(Event).join(User_Event) \ .filter(User_Event.user_uid==self.uid) \ .filter(Event.for_year==year).count() @property - def is_crew(self, year=2015): + def is_crew(self, year=CurrentYear): """ This property will return if User subscribe orga task on specified year """ return DBSession.query(User,Sejour.orga_part).outerjoin(Sejour).filter(User.uid == self.uid).one()[1] - def year_events(self, EventType='All', year=2015): + def year_events(self, EventType='All', year=CurrentYear): if EventType=='All': return filter(lambda e: e.for_year==year, self.events) else: @@ -490,13 +489,13 @@ class Exchange(Base): @classmethod def get_counters(cls): return DBSession.query(cls.exch_state, cls.exch_type, cls.exch_done, func.count(cls.exch_id))\ - .filter(cls.for_year==2015)\ + .filter(cls.for_year==CurrentYear)\ .group_by(cls.exch_state, cls.exch_type, cls.exch_done) @classmethod def get_my_counters(cls, uid): return DBSession.query(cls.exch_state, cls.exch_type, cls.exch_done, func.count(cls.exch_id))\ - .filter(cls.for_year==2015)\ + .filter(cls.for_year==CurrentYear)\ .filter( or_(cls.asker_id==uid, cls.provider_id==uid) )\ .group_by(cls.exch_state, cls.exch_type, cls.exch_done) @@ -510,7 +509,7 @@ class Exchange(Base): DicResult[extype][exstate]=[] DicResult[extype]['Counters']={'AllAsk':0, 'AllProp':0, 'AllAgree':0} Query = DBSession.query(cls)\ - .filter(cls.for_year==2015)\ + .filter(cls.for_year==CurrentYear)\ .order_by(cls.start_time).all() for item in Query: if item.exch_done: @@ -537,7 +536,7 @@ class Exchange(Base): @classmethod def get_pub_list(cls, exch_type): - return DBSession.query(cls).filter(cls.for_year==2015 and cls.exch_state in ['Ask','Proposal'])\ + return DBSession.query(cls).filter(cls.for_year==CurrentYear and cls.exch_state in ['Ask','Proposal'])\ .filter(cls.exch_type=='%s' % exch_type)\ .filter(cls.exch_done==False)\ .all() @@ -546,13 +545,13 @@ class Exchange(Base): def get_my_list(cls, uid, exch_type): DicResult = {} DicResult['Ask']=DBSession.query(cls)\ - .filter(cls.for_year==2015)\ + .filter(cls.for_year==CurrentYear)\ .filter( or_(cls.asker_id==uid, cls.provider_id==uid) )\ .filter(cls.exch_type=='%s' % exch_type)\ .filter(cls.exch_state=='Ask')\ .order_by(cls.start_time).all() DicResult['Proposal']=DBSession.query(cls)\ - .filter(cls.for_year==2015)\ + .filter(cls.for_year==CurrentYear)\ .filter( or_(cls.asker_id==uid, cls.provider_id==uid) )\ .filter(cls.exch_type=='%s' % exch_type)\ .filter(cls.exch_state=='Proposal')\ diff --git a/jm2l/static/img/2015/logo.png b/jm2l/static/img/2015/logo.png index 5b0b30a..4d11a28 100644 Binary files a/jm2l/static/img/2015/logo.png and b/jm2l/static/img/2015/logo.png differ diff --git a/jm2l/static/img/2015/logo_3.png b/jm2l/static/img/2015/logo_3.png index 4d11a28..5b0b30a 100644 Binary files a/jm2l/static/img/2015/logo_3.png and b/jm2l/static/img/2015/logo_3.png differ diff --git a/jm2l/static/img/2017/Photos/P1010063.JPG b/jm2l/static/img/2017/Photos/P1010063.JPG new file mode 100644 index 0000000..d3c1961 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010063.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010064.JPG b/jm2l/static/img/2017/Photos/P1010064.JPG new file mode 100644 index 0000000..ad96ce2 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010064.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010067.JPG b/jm2l/static/img/2017/Photos/P1010067.JPG new file mode 100644 index 0000000..c095cf4 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010067.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010069.JPG b/jm2l/static/img/2017/Photos/P1010069.JPG new file mode 100644 index 0000000..58ff55d Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010069.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010070.JPG b/jm2l/static/img/2017/Photos/P1010070.JPG new file mode 100644 index 0000000..dfd2e78 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010070.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010122.JPG b/jm2l/static/img/2017/Photos/P1010122.JPG new file mode 100644 index 0000000..3442c66 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010122.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010123.JPG b/jm2l/static/img/2017/Photos/P1010123.JPG new file mode 100644 index 0000000..c40e352 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010123.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010126.JPG b/jm2l/static/img/2017/Photos/P1010126.JPG new file mode 100644 index 0000000..8ae62ef Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010126.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010127.JPG b/jm2l/static/img/2017/Photos/P1010127.JPG new file mode 100644 index 0000000..83f738c Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010127.JPG differ diff --git a/jm2l/static/img/2017/Photos/P1010129.JPG b/jm2l/static/img/2017/Photos/P1010129.JPG new file mode 100644 index 0000000..92aa105 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P1010129.JPG differ diff --git a/jm2l/static/img/2017/Photos/P5050002.JPG b/jm2l/static/img/2017/Photos/P5050002.JPG new file mode 100644 index 0000000..e15e6f8 Binary files /dev/null and b/jm2l/static/img/2017/Photos/P5050002.JPG differ diff --git a/jm2l/static/img/2017/Photos/P5050046.JPG b/jm2l/static/img/2017/Photos/P5050046.JPG new file mode 100644 index 0000000..897a2ef Binary files /dev/null and b/jm2l/static/img/2017/Photos/P5050046.JPG differ diff --git a/jm2l/static/img/2017/Photos/panneau_stand.jpg b/jm2l/static/img/2017/Photos/panneau_stand.jpg new file mode 100644 index 0000000..b8f416d Binary files /dev/null and b/jm2l/static/img/2017/Photos/panneau_stand.jpg differ diff --git a/jm2l/static/img/2017/logo.png b/jm2l/static/img/2017/logo.png new file mode 100644 index 0000000..31fc741 Binary files /dev/null and b/jm2l/static/img/2017/logo.png differ diff --git a/jm2l/static/img/2017/logo_1.png b/jm2l/static/img/2017/logo_1.png new file mode 100644 index 0000000..5b0b30a Binary files /dev/null and b/jm2l/static/img/2017/logo_1.png differ diff --git a/jm2l/templates/Interventions/Interventions.mako b/jm2l/templates/Interventions/Interventions.mako index 370cc12..262704b 100644 --- a/jm2l/templates/Interventions/Interventions.mako +++ b/jm2l/templates/Interventions/Interventions.mako @@ -106,9 +106,9 @@ elif Type=='T': %> % if Type!='O':
- Vos ${CurTitles} programmés pour 2015 + Vos ${CurTitles} programmés pour ${CurrentYear} <% -Selection = filter(lambda x:(x.event_type==CurEventType and x.for_year==2015), uprofil.events) +Selection = filter(lambda x:(x.event_type==CurEventType and x.for_year==CurrentYear), uprofil.events) HeadHistTitle = u"L'historique de vos %s ( %d ) " % ( CurTitles, len(Selection) ) NothingTitle = u"Vous n'avez pas sollicité d'intervention %s." % CurEvent %> @@ -200,12 +200,12 @@ NothingTitle = u"Vous n'avez pas sollicité d'intervention %s." % CurEvent % endif % if Type!='O': - Je souhaite ajouter ${CurTitle} pour les JM2L 2015 ! + Je souhaite ajouter ${CurTitle} pour les JM2L ${CurrentYear} !
Historique <% -Selection = filter(lambda x:(x.event_type==CurEventType and x.for_year!=2015), uprofil.events) +Selection = filter(lambda x:(x.event_type==CurEventType and x.for_year!=CurrentYear), uprofil.events) HeadHistTitle = u"L'historique de vos %s ( %d ) " % ( CurTitles, len(Selection) ) NothingTitle = u"Désolé, Il n'y a rien dans l'historique vous concernant." %> diff --git a/jm2l/templates/Logistique/Dialog.mako b/jm2l/templates/Logistique/Dialog.mako index ba2c864..23ef983 100644 --- a/jm2l/templates/Logistique/Dialog.mako +++ b/jm2l/templates/Logistique/Dialog.mako @@ -23,9 +23,9 @@ elif Type=='M': @@ -124,7 +124,7 @@ Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...
Je peux - + Ajouter un lieu diff --git a/jm2l/templates/Logistique/Dialog_Heberg.mako b/jm2l/templates/Logistique/Dialog_Heberg.mako index 75f6ce3..b6b34de 100644 --- a/jm2l/templates/Logistique/Dialog_Heberg.mako +++ b/jm2l/templates/Logistique/Dialog_Heberg.mako @@ -33,7 +33,7 @@ ${helper.DisplayForm(form, DicFormat)} NB: Vous devez faire une proposition différente pour chaque nuit que vous proposez.
- + Indiquer l'adresse proposée. \ diff --git a/jm2l/templates/Logistique/Logistique.mako b/jm2l/templates/Logistique/Logistique.mako index dca17e3..86a93ae 100644 --- a/jm2l/templates/Logistique/Logistique.mako +++ b/jm2l/templates/Logistique/Logistique.mako @@ -156,8 +156,8 @@ elif Type=='M': % endif % if item.exch_type=="C": un co-voiturage le ${item.start_time.strftime('%a %d %b vers %Hh%M').decode('utf-8')} - de ${item.Itin.start.display_name} - à ${item.Itin.arrival.display_name} + de ${item.Itin.start.display_name} + à ${item.Itin.arrival.display_name} % elif item.exch_type=="M": % if item.Category: ${item.Category.exch_subtype} @@ -181,12 +181,12 @@ elif Type=='M': % if item.provider_id==request.user.uid or item.asker_id==request.user.uid: + href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"> % elif (item.provider_id and item.asker_id): + href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">

## $("#Ask${Type}-${item.exch_id}").popover(); % else: + href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">

## + ## href="javascript:DoGet('/${CurrentYear}/exchange/Ask${Type}/${item.exch_id}/deal')"> ## ## % endif diff --git a/jm2l/templates/Logistique/Tables.mako b/jm2l/templates/Logistique/Tables.mako index c97ea83..dae749e 100644 --- a/jm2l/templates/Logistique/Tables.mako +++ b/jm2l/templates/Logistique/Tables.mako @@ -24,7 +24,7 @@ elif Type=='M': ${What}s ${CurTitle} - Ajouter @@ -53,44 +53,44 @@ elif Type=='M': % if item.exch_done:
- Validé + Validé % elif getattr(item, You) is None:
Publié % elif getattr(item, Me)==request.user.uid and item.exch_state==CurKind: Je ${What}
@@ -98,8 +98,8 @@ elif Type=='M': %if Type=='C': ${item.start_time.strftime('%A %d %b %Y').decode('utf-8')} vers ${item.start_time.strftime('%Hh%M')} - de ${item.Itin.start.display_name} - à ${item.Itin.arrival.display_name} + de ${item.Itin.start.display_name} + à ${item.Itin.arrival.display_name} %elif Type=='H': % if item.Category: ${item.Category.exch_subtype}, diff --git a/jm2l/templates/NewIndex.mako b/jm2l/templates/NewIndex.mako index 4d56b9d..3438858 100644 --- a/jm2l/templates/NewIndex.mako +++ b/jm2l/templates/NewIndex.mako @@ -15,9 +15,9 @@
diff --git a/jm2l/templates/Profil/Profil.mako b/jm2l/templates/Profil/Profil.mako index 3f9e76c..0da19e1 100644 --- a/jm2l/templates/Profil/Profil.mako +++ b/jm2l/templates/Profil/Profil.mako @@ -105,7 +105,7 @@ ${helpers.DisplayRespForm(profil_form, DicFormB)} 2015 + value="${CurrentYear}" /> ${CurrentYear} % else: % endif
diff --git a/jm2l/templates/Public/Plan.mako b/jm2l/templates/Public/Plan.mako index b508fb6..710f7f1 100644 --- a/jm2l/templates/Public/Plan.mako +++ b/jm2l/templates/Public/Plan.mako @@ -14,7 +14,7 @@

Nous rejoindre ou nous joindre...

-

Le samedi 28 novembre 2015 d’où que vous veniez, tout est mis en place pour que vous +

Le samedi 28 novembre ${CurrentYear} d’où que vous veniez, tout est mis en place pour que vous puissiez vous rendre en toute simplicité sur les lieux de l’événement.
N'hésitez pas à utiliser la section covoiturage de votre profil. Et pas de panique ! Demain, ce sera pire...

diff --git a/jm2l/templates/Public/Presse.mako b/jm2l/templates/Public/Presse.mako index a595ddb..6d34d29 100644 --- a/jm2l/templates/Public/Presse.mako +++ b/jm2l/templates/Public/Presse.mako @@ -1,7 +1,7 @@ <%inherit file="jm2l:templates/layout.mako"/> <%namespace name="helpers" file="jm2l:templates/helpers.mako"/> <% -DisplayYear = request.session.get('year',2015) +DisplayYear = request.session.get('year',CurrentYear) %> % if request.user and request.user.Staff: Modifier
diff --git a/jm2l/templates/Staff/tasks.mako b/jm2l/templates/Staff/tasks.mako index ccf6c94..772f0aa 100644 --- a/jm2l/templates/Staff/tasks.mako +++ b/jm2l/templates/Staff/tasks.mako @@ -50,7 +50,7 @@ DicForm = { 'name': {'PlaceHolder':u"Nom de la tâche", "FieldStyle":"width:90%;" }, 'area_uid': {"FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" }, 'closed_by': {"FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" }, - 'due_date': {'PlaceHolder':u"27/11/2015", "FieldStyle":"width:8em;"}, + 'due_date': {'PlaceHolder':u"27/11/2017", "FieldStyle":"width:8em;"}, 'description': {'PlaceHolder':u"Description", "FieldStyle":"width:95%;min-height:150px;", "ckeditor":"1" }, } %> diff --git a/jm2l/templates/edit_event.mako b/jm2l/templates/edit_event.mako index f0bc2e0..2e7d627 100644 --- a/jm2l/templates/edit_event.mako +++ b/jm2l/templates/edit_event.mako @@ -23,7 +23,7 @@
${helpers.show_salles( Salles, form.salle_uid.data or form.salle_uid.choices and form.salle_uid.choices[0][0] )}
-% if event.for_year==2015 and request.user and (request.user.Staff or request.user in event.intervenants): +% if event.for_year==CurrentYear and request.user and (request.user.Staff or request.user in event.intervenants): Supprimer diff --git a/jm2l/templates/edit_tiers.mako b/jm2l/templates/edit_tiers.mako index 1e0602e..481faf3 100644 --- a/jm2l/templates/edit_tiers.mako +++ b/jm2l/templates/edit_tiers.mako @@ -54,7 +54,7 @@ DicForm = { - % for year in range(2015, 2005, -1): + % for year in range(CurrentYear, 2005, -1): <% if year in [2014]: continue diff --git a/jm2l/templates/helpers.mako b/jm2l/templates/helpers.mako index c214a77..cab5f1e 100644 --- a/jm2l/templates/helpers.mako +++ b/jm2l/templates/helpers.mako @@ -187,7 +187,7 @@ TabJs = {'select':[], 'desc':[]} Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...
Je peux - + Ajouter un lieu
@@ -453,7 +453,7 @@ TabJs = {'select':[], 'desc':[]} <% photos = uprofil.PhotosLinks %>
${request.user.slug}
- Changer ma photo + Changer ma photo
\ diff --git a/jm2l/templates/index.mako b/jm2l/templates/index.mako index fb53150..0580c6f 100644 --- a/jm2l/templates/index.mako +++ b/jm2l/templates/index.mako @@ -1,6 +1,6 @@ <%inherit file="jm2l:templates/layout.mako"/>

- Pour que l'évenement JM2L 2015 se passe dans les meilleures conditions + Pour que l'évenement JM2L 2017 se passe dans les meilleures conditions possible. Il s'agit ici pour toi de te connecter et de compléter les formulaires, d'essayer de les tenir à jour au fur et à meusure, de les compléter diff --git a/jm2l/templates/jm2l.mako b/jm2l/templates/jm2l.mako index a72b3ff..3fc5963 100644 --- a/jm2l/templates/jm2l.mako +++ b/jm2l/templates/jm2l.mako @@ -121,7 +121,7 @@ L'équipe des JM2L participe aux frais de transport des intervenants !

Et bien oui, mais cette participation ne sera effective que si vous remplissez toutes les conditions suivantes:

    -
  • Vous animez un atelier, une conférence ou une table ronde aux JM2L 2015.
  • +
  • Vous animez un atelier, une conférence ou une table ronde aux JM2L ${CurrentYear}.
  • Votre fiche est renseignée avec votre RIB.
  • Votre fiche est renseignée avec les preuves de vos achats.
  • Vous présentez l'original de vos tickets à l'accueil pendant l'évènement.
  • diff --git a/jm2l/templates/layout.mako b/jm2l/templates/layout.mako index efa5b52..028b9ab 100644 --- a/jm2l/templates/layout.mako +++ b/jm2l/templates/layout.mako @@ -2,7 +2,7 @@ <%namespace name="helpers" file="jm2l:templates/helpers.mako"/> -JM2L 2015 +JM2L 2017 @@ -28,7 +28,7 @@ <% context._kwargs['postpone_js']=[] -DisplayYear = request.session.get('year', 2015) +DisplayYear = request.session.get('year', 2017) %> <%def name="jsAddOn_head()"> <%def name="jsAddOn()"> @@ -37,7 +37,7 @@ ${helpers.uploader_js()}
    - % if DisplayYear!=2015: + % if DisplayYear!=2017:
    @@ -52,32 +52,24 @@ ${helpers.uploader_js()}