equal
deleted
inserted
replaced
8 {% block head %} |
8 {% block head %} |
9 {{ super() }} |
9 {{ super() }} |
10 <script src="{{ url_for('static', filename='js/jquery-1.11.1.min.js') }}" language="Javascript" type="text/javascript"></script> |
10 <script src="{{ url_for('static', filename='js/jquery-1.11.1.min.js') }}" language="Javascript" type="text/javascript"></script> |
11 <script> |
11 <script> |
12 $(document).ready(function(){ |
12 $(document).ready(function(){ |
13 {% for cat in cat_list %} |
13 {% for cat in existing_cat_list %} |
14 $("#properties_{{cat.cat_id}}").hide(); |
14 $("#properties_{{cat.cat_id}}").hide(); |
15 $("#info_button_{{cat.cat_id}}").click(function(){ |
15 $("#info_button_{{cat.cat_id}}").click(function(){ |
16 $("#properties_{{cat.cat_id}}").slideToggle(); |
16 $("#properties_{{cat.cat_id}}").slideToggle(); |
17 }); |
17 }); |
18 {% endfor %} |
18 {% endfor %} |
69 <span class="sr-only">Attention:</span> |
69 <span class="sr-only">Attention:</span> |
70 Veuillez vous identifier pour visualiser les catégories |
70 Veuillez vous identifier pour visualiser les catégories |
71 </td> |
71 </td> |
72 </tr> |
72 </tr> |
73 {% else %} |
73 {% else %} |
74 {% if cat_list|length == 0 %} |
74 {% if existing_cat_list|length == 0 %} |
75 <tr> |
75 <tr> |
76 <td class="col-md-12" colspan="2">Aucune catégorie n'a été créée pour l'instant. {% if not readonly %}<a href="{{ url_for('cat_editor', repository=current_repository) }}">Créer une catégorie</a>{% endif %}</td> |
76 <td class="col-md-12" colspan="2">Aucune catégorie n'a été créée pour l'instant. {% if not readonly %}<a href="{{ url_for('cat_editor', repository=current_repository) }}">Créer une catégorie</a>{% endif %}</td> |
77 </tr> |
77 </tr> |
78 {% else %} |
78 {% else %} |
79 {% for cat in cat_list %} |
79 {% for cat in existing_cat_list %} |
80 <tr> |
80 <tr> |
81 <td class="col-md-2">{{ cat.cat_label }}</td> |
81 <td class="col-md-2">{{ cat.cat_label }}</td> |
82 <td class="col-md-8">{{ cat.cat_description}}</td> |
82 <td class="col-md-8">{{ cat.cat_description}}</td> |
83 <td class="text-center"> |
83 <td class="text-center"> |
84 <a title="Détails catégorie"><button class="btn btn-default" id="info_button_{{ cat.cat_id }}"><span class="glyphicon glyphicon glyphicon-plus-sign"/></button></a> |
84 <a title="Détails catégorie"><button class="btn btn-default" id="info_button_{{ cat.cat_id }}"><span class="glyphicon glyphicon glyphicon-plus-sign"/></button></a> |
88 <a href="{{ url_for('cat_editor', cat_id=cat.cat_id, repository=current_repository)}}" title="Editer catégorie" class="btn btn-default"><span class="glyphicon glyphicon glyphicon-pencil"/></a> |
88 <a href="{{ url_for('cat_editor', cat_id=cat.cat_id, repository=current_repository)}}" title="Editer catégorie" class="btn btn-default"><span class="glyphicon glyphicon glyphicon-pencil"/></a> |
89 </td> |
89 </td> |
90 <td class="text-center"> |
90 <td class="text-center"> |
91 <a title="Supprimer catégorie"> |
91 <a title="Supprimer catégorie"> |
92 <form method="POST" action="{{ url_for('cat_modifs', deleted_cat_id=cat.cat_id, repository=current_repository) }}" class="form-inline form-button"> |
92 <form method="POST" action="{{ url_for('cat_modifs', deleted_cat_id=cat.cat_id, repository=current_repository) }}" class="form-inline form-button"> |
|
93 <input name="csrf_token" value="{{ csrf_token() }}" type="hidden"> |
93 <fieldset {% if readonly %}disabled{% endif %}> |
94 <fieldset {% if readonly %}disabled{% endif %}> |
94 <button type="submit" class="btn btn-default"> |
95 <button type="submit" class="btn btn-default"> |
95 <span class="glyphicon glyphicon-trash" title="Supprimer catégorie"/> |
96 <span class="glyphicon glyphicon-trash" title="Supprimer catégorie"/> |
96 </button> |
97 </button> |
97 </fieldset> |
98 </fieldset> |
111 {% else %} |
112 {% else %} |
112 {% for (predicate, object) in cat.cat_properties %} |
113 {% for (predicate, object) in cat.cat_properties %} |
113 <dt>{{ config["PROPERTY_LIST"][predicate]["descriptive_label_fr"] }}</dt> |
114 <dt>{{ config["PROPERTY_LIST"][predicate]["descriptive_label_fr"] }}</dt> |
114 <dd> |
115 <dd> |
115 {% if config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-category" %} |
116 {% if config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-category" %} |
116 {% for cat in cat_list %} |
117 {% for cat in existing_cat_list %} |
117 {% if object == config["CATEGORY_NAMESPACE"]+cat.cat_id %} |
118 {% if object == config["CATEGORY_NAMESPACE"]+cat.cat_id %} |
118 {{ cat.cat_label }} |
119 {{ cat.cat_label }} |
119 {% endif %} |
120 {% endif %} |
120 {% endfor %} |
121 {% endfor %} |
121 {% elif config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-link" %} |
122 {% elif config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-link" %} |
182 {% else %} |
183 {% else %} |
183 {% for (predicate, object) in cat.cat_properties %} |
184 {% for (predicate, object) in cat.cat_properties %} |
184 <dt>{{ config["PROPERTY_LIST"][predicate]["descriptive_label_fr"] }}</dt> |
185 <dt>{{ config["PROPERTY_LIST"][predicate]["descriptive_label_fr"] }}</dt> |
185 <dd> |
186 <dd> |
186 {% if config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-category" %} |
187 {% if config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-category" %} |
187 {% for cat in cat_list %} |
188 {% for cat in total_cat_list %} |
188 {% if object == config["CATEGORY_NAMESPACE"]+cat.cat_id %} |
189 {% if object == config["CATEGORY_NAMESPACE"]+cat.cat_id %} |
189 {{ cat.cat_label }} |
190 {{ cat.cat_label }} |
190 {% endif %} |
191 {% endif %} |
191 {% endfor %} |
192 {% endfor %} |
192 {% elif config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-link" %} |
193 {% elif config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-link" %} |
199 {% endif %} |
200 {% endif %} |
200 </dl> |
201 </dl> |
201 </div> |
202 </div> |
202 <div id="delete_created_{{cat.cat_id}}"> |
203 <div id="delete_created_{{cat.cat_id}}"> |
203 <form method="POST" action="{{ url_for('cat_modifs', deleted_modifs_id=cat.cat_id, repository=current_repository) }}" class="form-inline align-center"> |
204 <form method="POST" action="{{ url_for('cat_modifs', deleted_modifs_id=cat.cat_id, repository=current_repository) }}" class="form-inline align-center"> |
|
205 <input name="csrf_token" value="{{ csrf_token() }}" type="hidden"> |
204 <fieldset {% if readonly %}disabled{% endif %}> |
206 <fieldset {% if readonly %}disabled{% endif %}> |
205 <div class="input-group"> |
207 <div class="input-group"> |
206 <div class="input-group-addon"> |
208 <div class="input-group-addon"> |
207 Vous allez supprimer les changements faits sur cette catégorie. |
209 Vous allez supprimer les changements faits sur cette catégorie. |
208 </div> |
210 </div> |
243 {% else %} |
245 {% else %} |
244 {% for (predicate, object) in cat.cat_properties %} |
246 {% for (predicate, object) in cat.cat_properties %} |
245 <dt>{{ config["PROPERTY_LIST"][predicate]["descriptive_label_fr"] }}</dt> |
247 <dt>{{ config["PROPERTY_LIST"][predicate]["descriptive_label_fr"] }}</dt> |
246 <dd> |
248 <dd> |
247 {% if config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-category" %} |
249 {% if config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-category" %} |
248 {% for cat in cat_list %} |
250 {% for cat in total_cat_list %} |
249 {% if object == config["CATEGORY_NAMESPACE"]+cat.cat_id %} |
251 {% if object == config["CATEGORY_NAMESPACE"]+cat.cat_id %} |
250 {{ cat.cat_label }} |
252 {{ cat.cat_label }} |
251 {% endif %} |
253 {% endif %} |
252 {% endfor %} |
254 {% endfor %} |
253 {% elif config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-link" %} |
255 {% elif config["PROPERTY_LIST"][predicate]["object_type"]=="uriref-link" %} |
260 {% endif %} |
262 {% endif %} |
261 </dl> |
263 </dl> |
262 </div> |
264 </div> |
263 <div id="delete_modified_{{cat.cat_id}}"> |
265 <div id="delete_modified_{{cat.cat_id}}"> |
264 <form method="POST" action="{{ url_for('cat_modifs', deleted_modifs_id=cat.cat_id, repository=current_repository) }}" class="form-inline align-center"> |
266 <form method="POST" action="{{ url_for('cat_modifs', deleted_modifs_id=cat.cat_id, repository=current_repository) }}" class="form-inline align-center"> |
|
267 <input name="csrf_token" value="{{ csrf_token() }}" type="hidden"> |
265 <fieldset {% if readonly %}disabled{% endif %}> |
268 <fieldset {% if readonly %}disabled{% endif %}> |
266 <div class="input-group"> |
269 <div class="input-group"> |
267 <div class="input-group-addon"> |
270 <div class="input-group-addon"> |
268 Vous allez supprimer les changements faits sur cette catégorie. |
271 Vous allez supprimer les changements faits sur cette catégorie. |
269 </div> |
272 </div> |
286 <tr> |
289 <tr> |
287 <td class="col-md-12" colspan="3">Aucune catégorie n'a été supprimée pour l'instant.</td> |
290 <td class="col-md-12" colspan="3">Aucune catégorie n'a été supprimée pour l'instant.</td> |
288 </tr> |
291 </tr> |
289 {% else %} |
292 {% else %} |
290 {% for deleted_cat in deleted_cat_namelist %} |
293 {% for deleted_cat in deleted_cat_namelist %} |
291 {% for existing_cat in cat_list %} |
294 {% for existing_cat in existing_cat_list %} |
292 {% if existing_cat.cat_id == deleted_cat %} |
295 {% if existing_cat.cat_id == deleted_cat %} |
293 <tr class="danger"> |
296 <tr class="danger"> |
294 <td class="col-md-2">{{ existing_cat.cat_label }}</td> |
297 <td class="col-md-2">{{ existing_cat.cat_label }}</td> |
295 <td class="col-md-8"><i>Cette catégorie va être supprimée quand vous soumettrez vos modifications.</i></td> |
298 <td class="col-md-8"><i>Cette catégorie va être supprimée quand vous soumettrez vos modifications.</i></td> |
296 <td class="col-md-2 text-center"> |
299 <td class="col-md-2 text-center"> |
297 <form method="POST" action="{{ url_for('cat_modifs', deleted_cat_id=deleted_cat, repository=current_repository) }}"> |
300 <form method="POST" action="{{ url_for('cat_modifs', deleted_cat_id=deleted_cat, repository=current_repository) }}"> |
|
301 <input name="csrf_token" value="{{ csrf_token() }}" type="hidden"> |
298 <fieldset {% if readonly %}disabled{% endif %}> |
302 <fieldset {% if readonly %}disabled{% endif %}> |
299 <input type="submit" class="btn btn-default" value="Restaurer"> |
303 <input type="submit" class="btn btn-default" value="Restaurer"> |
300 </fieldset> |
304 </fieldset> |
301 </form> |
305 </form> |
302 </td> |
306 </td> |