aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/templates
diff options
context:
space:
mode:
authortr4ck3ur <tr4ck3ur@style-python.fr>2015-02-14 03:35:21 +0100
committertr4ck3ur <tr4ck3ur@style-python.fr>2015-02-14 03:35:21 +0100
commit114d2d92147f53a1ed1d0090feedb3fb0b50d064 (patch)
treed8b9c71567b5b0fcd84f6285c669fc754fbde26f /jm2l/templates
parentfa4a9859c57de6b7894ff4b84b75d242f2b796f5 (diff)
downloadjm2l-114d2d92147f53a1ed1d0090feedb3fb0b50d064.tar.gz
jm2l-114d2d92147f53a1ed1d0090feedb3fb0b50d064.tar.bz2
jm2l-114d2d92147f53a1ed1d0090feedb3fb0b50d064.tar.xz
jm2l-114d2d92147f53a1ed1d0090feedb3fb0b50d064.zip
harmonize file structure for third party plugins
Diffstat (limited to 'jm2l/templates')
-rw-r--r--jm2l/templates/Errors/404.mak65
-rw-r--r--jm2l/templates/trash/Hebergement.mako47
-rw-r--r--jm2l/templates/trash/Intendance.mako518
-rw-r--r--jm2l/templates/trash/Intendance_Dialog.mako142
-rw-r--r--jm2l/templates/trash/edit_blog.mako49
-rw-r--r--jm2l/templates/trash/helpers.mako18
-rw-r--r--jm2l/templates/trash/index.html251
-rw-r--r--jm2l/templates/trash/old_edit_tiers.mako199
-rw-r--r--jm2l/templates/trash/test.mako98
-rw-r--r--jm2l/templates/trash/upload.mako190
-rw-r--r--jm2l/templates/trash/upload2.mako26
-rw-r--r--jm2l/templates/trash/view_blog.mako14
12 files changed, 65 insertions, 1552 deletions
diff --git a/jm2l/templates/Errors/404.mak b/jm2l/templates/Errors/404.mak
new file mode 100644
index 0000000..6379cd4
--- /dev/null
+++ b/jm2l/templates/Errors/404.mak
@@ -0,0 +1,65 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Page Not Found</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style>
+
+ * {
+ line-height: 1.2;
+ margin: 0;
+ }
+
+ html {
+ color: #888;
+ display: table;
+ font-family: sans-serif;
+ height: 100%;
+ text-align: center;
+ width: 100%;
+ }
+
+ body {
+ display: table-cell;
+ vertical-align: middle;
+ margin: 2em auto;
+ }
+
+ h1 {
+ color: #555;
+ font-size: 2em;
+ font-weight: 400;
+ }
+
+ p {
+ margin: 0 auto;
+ width: 380px;
+ }
+
+ @media only screen and (max-width: 280px) {
+
+ body, p {
+ width: 95%;
+ }
+
+ h1 {
+ font-size: 1.5em;
+ margin: 0 0 0.3em;
+ }
+
+ }
+
+ </style>
+</head>
+<body>
+ <img src="/img/error404.png" width="200px" />
+ <h1>Page non trouvée</h1>
+ % if reason:
+ <p>${reason}</p>
+ % else:
+ <p>Sorry, but the page you were trying to view does not exist.</p>
+ % endif
+</body>
+</html>
+<!-- IE needs 512+ bytes: http://blogs.msdn.com/b/ieinternals/archive/2010/08/19/http-error-pages-in-internet-explorer.aspx -->
diff --git a/jm2l/templates/trash/Hebergement.mako b/jm2l/templates/trash/Hebergement.mako
deleted file mode 100644
index 9d4ddd4..0000000
--- a/jm2l/templates/trash/Hebergement.mako
+++ /dev/null
@@ -1,47 +0,0 @@
-<%namespace name="h" file="jm2l:templates/helpers.mako"/>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-## Détail de l'échange d'hébergement
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="ShowH(Exch)"> \
- ${h.show_exchange(Exch, Exch.asker, Exch.provider)}
- <dl>
- <dt>Quoi</dt>
- <dd>${Exch.Category.exch_subtype}</dd>
- <dt>Quand </dt>
- <dd>La nuit du ${Exch.start_time.strftime('%A %d %b %Y').decode('utf-8')} jusqu'au lendemain</dd>
- % if Exch.description:
- <dt>Détails </dt>
- <dd>${Exch.description}</dd>
- % endif
- </dl>
-</%def> \
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-## Proposition d'hébergement
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Heberg_Proposal(form)"> \
-<% ## PlaceHolder, ContainerStyle, FieldStyle
- DicFormat = {
- "Day_start" :{'ContainerStyle':'float:left;', 'FieldStyle':'width:13em;'},
- "exch_categ" :{'FieldStyle':'width:18em;'},
- "description":{'FieldStyle':'width:85%;'}
- }
-%>
- ${h.DisplayForm(form, DicFormat)}
- NB: Vous devez faire une proposition différente pour chaque nuit que vous proposez.
- <br>
- <a class="btn btn-mini btn-info" role="button" href="javascript:DoGetLieu('/2015/modal/Place/0');">
- <i class="icon-plus-sign icon-white"></i> Indiquer l'adresse proposée.
- </a>
-</%def> \
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-## Demande d'hébergement
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Heberg_Ask(form)"> \
-<% ## PlaceHolder, ContainerStyle, FieldStyle
- DicFormat = {
- "description":{'FieldStyle':'width:85%;'}
- }
-%>
- ${h.DisplayForm(form, DicFormat)}
- NB: Vous devez faire une demande différente pour chaque nuit d'hébergement demandée.
-</%def> \
diff --git a/jm2l/templates/trash/Intendance.mako b/jm2l/templates/trash/Intendance.mako
deleted file mode 100644
index 184dca2..0000000
--- a/jm2l/templates/trash/Intendance.mako
+++ /dev/null
@@ -1,518 +0,0 @@
-<%namespace name="h" file="jm2l:templates/helpers.mako"/>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Main(Exchanges)">
- <div class="tabbable tabs-left" id="Intendance_tab">
-
- <ul class="nav nav-tabs navbar" style="margin-bottom:0;">
- <li class="active"> <a href="#ResumeInt" data-toggle="tab">Resum&eacute;</a> </li>
- <li> <a href="#Miam" data-toggle="tab">Miam</a> </li>
- <li> <a href="#Covoiturage" data-toggle="tab">Covoiturage</a> </li>
- <li> <a href="#Hebergement" data-toggle="tab">H&eacute;bergement</a> </li>
- <li> <a href="#Materiel" data-toggle="tab">Mat&eacute;riel</a> </li>
- </ul>
-
- <div class="tab-content">
- <div class="tab-pane fade active in" id="ResumeInt">${Route_wrapper(Exchanges)}</div>
- <div class="tab-pane fade" id="Miam">${Miam_wrapper()}</div>
- <div class="tab-pane fade" id="Covoiturage">${Exchange_wrapper('C', Exchanges)}</div>
- <div class="tab-pane fade" id="Hebergement">${Exchange_wrapper('H', Exchanges)}</div>
- <div class="tab-pane fade" id="Materiel">${Exchange_wrapper('M', Exchanges)}</div>
- </div>
-
- </div>
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Exchange_wrapper(Type, Exchanges)">
-<%
-AllSelection = Exchanges.get_pub_list( Type )
-DicExch = Exchanges.get_my_list( request.user.uid, Type )
-%>
- ${Ask(Type, DicExch)}
- ${Proposal(Type, DicExch)}
- <fieldset>
- <legend>Tous les échanges</legend>
- ${Missing(Type, AllSelection)}
- </fieldset>
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Miam_wrapper()">
- <fieldset>
- <legend>Qu'est ce qu'on mange ?</legend>
- </fieldset>
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Missing(Type, Selection)">
-<%
-if Type=='H':
- CurTitle = u"d'hébergement"
- CurIcon = "icon-home"
-elif Type=='C':
- CurTitle = "de co-voiturage"
- CurIcon = "icon-road"
-elif Type=='M':
- CurTitle = u"de prêt de matériel"
- CurIcon = "icon-shopping-cart"
-%>
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th colspan="5">
- Les échanges ${CurTitle}
- % if 0:
- <span style="float:right;">
- <a data-original-title="Afficher les demandes" data-toggle="tooltip" id="${Type}_Demande">
- <label class="checkbox inline">
- <input type="checkbox" id="Demandes">
- <i class="icon-comment"></i>
- </input>
- </label>
- </a>
- <a data-original-title="Afficher les propositions" data-toggle="tooltip" id="${Type}_Props">
- <label class="checkbox inline">
- <input type="checkbox" value="#">
- <i class="${CurIcon}"></i>
- </input>
- </label>
- </a>
- <span>
- % endif
- </th>
- </tr>
-
- <tr>
- <th style="width:1em;"></th>
- <th>Détails</th>
- <th style="width:1em;"></th>
- <tr>
- </thead>
- <tbody id="Missing${Type}Table">
- % if len(Selection)==0:
- <tr>
- <td colspan="5" style="text-align:center;">
- <i>Il n'y a aucun échange ${CurTitle} proposé actuellement...</i>
- </td>
- </tr>
- % else:
- % for item in Selection:
- <%
- if (item.provider_id and item.asker_id):
- continue
- %>
- <tr style="cursor:pointer;">
- % if item.exch_state=='Ask':
- <td style="vertical-align: middle;"><i class="${CurIcon}"></i></td>
- % elif item.exch_state=='Proposal':
- <td style="vertical-align: middle;"><i class="icon-comment"></i></td>
- % endif
- <td>
- <p style="text-align:center">
- %if item.asker and item.exch_state=='Ask':
- <a href="/user/${item.asker.slug}"> ${item.asker.prenom} ${item.asker.nom} </a> demande
- %elif item.provider and item.exch_state=='Proposal':
- <a href="/user/${item.provider.slug}"> ${item.provider.prenom} ${item.provider.nom} </a> offre
- % endif
- % if item.exch_type=="C":
- un co-voiturage le ${item.start_time.strftime('%a %d %b vers %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>
- % elif item.exch_type=="M":
- % if item.Category:
- <i>${item.Category.exch_subtype}</i>
- % endif
- % if item.description:
- ${item.description[:30]}
- % endif
- de ${item.start_time.strftime('%a %d %b %Hh%M')}
- à ${item.end_time.strftime('%a %d %b %Hh%M')}
- % else:
- % if item.Category:
- <i>${item.Category.exch_subtype}</i>
- % endif
- % if item.description:
- ${item.description[:30]}
- % endif
- ${item.start_time.strftime('%a %d %b')} soir
- % endif
- </p>
- </td>
- <td style="vertical-align: middle;">
- % if item.provider_id==request.user.uid or item.asker_id==request.user.uid:
- <a class="btn btn-mini btn-primary" style="float:right"
- href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
- <i class="icon-search icon-white"></i>
- </a>
- % elif (item.provider_id and item.asker_id):
- <a class="btn btn-mini btn-primary" style="float:right"
- href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
- <i class="icon-search icon-white"></i>
- </a> <br/> <br/>
- ## <a id="Ask${Type}-${item.exch_id}"
- ## class="btn btn-mini btn-info" style="float:right"
- ## data-original-title="En attente"
- ## data-toggle="popover" data-placement="left"
- ## data-content="Déjà en attente d'une réponse."
- ## href="#Missing${Type}Table">
- ## <i class="icon-random icon-white"></i>
- ## </a>
- ## <script>$("#Ask${Type}-${item.exch_id}").popover();</script>
- % else:
- <a class="btn btn-mini btn-primary" style="float:right"
- href="javascript:DoGet('/2015/modal/Show${Type}/${item.exch_id}')">
- <i class="icon-search icon-white"></i>
- </a> <br/> <br/>
- ## <a class="btn btn-mini btn-primary" style="float:right"
- ## href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/deal')">
- ## <i class="icon-random icon-white"></i>
- ## </a>
- % endif
- </td>
- </tr>
- % endfor
- % endif
- </tbody>
- </table>
-
- <script>
- $('#${Type}_Props').tooltip()
- $('#${Type}_Demande').tooltip()
- </script>
-
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Ask(Type, Selection)">
-<%
-if Type=='H':
- CurTitle = u"d'hébergement"
- CurIcon = "icon-home"
-elif Type=='C':
- CurTitle = "de co-voiturage"
- CurIcon = "icon-road"
-elif Type=='M':
- CurTitle = u"de prêt de matériel"
- CurIcon = "icon-shopping-cart"
-%>
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th colspan="3"><i class="icon-comment"></i> Mes demandes ${CurTitle}
- <a class="btn btn-mini btn-primary" Myhref="/2015/modal/Ask${Type}/0"
- role="button" data-target="#AjaxModal" style="float:right" handle="modal">
- <i class="icon-plus-sign icon-white"></i> Ajouter
- </a>
- </th>
- </tr>
- </thead>
- <tbody id="Ask${Type}Table">
- % if len(Selection['Ask'])==0 and len(Selection['Proposal'])==0:
- <tr>
- <td colspan="2" style="text-align:center;">
- <i>Vous n'avez fait aucune demande ${CurTitle}</i>
- </td>
- </tr>
- % else:
- <tr>
- <th style="width:7em;">Etat</th>
- <th>Details</th>
- </tr>
- % for type in ['Ask', 'Proposal']:
- % for item in Selection[type]:
- <%
- if item.provider_id==request.user.uid:
- continue
- %>
- <tr style="cursor:pointer;">
- <td>
- % if item.exch_done:
- <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 dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <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 class="divider"></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Annuler</a></li>
- </ul>
- % elif item.provider_id is None:
- <div class="btn-group">
- <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>
- <ul class="dropdown-menu">
- <li><a href="javascript:DoGet('/2015/modal/Ask${Type}/${item.exch_id}')"><i class="icon-pencil"></i> Modifier</a></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
- </ul>
- % elif item.asker_id==request.user.uid and type=="Ask":
- Je demande <br>
- <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 dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <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 class="divider"></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/accept')"><i class="icon-ok"></i> Accepter</a></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Refuser</a></li>
- <li class="divider"></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
- </ul>
- % elif item.asker_id==request.user.uid and type=="Proposal":
- Je demande <br>
- <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 dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <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="#"><i class="icon-question-sign"></i> En Attente de réponse </a></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Se désister </a></li>
- </ul>
- % endif
- </div>
- </div>
- </td>
- <td>
- %if Type=='C':
- ${item.start_time.strftime('%A %d %b %Y')} 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>
- %elif Type=='H':
- <i>${item.Category.exch_subtype}</i>, La nuit du ${item.start_time.strftime('%A %d %b %Y')}<br>
- %elif Type=='M':
- de ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
- à ${item.end_time.strftime('%A %d %b %Y')} vers ${item.end_time.strftime('%Hh%M')}<br>
- ${item.Category.exch_subtype}
- %endif
- %if item.description:
- ${item.description}
- %endif
- </td>
- </tr>
- % endfor
- % endfor
- % endif
- </tbody>
- </table>
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Proposal(Type, Selection)">
-<%
-if Type=='H':
- CurTitle = u"d'hébergement"
- CurIcon = "icon-home"
-elif Type=='C':
- CurTitle = "de co-voiturage"
- CurIcon = "icon-road"
-elif Type=='M':
- CurTitle = u"de prêt de matériel"
- CurIcon = "icon-shopping-cart"
-%>
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th colspan="3"><i class="${CurIcon}"></i> Mes offres ${CurTitle}
- <a class="btn btn-mini btn-primary" Myhref="/2015/modal/Prop${Type}/0"
- role="button" data-target="#AjaxModal" style="float:right" handle="modal">
- <i class="icon-plus-sign icon-white"></i> Ajouter
- </a>
- </th>
- </tr>
- </thead>
-
- <tbody id="Prop${Type}Table">
-
- % if len(Selection['Ask'])==0 and len(Selection['Proposal'])==0:
- <tr>
- <td colspan="2" style="text-align:center;">
- <i>Vous n'avez fait aucune offre ${CurTitle}</i>
- </td>
- </tr>
- % else:
- <tr>
- <th style="width:7em;">Etat</th>
- <th>Détails</th>
- </tr>
- % for type in ['Ask', 'Proposal']:
- % for item in Selection[type]:
- <%
- if item.asker_id==request.user.uid:
- continue
- %>
- <tr style="cursor:pointer;">
- <td>
- % if item.exch_done:
- <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 dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <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 class="divider"></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Annuler</a></li>
- </ul>
- % elif item.asker_id is None:
- <div class="btn-group">
- <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>
- <ul class="dropdown-menu">
- <li><a href="javascript:DoGet('/2015/modal/Prop${Type}/${item.exch_id}')"><i class="icon-pencil"></i> Modifier</a></li>
- <li><a href="javascript:DoGet('/2015/exchange/Prop${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
- </ul>
- % elif item.provider_id==request.user.uid and type=="Ask":
- Je propose <br>
- <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 dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <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="#"><i class="icon-question-sign"></i> En Attente de réponse </a></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Se désister </a></li>
- </ul>
- % elif item.provider_id==request.user.uid and type=="Proposal":
- Je propose <br>
- <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 dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></a>
- <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 class="divider"></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/accept')"><i class="icon-ok"></i> Accepter</a></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/refuse')"><i class="icon-remove"></i> Refuser</a></li>
- <li class="divider"></li>
- <li><a href="javascript:DoGet('/2015/exchange/Ask${Type}/${item.exch_id}/delete')"><i class="icon-trash"></i> Supprimer</a></li>
- </ul>
- % endif
- </div>
- </td>
- <td>
- %if Type=='C':
- ${item.start_time.strftime('%A %d %b %Y')} 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>
- %elif Type=='H':
- <i>${item.Category.exch_subtype}</i>, La nuit du ${item.start_time.strftime('%A %d %b %Y')}<br>
- %elif Type=='M':
- de ${item.start_time.strftime('%A %d %b %Y')} vers ${item.start_time.strftime('%Hh%M')}
- à ${item.end_time.strftime('%A %d %b %Y')} vers ${item.end_time.strftime('%Hh%M')}<br>
- ${item.Category.exch_subtype}
- %endif
- %if item.description:
- ${item.description}
- %endif
- </td>
- </tr>
- % endfor
- % endfor
- % endif
- </tbody>
- </table>
-
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="Route_wrapper(Exchanges)">
-<%
-AskSelection = Exchanges.get_my_counters( int(request.user.uid) )
-AllSelection = Exchanges.get_counters()
-ListWrap = ["Co-voiturage",u"Hébergement","Matos"]
-%>
-<div class="accordion" id="AccordionCounter">
- <div class="accordion-group">
- <div class="accordion-heading">
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordionCounter" href="#collapseMe"> Mes compteurs </a>
- </div>
- <div id="collapseMe" class="accordion-body collapse in">
- <div class="accordion-inner">
-
- <table width="100%" class="table table-striped table-bordered table-hover">
- <thead style="text-align:center">
- <tr>
- <th>Section</th>
- <th style="text-align:center">Mes demandes</th>
- <th style="text-align:center">Mes Propositions</th>
- <th style="text-align:center">Accords</th>
- </tr>
- </thead>
- <tbody id="MyCounters">
- <tr>
- <td>Miam</td>
- <td style="text-align:center">?</td>
- <td style="text-align:center">-</td>
- <td style="text-align:center">?</td>
- </tr>
- % for Wrap in ListWrap:
- <tr>
- <td>${Wrap | h}</td>
- <%
- RecA = filter( lambda (A, B, C, D): A=='Ask' and B==Wrap[0] and C==0, AskSelection )
- RecP = filter( lambda (A, B, C, D): A=='Proposal' and B==Wrap[0] and C==0, AskSelection )
- RecD = filter( lambda (A, B, C, D): B==Wrap[0] and C==1, AskSelection )
- %>
- % for item in [RecA, RecP, RecD]:
- <td style="text-align:center">
- % if item:
- <span class="badge">${item[0][3]}</span>
- % else:
- <span class="badge">0</span>
- % endif
- </td>
- % endfor
- </tr>
- % endfor
- </tbody>
- </table>
-
- </div>
- </div>
- </div>
- <div class="accordion-group">
- <div class="accordion-heading">
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#AccordionCounter" href="#collapseAll">Les compteur de l´évenement</a>
- </div>
- <div id="collapseAll" class="accordion-body collapse">
- <div class="accordion-inner">
-
- <table width="100%" class="table table-striped table-bordered table-hover">
- <thead style="text-align:center">
- <tr>
- <th>Section</th>
- <th style="text-align:center">Les demandes</th>
- <th style="text-align:center">Les propositions</th>
- <th style="text-align:center">Les Accords</th>
- </tr>
- </thead>
- <tbody id="AllCounters">
- <tr>
- <td>Miam</td>
- <td style="text-align:center">?</td>
- <td style="text-align:center">-</td>
- <td style="text-align:center">?</td>
- </tr>
- % for Wrap in ListWrap:
- <tr>
- <td>${Wrap | h}</td>
- <%
- AllA = filter( lambda (A,B,C,D): A=='Ask' and B==Wrap[0] and C==0, AllSelection )
- AllP = filter( lambda (A,B,C,D): A=='Proposal' and B==Wrap[0] and C==0, AllSelection )
- AllD = filter( lambda (A,B,C,D): B==Wrap[0] and C==1, AllSelection )
- %>
- % for item in [AllA, AllP, AllD]:
- <td style="text-align:center">
- % if item:
- <span class="badge">${item[0][3]}</span>
- % else:
- <span class="badge">0</span>
- % endif
- </td>
- % endfor
- </tr>
- % endfor
- </tbody>
- </table>
-
- </div>
- </div>
- </div>
-</div>
-
- <fieldset>
- <legend>Mon Badge</legend>
- </fieldset>
-</%def>
-% if reload:
- ${Route_wrapper(Exchanges)}
- ${Exchange_wrapper(Type, Exchanges)}
-%endif
diff --git a/jm2l/templates/trash/Intendance_Dialog.mako b/jm2l/templates/trash/Intendance_Dialog.mako
deleted file mode 100644
index c0e40d7..0000000
--- a/jm2l/templates/trash/Intendance_Dialog.mako
+++ /dev/null
@@ -1,142 +0,0 @@
-<%namespace name="h" file="jm2l:templates/helpers.mako"/>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="AddProposal(Type, form)">
-<%
-if Type=='H':
- CurTitle = u"un hébergement"
- CurIcon = "icon-home"
-elif Type=='C':
- CurTitle = "un co-voiturage"
- CurIcon = "icon-road"
-elif Type=='M':
- CurTitle = u"un prêt de matériel"
- CurIcon = "icon-shopping-cart"
-%>
- <!-- Modal -->
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="AddProp${Type}ModalLabel"> Je propose ${CurTitle} !</h3>
- </div>
- <div class="modal-body">
- %if 'exch_id' in form._fields.keys():
- <form id="ModalForm" action="javascript:DoPost('/2015/modal/Prop${Type}/${form.exch_id.data}');">
- %else:
- <form id="ModalForm" action="javascript:DoPost('/2015/modal/Prop${Type}/0');">
- %endif
- <p>Je propose mes service pour ${CurTitle}</p>
- % if Type=='H':
- ${Heberg_Proposal(form)}
- % elif Type=='C':
- ${Covoit_Proposal(form)}
- % elif Type=='M':
- ${Matos_Proposal(form)}
- % endif
- </form>
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true">Fermer</button>
- <button class="btn btn-primary" onclick="javascript:document.forms['ModalForm'].submit();">
- <i class="${CurIcon} icon-white"></i> Proposer !</button>
- </div>
-</%def>
-## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-<%def name="AddAsk(Type, form)">
-<%
-if Type=='H':
- CurTitle = u"un hébergement"
- CurIcon = "icon-home"
-elif Type=='C':
- CurTitle = "un co-voiturage"
- CurIcon = "icon-road"
-elif Type=='M':
- CurTitle = u"un prêt de matériel"
- CurIcon = "icon-shopping-cart"
-%>
- <!-- Modal -->
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="AddAsk${Type}ModalLabel"> Je demande ${CurTitle} !</h3>
- </div>
- <div class="modal-body">
- % if 'exch_id' in form._fields.keys():
- <form id="ModalForm" action="javascript:DoPost('/2015/modal/Ask${Type}/${form.exch_id.data}');">
- % else:
- <form id="ModalForm" action="javascript:DoPost('/2015/modal/Ask${Type}/0');">
- %endif
- <p>Je demande ${CurTitle}</p>
- % if Type=='H':
- ${Heberg_Ask(form)}
- % elif Type=='C':
- ${Covoit_Ask(form)}
- % elif Type=='M':
- ${Matos_Ask(form)}
- % endif
- </form>
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true">Fermer</button>
- <button class="btn btn-primary" onclick="javascript:document.forms['ModalForm'].submit();">
- <i class="${CurIcon} icon-white"></i> Demander !</button>
- </div>
-</%def>
-
-<%def name="Show(Type, Exch)"> \
-<%
-if Exch.exch_type=='H':
- CurTitle = u"de l'hébergement"
- CurIcon = "icon-home"
-elif Exch.exch_type=='C':
- CurTitle = "du co-voiturage"
- CurIcon = "icon-road"
-elif Exch.exch_type=='M':
- CurTitle = u"du prêt de matériel"
- CurIcon = "icon-shopping-cart"
-%>
- <!-- Modal -->
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <i class="${CurIcon}"></i> <strong>Détails ${CurTitle}</strong>
- </div>
- <div class="modal-body">
- % if Type=='H':
- ${ShowH(Exch)}
- % elif Type=='C':
- ${ShowC(Exch)}
- % elif Type=='M':
- ${ShowM(Exch)}
- % endif
- % if Exch.exch_state=='Ask':
- <form id="ModalForm" action="javascript:DoPost('/2015/exchange/Ask${Type}/${Exch.exch_id}/deal');"></form>
- % elif Exch.exch_state=='Proposal':
- <form id="ModalForm" action="javascript:DoPost('/2015/exchange/Prop${Type}/${Exch.exch_id}/deal');"></form>
- % endif
- </div>
- <div class="modal-footer">
- % if not Exch.exch_done and (Exch.asker_id is None or Exch.provider_id is None):
- % if Exch.exch_state=='Proposal' and Exch.provider_id!=request.user.uid:
- <button class="btn btn-info" data-dismiss="modal" aria-hidden="true"
- onclick="javascript:document.forms['ModalForm'].submit();">
- % if Type=='H':
- Je lui demande pour dormir chez lui/elle !
- % elif Type=='C':
- Je lui demande de venir me chercher !
- % elif Type=='M':
- Je lui demande de me prêter son matériel !
- % endif
- </button>
- % elif Exch.exch_state=='Ask' and Exch.asker_id!=request.user.uid:
- <button class="btn btn-info" data-dismiss="modal" aria-hidden="true"
- onclick="javascript:document.forms['ModalForm'].submit();">
- % if Type=='H':
- Je propose de l'héberger !
- % elif Type=='C':
- Je propose de venir le/la chercher !
- % elif Type=='M':
- Je lui propose mon matériel !
- % endif
- </button>
- % endif
- % endif
- <button class="btn" data-dismiss="modal" aria-hidden="true">Fermer</button>
- </div>
-</%def> \
diff --git a/jm2l/templates/trash/edit_blog.mako b/jm2l/templates/trash/edit_blog.mako
deleted file mode 100644
index 84e1235..0000000
--- a/jm2l/templates/trash/edit_blog.mako
+++ /dev/null
@@ -1,49 +0,0 @@
-<%inherit file="jm2l:templates/layout.mako"/>
-
-<form action="${request.route_url('blog_action',action=action)}" method="post">
-%if action =='edit':
-${form.id()}
-%endif
-
-% for error in form.title.errors:
- <div class="error">${ error }</div>
-% endfor
-
-<div><label>${form.title.label}</label>${form.title()}</div>
-
-% for error in form.body.errors:
-<div class="error">${error}</div>
-% endfor
-
-<div><label>${form.body.label}</label>${form.body()}</div>
-<div><input type="submit" value="Submit"></div>
-</form>
-<p><a href="${request.route_url('home')}">Go Back</a></p>
-
-<style type="text/css">
-form{
- text-align: right;
-}
-label{
- min-width: 150px;
- vertical-align: top;
- text-align: right;
- display: inline-block;
-}
-input[type=text]{
- min-width: 505px;
-}
-textarea{
- color: #222;
- border: 1px solid #CCC;
- font-family: sans-serif;
- font-size: 12px;
- line-height: 16px;
- min-width: 505px;
- min-height: 100px;
-}
-.error{
- font-weight: bold;
- color: red;
-}
-</style>
diff --git a/jm2l/templates/trash/helpers.mako b/jm2l/templates/trash/helpers.mako
deleted file mode 100644
index 709389f..0000000
--- a/jm2l/templates/trash/helpers.mako
+++ /dev/null
@@ -1,18 +0,0 @@
-<%def name="date_wrapper(date_form)">
- Le ${date_form.Day(style='width:8em;')},
- ${date_form.Confidence(style='width:16em;')}
- ${date_form.Hour(placeholder='10:00',style='width:4em;margin:2px;')}
- <script>
- $("#${date_form.Day.label.field_id}").select2({});
- $("#${date_form.Confidence.label.field_id}").select2({});
- </script>
- % for error in date_form.Day.errors:
- <div class="alert error">Le Jour ${ error }</div>
- % endfor
- % for error in date_form.Confidence.errors:
- <div class="alert error">La Confience ${ error }</div>
- % endfor
- % for error in date_form.Hour.errors:
- <div class="alert error">L'Heure ${ error }</div>
- % endfor
-</%def>
diff --git a/jm2l/templates/trash/index.html b/jm2l/templates/trash/index.html
deleted file mode 100644
index 46b51ed..0000000
--- a/jm2l/templates/trash/index.html
+++ /dev/null
@@ -1,251 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-/*
- * jQuery File Upload Plugin Demo 9.1.0
- * https://github.com/blueimp/jQuery-File-Upload
- *
- * Copyright 2010, Sebastian Tschan
- * https://blueimp.net
- *
- * Licensed under the MIT license:
- * http://www.opensource.org/licenses/MIT
- */
--->
-<html lang="en">
-<head>
-<!-- Force latest IE rendering engine or ChromeFrame if installed -->
-<!--[if IE]>
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<![endif]-->
-<meta charset="utf-8">
-<title>jQuery File Upload Demo</title>
-<meta name="description" content="File Upload widget with multiple file selection, drag&amp;drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<!-- Bootstrap styles -->
-<link rel="stylesheet" href="/static/bootstrap.min.css">
-<!-- Generic page styles -->
-<link rel="stylesheet" href="/static/css/style.css">
-<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
-<link rel="stylesheet" href="/static/css/jquery.fileupload.css">
-<link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
-<!-- CSS adjustments for browsers with JavaScript disabled -->
-<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
-<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
-</head>
-<body>
-<div class="navbar navbar-default navbar-fixed-top">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top .navbar-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a>
- </div>
- <div class="navbar-collapse collapse">
- <ul class="nav navbar-nav">
- <li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li>
- <li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li>
- <li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li>
- <li><a href="https://blueimp.net">&copy; Sebastian Tschan</a></li>
- </ul>
- </div>
- </div>
-</div>
-<div class="container">
- <h1>jQuery File Upload Demo</h1>
- <h2 class="lead">Basic Plus UI version</h2>
- <ul class="nav nav-tabs">
- <li><a href="basic.html">Basic</a></li>
- <li><a href="basic-plus.html">Basic Plus</a></li>
- <li class="active"><a href="index.html">Basic Plus UI</a></li>
- <li><a href="angularjs.html">AngularJS</a></li>
- <li><a href="jquery-ui.html">jQuery UI</a></li>
- </ul>
- <br>
- <blockquote>
- <p>File Upload widget with multiple file selection, drag&amp;drop support, progress bars, validation and preview images, audio and video for jQuery.<br>
- Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br>
- Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p>
- </blockquote>
- <br>
- <!-- The file upload form used as target for the file upload widget -->
- <form id="fileupload" action="//jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data">
- <!-- Redirect browsers with JavaScript disabled to the origin page -->
- <noscript><input type="hidden" name="redirect" value="https://blueimp.github.io/jQuery-File-Upload/"></noscript>
- <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
- <div class="row fileupload-buttonbar">
- <div class="col-lg-7">
- <!-- The fileinput-button span is used to style the file input field as button -->
- <span class="btn btn-success fileinput-button">
- <i class="glyphicon glyphicon-plus"></i>
- <span>Add files...</span>
- <input type="file" name="files[]" multiple>
- </span>
- <button type="submit" class="btn btn-primary start">
- <i class="glyphicon glyphicon-upload"></i>
- <span>Start upload</span>
- </button>
- <button type="reset" class="btn btn-warning cancel">
- <i class="glyphicon glyphicon-ban-circle"></i>
- <span>Cancel upload</span>
- </button>
- <button type="button" class="btn btn-danger delete">
- <i class="glyphicon glyphicon-trash"></i>
- <span>Delete</span>
- </button>
- <input type="checkbox" class="toggle">
- <!-- The global file processing state -->
- <span class="fileupload-process"></span>
- </div>
- <!-- The global progress state -->
- <div class="col-lg-5 fileupload-progress fade">
- <!-- The global progress bar -->
- <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
- <div class="progress-bar progress-bar-success" style="width:0%;"></div>
- </div>
- <!-- The extended global progress state -->
- <div class="progress-extended">&nbsp;</div>
- </div>
- </div>
- <!-- The table listing the files available for upload/download -->
- <table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
- </form>
- <br>
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">Demo Notes</h3>
- </div>
- <div class="panel-body">
- <ul>
- <li>The maximum file size for uploads in this demo is <strong>5 MB</strong> (default file size is unlimited).</li>
- <li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li>
- <li>Uploaded files will be deleted automatically after <strong>5 minutes</strong> (demo setting).</li>
- <li>You can <strong>drag &amp; drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li>
- <li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li>
- <li>Built with the <a href="http://getbootstrap.com/">Bootstrap</a> CSS framework and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li>
- </ul>
- </div>
- </div>
-</div>
-<!-- The blueimp Gallery widget -->
-<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
- <div class="slides"></div>
- <h3 class="title"></h3>
- <a class="prev">‹</a>
- <a class="next">›</a>
- <a class="close">×</a>
- <a class="play-pause"></a>
- <ol class="indicator"></ol>
-</div>
-<!-- The template to display files available for upload -->
-<script id="template-upload" type="text/x-tmpl">
-{% for (var i=0, file; file=o.files[i]; i++) { %}
- <tr class="template-upload fade">
- <td>
- <span class="preview"></span>
- </td>
- <td>
- <p class="name">{%=file.name%}</p>
- <strong class="error text-danger"></strong>
- </td>
- <td>
- <p class="size">Processing...</p>
- <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
- </td>
- <td>
- {% if (!i && !o.options.autoUpload) { %}
- <button class="btn btn-primary start" disabled>
- <i class="glyphicon glyphicon-upload"></i>
- <span>Start</span>
- </button>
- {% } %}
- {% if (!i) { %}
- <button class="btn btn-warning cancel">
- <i class="glyphicon glyphicon-ban-circle"></i>
- <span>Cancel</span>
- </button>
- {% } %}
- </td>
- </tr>
-{% } %}
-</script>
-<!-- The template to display files available for download -->
-<script id="template-download" type="text/x-tmpl">
-{% for (var i=0, file; file=o.files[i]; i++) { %}
- <tr class="template-download fade">
- <td>
- <span class="preview">
- {% if (file.thumbnailUrl) { %}
- <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
- {% } %}
- </span>
- </td>
- <td>
- <p class="name">
- {% if (file.url) { %}
- <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
- {% } else { %}
- <span>{%=file.name%}</span>
- {% } %}
- </p>
- {% if (file.error) { %}
- <div><span class="label label-danger">Error</span> {%=file.error%}</div>
- {% } %}
- </td>
- <td>
- <span class="size">{%=o.formatFileSize(file.size)%}</span>
- </td>
- <td>
- {% if (file.deleteUrl) { %}
- <button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
- <i class="glyphicon glyphicon-trash"></i>
- <span>Delete</span>
- </button>
- <input type="checkbox" name="delete" value="1" class="toggle">
- {% } else { %}
- <button class="btn btn-warning cancel">
- <i class="glyphicon glyphicon-ban-circle"></i>
- <span>Cancel</span>
- </button>
- {% } %}
- </td>
- </tr>
-{% } %}
-</script>
-<script src="/static/jquery.min.js"></script>
-<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
-<script src="/static/js/vendor/jquery.ui.widget.js"></script>
-<!-- The Templates plugin is included to render the upload/download listings -->
-<script src="/static/js/tmpl.min.js"></script>
-<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
-<script src="/static/js/load-image.all.min.js"></script>
-<!-- The Canvas to Blob plugin is included for image resizing functionality -->
-<script src="/static/js/canvas-to-blob.min.js"></script>
-<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
-<script src="/static/bootstrap.min.js"></script>
-<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
-<script src="/static/js/jquery.iframe-transport.js"></script>
-<!-- The basic File Upload plugin -->
-<script src="/static/js/jquery.fileupload.js"></script>
-<!-- The File Upload processing plugin -->
-<script src="/static/js/jquery.fileupload-process.js"></script>
-<!-- The File Upload image preview & resize plugin -->
-<script src="/static/js/jquery.fileupload-image.js"></script>
-<!-- The File Upload audio preview plugin -->
-<script src="/static/js/jquery.fileupload-audio.js"></script>
-<!-- The File Upload video preview plugin -->
-<script src="/static/js/jquery.fileupload-video.js"></script>
-<!-- The File Upload validation plugin -->
-<script src="/static/js/jquery.fileupload-validate.js"></script>
-<!-- The File Upload user interface plugin -->
-<script src="/static/js/jquery.fileupload-ui.js"></script>
-<!-- The main application script -->
-<script src="/static/js/main.js"></script>
-<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
-<!--[if (gte IE 8)&(lt IE 10)]>
-<script src="/static/js/cors/jquery.xdr-transport.js"></script>
-<![endif]-->
-</body>
-</html>
diff --git a/jm2l/templates/trash/old_edit_tiers.mako b/jm2l/templates/trash/old_edit_tiers.mako
deleted file mode 100644
index 48bd902..0000000
--- a/jm2l/templates/trash/old_edit_tiers.mako
+++ /dev/null
@@ -1,199 +0,0 @@
-<%inherit file="jm2l:templates/layout.mako"/>
-<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
-<%def name="jsAddOn()">
- <script src="/static/ckeditor/ckeditor.js"></script>
- <script src="/static/select2.js"></script>
-</%def>
-<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
- <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
- <link rel="stylesheet" href="/static/leaflet.css" />
- <!-- CSS adjustments for browsers with JavaScript disabled -->
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
-</%def>
-<% from datetime import datetime %>
-<style>
-.borderbox {
- border: 1px solid #e1e4e5;
- margin: 1px 0 24px;
- color: #404040;
- line-height: 1.5;
- margin: 0;
- overflow: auto;
- padding: 12px;
- background: none repeat scroll 0 0 #fcfcfc;
- font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
-}
-.titleborderbox {
- background: none repeat scroll 0 0 #ffffff;
- border: 1px solid #eee;
- display: inline;
- left: 16px;
- padding: 2px 7px;
- position: relative;
- top: 10px;
-}
-.borderboxtime {
- float:right;
- padding:1px 15px;
- border: 1px solid #eee;
-}
-</style>
-
-<fieldset>
-% if form.name.data:
- <legend>${form.name.data}</legend>
-% else:
- <legend>Créer une entité représentative</legend>
-% endif
- <form action="" method="POST">
- % if 'uid' in form._fields:
- ${form.uid}
- %endif
-<%
-TabFields = [
- ( form._fields.get("name"), u"Nom", "padding-right:5px;" , "width:95%;" ),
- ( form._fields.get("description"), u"Description", "padding-right:5px;" , "width:90%;height:500px;" ),
- ( form._fields.get("website"), u"Site web", "padding-right:15px;", "width:30em;" ),
- ( form._fields.get("members"), u"membres", "padding-right:15px;", "width:30em;" ),
- ( form._fields.get("csrf_token"), "","",""),
-]
-%>
-% for Field, PlaceHolder, DivClass, FieldClass in TabFields:
- % if Field is None:
- <% continue %>
- % endif
- % if Field.type=='HiddenField':
- ${Field()}
- <% continue %>
- % endif
- <div style="padding-right:5px;${DivClass}">
- <label for="${Field.label.field_id}">${Field.label.text}
- % if len(Field.description):
- <a id="${Field.label.field_id}-help" data-toggle="popover"
- data-original-title="${Field.label.text}"
- data-content="${Field.description}">
- <i class="icon-me" style="background-image: url('/static/Help.png');background-position:1px 2px;"></i>
- </a>
- % endif
- </label>
- % for error in Field.errors:
- <div class="alert alert-error">
- <button type="button" class="close" data-dismiss="alert">&times;</button>
- <h4>Erreur!</h4>
- ${ error }
- </div>
- % endfor
- ${Field(placeholder=PlaceHolder, style=FieldClass)}
- </div>
-% endfor
-
- <button type="submit">Proposer</button>
- </form>
-
-</fieldset>
-
-% if 'uid' in form._fields:
-<fieldset>
- <legend>Ajouter des membres</legend>
- <p>
- Notez que tous les intervenants d'un même évenement ont les droits de modification.
- </p>
-
-% if 'uid' in form._fields:
- <div class="borderbox">
- Membres:
- <ul>
- % if tiers.members.count()==0:
- <i><b>Aucun</b></i>
- % else:
- % for num, member in enumerate(tiers.members):
- <li>
- <strong><a href="/MesJM2L?user=${member.uid}">${member.prenom} ${member.nom}</a></strong>.
- % if member.pseudo:
- (${member.pseudo})
- %endif
- </li>
- % endfor
- % endif
- </ul>
- </div>
-<br clear="both">
-%endif
-
- <form action="link" method="POST">
-${formAdd.tiers_uid}
-<%
-TabFields = [
- ( formAdd._fields["prenom"], u"Prénom", "padding-right:5px;float:left;" ),
- ( formAdd._fields["nom"], u"Nom", "padding-right:5px;" ),
- ( formAdd._fields["email"], u"son.mail@fqdn.tld", "padding-right:5px;" ),
-]
-%>
-% for Field, PlaceHolder, DivClass in TabFields:
- <div style="padding-right:5px;${DivClass}">
- <label for="${Field.label.field_id}">${Field.label.text}
- % if len(Field.description):
- <a id="${Field.label.field_id}-help" data-toggle="popover"
- data-original-title="${Field.label.text}"
- data-content="${Field.description}">
- <i class="icon-me" style="background-image: url('/static/Help.png');background-position:1px 2px;"></i>
- </a>
- % endif
- </label>
- % for error in Field.errors:
- <div class="alert alert-error">
- <button type="button" class="close" data-dismiss="alert">&times;</button>
- <h4>Erreur!</h4>
- ${ error }
- </div>
- % endfor
- ${Field(placeholder=PlaceHolder, style="width:16em;")}
- </div>
-% endfor
- ## Then the submit for this form
- ${formAdd.add}
- </form>
-</fieldset>
- % if 'uid' in form._fields:
-<fieldset>
- <legend>Support liés</legend>
- <div style="float:right;width:60%">
- <p> En plus de vos support de présentation classique.
- Pensez aussi aux affiches, aux flyers, aux stickers,
- au bulletin d'adhésion à une association, à la documentation technique...
- Tous ce qui peut être utile, de près ou de loin à la promotion de votre évenement.
- </p>
- </div>
- ${helpers.uploader("tiers", request.user.uid, u"fichiers" )}
-</fieldset>
- %else:
- <br>NB: Vous devez proposer votre entité avant de pouvoir
- téléverser des fichiers la concernant.
- % endif
-<hr/>
- <p style="float:right;">Créé le ${tiers.created.strftime('%d %b %Y')}</p>
-%else:
- <p style="float:right;">Créé le ${datetime.now().strftime('%d %b %Y')}</p>
-% endif
-<br/>
-% if 'uid' in form._fields:
- ${helpers.uploader_js()}
-% endif
-<script type="text/javascript">
-## Handle Popover of this form
-% for field in form._fields.keys():
- $('#${field}-help').popover();
- % if form._fields[field].type=='SelectField':
- $('#${field}').select2({width:'resolve'});
- % endif
-%endfor
-% if formAdd:
- % for field in formAdd._fields.keys():
- $('#${field}-help').popover();
- %endfor
-% endif
-var editor = CKEDITOR.replace('description');
-</script>
diff --git a/jm2l/templates/trash/test.mako b/jm2l/templates/trash/test.mako
deleted file mode 100644
index 1e477b4..0000000
--- a/jm2l/templates/trash/test.mako
+++ /dev/null
@@ -1,98 +0,0 @@
-<%inherit file="jm2l:templates/layout.mako"/>
-<%namespace name="h" file="jm2l:templates/helpers.mako"/>
-<%def name="jsAddOn()">
- <script src="/static/select2.js"></script>
- <script src="/static/leaflet.js"></script>
- <script src="/static/leaflet-routing-machine.min.js"></script>
-</%def>
-<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/static/leaflet.css" />
- <link rel="stylesheet" href="/static/leaflet-routing-machine.css" />
-</%def>
-<style>
-.tr_icon {
- display: inline-block;
- text-align: center;
-}
-.tr_icon label {
- margin-bottom: -12px;
-}
-.itin_fields {
- display: inline-block;
- margin-right: 10px;
-}
-.itin_fields input {
- text-align: right;
-}
-#map { height: 280px; }
-</style>
-<fieldset>
-<legend>Ajouter un Intinéraire</legend>
- ${h.itin_wrapper(itin_form.itin)}
- <div style="width:250px;margin:auto;">
- <div class="itin_fields">
- <label for="${itin_form.distance.label.field_id}">
- ${itin_form.distance.label.text}
- </label>
- ${itin_form.distance(placeholder=u"0", style='width:3em;')} km
- </div>
- <div class="itin_fields">
- <label for="${itin_form.duration.label.field_id}">
- ${itin_form.duration.label.text}
- </label>
- ${itin_form.duration(placeholder=u"0:00", style='width:3em;')}
- </div>
- <div class="itin_fields">
- <label for="${itin_form.price.label.field_id}">
- ${itin_form.price.label.text}
- </label>
- ${itin_form.price(placeholder=u"0",style='width:3em;')} &euro;
- </div>
- </div>
- <div style="width:330px;margin:auto;">
- % for trsp in ['tr_pied','tr_velo','tr_moto','tr_voiture','tr_taxi','tr_bus','tr_avion']:
- <% Field = itin_form._fields[trsp] %>
- <div class="tr_icon">
- <label for="${Field.label.field_id}">
- <img src="/static/${trsp}_.png" alt="${Field.label.text}" />
- </label>
- ${Field}
- </div>
- % endfor
- </div>
- <div style="width:500px;margin:auto;">
- <label for="${itin_form.description.label.field_id}">
- ${itin_form.description.label.text}
- </label>
- ${itin_form.description(placeholder=u"Description",style='width:40em;height:10em;')}
- </div>
- </form>
-</fieldset>
- <div id="map"></div>
- <br />
- <br />
- <br />
-
-<script type="text/javascript">
- var map = L.map('map');
- // create the tile layer with correct attribution
- var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
- var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
- var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 15, attribution: osmAttrib});
-
- // start the map in South-East England
- //map.setView(new L.LatLng(43.704857,7.262344),15);
-
- L.Routing.control({
- waypoints: [
- L.latLng(43.554161, 7.018614),
- L.latLng(43.704857, 7.262344)
- ]
- }).addTo(map);
-
- map.addLayer(osm);
-
- $("#${itin_form.itin.start_place.label.field_id}").select2({});
- $("#${itin_form.itin.arrival_place.label.field_id}").select2({});
-</script>
diff --git a/jm2l/templates/trash/upload.mako b/jm2l/templates/trash/upload.mako
deleted file mode 100644
index d8437de..0000000
--- a/jm2l/templates/trash/upload.mako
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-/*
- * jQuery File Upload Plugin Demo 9.1.0
- * https://github.com/blueimp/jQuery-File-Upload
- *
- * Copyright 2010, Sebastian Tschan
- * https://blueimp.net
- *
- * Licensed under the MIT license:
- * http://www.opensource.org/licenses/MIT
- */
--->
-<html lang="en">
-<head>
-<!-- Force latest IE rendering engine or ChromeFrame if installed -->
-<!--[if IE]>
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<![endif]-->
-
-<title>jQuery File Upload Demo</title>
-<meta name="description" content="File Upload widget with multiple file selection, drag&amp;drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<!-- Bootstrap styles -->
-<link rel="stylesheet" href="/static/bootstrap.min.css">
-<!-- Generic page styles -->
-<link rel="stylesheet" href="/static/css/style.css">
-<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
-<link rel="stylesheet" href="/static/css/jquery.fileupload.css">
-<link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
-<!-- CSS adjustments for browsers with JavaScript disabled -->
-<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
-<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
-</head>
-<body>
-<div class="container">
- <!-- The file upload form used as target for the file upload widget -->
- <form id="fileupload" action="/uploader/proceed/" method="POST" enctype="multipart/form-data">
- <!-- Redirect browsers with JavaScript disabled to the origin page -->
- <noscript><input type="hidden" name="redirect" value="/"></noscript>
- <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
- <div class="row fileupload-buttonbar">
- <div class="col-lg-7">
- <!-- The fileinput-button span is used to style the file input field as button -->
- <span class="btn btn-success fileinput-button">
- <i class="glyphicon glyphicon-plus"></i>
- <span>Add files...</span>
- <input type="file" name="files[]" multiple>
- </span>
- <button type="submit" class="btn btn-primary start">
- <i class="glyphicon glyphicon-upload"></i>
- <span>Start upload</span>
- </button>
- <button type="reset" class="btn btn-warning cancel">
- <i class="glyphicon glyphicon-ban-circle"></i>
- <span>Cancel upload</span>
- </button>
- <button type="button" class="btn btn-danger delete">
- <i class="glyphicon glyphicon-trash"></i>
- <span>Delete</span>
- </button>
- <input type="checkbox" class="toggle">
- <!-- The global file processing state -->
- <span class="fileupload-process"></span>
- </div>
- <!-- The global progress state -->
- <div class="col-lg-5 fileupload-progress fade">
- <!-- The global progress bar -->
- <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
- <div class="progress-bar progress-bar-success" style="width:0%;"></div>
- </div>
- <!-- The extended global progress state -->
- <div class="progress-extended">&nbsp;</div>
- </div>
- </div>
- <!-- The table listing the files available for upload/download -->
- <table role="presentation" class="table table-striped"><tbody class="files"></tbody></table>
- </form>
-</div>
-<!-- The template to display files available for upload -->
-<script id="template-upload" type="text/x-tmpl">
-{% for (var i=0, file; file=o.files[i]; i++) { %}
- <tr class="template-upload fade">
- <td>
- <span class="preview"></span>
- </td>
- <td>
- <p class="name">{%=file.name%}</p>
- <strong class="error text-danger"></strong>
- </td>
- <td>
- <p class="size">Processing...</p>
- <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
- </td>
- <td>
- {% if (!i && !o.options.autoUpload) { %}
- <button class="btn btn-primary start" disabled>
- <i class="glyphicon glyphicon-upload"></i>
- <span>Start</span>
- </button>
- {% } %}
- {% if (!i) { %}
- <button class="btn btn-warning cancel">
- <i class="glyphicon glyphicon-ban-circle"></i>
- <span>Cancel</span>
- </button>
- {% } %}
- </td>
- </tr>
-{% } %}
-</script>
-<!-- The template to display files available for download -->
-<script id="template-download" type="text/x-tmpl">
-{% for (var i=0, file; file=o.files[i]; i++) { %}
- <tr class="template-download fade">
- <td>
- <span class="preview">
- {% if (file.thumbnailUrl) { %}
- <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
- {% } %}
- </span>
- </td>
- <td>
- <p class="name">
- {% if (file.url) { %}
- <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
- {% } else { %}
- <span>{%=file.name%}</span>
- {% } %}
- </p>
- {% if (file.error) { %}
- <div><span class="label label-danger">Error</span> {%=file.error%}</div>
- {% } %}
- </td>
- <td>
- <span class="size">{%=o.formatFileSize(file.size)%}</span>
- </td>
- <td>
- {% if (file.deleteUrl) { %}
- <button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
- <i class="glyphicon glyphicon-trash"></i>
- <span>Delete</span>
- </button>
- <input type="checkbox" name="delete" value="1" class="toggle">
- {% } else { %}
- <button class="btn btn-warning cancel">
- <i class="glyphicon glyphicon-ban-circle"></i>
- <span>Cancel</span>
- </button>
- {% } %}
- </td>
- </tr>
-{% } %}
-</script>
-<![endif]-->
-<script src="/static/jquery.min.js"></script>
-<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
-<script src="/static/js/vendor/jquery.ui.widget.js"></script>
-<!-- The Templates plugin is included to render the upload/download listings -->
-<script src="/static/js/tmpl.min.js"></script>
-<!-- The Load Image plugin is included for the preview images and image resizing functionality -->
-<script src="/static/js/load-image.all.min.js"></script>
-<!-- The Canvas to Blob plugin is included for image resizing functionality -->
-<script src="/static/js/canvas-to-blob.min.js"></script>
-<!-- Bootstrap JS is not required, but included for the responsive demo navigation -->
-<script src="/static/bootstrap.min.js"></script>
-<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
-<script src="/static/js/jquery.iframe-transport.js"></script>
-<!-- The basic File Upload plugin -->
-<script src="/static/js/jquery.fileupload.js"></script>
-<!-- The File Upload processing plugin -->
-<script src="/static/js/jquery.fileupload-process.js"></script>
-<!-- The File Upload image preview & resize plugin -->
-<script src="/static/js/jquery.fileupload-image.js"></script>
-<!-- The File Upload audio preview plugin -->
-<script src="/static/js/jquery.fileupload-audio.js"></script>
-<!-- The File Upload video preview plugin -->
-<script src="/static/js/jquery.fileupload-video.js"></script>
-<!-- The File Upload validation plugin -->
-<script src="/static/js/jquery.fileupload-validate.js"></script>
-<!-- The File Upload user interface plugin -->
-<script src="/static/js/jquery.fileupload-ui.js"></script>
-<!-- The main application script -->
-<script src="/static/js/main.js"></script>
-<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
-<!--[if (gte IE 8)&(lt IE 10)]>
-<script src="/static/js/cors/jquery.xdr-transport.js"></script>
-
-</body>
-</html>
diff --git a/jm2l/templates/trash/upload2.mako b/jm2l/templates/trash/upload2.mako
deleted file mode 100644
index 46b368a..0000000
--- a/jm2l/templates/trash/upload2.mako
+++ /dev/null
@@ -1,26 +0,0 @@
-<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
-<html lang="en">
-<head>
-<!-- Force latest IE rendering engine or ChromeFrame if installed -->
-<!--[if IE]>
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<![endif]-->
-
-<title>jQuery File Upload Demo</title>
-<meta name="description" content="File Upload widget with multiple file selection, drag&amp;drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.">
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<!-- Bootstrap styles -->
-<link rel="stylesheet" href="/static/bootstrap.min.css">
-<!-- Generic page styles -->
-<link rel="stylesheet" href="/static/css/style.css">
-<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
-<link rel="stylesheet" href="/static/css/jquery.fileupload.css">
-<link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
-<!-- CSS adjustments for browsers with JavaScript disabled -->
-<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
-<noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
-</head>
-<body>
-${helpers.uploader()}
-</body>
-</html>
diff --git a/jm2l/templates/trash/view_blog.mako b/jm2l/templates/trash/view_blog.mako
deleted file mode 100644
index 34bebc2..0000000
--- a/jm2l/templates/trash/view_blog.mako
+++ /dev/null
@@ -1,14 +0,0 @@
-<%inherit file="jm2l:templates/layout.mako"/>
-
-<h1>${entry.title}</h1>
-<hr/>
-<p>${entry.body}</p>
-<hr/>
-<p>Created <strong title="${entry.created}">
-${entry.created_in_words}</strong> ago</p>
-
-<p><a href="${request.route_url('home')}">Go Back</a> ::
-<a href="${request.route_url('blog_action', action='edit',
-_query=(('id',entry.id),))}">Edit Entry</a>
-
-</p>