Browse Source

Fix tasks issue after update,

Fix upload button name
Added link task and taskarea
master
tr4ck3ur des JM2L 9 years ago
parent
commit
e6beb8f496
4 changed files with 8 additions and 3 deletions
  1. +1
    -0
      jm2l/models.py
  2. +4
    -0
      jm2l/templates/NewIndex.mako
  3. +1
    -1
      jm2l/templates/Staff/tasks.mako
  4. +2
    -2
      jm2l/views.py

+ 1
- 0
jm2l/models.py View File

@@ -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):


+ 4
- 0
jm2l/templates/NewIndex.mako View File

@@ -11,6 +11,10 @@
<!-- The default timeline stylesheet -->
<link rel="stylesheet" href="/vendor/timeline/css/timeline.css" />
</%def>
<div class="pull-right">
Synchronisez votre calendrier avec <a href="/2015/JM2L.ics">le fichier ical JM2L 2015</a>
</div>
<br>
<div id="timeline" style="margin-left: -50px;display:block;"></div>
<div class="clearfix">&nbsp;</div>
<div style="top:500px;position: relative">


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

@@ -41,5 +41,5 @@ DicForm = {
<input type="submit" class="btn btn-primary" value="Valider"></input>
</form>
% 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

+ 2
- 2
jm2l/views.py View File

@@ -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 -=-=


Loading…
Cancel
Save