From e6beb8f49622c3cb14ca47916638b6ac91a7b944 Mon Sep 17 00:00:00 2001 From: tr4ck3ur Date: Fri, 20 Feb 2015 17:44:56 +0100 Subject: Fix tasks issue after update, Fix upload button name Added link task and taskarea --- jm2l/models.py | 1 + jm2l/templates/NewIndex.mako | 4 ++++ jm2l/templates/Staff/tasks.mako | 2 +- jm2l/views.py | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/jm2l/models.py b/jm2l/models.py index 2500af9..9e33644 100644 --- a/jm2l/models.py +++ b/jm2l/models.py @@ -60,6 +60,7 @@ class Tasks(Base): closed = Column(Integer, default=0) name = Column(Unicode(80)) description = Column(UnicodeText) + area = relationship(TasksArea, backref=backref("tasks") ) @classmethod def by_id(cls, id): diff --git a/jm2l/templates/NewIndex.mako b/jm2l/templates/NewIndex.mako index 30bedbb..e55f45a 100644 --- a/jm2l/templates/NewIndex.mako +++ b/jm2l/templates/NewIndex.mako @@ -11,6 +11,10 @@ +
+Synchronisez votre calendrier avec le fichier ical JM2L 2015 +
+
 
diff --git a/jm2l/templates/Staff/tasks.mako b/jm2l/templates/Staff/tasks.mako index 2a1d389..b871aa2 100644 --- a/jm2l/templates/Staff/tasks.mako +++ b/jm2l/templates/Staff/tasks.mako @@ -41,5 +41,5 @@ DicForm = { % if 'uid' in form._fields.keys(): - ${helpers.uploader("tasks", form.uid.data, u"Attachement" )} + ${helpers.uploader("tasks", form.uid.data, u"une pièce jointe" )} %endif \ No newline at end of file diff --git a/jm2l/views.py b/jm2l/views.py index b7b11a3..90c4c32 100644 --- a/jm2l/views.py +++ b/jm2l/views.py @@ -301,7 +301,7 @@ def tasks(request): DBSession.merge(Task) else: DBSession.add(Task) - return HTTPFound(location=request.route_url('list_task')) + return HTTPFound(location=request.route_url('list_task')+"#"+slugify(Task.area.name)) return {'form':form } @@ -336,7 +336,7 @@ def action_task(request): Task.closed = False DBSession.merge(Task) request.session.flash('Task was successfully closed!') - return HTTPFound(location=request.route_url('list_task')) + return HTTPFound(location=request.route_url('list_task')+"#"+slugify(Task.area.name)) ## =-=- Here, We handle HTTP requests - User Logged Part -=-= -- cgit v1.2.3-70-g09d2