Compare commits

...
27 Commits
Author SHA1 Message Date
pvincent 789a4eb7ec tagged as 1.13.2 2022-11-21 22:32:06 +04:00
pvincent 2b0f3557fc no more www/file in git 2022-11-21 22:31:58 +04:00
pvincent 10688b9892 tagged as 1.13.1 2022-11-21 22:22:36 +04:00
pvincent c86eafa130 ok 2022-11-21 22:22:27 +04:00
pvincent b2b7e88e3c by default /group/1 2022-11-21 22:21:56 +04:00
pvincent c078d7cf16 tagged as 1.12.0 2022-11-16 09:11:06 +04:00
pvincent f2c6c05a00 bandeau_region via config.xml 2022-11-16 09:09:36 +04:00
pvincent c163807c96 tagged as 1.11.9 2022-08-24 10:04:36 +04:00
pvincent 5cbc81a07a file/.htaccess required 2022-08-24 10:04:25 +04:00
pvincent 22a78d1fef tagged as 1.11.8 2022-08-23 22:05:07 +04:00
pvincent 6eb02e94ce makefile 2022-08-23 22:04:57 +04:00
pvincent 5116f6b60d tagged as 1.11.7 2022-08-23 21:56:32 +04:00
pvincent 9edfa4f40e package.json 2022-08-23 21:54:01 +04:00
pvincent 4b9fd45d92 tagged as 1.11.6 2022-08-23 21:49:31 +04:00
pvincent 42b07fea6a lang owend by www-data 2022-08-23 21:49:19 +04:00
pvincent 04a526e728 tagged as 1.11.5 2022-08-22 10:59:40 +04:00
pvincent e28efeab7e re-enable config.xml 2022-08-22 10:59:30 +04:00
pvincent bc939a5bdb tagged as 1.11.4 2022-08-22 10:48:54 +04:00
pvincent 4a052ea707 no more config.xml first time 2022-08-22 10:48:41 +04:00
pvincent f139fcfefb Update 'README.md' 2021-12-03 20:18:54 +04:00
pvincent 347a81dc66 Update 'README.md' 2021-08-31 21:34:26 +04:00
pvincent d142fc1eac Update 'README.md' 2021-08-31 21:22:59 +04:00
pvincent e039ed4fe5 better readme 2021-08-31 20:04:52 +04:00
pvincent 44d2248ba5 screenshot 2021-08-31 19:54:35 +04:00
pvincent 34e7527442 screenshot 2021-08-31 19:15:28 +04:00
pvincent ecffe9bb4e tagged as 1.11.3 2021-08-30 23:22:46 +04:00
pvincent 6e7382633f css footer margin 0 2021-08-30 23:22:19 +04:00
18 changed files with 903 additions and 988 deletions
+2 -2
View File
@@ -25,11 +25,11 @@ lang/es/tmp/*.n
www/lang/*.mo www/lang/*.mo
www/file/*
www/js/app.js www/js/app.js
www/js/libs.js www/js/libs.js
www/file/*
www/css/.sass-cache www/css/.sass-cache
www/css/*.css www/css/*.css
!www/css/bootstrap.min.css !www/css/bootstrap.min.css
+1 -1
View File
@@ -1 +1 @@
1.11.2 1.13.2
+2 -1
View File
@@ -73,8 +73,9 @@ templates:
haxe cagette.hxml -D i18n_generation haxe cagette.hxml -D i18n_generation
@make LANG=fr ctemplates @make LANG=fr ctemplates
msgfmt www/lang/texts_fr.po -o www/lang/texts_fr.mo msgfmt www/lang/texts_fr.po -o www/lang/texts_fr.mo
chown www-data:www-data -R www chown www-data:www-data -R www
chown www-data:www-data -R lang/fr chown www-data:www-data -R lang
ctemplates: ctemplates:
(cd lang/$(LANG)/tpl; temploc2 -macros macros.mtt -output ../tmp/ *.mtt */*.mtt */*/*.mtt) (cd lang/$(LANG)/tpl; temploc2 -macros macros.mtt -output ../tmp/ *.mtt */*.mtt */*/*.mtt)
+12 -11
View File
@@ -1,13 +1,15 @@
CAGETTE PEI CAGETTE PEI
=========== ===========
Cagette Péi est un logiciel libre qui favorise les circuits courts.
Il a été adapté pour les besoins des AMAPs sur le marché réunionnais.
> <french> > <french>
> Fourche du logiciel [Cagette.net](https://github.com/CagetteNet) à partir de la version 0.9.2 Novembre 2018 > Fourche du logiciel [Cagette.net](https://github.com/CagetteNet) à partir de la version 0.9.2 Novembre 2018. Certaines portions de code n'étant plus disponibles en téléchargement à partir de cette date, le logiciel a été repris, adapté puis réactualisé. Pour plus d'information, contact@artcode.re
>
> Certaines portions du code source de Cagette.net n'étant plus disponibles en téléchargement à partir de cette date,
> j'ai repris sur la base d'un existant pour adapter au marché local réunionnais et leurs AMAPéi.
> </french> > </french>
![Screenshot](www/img/screenshot.png)
## PREREQUISITE MARIADB ## PREREQUISITE MARIADB
```bash ```bash
@@ -32,21 +34,20 @@ cd /var/www
git clone https://git.artcode.re/cagetters/cagettepei.git git clone https://git.artcode.re/cagetters/cagettepei.git
cd cagettepei cd cagettepei
make install ENV=dev make install ENV=dev
vim /etc/apache2/sites-available/cagettepei.conf vim /etc/apache2/sites-available/cagettepei.conf
``` ```
``` ```
<VirtualHost *:80> <VirtualHost *:80>
ServerName cagettepei DocumentRoot /var/www/cagettepei/www
DirectoryIndex index.n DirectoryIndex index.n
DocumentRoot /var/www/cagettepei/www/ CustomLog ${APACHE_LOG_DIR}/cagettepei/access.log combined
CustomLog ${APACHE_LOG_DIR}/cagettepei/access.log combined
ErrorLog ${APACHE_LOG_DIR}/cagettepei/debug.log
ErrorLogFormat "[%{uc}t] %M"
</VirtualHost> </VirtualHost>
``` ```
```bash ```bash
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
a2dissite 000-default.conf a2dissite 000-default.conf
+7 -1
View File
@@ -153,7 +153,13 @@
</div> </div>
<div class="row" id="subfooter"> <div class="row" id="subfooter">
<span>version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a></span> <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>
::end::
</div> </div>
<div class="row"> <div class="row">
+5 -51
View File
@@ -1,51 +1,5 @@
{ <<<<<<< HEAD
"name": "cagette-pei", {"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"}
"description": "le logiciel libre du circuit court", =======
"license": "AGPL-3.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"}
"dependencies": { >>>>>>> 6a6f479 (tagged as 1.13.0)
"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.11.2"
}
+2 -2
View File
@@ -203,7 +203,7 @@ class App extends sugoi.BaseApp {
out.set("percent", "Pourcentage"); out.set("percent", "Pourcentage");
out.set("pinned", "Mets en avant les produits"); out.set("pinned", "Mets en avant les produits");
out.set("CagetteNetwork", "Me lister dans l'annuaire des groupes Cagette.net"); out.set("CagetteNetwork", "Me lister dans l'annuaire des groupes");
out.set("unitType", "Unité"); out.set("unitType", "Unité");
out.set("qt", "Quantité"); out.set("qt", "Quantité");
out.set("Unit", "Pièce"); out.set("Unit", "Pièce");
@@ -280,7 +280,7 @@ class App extends sugoi.BaseApp {
var e = new sugoi.mail.Mail(); var e = new sugoi.mail.Mail();
e.setSubject(subject); e.setSubject(subject);
e.setRecipient(to); e.setRecipient(to);
e.setSender(App.config.get("default_email"), t._("Cagette.net")); e.setSender(App.config.get("default_email"), t._("CagettePéi"));
var html = App.current.processTemplate("mail/message.mtt", {text: html, group: group}); var html = App.current.processTemplate("mail/message.mtt", {text: html, group: group});
e.setHtmlBody(html); e.setHtmlBody(html);
App.sendMail(e); App.sendMail(e);
+1 -1
View File
@@ -54,7 +54,7 @@ class Group extends controller.Controller
form.addElement(new StringInput("userLastName", t._("Your lastname") ,"",true)); form.addElement(new StringInput("userLastName", t._("Your lastname") ,"",true));
form.addElement(new StringInput("userEmail", t._("Your e-mail"), "", true)); form.addElement(new StringInput("userEmail", t._("Your e-mail"), "", true));
} }
form.addElement(new sugoi.form.elements.TextArea("msg", t._("Leave a message"))); form.addElement(new sugoi.form.elements.TextArea("msg", t._("Leave a message"),"",false));
if (form.isValid()){ if (form.isValid()){
try{ try{
+2 -1
View File
@@ -29,7 +29,8 @@ 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) ) {
throw Redirect("/user/login"); //throw Redirect("/user/login");
throw Redirect("/group/1");
} }
view.amap = group; view.amap = group;
+14 -21
View File
@@ -1,38 +1,34 @@
package form; package form;
import sugoi.form.elements.RadioGroup; import sugoi.form.elements.RadioGroup;
import Common; import Common;
class ColorRadioGroup extends RadioGroup class ColorRadioGroup extends RadioGroup {
{ public function new(name:String, label:String, selected:String) {
public function new(name:String, label:String,selected:String)
{
var data = []; var data = [];
var i = 0; var i = 0;
for (c in db.CategoryGroup.COLORS) { for (c in db.CategoryGroup.COLORS) {
data.push( { value:Std.string(c), label:Std.string(i) } ); data.push({value: Std.string(c), label: Std.string(i)});
i++; i++;
} }
super(name, label, data, selected, "1", false, true); super(name, label, data, selected, "1", false, true);
} }
override public function render():String override public function render():String {
{
var s = ""; var s = "";
var n = parentForm.name + "_" +name; var n = parentForm.name + "_" + name;
var c = 0; var c = 0;
if (data != null) if (data != null) {
{ for (row in data) {
for (row in data) var radio = "<input type=\"radio\" name=\"" + n + "\" id=\"" + n + c + "\" value=\"" + row.label + "\" "
{ + (row.label == Std.string(value) ? "checked" : "") + " />\n";
var img = "<div style='margin-right:16px;width:32px;height:32px;background:"
+ App.current.view.intToHex(Std.parseInt(row.value))
+ ";'></div>";
var radio = "<input type=\"radio\" name=\""+n+"\" id=\""+n+c+"\" value=\"" + row.label + "\" " + (row.label == Std.string(value) ? "checked":"") +" />\n"; s += "<label for=\"" + n + c + "\" class='checkbox' style='display: inline-block;'>" + radio + " " + img + " </label>";
var img = "<div style='margin-right:16px;width:32px;height:32px;background:"+App.current.view.intToHex(Std.parseInt(row.value))+";'></div>";
s += "<label for=\"" + n+c + "\" class='checkbox' style='display: inline-block;'>"+radio + " "+img+" </label>";
c++; c++;
} }
@@ -40,7 +36,4 @@ class ColorRadioGroup extends RadioGroup
return s; return s;
} }
} }
+2
View File
@@ -13,6 +13,8 @@ class WaitingListService{
var w = new db.WaitingList(); var w = new db.WaitingList();
w.user = user; w.user = user;
w.group = group; w.group = group;
if (message == null ) message = "";
//message = "souscription = " + message;
w.message = message; w.message = message;
w.insert(); w.insert();
+2
View File
@@ -20,12 +20,14 @@ class BaseView implements Dynamic {
this.HOST = App.config.HOST; this.HOST = App.config.HOST;
this.DATA_HOST = App.config.DATA_HOST; this.DATA_HOST = App.config.DATA_HOST;
this.DEBUG = App.config.DEBUG; this.DEBUG = App.config.DEBUG;
this.BANDEAU_REGION = App.config.BANDEAU_REGION;
this.NAME = App.config.NAME; this.NAME = App.config.NAME;
this.isAdmin = app.user != null && app.user.isAdmin(); this.isAdmin = app.user != null && app.user.isAdmin();
//Access basic functions in views //Access basic functions in views
this.Std = Std; this.Std = Std;
this.Math = Math; this.Math = Math;
this.Config = App.config;
if ( App.config.SQL_LOG ) { if ( App.config.SQL_LOG ) {
+2
View File
@@ -11,6 +11,7 @@ class Config {
public var TPL:String; public var TPL:String;
public var TPL_TMP:String; public var TPL_TMP:String;
public var DEBUG:Bool; public var DEBUG:Bool;
public var BANDEAU_REGION:Bool;
public var HOST:String; public var HOST:String;
public var NAME:String; public var NAME:String;
public var KEY:String; public var KEY:String;
@@ -28,6 +29,7 @@ class Config {
TPL = PATH + "lang/" + LANG + "/tpl/"; TPL = PATH + "lang/" + LANG + "/tpl/";
TPL_TMP = PATH + "lang/" + LANG + "/tmp/"; TPL_TMP = PATH + "lang/" + LANG + "/tmp/";
DEBUG = get("debug", "0") == "1"; DEBUG = get("debug", "0") == "1";
BANDEAU_REGION = get("bandeau_region", "0") == "1";
HOST = get("host"); HOST = get("host");
KEY = get("key"); KEY = get("key");
DATA_HOST = get("dataHost", "data." + HOST); DATA_HOST = get("dataHost", "data." + HOST);
+395 -444
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
ErrorDocument 404 /index.n
Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

+1
View File
@@ -14,6 +14,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n" "Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Poedit 2.0.6\n" "X-Generator: Poedit 2.0.6\n"
#: src/payment/Cash.hx:294 #: src/payment/Cash.hx:294
msgid "Cash" msgid "Cash"
msgstr "Espèces / Carte Bancaire" msgstr "Espèces / Carte Bancaire"