Browse Source

Fix issue with year for next edition

master
tr4ck3ur des JM2L 8 years ago
parent
commit
65abfb0e69
45 changed files with 97 additions and 100 deletions
  1. +3
    -1
      jm2l/__init__.py
  2. +1
    -0
      jm2l/const.py
  3. +1
    -0
      jm2l/helpers.py
  4. +10
    -11
      jm2l/models.py
  5. BIN
      jm2l/static/img/2015/logo.png
  6. BIN
      jm2l/static/img/2015/logo_3.png
  7. BIN
      jm2l/static/img/2017/Photos/P1010063.JPG
  8. BIN
      jm2l/static/img/2017/Photos/P1010064.JPG
  9. BIN
      jm2l/static/img/2017/Photos/P1010067.JPG
  10. BIN
      jm2l/static/img/2017/Photos/P1010069.JPG
  11. BIN
      jm2l/static/img/2017/Photos/P1010070.JPG
  12. BIN
      jm2l/static/img/2017/Photos/P1010122.JPG
  13. BIN
      jm2l/static/img/2017/Photos/P1010123.JPG
  14. BIN
      jm2l/static/img/2017/Photos/P1010126.JPG
  15. BIN
      jm2l/static/img/2017/Photos/P1010127.JPG
  16. BIN
      jm2l/static/img/2017/Photos/P1010129.JPG
  17. BIN
      jm2l/static/img/2017/Photos/P5050002.JPG
  18. BIN
      jm2l/static/img/2017/Photos/P5050046.JPG
  19. BIN
      jm2l/static/img/2017/Photos/panneau_stand.jpg
  20. BIN
      jm2l/static/img/2017/logo.png
  21. BIN
      jm2l/static/img/2017/logo_1.png
  22. +4
    -4
      jm2l/templates/Interventions/Interventions.mako
  23. +6
    -6
      jm2l/templates/Logistique/Dialog.mako
  24. +2
    -2
      jm2l/templates/Logistique/Dialog_Covoit.mako
  25. +1
    -1
      jm2l/templates/Logistique/Dialog_Heberg.mako
  26. +6
    -6
      jm2l/templates/Logistique/Logistique.mako
  27. +17
    -17
      jm2l/templates/Logistique/Tables.mako
  28. +2
    -2
      jm2l/templates/NewIndex.mako
  29. +1
    -1
      jm2l/templates/Profil/Profil.mako
  30. +1
    -1
      jm2l/templates/Profil/Sejour.mako
  31. +1
    -1
      jm2l/templates/Public/Plan.mako
  32. +1
    -1
      jm2l/templates/Public/Presse.mako
  33. +1
    -1
      jm2l/templates/Staff/tasks.mako
  34. +1
    -1
      jm2l/templates/edit_event.mako
  35. +2
    -2
      jm2l/templates/edit_tiers.mako
  36. +3
    -3
      jm2l/templates/helpers.mako
  37. +1
    -1
      jm2l/templates/index.mako
  38. +1
    -1
      jm2l/templates/jm2l.mako
  39. +12
    -20
      jm2l/templates/layout.mako
  40. +4
    -4
      jm2l/templates/modals.mako
  41. +3
    -3
      jm2l/templates/modals_js.mako
  42. +1
    -1
      jm2l/templates/view_event.mako
  43. +1
    -1
      jm2l/to_print.py
  44. +1
    -1
      jm2l/upload.py
  45. +9
    -7
      jm2l/views.py

+ 3
- 1
jm2l/__init__.py View File

@@ -18,12 +18,14 @@ from apscheduler.schedulers.background import BackgroundScheduler
from pyramid.request import Request from pyramid.request import Request
from mako.template import Template from mako.template import Template
from .models import User from .models import User
import logging
from jm2l.const import CurrentYear


import logging


def add_renderer_globals(event): def add_renderer_globals(event):
event['mytrip'] = Sejour_helpers(event) event['mytrip'] = Sejour_helpers(event)
event['myorga'] = Orga_helpers(event) event['myorga'] = Orga_helpers(event)
event['CurrentYear'] = CurrentYear


#@sched.scheduled_job('cron', day_of_week='sun', hour=22, minute=07) #@sched.scheduled_job('cron', day_of_week='sun', hour=22, minute=07)
def mailer_tasks(config): def mailer_tasks(config):


+ 1
- 0
jm2l/const.py View File

@@ -0,0 +1 @@
CurrentYear = 2017

+ 1
- 0
jm2l/helpers.py View File

@@ -2,6 +2,7 @@
from .models import DBSession, JM2L_Year, Sejour from .models import DBSession, JM2L_Year, Sejour
from datetime import timedelta, datetime from datetime import timedelta, datetime
import itertools import itertools
from jm2l.const import CurrentYear


class DummySejour(object): class DummySejour(object):


+ 10
- 11
jm2l/models.py View File

@@ -31,12 +31,11 @@ from sqlalchemy.orm import (
) )


from zope.sqlalchemy import ZopeTransactionExtension from zope.sqlalchemy import ZopeTransactionExtension
from jm2l.const import CurrentYear


DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
Base = declarative_base() Base = declarative_base()


CurrentYear = 2015

class TasksArea(Base): class TasksArea(Base):
__tablename__ = 'staff_tasks_area' __tablename__ = 'staff_tasks_area'
uid = Column(Integer, primary_key=True) uid = Column(Integer, primary_key=True)
@@ -174,19 +173,19 @@ class User(Base):
return None return None


@property @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 """ """ This property will return if User do an event on specified year """
return DBSession.query(Event).join(User_Event) \ return DBSession.query(Event).join(User_Event) \
.filter(User_Event.user_uid==self.uid) \ .filter(User_Event.user_uid==self.uid) \
.filter(Event.for_year==year).count() .filter(Event.for_year==year).count()


@property @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 """ """ 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] 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': if EventType=='All':
return filter(lambda e: e.for_year==year, self.events) return filter(lambda e: e.for_year==year, self.events)
else: else:
@@ -490,13 +489,13 @@ class Exchange(Base):
@classmethod @classmethod
def get_counters(cls): def get_counters(cls):
return DBSession.query(cls.exch_state, cls.exch_type, cls.exch_done, func.count(cls.exch_id))\ 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) .group_by(cls.exch_state, cls.exch_type, cls.exch_done)


@classmethod @classmethod
def get_my_counters(cls, uid): def get_my_counters(cls, uid):
return DBSession.query(cls.exch_state, cls.exch_type, cls.exch_done, func.count(cls.exch_id))\ 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) )\ .filter( or_(cls.asker_id==uid, cls.provider_id==uid) )\
.group_by(cls.exch_state, cls.exch_type, cls.exch_done) .group_by(cls.exch_state, cls.exch_type, cls.exch_done)
@@ -510,7 +509,7 @@ class Exchange(Base):
DicResult[extype][exstate]=[] DicResult[extype][exstate]=[]
DicResult[extype]['Counters']={'AllAsk':0, 'AllProp':0, 'AllAgree':0} DicResult[extype]['Counters']={'AllAsk':0, 'AllProp':0, 'AllAgree':0}
Query = DBSession.query(cls)\ Query = DBSession.query(cls)\
.filter(cls.for_year==2015)\
.filter(cls.for_year==CurrentYear)\
.order_by(cls.start_time).all() .order_by(cls.start_time).all()
for item in Query: for item in Query:
if item.exch_done: if item.exch_done:
@@ -537,7 +536,7 @@ class Exchange(Base):
@classmethod @classmethod
def get_pub_list(cls, exch_type): 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_type=='%s' % exch_type)\
.filter(cls.exch_done==False)\ .filter(cls.exch_done==False)\
.all() .all()
@@ -546,13 +545,13 @@ class Exchange(Base):
def get_my_list(cls, uid, exch_type): def get_my_list(cls, uid, exch_type):
DicResult = {} DicResult = {}
DicResult['Ask']=DBSession.query(cls)\ 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( or_(cls.asker_id==uid, cls.provider_id==uid) )\
.filter(cls.exch_type=='%s' % exch_type)\ .filter(cls.exch_type=='%s' % exch_type)\
.filter(cls.exch_state=='Ask')\ .filter(cls.exch_state=='Ask')\
.order_by(cls.start_time).all() .order_by(cls.start_time).all()
DicResult['Proposal']=DBSession.query(cls)\ 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( or_(cls.asker_id==uid, cls.provider_id==uid) )\
.filter(cls.exch_type=='%s' % exch_type)\ .filter(cls.exch_type=='%s' % exch_type)\
.filter(cls.exch_state=='Proposal')\ .filter(cls.exch_state=='Proposal')\


BIN
jm2l/static/img/2015/logo.png View File

Before After
Width: 1234  |  Height: 213  |  Size: 268 KiB Width: 1234  |  Height: 213  |  Size: 289 KiB

BIN
jm2l/static/img/2015/logo_3.png View File

Before After
Width: 1234  |  Height: 213  |  Size: 289 KiB Width: 1234  |  Height: 213  |  Size: 268 KiB

BIN
jm2l/static/img/2017/Photos/P1010063.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 133 KiB

BIN
jm2l/static/img/2017/Photos/P1010064.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 153 KiB

BIN
jm2l/static/img/2017/Photos/P1010067.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 134 KiB

BIN
jm2l/static/img/2017/Photos/P1010069.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 140 KiB

BIN
jm2l/static/img/2017/Photos/P1010070.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 101 KiB

BIN
jm2l/static/img/2017/Photos/P1010122.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 139 KiB

BIN
jm2l/static/img/2017/Photos/P1010123.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 136 KiB

BIN
jm2l/static/img/2017/Photos/P1010126.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 149 KiB

BIN
jm2l/static/img/2017/Photos/P1010127.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 140 KiB

BIN
jm2l/static/img/2017/Photos/P1010129.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 148 KiB

BIN
jm2l/static/img/2017/Photos/P5050002.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 346 KiB

BIN
jm2l/static/img/2017/Photos/P5050046.JPG View File

Before After
Width: 800  |  Height: 600  |  Size: 331 KiB

BIN
jm2l/static/img/2017/Photos/panneau_stand.jpg View File

Before After
Width: 800  |  Height: 600  |  Size: 128 KiB

BIN
jm2l/static/img/2017/logo.png View File

Before After
Width: 1269  |  Height: 257  |  Size: 297 KiB

BIN
jm2l/static/img/2017/logo_1.png View File

Before After
Width: 1234  |  Height: 213  |  Size: 268 KiB

+ 4
- 4
jm2l/templates/Interventions/Interventions.mako View File

@@ -106,9 +106,9 @@ elif Type=='T':
%> %>
% if Type!='O': % if Type!='O':
<fieldset> <fieldset>
<legend class="lowshadow">Vos ${CurTitles} programmés pour 2015</legend>
<legend class="lowshadow">Vos ${CurTitles} programmés pour ${CurrentYear}</legend>
<% <%
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) ) HeadHistTitle = u"L'historique de vos %s ( %d ) " % ( CurTitles, len(Selection) )
NothingTitle = u"Vous n'avez pas sollicité d'intervention %s." % CurEvent 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 % endif
% if Type!='O': % if Type!='O':
<a href="/MesJM2L/2015/${CurEventType.replace(' ','_')}">Je souhaite ajouter ${CurTitle} pour les JM2L 2015 !</a>
<a href="/MesJM2L/${CurrentYear}/${CurEventType.replace(' ','_')}">Je souhaite ajouter ${CurTitle} pour les JM2L ${CurrentYear} !</a>


<fieldset> <fieldset>
<legend class="lowshadow">Historique</legend> <legend class="lowshadow">Historique</legend>
<% <%
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) ) 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." NothingTitle = u"Désolé, Il n'y a rien dans l'historique vous concernant."
%> %>


+ 6
- 6
jm2l/templates/Logistique/Dialog.mako View File

@@ -23,9 +23,9 @@ elif Type=='M':
</div> </div>
<div class="modal-body"> <div class="modal-body">
%if 'exch_id' in form._fields.keys(): %if 'exch_id' in form._fields.keys():
<form id="ModalForm" action="javascript:DoPost('/2015/modal/Prop${Type}/${form.exch_id.data}');">
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/modal/Prop${Type}/${form.exch_id.data}');">
%else: %else:
<form id="ModalForm" action="javascript:DoPost('/2015/modal/Prop${Type}/0');">
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/modal/Prop${Type}/0');">
%endif %endif
<p>Je propose mes service pour ${CurTitle}</p> <p>Je propose mes service pour ${CurTitle}</p>
% if Type=='H': % if Type=='H':
@@ -65,9 +65,9 @@ elif Type=='M':
</div> </div>
<div class="modal-body"> <div class="modal-body">
% if 'exch_id' in form._fields.keys(): % if 'exch_id' in form._fields.keys():
<form id="ModalForm" action="javascript:DoPost('/2015/modal/Ask${Type}/${form.exch_id.data}');">
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/modal/Ask${Type}/${form.exch_id.data}');">
% else: % else:
<form id="ModalForm" action="javascript:DoPost('/2015/modal/Ask${Type}/0');">
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/modal/Ask${Type}/0');">
%endif %endif
<p>Je demande ${CurTitle}</p> <p>Je demande ${CurTitle}</p>
% if Type=='H': % if Type=='H':
@@ -114,9 +114,9 @@ elif Exch.exch_type=='M':
${dialogM.ShowM(Exch)} ${dialogM.ShowM(Exch)}
% endif % endif
% if Exch.exch_state=='Ask': % if Exch.exch_state=='Ask':
<form id="ModalForm" action="javascript:DoPost('/2015/exchange/Ask${Type}/${Exch.exch_id}/deal');"></form>
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/exchange/Ask${Type}/${Exch.exch_id}/deal');"></form>
% elif Exch.exch_state=='Proposal': % elif Exch.exch_state=='Proposal':
<form id="ModalForm" action="javascript:DoPost('/2015/exchange/Prop${Type}/${Exch.exch_id}/deal');"></form>
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/exchange/Prop${Type}/${Exch.exch_id}/deal');"></form>
% endif % endif
</div> </div>
<div class="modal-footer"> <div class="modal-footer">


+ 2
- 2
jm2l/templates/Logistique/Dialog_Covoit.mako View File

@@ -100,7 +100,7 @@
<small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small> <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
<br /> <br />
<small style="color:#999">Je peux </small> <small style="color:#999">Je peux </small>
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/0');">
<i class="icon-plus-sign icon-white"></i> Ajouter un lieu <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
</a> </a>
</div> </div>
@@ -124,7 +124,7 @@
<small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small> <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
<br /> <br />
<small style="color:#999">Je peux </small> <small style="color:#999">Je peux </small>
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/0');">
<i class="icon-plus-sign icon-white"></i> Ajouter un lieu <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
</a> </a>
</div> </div>


+ 1
- 1
jm2l/templates/Logistique/Dialog_Heberg.mako View File

@@ -33,7 +33,7 @@
${helper.DisplayForm(form, DicFormat)} ${helper.DisplayForm(form, DicFormat)}
NB: Vous devez faire une proposition différente pour chaque nuit que vous proposez. NB: Vous devez faire une proposition différente pour chaque nuit que vous proposez.
<br> <br>
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/0');">
<i class="icon-plus-sign icon-white"></i> Indiquer l'adresse proposée. <i class="icon-plus-sign icon-white"></i> Indiquer l'adresse proposée.
</a> </a>
</%def> \ </%def> \


+ 6
- 6
jm2l/templates/Logistique/Logistique.mako View File

@@ -156,8 +156,8 @@ elif Type=='M':
% endif % endif
% if item.exch_type=="C": % if item.exch_type=="C":
un co-voiturage le ${item.start_time.strftime('%a %d %b vers %Hh%M').decode('utf-8')} un co-voiturage le ${item.start_time.strftime('%a %d %b vers %Hh%M').decode('utf-8')}
de <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
à <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
de <a href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
à <a href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
% elif item.exch_type=="M": % elif item.exch_type=="M":
% if item.Category: % if item.Category:
<i>${item.Category.exch_subtype}</i> <i>${item.Category.exch_subtype}</i>
@@ -181,12 +181,12 @@ elif Type=='M':
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
% if item.provider_id==request.user.uid or item.asker_id==request.user.uid: % if item.provider_id==request.user.uid or item.asker_id==request.user.uid:
<a class="btn btn-mini btn-primary" style="float:right" <a class="btn btn-mini btn-primary" style="float:right"
href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">
<i class="icon-search icon-white"></i> <i class="icon-search icon-white"></i>
</a> </a>
% elif (item.provider_id and item.asker_id): % elif (item.provider_id and item.asker_id):
<a class="btn btn-mini btn-primary" style="float:right" <a class="btn btn-mini btn-primary" style="float:right"
href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">
<i class="icon-search icon-white"></i> <i class="icon-search icon-white"></i>
</a> <br/> <br/> </a> <br/> <br/>
## <a id="Ask${Type}-${item.exch_id}" ## <a id="Ask${Type}-${item.exch_id}"
@@ -200,11 +200,11 @@ elif Type=='M':
## <script>$("#Ask${Type}-${item.exch_id}").popover();</script> ## <script>$("#Ask${Type}-${item.exch_id}").popover();</script>
% else: % else:
<a class="btn btn-mini btn-primary" style="float:right" <a class="btn btn-mini btn-primary" style="float:right"
href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')">
<i class="icon-search icon-white"></i> <i class="icon-search icon-white"></i>
</a> <br/> <br/> </a> <br/> <br/>
## <a class="btn btn-mini btn-primary" style="float:right" ## <a class="btn btn-mini btn-primary" style="float:right"
## href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/deal')">
## href="javascript:DoGet('/${CurrentYear}/exchange/Ask${Type}/${item.exch_id}/deal')">
## <i class="icon-random icon-white"></i> ## <i class="icon-random icon-white"></i>
## </a> ## </a>
% endif % endif


+ 17
- 17
jm2l/templates/Logistique/Tables.mako View File

@@ -24,7 +24,7 @@ elif Type=='M':
<thead> <thead>
<tr> <tr>
<th colspan="3"><i class="${CurIcon}"></i> ${What}s ${CurTitle} <th colspan="3"><i class="${CurIcon}"></i> ${What}s ${CurTitle}
<a class="btn btn-mini btn-primary" Myhref="/2015/modal/${Form}${Type}/0"
<a class="btn btn-mini btn-primary" Myhref="/${CurrentYear}/modal/${Form}${Type}/0"
role="button" data-target="#AjaxModal" style="float:right" handle="modal"> role="button" data-target="#AjaxModal" style="float:right" handle="modal">
<i class="icon-plus-sign icon-white"></i> Ajouter <i class="icon-plus-sign icon-white"></i> Ajouter
</a> </a>
@@ -53,44 +53,44 @@ elif Type=='M':
<td> <td>
% if item.exch_done: % if item.exch_done:
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-success" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-ok icon-white"></i> Validé</a>
<a class="btn btn-small btn-success" href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"><i class="icon-ok icon-white"></i> Validé</a>
<a class="btn btn-small btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <a class="btn btn-small btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="javascript:DoGet('/2015/exchange/${Form}${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Annuler</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Annuler</a></li>
</ul> </ul>
% elif getattr(item, You) is None: % elif getattr(item, You) is None:
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small"><i class="icon-signal"></i> Publié</a> <a class="btn btn-small"><i class="icon-signal"></i> Publié</a>
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="javascript:DoGet('/2015/modal/${Form}${Type}/${item.exch_id}')"><i class="icon-pencil"></i> Modifier</a></li>
<li><a href="javascript:DoGet('/2015/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/modal/${Form}${Type}/${item.exch_id}')"><i class="icon-pencil"></i> Modifier</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
</ul> </ul>
% elif getattr(item, Me)==request.user.uid and item.exch_state==CurKind: % elif getattr(item, Me)==request.user.uid and item.exch_state==CurKind:
Je ${What} <br> Je ${What} <br>
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-warning" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Proposition</a>
<a class="btn btn-small btn-warning" href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Proposition</a>
<a class="btn btn-small btn-warning dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <a class="btn btn-small btn-warning dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="javascript:DoGet('/2015/exchange/${Form}${Type}/${item.exch_id}/accept')"><i class="icon-ok"></i> Accepter</a></li>
<li><a href="javascript:DoGet('/2015/exchange/${Form}${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Refuser</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/accept')"><i class="icon-ok"></i> Accepter</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Refuser</a></li>
<li class="divider"></li> <li class="divider"></li>
<li><a href="javascript:DoGet('/2015/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
</ul> </ul>
% elif getattr(item, Me)==request.user.uid: % elif getattr(item, Me)==request.user.uid:
Je ${What} <br> Je ${What} <br>
<div class="btn-group"> <div class="btn-group">
<a class="btn btn-small btn-info" href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Négociation</a>
<a class="btn btn-small btn-info" href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"><i class="icon-question-sign icon-white"></i> Négociation</a>
<a class="btn btn-small btn-info dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a> <a class="btn btn-small btn-info dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
<li><a href="javascript:DoGet('/${CurrentYear}/modal/Show${Type}/${item.exch_id}')"><i class="icon-search"></i> Détails</a></li>
<li><a href="#"><i class="icon-question-sign"></i> En Attente de réponse </a></li> <li><a href="#"><i class="icon-question-sign"></i> En Attente de réponse </a></li>
<li><a href="javascript:DoGet('/2015/exchange/${Form}${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Se désister </a></li>
</ul>
<li><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Se désister </a></li>
</ul>
% endif % endif
</div> </div>
</div> </div>
@@ -98,8 +98,8 @@ elif Type=='M':
<td> <td>
%if Type=='C': %if Type=='C':
${item.start_time.strftime('%A %d %b %Y').decode('utf-8')} vers ${item.start_time.strftime('%Hh%M')} ${item.start_time.strftime('%A %d %b %Y').decode('utf-8')} vers ${item.start_time.strftime('%Hh%M')}
de <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
à <a href="javascript:DoGetLieu('/2015/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
de <a href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/${item.Itin.start.place_id}')">${item.Itin.start.display_name}</a>
à <a href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/${item.Itin.arrival.place_id}')">${item.Itin.arrival.display_name}</a>
%elif Type=='H': %elif Type=='H':
% if item.Category: % if item.Category:
<i>${item.Category.exch_subtype}</i>, <i>${item.Category.exch_subtype}</i>,


+ 2
- 2
jm2l/templates/NewIndex.mako View File

@@ -15,9 +15,9 @@
<br> <br>
<div class="center"> <div class="center">
% if request.user and request.user.Staff: % if request.user and request.user.Staff:
<a href="/${year or 2015}/edit">Editer cette page</a> -
<a href="/${year or CurrentYear}/edit">Editer cette page</a> -
% endif % endif
<h4><a href="/${year or 2015}/le-programme">Le programme des événements ${year or 2015 }</a></h4>
<h4><a href="/${year or CurrentYear}/le-programme">Le programme des événements ${year or CurrentYear }</a></h4>
</div> </div>
<div class="row-fluid"> <div class="row-fluid">
<div class="span10 offset1"> <div class="span10 offset1">


+ 1
- 1
jm2l/templates/Profil/Profil.mako View File

@@ -105,7 +105,7 @@ ${helpers.DisplayRespForm(profil_form, DicFormB)}
<tr class="row template" style="line-height:2.2em;"> <tr class="row template" style="line-height:2.2em;">
<td style="text-align:center;"> <td style="text-align:center;">
<input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid" <input type="hidden" style="width:20em;" class="form-control" name="tiersship-{{row-count-placeholder}}-year_uid"
value="2015" /> 2015
value="${CurrentYear}" /> ${CurrentYear}
</td> </td>
<td style="text-align: center;"> <td style="text-align: center;">
<input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid" <input type="hidden" class="form-control" name="tiersship-{{row-count-placeholder}}-user_uid"


+ 1
- 1
jm2l/templates/Profil/Sejour.mako View File

@@ -150,7 +150,7 @@ fieldset:disabled {
</button> </button>
% else: % else:
<button type="submit" class="btn btn-large btn-primary" /> <button type="submit" class="btn btn-large btn-primary" />
<i class="icon-ok icon-white"></i> Je viens aux JM2L 2015
<i class="icon-ok icon-white"></i> Je viens aux JM2L ${CurrentYear}
</button> </button>
% endif % endif
</div> </div>


+ 1
- 1
jm2l/templates/Public/Plan.mako View File

@@ -14,7 +14,7 @@
<h2 class="shadow">Nous rejoindre ou nous joindre...</h2> <h2 class="shadow">Nous rejoindre ou nous joindre...</h2>


<div class="span10 offset1"> <div class="span10 offset1">
<p>Le samedi 28 novembre 2015 d’où que vous veniez, tout est mis en place pour que vous
<p>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. puissiez vous rendre en toute simplicité sur les lieux de l’événement.
<br> N'hésitez pas à utiliser la section covoiturage de votre profil. Et <br> N'hésitez pas à utiliser la section covoiturage de votre profil. Et
pas de panique ! Demain, ce sera pire... </p> pas de panique ! Demain, ce sera pire... </p>


+ 1
- 1
jm2l/templates/Public/Presse.mako View File

@@ -1,7 +1,7 @@
<%inherit file="jm2l:templates/layout.mako"/> <%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.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: % if request.user and request.user.Staff:
<a href="dossier-de-presse/edit">Modifier</a><br> <a href="dossier-de-presse/edit">Modifier</a><br>


+ 1
- 1
jm2l/templates/Staff/tasks.mako View File

@@ -50,7 +50,7 @@ DicForm = {
'name': {'PlaceHolder':u"Nom de la tâche", "FieldStyle":"width:90%;" }, 'name': {'PlaceHolder':u"Nom de la tâche", "FieldStyle":"width:90%;" },
'area_uid': {"FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" }, 'area_uid': {"FieldStyle":"width:16em;", 'ContainerStyle':"float:left;" },
'closed_by': {"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" }, 'description': {'PlaceHolder':u"Description", "FieldStyle":"width:95%;min-height:150px;", "ckeditor":"1" },
} }
%> %>


+ 1
- 1
jm2l/templates/edit_event.mako View File

@@ -23,7 +23,7 @@
<div id="SalleCarousel"> <div id="SalleCarousel">
${helpers.show_salles( Salles, form.salle_uid.data or form.salle_uid.choices and form.salle_uid.choices[0][0] )} ${helpers.show_salles( Salles, form.salle_uid.data or form.salle_uid.choices and form.salle_uid.choices[0][0] )}
</div> </div>
% 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):
<a class="btn btn-danger pull-right" type="button" href="${event.uid}/delete"> <a class="btn btn-danger pull-right" type="button" href="${event.uid}/delete">
<i class="icon-remove icon-white"></i> Supprimer <i class="icon-remove icon-white"></i> Supprimer
</a> </a>


+ 2
- 2
jm2l/templates/edit_tiers.mako View File

@@ -54,7 +54,7 @@ DicForm = {
<td> <td>
<select class="form-control" style="width:5em;" name="membership-{{row-count-placeholder}}-year_uid" <select class="form-control" style="width:5em;" name="membership-{{row-count-placeholder}}-year_uid"
id="membership-{{row-count-placeholder}}-year_uid"> id="membership-{{row-count-placeholder}}-year_uid">
% for year in range(2015, 2005, -1):
% for year in range(CurrentYear, 2005, -1):
<% <%
if year in [2014]: if year in [2014]:
continue continue
@@ -141,7 +141,7 @@ DicForm = {
<td> <td>
<select class="form-control" style="width:5em;" name="roles-{{row-count-placeholder}}-year_uid" <select class="form-control" style="width:5em;" name="roles-{{row-count-placeholder}}-year_uid"
id="roles-{{row-count-placeholder}}-year_uid"> id="roles-{{row-count-placeholder}}-year_uid">
% for year in range(2015, 2005, -1):
% for year in range(CurrentYear, 2005, -1):
<% <%
if year in [2014]: if year in [2014]:
continue continue


+ 3
- 3
jm2l/templates/helpers.mako View File

@@ -187,7 +187,7 @@ TabJs = {'select':[], 'desc':[]}
<small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small> <small style="color:#999">Si je n´ai pas trouvé le lieu dont j´ai besoin dans ces listes...</small>
<br /> <br />
<small style="color:#999">Je peux </small> <small style="color:#999">Je peux </small>
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
<a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/${CurrentYear}/modal/Place/0');">
<i class="icon-plus-sign icon-white"></i> Ajouter un lieu <i class="icon-plus-sign icon-white"></i> Ajouter un lieu
</a> </a>
</div> </div>
@@ -453,7 +453,7 @@ TabJs = {'select':[], 'desc':[]}
<% photos = uprofil.PhotosLinks %> <% photos = uprofil.PhotosLinks %>
<div style="text-align: center;line-height:20px;"><b>${request.user.slug}</b></div> <div style="text-align: center;line-height:20px;"><b>${request.user.slug}</b></div>
<div style="text-align: center;line-height:20px;"> <div style="text-align: center;line-height:20px;">
<a data-target="#AjaxModal" Myhref="/2015/modal/Password/1" role="button" handle="modal">Changer mon mot de passe</a>
<a data-target="#AjaxModal" Myhref="/${CurrentYear}/modal/Password/1" role="button" handle="modal">Changer mon mot de passe</a>
</div> </div>
<div id="MyPictureCarousel" class="carousel slide"> <div id="MyPictureCarousel" class="carousel slide">
% if len(photos)>1: % if len(photos)>1:
@@ -481,7 +481,7 @@ TabJs = {'select':[], 'desc':[]}
</div> </div>
</div> </div>
<div style="text-align: center;line-height:20px;"> <div style="text-align: center;line-height:20px;">
<a data-target="#AjaxModal" Myhref="/2015/modal/UserPicture/${uprofil.uid}" handle="modal">Changer ma photo</a>
<a data-target="#AjaxModal" Myhref="/${CurrentYear}/modal/UserPicture/${uprofil.uid}" handle="modal">Changer ma photo</a>
</div> </div>
</div> </div>
</%def> \ </%def> \


+ 1
- 1
jm2l/templates/index.mako View File

@@ -1,6 +1,6 @@
<%inherit file="jm2l:templates/layout.mako"/> <%inherit file="jm2l:templates/layout.mako"/>
<p> <p>
Pour que l'&eacute;venement JM2L 2015 se passe dans les meilleures conditions
Pour que l'&eacute;venement JM2L 2017 se passe dans les meilleures conditions
possible. possible.
Il s'agit ici pour toi de te connecter et de compl&eacute;ter les formulaires, Il s'agit ici pour toi de te connecter et de compl&eacute;ter les formulaires,
d'essayer de les tenir à jour au fur et à meusure, de les compl&eacute;ter d'essayer de les tenir à jour au fur et à meusure, de les compl&eacute;ter


+ 1
- 1
jm2l/templates/jm2l.mako View File

@@ -121,7 +121,7 @@
L'équipe des JM2L participe aux <u>frais de transport</u> des intervenants !<br /><br /> L'équipe des JM2L participe aux <u>frais de transport</u> des intervenants !<br /><br />
Et bien oui, mais cette participation ne sera effective que si vous remplissez <u>toutes les conditions</u> suivantes: Et bien oui, mais cette participation ne sera effective que si vous remplissez <u>toutes les conditions</u> suivantes:
<ul style="list-style:circle;"> <ul style="list-style:circle;">
<li>Vous animez <strong>un atelier, une conférence ou une table ronde</strong> aux JM2L 2015.</li>
<li>Vous animez <strong>un atelier, une conférence ou une table ronde</strong> aux JM2L ${CurrentYear}.</li>
<li>Votre fiche est renseignée avec <strong>votre RIB</strong>.</li> <li>Votre fiche est renseignée avec <strong>votre RIB</strong>.</li>
<li>Votre fiche est renseignée avec <strong>les preuves</strong> de vos achats.</li> <li>Votre fiche est renseignée avec <strong>les preuves</strong> de vos achats.</li>
<li>Vous <strong>présentez l'original de vos tickets</strong> à l'accueil pendant l'évènement.</li> <li>Vous <strong>présentez l'original de vos tickets</strong> à l'accueil pendant l'évènement.</li>


+ 12
- 20
jm2l/templates/layout.mako View File

@@ -2,7 +2,7 @@
<html> <html>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/> <%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<head> <head>
<title>JM2L 2015</title>
<title>JM2L 2017</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="keywords" content="python web application" /> <meta name="keywords" content="python web application" />
<meta name="description" content="jm2l LinuxAzur journée méditéranéenne logiciel libre" /> <meta name="description" content="jm2l LinuxAzur journée méditéranéenne logiciel libre" />
@@ -28,7 +28,7 @@
<body> <body>
<% <%
context._kwargs['postpone_js']=[] context._kwargs['postpone_js']=[]
DisplayYear = request.session.get('year', 2015)
DisplayYear = request.session.get('year', 2017)
%> %>
<%def name="jsAddOn_head()"></%def> <%def name="jsAddOn_head()"></%def>
<%def name="jsAddOn()"></%def> <%def name="jsAddOn()"></%def>
@@ -37,7 +37,7 @@ ${helpers.uploader_js()}


<div id="wrap"> <div id="wrap">
<div id="top"> <div id="top">
% if DisplayYear!=2015:
% if DisplayYear!=2017:
<div class="align-center" style="background: url( ${'/img/%s/headerbg.png' % DisplayYear} ) repeat-x scroll 0 top #ffffff;"> <div class="align-center" style="background: url( ${'/img/%s/headerbg.png' % DisplayYear} ) repeat-x scroll 0 top #ffffff;">
<a href="${"/%s/" % DisplayYear}"> <a href="${"/%s/" % DisplayYear}">
<div style="height:215px;background: url( ${"/img/%s/logo.png" % DisplayYear} ) no-repeat scroll center center transparent"> <div style="height:215px;background: url( ${"/img/%s/logo.png" % DisplayYear} ) no-repeat scroll center center transparent">
@@ -52,32 +52,24 @@ ${helpers.uploader_js()}
<div class="carousel-inner" role="listbox"> <div class="carousel-inner" role="listbox">
<div class="item ${["","active"][request.user and request.user.vote_logo==1 or request.user is None]}"> <div class="item ${["","active"][request.user and request.user.vote_logo==1 or request.user is None]}">
<a href="/"> <a href="/">
<div style="height:215px;background: url(/img/2015/logo.png) no-repeat scroll center transparent"></div>
<div style="height:215px;background: url(/img/2017/logo.png) no-repeat scroll center transparent"></div>
</a> </a>
</div> </div>
<div class="item ${["","active"][request.user and request.user.vote_logo==2 or 0]}"> <div class="item ${["","active"][request.user and request.user.vote_logo==2 or 0]}">
<a href="/"> <a href="/">
<div style="height:215px;background: url(/img/2015/logo_1.png) no-repeat scroll center transparent"></div>
<div style="height:215px;background: url(/img/2017/logo_1.png) no-repeat scroll center transparent"></div>
</a> </a>
</div> </div>
<div class="item ${["","active"][request.user and request.user.vote_logo==3 or 0]}">
<a href="/">
<div style="height:215px;background: url(/img/2015/logo_2.png) no-repeat scroll center transparent"></div>
</a>
</div>
<div class="item ${["","active"][request.user and request.user.vote_logo==4 or 0]}">
<a href="/">
<div style="height:215px;background: url(/img/2015/logo_3.png) no-repeat scroll center transparent"></div>
</a>
</div>
% if request.user and request.user.vote_logo not in [1,2,3,4]:
% if request.user and request.user.vote_logo not in [1,2]:
<div class="item active"> <div class="item active">
<div class="align-center"> <div class="align-center">
<H1>JM2L 2015</H1>
<H1>JM2L 2017</H1>
<H2> &laquo; Do It Yourself &raquo;</H2> <H2> &laquo; Do It Yourself &raquo;</H2>
<h3>Choisissez ici votre logo préféré !</h3> <h3>Choisissez ici votre logo préféré !</h3>
<p>Utilisez les flèches pour choisir et voter !<br> <p>Utilisez les flèches pour choisir et voter !<br>
Vous pouvez changer à tout moment, mais vous n'aurez droit qu'a un seul choix, le vôtre ;)</p> Vous pouvez changer à tout moment, mais vous n'aurez droit qu'a un seul choix, le vôtre ;)</p>
<p>Vous souhaitez proposer le vôtre ? <br>
N'hésitez pas à envoyer vos propositions par mail à l'équipe !</p>
</div> </div>
</div> </div>
% endif % endif
@@ -109,8 +101,8 @@ ${helpers.uploader_js()}
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
Archives&nbsp;<span class="caret"></span></a> Archives&nbsp;<span class="caret"></span></a>
<ul class="dropdown-menu pull-right" style="min-width:0"> <ul class="dropdown-menu pull-right" style="min-width:0">
% for tmpyear in range(2015, 2005, -1):
% if tmpyear!=2014:
% for tmpyear in range(2017, 2005, -1):
% if tmpyear!=2014 and tmpyear!=2016:
<li><a href="/year/${tmpyear}">${tmpyear}</a></li> <li><a href="/year/${tmpyear}">${tmpyear}</a></li>
% endif % endif
% endfor % endfor
@@ -192,7 +184,7 @@ ${helpers.uploader_js()}


<footer class="footer"> <footer class="footer">
<div class="container"> <div class="container">
<h4>JM2L 2005-2015</h4>
<h4>JM2L 2005-2017</h4>
<p> <p>
Concocté par <a href="http://www.linux-azur.org/">Linux Azur</a> ~ Concocté par <a href="http://www.linux-azur.org/">Linux Azur</a> ~
<a href="http://creativecommons.org/licenses/by-sa/4.0/">CopyFriendly</a> <a href="http://creativecommons.org/licenses/by-sa/4.0/">CopyFriendly</a>


+ 4
- 4
jm2l/templates/modals.mako View File

@@ -25,11 +25,11 @@
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane fade active in" id="Place_Address"> <div class="tab-pane fade active in" id="Place_Address">
% if update: % if update:
<form id="ModalPlaceForm" action="javascript:DoPostLieu('/2015/modal/Place/${form.place_id.data}');" style='margin:0;'>
<form id="ModalPlaceForm" action="javascript:DoPostLieu('/${CurrentYear}/modal/Place/${form.place_id.data}');" style='margin:0;'>
${form.place_id()} ${form.place_id()}
${form.csrf_token} ${form.csrf_token}
% else: % else:
<form id="ModalPlaceForm" action="javascript:DoPostLieu('/2015/modal/Place/0');" style='margin:0;'>
<form id="ModalPlaceForm" action="javascript:DoPostLieu('/${CurrentYear}/modal/Place/0');" style='margin:0;'>
${form.csrf_token} ${form.csrf_token}
% endif % endif
@@ -153,7 +153,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Annuler</button> <button class="btn" data-dismiss="modal" aria-hidden="true">Annuler</button>
<button class="btn btn-primary" onclick="javascript:DoPost('/2015/modal/UserPicture/${uid}');">Enregistrer les modifications</button>
<button class="btn btn-primary" onclick="javascript:DoPost('/${CurrentYear}/modal/UserPicture/${uid}');">Enregistrer les modifications</button>
</div> </div>
</div> </div>
</%def> \ </%def> \
@@ -165,7 +165,7 @@
<h3>Changer mon mot de passe</h3> <h3>Changer mon mot de passe</h3>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<form id="ModalForm" action="javascript:DoPost('/2015/modal/Password/${uid}');" style='margin:0;'>
<form id="ModalForm" action="javascript:DoPost('/${CurrentYear}/modal/Password/${uid}');" style='margin:0;'>
<div class="description">Votre identifiant est <b>${request.user.slug}</b> <div class="description">Votre identifiant est <b>${request.user.slug}</b>
<div class="description">Pour modifier le mot de passe actuel, <div class="description">Pour modifier le mot de passe actuel,
entrez un nouveau mot de passe dans chacune des deux zones de texte. entrez un nouveau mot de passe dans chacune des deux zones de texte.


+ 3
- 3
jm2l/templates/modals_js.mako View File

@@ -7,7 +7,7 @@ $('#AjaxModal').modal("hide");


% if modtype in ['AskC', 'PropC', 'ShowC']: % if modtype in ['AskC', 'PropC', 'ShowC']:
$.ajax({ $.ajax({
url:'/2015/exchange/AskC/0/refresh',
url:'/${CurrentYear}/exchange/AskC/0/refresh',
success:function(result, status, jqXHR){ success:function(result, status, jqXHR){
var pubresult = $('<div />').append(result).find('#MissingCTable').html(); var pubresult = $('<div />').append(result).find('#MissingCTable').html();
$('#MissingCTable').html(pubresult); $('#MissingCTable').html(pubresult);
@@ -27,7 +27,7 @@ $.ajax({
}); });
% elif modtype in ['AskM', 'PropM', 'ShowM']: % elif modtype in ['AskM', 'PropM', 'ShowM']:
$.ajax({ $.ajax({
url:'/2015/exchange/AskM/0/refresh',
url:'/${CurrentYear}/exchange/AskM/0/refresh',
success:function(result, status, jqXHR){ success:function(result, status, jqXHR){
var pubresult = $('<div />').append(result).find('#MissingMTable').html(); var pubresult = $('<div />').append(result).find('#MissingMTable').html();
$('#MissingCTable').html(pubresult); $('#MissingCTable').html(pubresult);
@@ -46,7 +46,7 @@ $.ajax({
}); });
% elif modtype in ['AskH', 'PropH', 'ShowH']: % elif modtype in ['AskH', 'PropH', 'ShowH']:
$.ajax({ $.ajax({
url:'/2015/exchange/AskH/0/refresh',
url:'/${CurrentYear}/exchange/AskH/0/refresh',
success:function(result, status, jqXHR){ success:function(result, status, jqXHR){
var pubresult = $('<div />').append(result).find('#MissingHTable').html(); var pubresult = $('<div />').append(result).find('#MissingHTable').html();
$('#MissingHTable').html(pubresult); $('#MissingHTable').html(pubresult);


+ 1
- 1
jm2l/templates/view_event.mako View File

@@ -16,7 +16,7 @@
${event.start_time.strftime('%d %b %Y').decode('utf-8')} - ${event.start_time.strftime('%d %b %Y').decode('utf-8')} -
${event.start_time.strftime('%H:%M')} à ${event.end_time.strftime('%H:%M')} ${event.start_time.strftime('%H:%M')} à ${event.end_time.strftime('%H:%M')}
</div> </div>
% 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):
<a href="/MesJM2L/${event.for_year}/${event.event_type.replace(' ', '_')}/${event.slug}">Modifier</a> <a href="/MesJM2L/${event.for_year}/${event.event_type.replace(' ', '_')}/${event.slug}">Modifier</a>
% elif request.user and request.user.Staff: % elif request.user and request.user.Staff:
<a href="/MesJM2L/${event.for_year}/${event.event_type.replace(' ', '_')}/${event.slug}">Editer</a> <a href="/MesJM2L/${event.for_year}/${event.event_type.replace(' ', '_')}/${event.slug}">Editer</a>


+ 1
- 1
jm2l/to_print.py View File

@@ -8,8 +8,8 @@ from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.units import mm from reportlab.lib.units import mm
from .upload import MediaPath from .upload import MediaPath
from jm2l.const import CurrentYear


CurrentYear = 2015
# Create PDF container # Create PDF container
EXPIRATION_TIME = 300 # seconds EXPIRATION_TIME = 300 # seconds
WIDTH = 210 * mm WIDTH = 210 * mm


+ 1
- 1
jm2l/upload.py View File

@@ -13,8 +13,8 @@ import cStringIO as StringIO
# Database access imports # Database access imports
from .models import User, Place, Tiers, Event, SallePhy from .models import User, Place, Tiers, Event, SallePhy
from .blenderthumbnailer import blend_extract_thumb, write_png from .blenderthumbnailer import blend_extract_thumb, write_png
from jm2l.const import CurrentYear


CurrentYear = 2015
MIN_FILE_SIZE = 1 # bytes MIN_FILE_SIZE = 1 # bytes
MAX_FILE_SIZE = 500000000 # bytes MAX_FILE_SIZE = 500000000 # bytes
IMAGE_TYPES = re.compile('image/(gif|p?jpeg|(x-)?png)') IMAGE_TYPES = re.compile('image/(gif|p?jpeg|(x-)?png)')


+ 9
- 7
jm2l/views.py View File

@@ -5,6 +5,7 @@ from pyramid.renderers import render_to_response
from pyramid.view import notfound_view_config, forbidden_view_config from pyramid.view import notfound_view_config, forbidden_view_config
from pyramid.view import view_config from pyramid.view import view_config
from mako.template import Template from mako.template import Template
from pyramid_mailer.message import Message
from .upload import IMAGEPATH from .upload import IMAGEPATH
# Import Web Forms # Import Web Forms
from .forms import * from .forms import *
@@ -26,8 +27,7 @@ import datetime
import re import re
import shutil import shutil
import glob import glob
CurrentYear = 2015
from jm2l.const import CurrentYear


## =-=- Here, We keep some usefull function -=-= ## =-=- Here, We keep some usefull function -=-=
def remove_accents(input_str): def remove_accents(input_str):
@@ -359,6 +359,8 @@ def index_page(request):
return {'year': year, 'content':content, 'edition':u"1<sup>ère</sup>" } return {'year': year, 'content':content, 'edition':u"1<sup>ère</sup>" }
elif year==2015: elif year==2015:
return {'year': year, 'content':content, 'edition':u"9<sup>ème</sup>" } return {'year': year, 'content':content, 'edition':u"9<sup>ème</sup>" }
elif year==2017:
return {'year': year, 'content':content, 'edition':u"10<sup>ème</sup>" }
else: else:
edition = year - 2005 edition = year - 2005
return {'year': year, 'content':content, 'edition':u"%d<sup>ème</sup>" % edition } return {'year': year, 'content':content, 'edition':u"%d<sup>ème</sup>" % edition }
@@ -366,13 +368,13 @@ def index_page(request):
raise HTTPNotFound() raise HTTPNotFound()
else: else:
content = DBSession.query(JM2L_Year).filter(JM2L_Year.year_uid==CurrentYear).first().description content = DBSession.query(JM2L_Year).filter(JM2L_Year.year_uid==CurrentYear).first().description
TargetDir = "jm2l/static/img/%s/Photos" % (year or 2015)
TargetUrl = "/static/img/%s/Photos/" % (year or 2015)
TargetDir = "jm2l/static/img/%s/Photos" % (year or CurrentYear)
TargetUrl = "/static/img/%s/Photos/" % (year or CurrentYear)
if path.isdir(TargetDir): if path.isdir(TargetDir):
ListPhotos = map(lambda x: TargetUrl + x, listdir(TargetDir)) ListPhotos = map(lambda x: TargetUrl + x, listdir(TargetDir))
else: else:
ListPhotos = [] ListPhotos = []
return {'year': CurrentYear, 'content':content, 'edition':u"9<sup>ème</sup>", 'ListPhotos': ListPhotos}
return {'year': CurrentYear, 'content':content, 'edition':u"10<sup>ème</sup>", 'ListPhotos': ListPhotos}


@view_config(route_name='edit_index', renderer="jm2l:templates/Staff/EditIndex.mako") @view_config(route_name='edit_index', renderer="jm2l:templates/Staff/EditIndex.mako")
def edit_index(request): def edit_index(request):
@@ -438,7 +440,7 @@ def edit_presse(request):
@view_config(route_name='plan', renderer="jm2l:templates/Public/Plan.mako") @view_config(route_name='plan', renderer="jm2l:templates/Public/Plan.mako")
def static_plan(request): def static_plan(request):
session = request.session session = request.session
session['year'] = 2015
session['year'] = CurrentYear
MainTab = {'plan':'active', "logged_in":request.authenticated_userid } MainTab = {'plan':'active', "logged_in":request.authenticated_userid }
return MainTab return MainTab


@@ -1202,7 +1204,7 @@ def Modal(request):
@view_config(route_name='participer', renderer="jm2l:templates/Participer.mako") @view_config(route_name='participer', renderer="jm2l:templates/Participer.mako")
def participer(request): def participer(request):
session = request.session session = request.session
session['year'] = 2015
session['year'] = CurrentYear
TmpUsr = User() TmpUsr = User()
form = UserRegisterForm(request.POST, TmpUsr, meta={'csrf_context': request.session}) form = UserRegisterForm(request.POST, TmpUsr, meta={'csrf_context': request.session})
MyLink=None MyLink=None


Loading…
Cancel
Save