Browse Source

mentions légales

master
pvincent 2 years ago
parent
commit
5db8f5f1f3
  1. 3
      lang/master/tpl/footer.mtt
  2. 62
      lang/master/tpl/mentions_legales/default.mtt
  3. 52
      package.json
  4. 35
      src/controller/Main.hx
  5. 10
      src/controller/MentionsLegales.hx

3
lang/master/tpl/footer.mtt

@ -28,11 +28,12 @@
</div> </div>
<div class="row" id="subfooter"> <div class="row" id="subfooter">
<p><a href="/mentions">MENTIONS LÉGALES</a></p>
<p> <p>
version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a> version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a>
</p> </p>
::if BANDEAU_REGION:: ::if BANDEAU_REGION::
<img src='/img/bandeau_region_france_relance.png' alt='bandeau Région Réunion' width='250'></img>
<img src='/img/bandeau_region_france_relance.png' alt='bandeau Région Réunion' width='640'></img>
::end:: ::end::
</div> </div>

62
lang/master/tpl/mentions_legales/default.mtt

@ -0,0 +1,62 @@
::use 'design.mtt'::
<div class="col-md-9">
<div class="article">
<h4>Mentions Légales</h4>
<table class="table table-bordered table-condensed">
<tbody><tr>
<th>Champ</th>
<th>Valeur</th>
</tr>
<tr>
<td>Adresse de courrier électronique</td>
<td>contact@mangue-et-solidaire.re</td>
</tr>
<tr>
<td>Numéro Siren</td>
<td>879178739</td>
</tr>
<tr>
<td>Numéro Siret</td>
<td>87917873900022</td>
</tr>
<tr>
<td>Code NAF / APE</td>
<td>4711B</td>
</tr>
<tr>
<td>Forme juridique et capital</td>
<td>Association Loi 1901</td>
</tr>
<tr>
<td>Responsable éditorial</td>
<td>Yann Jacob</td>
</tr>
<tr>
<td>Hébergeur</td>
<td><a href="www.artcode.re">Artcode</a></td>
</tr>
</tbody>
</table>
</div>
</div>
::end::

52
package.json

@ -1 +1,51 @@
{"name": "cagette-pei", "description": "le logiciel libre du circuit court", "license": "AGPL-3.0", "dependencies": {"bootstrap": "^3.3.4", "eonasdan-bootstrap-datetimepicker": "^4.7.14", "geolib": "^2.0.24", "haxe-modular": "^0.7.0", "jquery": "^2.2.4", "leaflet": "^1.3.1", "react": "^15.6.1", "react-bootstrap-typeahead": "1.4.2", "react-datetime": "^2.9.0", "react-dom": "^15.6.1", "react-leaflet": "^1.8.0", "react-places-autocomplete": "^6.0.2", "react-router": "^4.2.0", "react-router-dom": "^4.2.2"}, "devDependencies": {"babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babelify": "^7.3.0", "browserify": "^14.4.0", "cross-env": "^5.1.1", "node-sass": "^4.5.3", "npm-run-all": "^4.1.2", "uglify-js": "^3.1.9", "watchify": "^3.9.0"}, "scripts": {"build": "npm-run-all --parallel build:*", "build:js": "haxe cagetteJs.hxml", "build:sass": "node-sass www/css -o www/css", "watch:sass": "npm run build:sass -- --watch", "build2": "babel src -d lib", "libs:dev": "browserify js/libs/libs.js -o www/js/libs.js -d", "libs:prod": "cross-env NODE_ENV=production browserify js/libs/libs.js | uglifyjs -c -m > www/js/libs.js", "test": "haxe testsJS.hxml && node js/test/tests.js", "prepush": "npm test"}, "repository": {"type": "git", "url": "git+https://github.com/bablukid/cagette.git"}, "bugs": {"url": "https://github.com/bablukid/cagette/issues"}, "version": "1.14.1"}
{
"name": "cagette-pei",
"description": "le logiciel libre du circuit court",
"license": "AGPL-3.0",
"dependencies": {
"bootstrap": "^3.3.4",
"eonasdan-bootstrap-datetimepicker": "^4.7.14",
"geolib": "^2.0.24",
"haxe-modular": "^0.7.0",
"jquery": "^2.2.4",
"leaflet": "^1.3.1",
"react": "^15.6.1",
"react-bootstrap-typeahead": "1.4.2",
"react-datetime": "^2.9.0",
"react-dom": "^15.6.1",
"react-leaflet": "^1.8.0",
"react-places-autocomplete": "^6.0.2",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2"
},
"devDependencies": {
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babelify": "^7.3.0",
"browserify": "^14.4.0",
"cross-env": "^5.1.1",
"node-sass": "^4.5.3",
"npm-run-all": "^4.1.2",
"uglify-js": "^3.1.9",
"watchify": "^3.9.0"
},
"scripts": {
"build": "npm-run-all --parallel build:*",
"build:js": "haxe cagetteJs.hxml",
"build:sass": "node-sass www/css -o www/css",
"watch:sass": "npm run build:sass -- --watch",
"build2": "babel src -d lib",
"libs:dev": "browserify js/libs/libs.js -o www/js/libs.js -d",
"libs:prod": "cross-env NODE_ENV=production browserify js/libs/libs.js | uglifyjs -c -m > www/js/libs.js",
"test": "haxe testsJS.hxml && node js/test/tests.js",
"prepush": "npm test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bablukid/cagette.git"
},
"bugs": {
"url": "https://github.com/bablukid/cagette/issues"
},
"version": "1.14.1"
}

35
src/controller/Main.hx

@ -1,4 +1,5 @@
package controller; package controller;
import db.Distribution; import db.Distribution;
import db.UserContract; import db.UserContract;
import haxe.Json; import haxe.Json;
@ -9,8 +10,6 @@ import Common;
import tools.ArrayTool; import tools.ArrayTool;
class Main extends Controller { class Main extends Controller {
/** /**
* public pages * public pages
*/ */
@ -29,10 +28,10 @@ class Main extends Controller {
if (app.user != null && group == null) { if (app.user != null && group == null) {
throw Redirect("/user/choose"); throw Redirect("/user/choose");
} else if (app.user == null && (group == null || group.regOption != db.Amap.RegOption.Open)) { } else if (app.user == null && (group == null || group.regOption != db.Amap.RegOption.Open)) {
if (db.Amap.manager.get(1, false) != null) throw Redirect("/group/1");
else throw Redirect("/user/login");
if (db.Amap.manager.get(1, false) != null)
throw Redirect("/group/1");
else
throw Redirect("/user/login");
} }
view.amap = group; view.amap = group;
@ -66,9 +65,9 @@ class Main extends Controller {
// message if phone is required // message if phone is required
if (app.user != null && app.user.amap.flags.has(db.Amap.AmapFlags.PhoneRequired) && app.user.phone == null) { if (app.user != null && app.user.amap.flags.has(db.Amap.AmapFlags.PhoneRequired) && app.user.phone == null) {
app.session.addMessage(t._("Members of this group should provide a phone number. <a href='/account/edit'>Please click here to update your account</a>."),true);
app.session.addMessage(t._("Members of this group should provide a phone number. <a href='/account/edit'>Please click here to update your account</a>."),
true);
} }
} }
// login and stuff // login and stuff
@ -84,26 +83,19 @@ class Main extends Controller {
* JSON REST API Entry point * JSON REST API Entry point
*/ */
function doApi(d:Dispatch) { function doApi(d:Dispatch) {
try { try {
d.dispatch(new controller.Api()); d.dispatch(new controller.Api());
} catch (e:tink.core.Error) { } catch (e:tink.core.Error) {
// manage tink Errors (service errors) // manage tink Errors (service errors)
sugoi.Web.setReturnCode(e.code); sugoi.Web.setReturnCode(e.code);
Sys.print(Json.stringify({error: {code: e.code, message: e.message, stack: e.exceptionStack}})); Sys.print(Json.stringify({error: {code: e.code, message: e.message, stack: e.exceptionStack}}));
} catch (e:Dynamic) { } catch (e:Dynamic) {
// manage other errors // manage other errors
sugoi.Web.setReturnCode(500); sugoi.Web.setReturnCode(500);
var stack = if (App.config.DEBUG) haxe.CallStack.toString(haxe.CallStack.exceptionStack()) else ""; var stack = if (App.config.DEBUG) haxe.CallStack.toString(haxe.CallStack.exceptionStack()) else "";
App.current.logError(e, stack); App.current.logError(e, stack);
Sys.print(Json.stringify({error: {code: 500, message: Std.string(e), stack: stack}})); Sys.print(Json.stringify({error: {code: 500, message: Std.string(e), stack: stack}}));
} }
} }
@tpl("cssDemo.mtt") @tpl("cssDemo.mtt")
@ -116,9 +108,7 @@ class Main extends Controller {
d.dispatch(new controller.Install()); d.dispatch(new controller.Install());
} }
function doP(d:Dispatch) { function doP(d:Dispatch) {
/* /*
* Invalid array access * Invalid array access
Stack (ADMIN|DEBUG) Stack (ADMIN|DEBUG)
@ -142,7 +132,6 @@ Called from controller/Main.hx line 117
d.dispatch(new controller.Plugin()); d.dispatch(new controller.Plugin());
} }
@logged @logged
function doMember(d:Dispatch) { function doMember(d:Dispatch) {
view.category = 'members'; view.category = 'members';
@ -151,10 +140,17 @@ Called from controller/Main.hx line 117
@logged @logged
function doStats(d:Dispatch) { function doStats(d:Dispatch) {
App.log('doStats called');
view.category = 'stats'; view.category = 'stats';
d.dispatch(new Stats()); d.dispatch(new Stats());
} }
function doMentions(d:Dispatch) {
App.log('do Mentions called');
view.category = 'mentions';
d.dispatch(new MentionsLegales());
}
@logged @logged
function doAccount(d:Dispatch) { function doAccount(d:Dispatch) {
view.category = 'account'; view.category = 'account';
@ -241,7 +237,6 @@ Called from controller/Main.hx line 117
@logged @logged
function doValidate(date:Date, place:db.Place, user:db.User, d:haxe.web.Dispatch) { function doValidate(date:Date, place:db.Place, user:db.User, d:haxe.web.Dispatch) {
var v = new controller.Validate(); var v = new controller.Validate();
v.date = date; v.date = date;
v.place = place; v.place = place;
@ -259,6 +254,4 @@ Called from controller/Main.hx line 117
d.parts = []; // disable haxe.web.Dispatch d.parts = []; // disable haxe.web.Dispatch
sys.db.Admin.handler(); sys.db.Admin.handler();
} }
} }

10
src/controller/MentionsLegales.hx

@ -0,0 +1,10 @@
package controller;
class MentionsLegales extends Controller {
public function new() {
super();
}
@tpl("mentions_legales/default.mtt")
function doDefault() {}
}
Loading…
Cancel
Save