Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc5e1cc4d2 | ||
|
|
5db8f5f1f3 | ||
|
|
0c45dffc1e | ||
|
|
5bc2ad1517 | ||
|
|
a6eed18ac1 | ||
|
|
67bbb02a2f | ||
|
|
8fe3153c10 | ||
|
|
de0f10425b | ||
|
|
4bd7c3d174 | ||
|
|
ad1ae04624 | ||
|
|
dad6babe97 | ||
|
|
240c63d9fd | ||
|
|
d6675758ff | ||
|
|
61ce852dbc | ||
|
|
789a4eb7ec | ||
|
|
2b0f3557fc |
@@ -28,6 +28,8 @@ www/lang/*.mo
|
||||
www/js/app.js
|
||||
www/js/libs.js
|
||||
|
||||
www/file/*
|
||||
|
||||
www/css/.sass-cache
|
||||
www/css/*.css
|
||||
!www/css/bootstrap.min.css
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.13.1
|
||||
1.14.2
|
||||
|
||||
@@ -123,60 +123,8 @@
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="row" id="footer">
|
||||
|
||||
<div class="col-md-2" >
|
||||
<img width="120" style="border: white 5px solid;" src="/img/logo-mini.jpg" alt="::_("Cagette.net")::" title="Logo ::_("Cagette.net")::"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7" style="padding-top:1em">
|
||||
Cagette Péi est un logiciel libre qui favorise les circuits courts.<br/>
|
||||
Il a été adapté pour les besoins des AMAPs sur le marché réunionnais.<br/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" >
|
||||
::_("HELP")::
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="subfooter">
|
||||
<p>
|
||||
version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a>
|
||||
</p>
|
||||
::if BANDEAU_REGION::
|
||||
<img src='/img/bandeau_region.png' alt='bandeau Région Réunion' width='250'></img>
|
||||
::use 'footer.mtt'::
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- SQL LOG -->
|
||||
<table class="sqlLog table table-bordered" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<div class="row" id="footer">
|
||||
|
||||
<div class="col-md-2" >
|
||||
<img width="120" style="border: white 5px solid;" src="/img/logo-mini.jpg" alt="::_("Cagette.net")::" title="Logo ::_("Cagette.net")::"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-7" style="padding-top:1em">
|
||||
Cagette Péi est un logiciel libre qui favorise les circuits courts.<br/>
|
||||
Il a été adapté pour les besoins des AMAPs sur le marché réunionnais.<br/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" >
|
||||
::_("HELP")::
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://wiki.cagette.net/doku.php" target="_blank">::_("Documentation")::</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="subfooter">
|
||||
<p><a href="/mentions">MENTIONS LÉGALES</a></p>
|
||||
<p>
|
||||
version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a>
|
||||
</p>
|
||||
::if BANDEAU_REGION::
|
||||
<img src='/img/bandeau_region_france_relance.png' alt='bandeau Région Réunion' width='640'></img>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- SQL LOG -->
|
||||
<table class="sqlLog table table-bordered" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,6 +1,6 @@
|
||||
::use 'base.mtt'::
|
||||
|
||||
|
||||
<div class="row header" style="margin-top:10px;">
|
||||
<div class="col-md-8 col-md-offset-2" style="margin-top:12px;">
|
||||
|
||||
<!-- Notifications -->
|
||||
@@ -185,11 +185,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div id="footer">
|
||||
<a href="::_("http://www.cagette.net")::">::_("Cagette.net, the free software of food direct-selling")::</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
::use 'footer.mtt'::
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
@@ -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::
|
||||
+1
-5
@@ -1,5 +1 @@
|
||||
<<<<<<< HEAD
|
||||
{"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.12.0"}
|
||||
=======
|
||||
{"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.13.0"}
|
||||
>>>>>>> 6a6f479 (tagged as 1.13.0)
|
||||
{"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.2"}
|
||||
|
||||
+39
-44
@@ -1,4 +1,5 @@
|
||||
package controller;
|
||||
|
||||
import db.Distribution;
|
||||
import db.UserContract;
|
||||
import haxe.Json;
|
||||
@@ -9,12 +10,10 @@ import Common;
|
||||
import tools.ArrayTool;
|
||||
|
||||
class Main extends Controller {
|
||||
|
||||
|
||||
/**
|
||||
* public pages
|
||||
*/
|
||||
function doGroup(d:haxe.web.Dispatch){
|
||||
function doGroup(d:haxe.web.Dispatch) {
|
||||
d.dispatch(new controller.Group());
|
||||
}
|
||||
|
||||
@@ -26,50 +25,52 @@ class Main extends Controller {
|
||||
view.category = 'home';
|
||||
|
||||
var group = app.getCurrentGroup();
|
||||
if ( app.user!=null && group == null) {
|
||||
if (app.user != null && group == null) {
|
||||
throw Redirect("/user/choose");
|
||||
}else if (app.user == null && (group==null || group.regOption!=db.Amap.RegOption.Open) ) {
|
||||
//throw Redirect("/user/login");
|
||||
} 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");
|
||||
}
|
||||
|
||||
view.amap = group;
|
||||
|
||||
//contract with open orders
|
||||
// contract with open orders
|
||||
var openContracts = Lambda.filter(group.getActiveContracts(), function(c) return c.isUserOrderAvailable());
|
||||
view.openContracts = openContracts;
|
||||
|
||||
//register to become "distributor"
|
||||
view.contractsWithDistributors = app.user==null ? [] : Lambda.filter(app.user.amap.getActiveContracts(), function(c) return c.distributorNum > 0);
|
||||
// register to become "distributor"
|
||||
view.contractsWithDistributors = app.user == null ? [] : Lambda.filter(app.user.amap.getActiveContracts(), function(c) return c.distributorNum > 0);
|
||||
|
||||
//freshly created group
|
||||
// freshly created group
|
||||
view.newGroup = app.session.data.newGroup == true;
|
||||
|
||||
var n = Date.now();
|
||||
var now = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0);
|
||||
var in3Month = DateTools.delta(now, 1000.0 * 60 * 60 * 24 * 30 * 3);
|
||||
|
||||
var distribs = MultiDistrib.getFromTimeRange(group,now,in3Month);
|
||||
var distribs = MultiDistrib.getFromTimeRange(group, now, in3Month);
|
||||
view.distribs = distribs;
|
||||
|
||||
//view functions
|
||||
// view functions
|
||||
view.getWhosTurn = function(orderId:Int, distrib:Distribution) {
|
||||
return db.UserContract.manager.get(orderId, false).getWhosTurn(distrib);
|
||||
}
|
||||
|
||||
//event for additionnal blocks on home page
|
||||
// event for additionnal blocks on home page
|
||||
var e = Blocks([], "home");
|
||||
app.event(e);
|
||||
view.blocks = e.getParameters()[0];
|
||||
|
||||
//message if phone is required
|
||||
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);
|
||||
// message if phone is required
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//login and stuff
|
||||
// login and stuff
|
||||
function doUser(d:Dispatch) {
|
||||
d.dispatch(new controller.User());
|
||||
}
|
||||
@@ -82,26 +83,19 @@ class Main extends Controller {
|
||||
* JSON REST API Entry point
|
||||
*/
|
||||
function doApi(d:Dispatch) {
|
||||
|
||||
try {
|
||||
|
||||
d.dispatch(new controller.Api());
|
||||
|
||||
}catch (e:tink.core.Error){
|
||||
|
||||
//manage tink Errors (service errors)
|
||||
} catch (e:tink.core.Error) {
|
||||
// manage tink Errors (service errors)
|
||||
sugoi.Web.setReturnCode(e.code);
|
||||
Sys.print(Json.stringify( {error:{code:e.code,message:e.message,stack:e.exceptionStack}} ));
|
||||
|
||||
}catch (e:Dynamic){
|
||||
|
||||
//manage other errors
|
||||
Sys.print(Json.stringify({error: {code: e.code, message: e.message, stack: e.exceptionStack}}));
|
||||
} catch (e:Dynamic) {
|
||||
// manage other errors
|
||||
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);
|
||||
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")
|
||||
@@ -114,15 +108,13 @@ class Main extends Controller {
|
||||
d.dispatch(new controller.Install());
|
||||
}
|
||||
|
||||
|
||||
function doP(d:Dispatch) {
|
||||
|
||||
/*
|
||||
* Invalid array access
|
||||
Stack (ADMIN|DEBUG)
|
||||
Stack (ADMIN|DEBUG)
|
||||
|
||||
Called from C:\HaxeToolkit\haxe\std/haxe/web/Dispatch.hx line 463
|
||||
Called from controller/Main.hx line 117
|
||||
Called from C:\HaxeToolkit\haxe\std/haxe/web/Dispatch.hx line 463
|
||||
Called from controller/Main.hx line 117
|
||||
*
|
||||
var plugin = d.parts.shift();
|
||||
for ( p in App.plugins) {
|
||||
@@ -140,7 +132,6 @@ Called from controller/Main.hx line 117
|
||||
d.dispatch(new controller.Plugin());
|
||||
}
|
||||
|
||||
|
||||
@logged
|
||||
function doMember(d:Dispatch) {
|
||||
view.category = 'members';
|
||||
@@ -149,10 +140,17 @@ Called from controller/Main.hx line 117
|
||||
|
||||
@logged
|
||||
function doStats(d:Dispatch) {
|
||||
App.log('doStats called');
|
||||
view.category = 'stats';
|
||||
d.dispatch(new Stats());
|
||||
}
|
||||
|
||||
function doMentions(d:Dispatch) {
|
||||
App.log('do Mentions called');
|
||||
view.category = 'mentions';
|
||||
d.dispatch(new MentionsLegales());
|
||||
}
|
||||
|
||||
@logged
|
||||
function doAccount(d:Dispatch) {
|
||||
view.category = 'account';
|
||||
@@ -238,8 +236,7 @@ Called from controller/Main.hx line 117
|
||||
}
|
||||
|
||||
@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();
|
||||
v.date = date;
|
||||
v.place = place;
|
||||
@@ -254,9 +251,7 @@ Called from controller/Main.hx line 117
|
||||
|
||||
@admin
|
||||
function doDb(d:Dispatch) {
|
||||
d.parts = []; //disable haxe.web.Dispatch
|
||||
d.parts = []; // disable haxe.web.Dispatch
|
||||
sys.db.Admin.handler();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
package controller;
|
||||
|
||||
class MentionsLegales extends Controller {
|
||||
public function new() {
|
||||
super();
|
||||
}
|
||||
|
||||
@tpl("mentions_legales/default.mtt")
|
||||
function doDefault() {}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 212 KiB |
Reference in New Issue
Block a user