Commit 5436736d authored by Praibait's avatar Praibait

L'entrée des pot est maintenant dans l'onglet activités

(snif :'( )
parent 7ca15d73
......@@ -90,7 +90,7 @@ def render_activite(activite, isadmin=False, isgestion=False, ismine=False, hasn
if hasnote and activite["ouvert"] and activite["liste"] and not isadmin:
boutons.append(Link(
"Accéder à la page d'entrée",
"%spot/entree/%s/" % (settings.NOTE_ROOT_URL, activite["id"]),
"%sactivites/%s/entree/" % (settings.NOTE_ROOT_URL, activite["id"]),
"success"))
if activite["liste"] and (isadmin or "caninvite" in activite and activite["caninvite"]):
......
......@@ -28,6 +28,7 @@ urlpatterns = [
url(ur'^/(?:activite|invitation)s?/(?P<idact>[^/]*)/gestion(?P<validation>/validate|/invalidate|/delete|/open|/close)?/*$', note.views.activite_gestion,name='activite_gestion'),
url(ur'^/(?:activite|invitation)s?/(?P<idact>[^/]*)/gestion/modifier/*$', note.views.activite_gestion_modifier,name='activite_gestion_modifier'),
url(ur'^/(?:activite|invitation)s?/(?P<idact>[^/]*)(?P<admin>/admin)?/*$', note.views.activite,name='activite'),
url(ur'^/(?:activite|invitation)s?/(?P<idact>[^/]*)/entree/*$', note.views.pot_entree, name='pot_entree'),
url(ur'^/(?:activite|invitation)s?/(?P<idact>[^/]*)/del_invite/(?P<idinv>[^/]*)(?P<admin>/admin)?/*$', note.views.del_invite,name='del_invite'),
# mes_activités = création d'activités
url(ur'^/mes_activites(?:/(?P<idact>[^/]*))?(?P<delete>/delete)?/*$', note.views.mes_activites,name='mes_activites'),
......@@ -79,7 +80,6 @@ urlpatterns = [
# Interface Pot
url(ur'^/pot/*$', note.views.pot_accueil, name='pot_accueil'),
url(ur'^/pot/entree/(?P<idpot>\d{,4})/*$', note.views.pot_entree, name='pot_entree'),
url(ur'^/pot/admin/*$',note.views.pot_admin, name='pot_admin'),
# Page de liste des droits
......
......@@ -2164,7 +2164,7 @@ def pot_accueil(request,sock,kwargs):
def pot_entree(request, sock, kwargs):
""" Affiche la page Entrée de l'interface Pot
Dans kwargs :
* idpot : id de l'activité qui correspond au pot
* idact : id de l'activité qui correspond au pot
"""
variables = {}
......@@ -2184,7 +2184,7 @@ def pot_entree(request, sock, kwargs):
messages.add_error(request, _(u"Tu n'as pas le droit note !"))
return HttpResponseRedirect("%sindex/" % settings.NOTE_ROOT_URL)
idpot = int(kwargs["idpot"])
idpot = int(kwargs["idact"])
pot = utilities._get_activite(sock, idpot, request, '%spot/' % (settings.NOTE_ROOT_URL))
variables["fini"] = datetime.now() > datetime.strptime(pot["fin"], "%Y-%m-%d %H:%M:%S")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment