Add vote deletion (only hides it in the DB : can be recovered manually from SQL by...
[cavote.git] / templates / admin_votes.html
index b97e45a..40358ab 100644 (file)
       <td>
         <a href="{{ url_for('vote', idvote=vote.voteid) }}" class="btn btn-success btn-mini">Voir</a>
         <a href="{{ url_for('admin_vote_edit', voteid=vote.voteid) }}" class="btn btn-mini">Éditer</a>
+        <a href="#delete{{ vote.voteid }}" data-toggle="modal" class="btn btn-mini btn-danger">Supprimer</a>
       </td>
     </tr>
+    <div class="modal hide fade" id="delete{{ vote.voteid }}">
+      <div class="modal-header">
+        <button type="button" class="close" data-dismiss="modal">×</button>
+        <h3>Suppression d'uun vote</h3>
+      </div>
+      <div class="modal-body">
+        <p>Voulez-vous vraiment supprimer le vote <strong>{{ vote.title }}</strong> ?</p>
+      </div>
+      <div class="modal-footer">
+        <a href="{{ url_for('admin_vote_del', idvote=vote.voteid) }}" class="btn btn-danger">Confirmer</a>
+        <a href="#" class="btn" data-dismiss="modal">Annuler</a>
+      </div>
+    </div>
     {% endfor %}
     </tbody>
   </table>