瀏覽代碼

Merge branch 'tr4ck3ur/various_fixes_2017' of JM2L/jm2l into master

master
JM2L 7 年之前
committed by Gogs
父節點
當前提交
1fb19f573a
共有 13 個文件被更改,包括 48 次插入14 次删除
  1. +1
    -0
      jm2l/__init__.py
  2. 二進制
      jm2l/static/img/warn.png
  3. +2
    -2
      jm2l/templates/Logistique/Tables.mako
  4. +4
    -4
      jm2l/templates/Profil/Profil.mako
  5. +15
    -0
      jm2l/templates/Profil/Sejour.mako
  6. +1
    -1
      jm2l/templates/Salles/salle.mako
  7. +1
    -1
      jm2l/templates/Staff/pole.mako
  8. +1
    -1
      jm2l/templates/Staff/tasks.mako
  9. +3
    -3
      jm2l/templates/edit_event.mako
  10. +1
    -1
      jm2l/templates/edit_tiers.mako
  11. +3
    -0
      jm2l/templates/layout.mako
  12. +1
    -1
      jm2l/templates/view_tiers.mako
  13. +15
    -0
      jm2l/views.py

+ 1
- 0
jm2l/__init__.py 查看文件

@@ -168,6 +168,7 @@ def main(global_config, **settings):
# HTML Routes - Logged
#config.add_route('profil', 'MesJM2L')
config.add_route('jm2l', '/MesJM2L')
config.add_route('drop_sejour', '/DropSejour')
config.add_route('miam', '/MonMiam')
config.add_route('sejour', '/MonSejour')
config.add_route('orga', '/MonOrga')


二進制
jm2l/static/img/warn.png 查看文件

Before After
Width: 893  |  Height: 900  |  Size: 58 KiB

+ 2
- 2
jm2l/templates/Logistique/Tables.mako 查看文件

@@ -66,7 +66,7 @@ elif Type=='M':
<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
<ul class="dropdown-menu">
<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>
<li><a onclick="return confirm_click();" href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
</ul>
% elif getattr(item, Me)==request.user.uid and item.exch_state==CurKind:
Je ${What} <br>
@@ -79,7 +79,7 @@ elif Type=='M':
<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><a href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
<li><a onclick="return confirm_click();" href="javascript:DoGet('/${CurrentYear}/exchange/${Form}${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
</ul>
% elif getattr(item, Me)==request.user.uid:
Je ${What} <br>


+ 4
- 4
jm2l/templates/Profil/Profil.mako 查看文件

@@ -128,9 +128,9 @@ ${helpers.DisplayRespForm(profil_form, DicFormB)}
value="" />
</td>
<td>
<span class="remove btn btn-mini btn-danger">
<a class="remove btn btn-mini btn-danger">
<i class="icon-remove-sign icon-white"> </i> Suppr.
</span>
</a>
</td>
</tr>
% for num, dicdata in enumerate(profil_form._fields.get("tiersship").data):
@@ -158,9 +158,9 @@ ${helpers.DisplayRespForm(profil_form, DicFormB)}
value="${dicdata.get('role')}" />
</td>
<td>
<span class="remove btn btn-mini btn-danger">
<a class="remove btn btn-mini btn-danger">
<i class="icon-remove-sign icon-white"></i> Suppr.
</span>
</a>
</td>
</tr>
% endfor


+ 15
- 0
jm2l/templates/Profil/Sejour.mako 查看文件

@@ -4,6 +4,21 @@ fieldset:disabled {
color:#CCC;
}
</style>
% if mytrip.Sejour:
<div class="pull-right">
<span style="line-height: 30px;">Ooops !! J'ai rendez-vous pour un poney-piscine...</span><br />
<a class="btn btn-small btn-danger" href="/DropSejour"/>
<i class="icon-remove icon-white"></i> J'annule ma venue en ${CurrentYear}.
</a>
</div>
% else:
<legend class="lowshadow">
<img style="max-height:50px;" src="/img/warn.png" alt="Attention !">
Vous n'avez pas confirm&eacute; votre venue aux JM2L ${CurrentYear}
</legend>
<h4 class="lowshadow">Compl&eacute;tez et validez vite ce formulaire !</h4>
% endif

<form id="ProfilForm" action="/MonSejour" method="POST">
<fieldset class="ComeToJM2L">
<legend>Arriv&eacute;e</legend>


+ 1
- 1
jm2l/templates/Salles/salle.mako 查看文件

@@ -18,7 +18,7 @@
<i class="icon-arrow-left"></i> Retour à la liste
</a>
% if 'salle_id' in form._fields.keys():
<a class="btn btn-danger btn-mini pull-right" href="${request.route_path('action_salle', action='delete', salle_id=form.salle_id.data)}">
<a class="btn btn-danger btn-mini pull-right" onclick="return confirm_click();" href="${request.route_path('action_salle', action='delete', salle_id=form.salle_id.data)}">
<i class="icon-remove icon-white"></i> Supprimer cette salle
</a>
%endif


+ 1
- 1
jm2l/templates/Staff/pole.mako 查看文件

@@ -23,7 +23,7 @@
<i class="icon-arrow-left"></i> Retour à la liste
</a>
% if 'uid' in form._fields.keys():
<a class="btn btn-danger btn-mini pull-right" href="${request.route_path('action_task_area', year=year, action='delete', pole_id=form.uid.data)}">
<a class="btn btn-danger btn-mini pull-right" onclick="return confirm_click();" href="${request.route_path('action_task_area', year=year, action='delete', pole_id=form.uid.data)}">
<i class="icon-remove icon-white"></i> Supprimer ce pôle
</a>
<h3>Editer un Pôle</h3>


+ 1
- 1
jm2l/templates/Staff/tasks.mako 查看文件

@@ -33,7 +33,7 @@
<i class="icon-arrow-left"></i> Retour à la liste
</a>
% if 'uid' in form._fields.keys():
<a class="btn btn-danger btn-mini pull-right" href="${request.route_path('action_task', year=year, action='delete', task_id=form.uid.data)}">
<a class="btn btn-danger btn-mini pull-right" onclick="return confirm_click();" href="${request.route_path('action_task', year=year, action='delete', task_id=form.uid.data)}">
<i class="icon-remove icon-white"></i> Supprimer cette tâche
</a>
%endif


+ 3
- 3
jm2l/templates/edit_event.mako 查看文件

@@ -24,7 +24,7 @@
${helpers.show_salles( Salles, form.salle_uid.data or form.salle_uid.choices and form.salle_uid.choices[0][0] )}
</div>
% 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" onclick="return confirm_click();" href="${event.uid}/delete">
<i class="icon-remove icon-white"></i> Supprimer
</a>
%endif
@@ -110,7 +110,7 @@ DicForm = {
% endif

<%def name="callback_Del_Summary(Entity)"> \
<a class="btn btn-danger btn-mini pull-right" type="button" href="delete_link_tiers?tid=${Entity.uid}&uid=${event.uid}">
<a class="btn btn-danger btn-mini pull-right" type="button" onclick="return confirm_click();" href="delete_link_tiers?tid=${Entity.uid}&uid=${event.uid}">
<i class="icon-remove icon-white"></i>
</a>
</%def>
@@ -170,7 +170,7 @@ DicForm = {
(${iterv.pseudo})
%endif
% if iterv!=request.user:
<a class="btn btn-danger btn-mini" type="button" href="delete_link_user?uid=${iterv.uid}&eid=${event.uid}">
<a class="btn btn-danger btn-mini" type="button" onclick="return confirm_click();" href="delete_link_user?uid=${iterv.uid}&eid=${event.uid}">
<i class="icon-remove icon-white"></i>
</a>
%endif


+ 1
- 1
jm2l/templates/edit_tiers.mako 查看文件

@@ -13,7 +13,7 @@
<div class="span10 offset1">
% if 'uid' in form._fields.keys():
<a class="btn btn-danger btn-mini pull-right" href="${request.route_path('delete_entity', action='delete_entity', entity_id=form.uid.data)}">
<a class="btn btn-danger btn-mini pull-right" onclick="return confirm_click();" href="${request.route_path('delete_entity', action='delete_entity', entity_id=form.uid.data)}">
<i class="icon-remove icon-white"></i> Supprimer cette entit&eacute;e
</a>
%endif


+ 3
- 0
jm2l/templates/layout.mako 查看文件

@@ -214,6 +214,9 @@ ${helpers.uploader_js()}
${self.jsAddOn()}
## Then Handle Javascript
<script>
function confirm_click() {
return confirm("Confirmer la suppression ?")
}
% for jsitem in context._kwargs['postpone_js']:
${jsitem | n}
% endfor


+ 1
- 1
jm2l/templates/view_tiers.mako 查看文件

@@ -20,7 +20,7 @@ ${The_entity_type.entity_subtype}
<a href="/entity/${entity.get_entity_type.slug_entity_type}/${entity.slug}/edit">Editer</a>
% endif
% if request.user and (request.user.Staff or request.user in entity.members):
<a class="btn btn-danger btn-mini pull-right" href="${request.route_path('delete_entity', action='delete_entity', entity_id=entity.uid)}">
<a class="btn btn-danger btn-mini pull-right" onclick="return confirm_click();" href="${request.route_path('delete_entity', action='delete_entity', entity_id=entity.uid)}">
<i class="icon-remove icon-white"></i> Supprimer cette entit&eacute;e
</a>
% endif


+ 15
- 0
jm2l/views.py 查看文件

@@ -1031,6 +1031,21 @@ def list_orga(request):
.all()
return { 'Users':Data }

@view_config(route_name='drop_sejour')
def drop_sejour(request):
if request.user is None:
# Don't answer to users that aren't logged
raise HTTPForbidden(u'Vous devez vous identifier pour obtenir une réponse.')

# Feed FicheSejour if any
FicheSejour = Sejour.by_user(request.user.uid, CurrentYear)
if FicheSejour:
DBSession.delete(FicheSejour)
request.session.flash(('warning', u'Votre participation %s a été supprimé avec succès.' % CurrentYear ))
else:
raise HTTPNotFound()
return HTTPFound(location='/MesJM2L#Sejour')

@view_config(route_name='jm2l', renderer="jm2l:templates/jm2l.mako")
def jm2l_page(request):
if request.user is None:


Loading…
取消
儲存