diff --git a/app/data/forums.yaml b/app/data/forums.yaml index a0f6b1d..55e77c9 100644 --- a/app/data/forums.yaml +++ b/app/data/forums.yaml @@ -12,83 +12,91 @@ # News -/news: +/actus: name: Actualités prefix: news -/news/projects: +/actus/projets: name: Actualités des projets prefix: projectnews descr: Nouveautés des projets de la communauté. -/news/calc: +/actus/calc: name: Actualités des constructeurs de calculatrices prefix: calcnews descr: Nouveautés CASIO, nouveaux modèles de calculatrices, mises à jour du système ou nouveautés d'autres constructeurs. -/news/events: +/actus/evenements: name: Événements organisés par Planète Casio prefix: eventnews descr: Tous les événements organisés par Planète Casio ou la communauté. -/news/other: +/actus/autres: name: Autres nouveautés prefix: othernews descr: Actualités non catégorisées. # Help -/help: +/aide: name: Aide et questions prefix: help -/help/transfers: +/aide/transferts: name: Questions sur les tranferts prefix: transferhelp descr: Questions sur le transfert de fichiers et l'installation de programmes sur la calculatrice. -/help/calc: +/aide/calc: name: Question sur l'utilisation des calculatrices prefix: calchelp descr: Questions sur l'utilisation des applications de la calculatrice, paramètres, formats de fichiers... -/help/prog: +/aide/prog: name: Questions de programmation prefix: proghelp descr: Questions sur le développement et le debuggage de programmes. -/help/other: +/aide/autres: name: Autres questions prefix: otherhelp descr: Questions non catégorisées. # Projects -/projects: +/projets: name: Forum des projets prefix: projects -/projects/games: +/projets/jeux: name: Projets de jeux prefix: gameprojects descr: Projets de jeux pour calculatrices, tous langages confondus et tous modèles de calculatrices confondus. -/projects/apps: +/projets/applis: name: Projets d'applications, utilitaires, outils pour calculatrice prefix: appprojects descr: Projets d'applications (hors jeux) pour calculatrice, tous langages et modèles confondus. -/projects/tools: +/projets/outils: name: Projets pour d'autres plateformes prefix: toolprojetcs descr: Tous les projets tournant sur ordinateur, téléphone, ou toute autre plateforme que la calculatrice. +# Community + +/communaute: + name: Vie communautaire + prefix: community + descr: Projets pour Planète Casio, remarques sur le fonctionnement du site et + de sa communauté. + # Discussion /discussion: diff --git a/app/routes/account/account.py b/app/routes/account/account.py index 5ec1271..6b085ab 100644 --- a/app/routes/account/account.py +++ b/app/routes/account/account.py @@ -8,7 +8,7 @@ import app.utils.ldap as ldap from config import V5Config -@app.route('/account', methods=['GET', 'POST']) +@app.route('/compte', methods=['GET', 'POST']) @login_required def edit_account(): form = UpdateAccountForm() @@ -34,7 +34,7 @@ def edit_account(): return render('account/account.html', form=form) -@app.route('/account/delete', methods=['GET', 'POST']) +@app.route('/compte/supprimer', methods=['GET', 'POST']) @login_required def delete_account(): del_form = DeleteAccountForm() @@ -51,7 +51,7 @@ def delete_account(): return render('account/delete_account.html', del_form=del_form) -@app.route('/register', methods=['GET', 'POST']) +@app.route('/inscription', methods=['GET', 'POST']) def register(): if current_user.is_authenticated: return redirect(url_for('index')) diff --git a/app/routes/account/login.py b/app/routes/account/login.py index 257a06b..1147200 100644 --- a/app/routes/account/login.py +++ b/app/routes/account/login.py @@ -9,7 +9,7 @@ from app.utils.render import render from config import V5Config -@app.route('/login', methods=['GET', 'POST']) +@app.route('/connexion', methods=['GET', 'POST']) def login(): if current_user.is_authenticated: return redirect(url_for('index')) @@ -58,7 +58,7 @@ def login(): return render('account/login.html', form=form) -@app.route('/logout') +@app.route('/deconnexion') @login_required def logout(): try: diff --git a/app/routes/account/notification.py b/app/routes/account/notification.py index daea674..6ce1dd2 100644 --- a/app/routes/account/notification.py +++ b/app/routes/account/notification.py @@ -12,8 +12,9 @@ def list_notifications(): return render('account/notifications.html', notifications=notifications) -@app.route('/notifications/delete/', methods=['GET']) +@app.route('/notifications/supprimer/', methods=['GET']) @login_required +# TODO: [SECURITY ISSUE] prevent CSRF def delete_notification(id=None): # Try to convert id to int try: diff --git a/app/routes/admin/account.py b/app/routes/admin/account.py index a068f2e..ae32cb6 100644 --- a/app/routes/admin/account.py +++ b/app/routes/admin/account.py @@ -13,7 +13,7 @@ from app import app, db from config import V5Config -@app.route('/admin/account//edit', methods=['GET', 'POST']) +@app.route('/admin/compte//editer', methods=['GET', 'POST']) @priv_required('access-admin-panel', 'edit-account') def adm_edit_account(user_id): user = Member.query.filter_by(id=user_id).first_or_404() @@ -113,7 +113,7 @@ def adm_edit_account(user_id): group_form=group_form, groups_owned=groups_owned) -@app.route('/admin/account//delete', methods=['GET', 'POST']) +@app.route('/admin/compte//supprimer', methods=['GET', 'POST']) @priv_required('access-admin-panel', 'delete-account') def adm_delete_account(user_id): user = Member.query.filter_by(id=user_id).first_or_404() diff --git a/app/routes/admin/groups.py b/app/routes/admin/groups.py index 122e8a8..35a03cb 100644 --- a/app/routes/admin/groups.py +++ b/app/routes/admin/groups.py @@ -9,7 +9,7 @@ import yaml import os -@app.route('/admin/groups', methods=['GET', 'POST']) +@app.route('/admin/groupes', methods=['GET', 'POST']) @priv_required('access-admin-panel') def adm_groups(): users = Member.query.all() diff --git a/app/routes/admin/trophies.py b/app/routes/admin/trophies.py index 94ded1c..869d18e 100644 --- a/app/routes/admin/trophies.py +++ b/app/routes/admin/trophies.py @@ -6,7 +6,7 @@ from app.utils.render import render from app import app, db -@app.route('/admin/trophies', methods=['GET', 'POST']) +@app.route('/admin/trophees', methods=['GET', 'POST']) @priv_required('access-admin-panel', 'edit-trophies') def adm_trophies(): form = TrophyForm() @@ -28,7 +28,7 @@ def adm_trophies(): form=form) -@app.route('/admin/trophies//edit', methods=['GET', 'POST']) +@app.route('/admin/trophees//editer', methods=['GET', 'POST']) @priv_required('access-admin-panel', 'edit-trophies') def adm_edit_trophy(trophy_id): trophy = Trophy.query.filter_by(id=trophy_id).first_or_404() @@ -52,7 +52,7 @@ def adm_edit_trophy(trophy_id): return render('admin/edit_trophy.html', trophy=trophy, form=form) -@app.route('/admin/trophies//delete', methods=['GET', 'POST']) +@app.route('/admin/trophees//supprimer', methods=['GET', 'POST']) @priv_required('access-admin-panel', 'edit-trophies') def adm_delete_trophy(trophy_id): trophy = Trophy.query.filter_by(id=trophy_id).first_or_404() diff --git a/app/routes/forum/index.py b/app/routes/forum/index.py index 6dee2b1..bed0aa2 100644 --- a/app/routes/forum/index.py +++ b/app/routes/forum/index.py @@ -24,10 +24,10 @@ def forum_page(f): # User can write anywhere (current_user.is_authenticated and current_user.priv('write-anywhere')) # Forum is news forum TODO: add good condition to check if it's news - or ("/news" in f.url and current_user.is_authenticated + or ("/actus" in f.url and current_user.is_authenticated and current_user.priv('write-news')) # Forum is not news and is a leaf: - or ("/news" not in f.url and not f.sub_forums)): + or ("/actus" not in f.url and not f.sub_forums)): # First create the thread, then the comment, then the topic th = Thread() diff --git a/app/routes/search.py b/app/routes/search.py index 8b5bf9c..633edb1 100644 --- a/app/routes/search.py +++ b/app/routes/search.py @@ -3,7 +3,7 @@ from app.forms.search import AdvancedSearchForm from app.utils.render import render -@app.route('/search') +@app.route('/rechercher') def search(): form = AdvancedSearchForm() return render('search.html', form=form) diff --git a/app/routes/tools.py b/app/routes/tools.py index 3f24e64..a0fe9c9 100644 --- a/app/routes/tools.py +++ b/app/routes/tools.py @@ -3,6 +3,6 @@ from app import app from app.utils.render import render -@app.route('/tools') +@app.route('/outils') def tools(): return render('tools.html') diff --git a/app/routes/users.py b/app/routes/users.py index 1474252..fa755ad 100644 --- a/app/routes/users.py +++ b/app/routes/users.py @@ -8,14 +8,14 @@ from app.utils.render import render from config import V5Config -@app.route('/user/') +@app.route('/membre/') def user(username): norm = unicode_names.normalize(username) member = Member.query.filter_by(norm=norm).first_or_404() return render('account/user.html', member=member) -@app.route('/user/id/') +@app.route('/membre/id/') def user_by_id(user_id): member = Member.query.filter_by(id=user_id).first_or_404() return redirect(url_for('user', username=member.name)) diff --git a/app/templates/forum/forum.html b/app/templates/forum/forum.html index 734dfe9..d9f1c0b 100644 --- a/app/templates/forum/forum.html +++ b/app/templates/forum/forum.html @@ -42,8 +42,8 @@ {% endif %} {% if (current_user.is_authenticated and current_user.priv('write-anywhere')) - or ("/news" in f.url and current_user.is_authenticated and current_user.priv('write-news')) - or ("/news" not in f.url and not f.sub_forums) %} + or ("/actus" in f.url and current_user.is_authenticated and current_user.priv('write-news')) + or ("/actus" not in f.url and not f.sub_forums) %}

Créer un nouveau sujet