--- a/src/catedit/templates/categories/submit.html Wed Apr 08 16:11:55 2015 +0200
+++ b/src/catedit/templates/categories/submit.html Thu Apr 09 14:46:13 2015 +0200
@@ -12,6 +12,7 @@
$(document).ready(function(){
$(".cat-delete-div").hide();
$(".cat-info-div").hide();
+ $(".cat-table").hide();
$(".cat-table-toggle").click(function(evt){
$(".cat-table").slideToggle(function(){
$(".cat-table-toggle").children().toggleClass("glyphicon-chevron-up");
@@ -43,42 +44,22 @@
{{ super() }}
{% endblock repo_list %}
{% block page_content %}
- <h2> <b>CatEdit</b> - <small>{{current_repository}}</small></h2>
- <h3> Catégories existantes <a title="Afficher/Cacher tableau" class="btn btn-default cat-table-toggle">
- <span class="glyphicon glyphicon-chevron-up"/>
- </a></h3>
- <div class="cat-table">
- <table class="table table-bordered table-condensed">
- <thead>
- <tr class="active">
- <th class="col-md-2"><b>Nom de la catégorie</b></th>
- <th class="col-md-10" colspan="5"><b>Description de la catégorie</b></th>
- </tr>
- </thead>
- <tbody>
- {% if not session["user_logged"] %}
- <tr>
- <td class="col-md-12" colspan="5">
- <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
- <span class="sr-only">Attention:</span>
- Veuillez vous identifier pour visualiser les catégories
- </td>
- </tr>
- {% else %}
- {% if original_cat_count == 0 %}
- <tr>
- <td class="col-md-12" colspan="3">Aucune catégorie n'a été créée pour l'instant. {% if not readonly %}<a href="{{ url_for('categories.editor', repository=current_repository) }}">Créer une catégorie</a>{% endif %}</td>
- </tr>
- {% else %}
- {% import "macros.html" as macros %}
- {{ macros.category_table(original_cat_list, current_repository, state_list=["original"], interactive=False, buttons_id="original") }}
- {% endif %}
- {% endif %}
- </tbody>
- </table>
+ <h2><b>CatEdit</b> - <small>{{current_repository}}</small></h2>
+ <h3> Soumettre mes changements </h3>
+ <div class="col-md-12">
+ <form method="POST" action="{{ url_for('categories.submit', repository=current_repository)}}">
+ <fieldset {% if readonly %}disabled{% endif %}>
+ {{ commit_form.hidden_tag() }}
+ <div class="form-group">
+ {{ commit_form.commit_message.label }}
+ {{ commit_form.commit_message(size=40, class="form-control", readonly=readonly) }}
+ </div>
+ <button type="submit" class="btn btn-default">Soumettre modifications</button>
+ <a href="{{ url_for('categories.workshop', repository=current_repository)}}"class="btn btn-default">Retour</a>
+ </fieldset>
+ </form><br>
</div>
-
- <h3> Mes modifications </h3>
+ <h4> Mes modifications à soumettre </h4>
<table class="table table-bordered table-condensed">
<thead>
<tr class="active">
@@ -139,18 +120,38 @@
{% endif %}
</tbody>
</table>
- <h3> Soumettre mes changements </h3>
- <div class="col-md-12">
- <form method="POST" action="{{ url_for('categories.submit', repository=current_repository)}}">
- <fieldset {% if readonly %}disabled{% endif %}>
- {{ commit_form.hidden_tag() }}
- <div class="form-group">
- {{ commit_form.commit_message.label }}
- {{ commit_form.commit_message(size=40, class="form-control", readonly=readonly) }}
- </div>
- <button type="submit" class="btn btn-default">Soumettre modifications</button>
- <a href="{{ url_for('categories.workshop', repository=current_repository)}}"class="btn btn-default">Retour</a>
- </fieldset>
- </form><br>
+
+<h4> Ensemble de catégorie sans mes modifications <a title="Afficher/Cacher tableau" class="btn btn-default cat-table-toggle">
+ <span class="glyphicon glyphicon-chevron-down"/>
+ </a></h4>
+ <div class="cat-table">
+ <table class="table table-bordered table-condensed">
+ <thead>
+ <tr class="active">
+ <th class="col-md-2"><b>Nom de la catégorie</b></th>
+ <th class="col-md-10" colspan="5"><b>Description de la catégorie</b></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% if not session["user_logged"] %}
+ <tr>
+ <td class="col-md-12" colspan="5">
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+ <span class="sr-only">Attention:</span>
+ Veuillez vous identifier pour visualiser les catégories
+ </td>
+ </tr>
+ {% else %}
+ {% if original_cat_count == 0 %}
+ <tr>
+ <td class="col-md-12" colspan="3">Aucune catégorie n'a été créée pour l'instant. {% if not readonly %}<a href="{{ url_for('categories.editor', repository=current_repository) }}">Créer une catégorie</a>{% endif %}</td>
+ </tr>
+ {% else %}
+ {% import "macros.html" as macros %}
+ {{ macros.category_table(original_cat_list, current_repository, state_list=["original"], interactive=False, buttons_id="original") }}
+ {% endif %}
+ {% endif %}
+ </tbody>
+ </table>
</div>
{% endblock page_content %}
--- a/src/catedit/templates/categories/workshop.html Wed Apr 08 16:11:55 2015 +0200
+++ b/src/catedit/templates/categories/workshop.html Thu Apr 09 14:46:13 2015 +0200
@@ -49,9 +49,47 @@
Vous n'avez pas accès en écriture au repository contenant les catégories - Vous ne pourrez pas les modifier.
</div>
{% endif %}
- <h3>Mes catégories <a title="Afficher/Cacher tableau" class="btn btn-default cat-table-toggle">
- <span class="glyphicon glyphicon-chevron-up"/>
- </a></h3>
+ <p>
+ <h3>Etat de l'ensemble de catégories
+ <a title="Afficher/Cacher tableau" class="btn btn-default cat-table-toggle">
+ <span class="glyphicon glyphicon-chevron-up"/>
+ </a>
+ </h3>
+ <form method="POST" action="{{url_for('categories.workshop', repository=current_repository)}}" class="form form-inline">
+ <h4>
+ <small>
+ <ul class="list-inline">
+ <li>
+ <b> Créer une catégorie: </b><a href="{{url_for('categories.editor', repository=current_repository)}}" title="Créer catégorie" class="btn btn-default {% if readonly %}disabled{% endif %}"><span class="glyphicon glyphicon-plus"/></a>
+ </li>
+ {% if session["modified_categories"][current_repository] or session["deleted_categories"][current_repository] %}
+ <li>
+ <b> Soumettre tous mes changements: </b><a href="{{ url_for('categories.submit', repository=current_repository)}}" title="Soumettre changements" class="btn btn-default" {% if readonly %}disabled{% endif %}><span class="glyphicon glyphicon-share"/></a>
+ </li>
+ {% endif %}
+ {% if session["modified_categories"][current_repository] or session["deleted_categories"][current_repository] %}
+ <li>
+ <b> Supprimer tous mes changements: </b>
+ <input name="csrf_token" value="{{ csrf_token() }}" type="hidden">
+ <a title="Supprimer changements">
+ <button type="submit" class="btn btn-default" {% if readonly %}disabled{% endif %}>
+ <span class="glyphicon glyphicon-remove"/>
+ </button>
+ </a>
+ </li>
+ {% endif %}
+ </ul>
+ </small>
+ </h4>
+ </form>
+ <p>
+ {% if session["modified_categories"][current_repository] or session["deleted_categories"][current_repository] %}
+ <div class="alert alert-info" role="alert">
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+ <span class="sr-only">Attention:</span>
+ Pour que vos changements soient pris en compte, vous devez utiliser l'écran de soumission.
+ </div>
+ {% endif %}
<div class="cat-table">
<table class="table table-bordered table-condensed">
<thead>
@@ -82,22 +120,7 @@
</tbody>
</table>
</div>
- <h4> Créer une catégorie : <a href="{{url_for('categories.editor', repository=current_repository)}}" title="Créer catégorie" class="btn btn-default {% if readonly %}disabled{% endif %}"><span class="glyphicon glyphicon-plus"/></a></h4>
- {% if session.get("user_logged") %}
- <form method="POST" action="{{url_for('categories.workshop', repository=current_repository)}}" class="form-inline">
- <input name="csrf_token" value="{{ csrf_token() }}" type="hidden">
- <h4> Annuler tous mes changements actuels :
- <a title="Supprimer changements">
- <button type="submit" class="btn btn-default" {% if readonly %}disabled{% endif %}>
- <span class="glyphicon glyphicon-remove"/>
- </button>
- </a>
- </h4>
- </form>
- <h4> Soumettre mes changements actuels : <a href="{{ url_for('categories.submit', repository=current_repository)}}" title="Soumettre changements" class="btn btn-default" {% if readonly %}disabled{% endif %}><span class="glyphicon glyphicon-share"/></a>
- </h4>
- {% endif %}
- <h3>Modifications récentes</h3>
+ <h3>Modifications récentes <small>- Voir liste complète: <a href="{{ url_for('social.changesets_index', repository=current_repository)}}" title="Voir la liste complète" class="btn btn-default"><span class="glyphicon glyphicon-comment"/></a></small></h3>
<table class="table table-condensed">
<thead>
<tr>
@@ -131,9 +154,19 @@
{% endif %}
</tbody>
</table>
- <h4>Voir la liste des modifications: <a href="{{ url_for('social.changesets_index', repository=current_repository)}}" title="Voir la liste complète" class="btn btn-default"><span class="glyphicon glyphicon-comment"/></a>
+ <h3>Discussions récentes <small>- Voir liste complète: <a href="{{ url_for('social.discussions_index', repository=current_repository)}}" title="Voir la liste complète" class="btn btn-default"><span class="glyphicon glyphicon-comment"/></a></small></h3>
+ <h4>
+ <small>
+ <ul class="list-inline">
+ <li>
+ <b> Créer une nouvelle discussion: </b>
+ <a href="{{ url_for('social.discussion', repository=current_repository, discussion_id='new')}}" title="Créer discussion" class="btn btn-default">
+ <span class=" glyphicon glyphicon-plus"/>
+ </a>
+ </li>
+ </ul>
+ </small>
</h4>
- <h3>Discussions récentes</h3>
<table class="table table-condensed">
<thead>
<tr>
@@ -169,5 +202,4 @@
{% endif %}
</tbody>
</table>
- <h4>Voir la liste des discussions: <a href="{{ url_for('social.discussions_index', repository=current_repository)}}" title="Voir la liste complète" class="btn btn-default"><span class="glyphicon glyphicon-comment"/></a>
{% endblock page_content %}
--- a/src/catedit/templates/social/discussions_index.html Wed Apr 08 16:11:55 2015 +0200
+++ b/src/catedit/templates/social/discussions_index.html Thu Apr 09 14:46:13 2015 +0200
@@ -30,10 +30,12 @@
</div>
{% endif %}
<h3>Discussions générales</h3>
- <h4> Créer une nouvelle discussion :
- <a href="{{ url_for('social.discussion', repository=current_repository, discussion_id='new')}}" title="Créer discussion" class="btn btn-default">
- <span class=" glyphicon glyphicon-plus"/>
- </a>
+ <h4>
+ <small><b>Créer une nouvelle discussion :</b>
+ <a href="{{ url_for('social.discussion', repository=current_repository, discussion_id='new')}}" title="Créer discussion" class="btn btn-default">
+ <span class=" glyphicon glyphicon-plus"/>
+ </a>
+ </small>
</h4>
<table class="table table-condensed">
<thead>