Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c078d7cf16 | ||
|
|
f2c6c05a00 | ||
|
|
c163807c96 | ||
|
|
5cbc81a07a | ||
|
|
22a78d1fef | ||
|
|
6eb02e94ce | ||
|
|
5116f6b60d | ||
|
|
9edfa4f40e | ||
|
|
4b9fd45d92 | ||
|
|
42b07fea6a | ||
|
|
04a526e728 | ||
|
|
e28efeab7e | ||
|
|
bc939a5bdb | ||
|
|
4a052ea707 | ||
|
|
f139fcfefb | ||
|
|
347a81dc66 | ||
|
|
d142fc1eac | ||
|
|
e039ed4fe5 | ||
|
|
44d2248ba5 | ||
|
|
34e7527442 |
@@ -25,8 +25,6 @@ lang/es/tmp/*.n
|
||||
|
||||
www/lang/*.mo
|
||||
|
||||
www/file/*
|
||||
|
||||
www/js/app.js
|
||||
www/js/libs.js
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
1.11.3
|
||||
1.12.0
|
||||
|
||||
@@ -20,7 +20,7 @@ install_dev:
|
||||
#set config file to debug=1
|
||||
#@sed -e 's?debug=.*?debug="1"?g' --in-place config.xml
|
||||
#install haxe dependencies in .haxelib
|
||||
haxelib newrepo
|
||||
haxelib newrepo
|
||||
haxelib -always install cagette.hxml
|
||||
haxelib -always install cagetteJs.hxml
|
||||
#template tools
|
||||
@@ -47,7 +47,7 @@ compile:
|
||||
echo "compile CagettePéi core"; \
|
||||
haxe cagette.hxml; \
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#compile SASS files to CSS
|
||||
css:
|
||||
@@ -64,17 +64,18 @@ frontend:
|
||||
chown www-data:www-data tmp
|
||||
|
||||
#update POT file from source
|
||||
i18n:
|
||||
i18n:
|
||||
haxe potGeneration.hxml
|
||||
|
||||
#compile templates in each language, required for production env.
|
||||
templates:
|
||||
templates:
|
||||
mkdir -p lang/master/tmp
|
||||
haxe cagette.hxml -D i18n_generation
|
||||
@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 lang/fr
|
||||
chown www-data:www-data -R lang
|
||||
|
||||
ctemplates:
|
||||
(cd lang/$(LANG)/tpl; temploc2 -macros macros.mtt -output ../tmp/ *.mtt */*.mtt */*/*.mtt)
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
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>
|
||||
> Fourche du logiciel [Cagette.net](https://github.com/CagetteNet) à partir de la version 0.9.2 Novembre 2018
|
||||
>
|
||||
> 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.
|
||||
> 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
|
||||
> </french>
|
||||
|
||||

|
||||
|
||||
## PREREQUISITE MARIADB
|
||||
|
||||
```bash
|
||||
@@ -32,21 +34,20 @@ cd /var/www
|
||||
git clone https://git.artcode.re/cagetters/cagettepei.git
|
||||
cd cagettepei
|
||||
make install ENV=dev
|
||||
|
||||
vim /etc/apache2/sites-available/cagettepei.conf
|
||||
```
|
||||
|
||||
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ServerName cagettepei
|
||||
DirectoryIndex index.n
|
||||
DocumentRoot /var/www/cagettepei/www/
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/cagettepei/access.log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/cagettepei/debug.log
|
||||
ErrorLogFormat "[%{uc}t] %M"
|
||||
DocumentRoot /var/www/cagettepei/www
|
||||
DirectoryIndex index.n
|
||||
CustomLog ${APACHE_LOG_DIR}/cagettepei/access.log combined
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
|
||||
a2dissite 000-default.conf
|
||||
|
||||
+48
-42
@@ -1,5 +1,5 @@
|
||||
::use 'base.mtt'::
|
||||
|
||||
|
||||
::if getParam('__redirect')!=null::
|
||||
<!-- need to login to go to this page-->
|
||||
<script>$(function(){
|
||||
@@ -16,11 +16,11 @@
|
||||
<h1>::_("Cagette.net")::</h1>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 accountBlock">
|
||||
::if user != null::
|
||||
|
||||
<div class="col-md-4 accountBlock">
|
||||
::if user != null::
|
||||
<div class="dropdown pull-right text-right userName" style="margin-top:16px;">
|
||||
|
||||
|
||||
<a class="" style="margin-right:16px;" href="/user/choose?show=1">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
|
||||
</a>
|
||||
@@ -29,46 +29,46 @@
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
::user.getName()::
|
||||
::if user.firstName2!=null::
|
||||
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
||||
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
||||
::end::
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::else::
|
||||
<div class="pull-right text-right">
|
||||
<a href="/user/login" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
||||
<a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
|
||||
<a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::if user != null && noGroup!=true::
|
||||
|
||||
<nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="cagette-navbar">
|
||||
|
||||
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
|
||||
<li ::attr class if(category=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
|
||||
<li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li id="member" ::attr class if(category=="members") 'active' ::>
|
||||
<a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
|
||||
@@ -81,13 +81,13 @@
|
||||
<li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
|
||||
<a href="/admin" >::_("Admin")::</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</nav>
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
<!-- Notifications -->
|
||||
<div class="row">
|
||||
<div id="content" class="col-md-12">
|
||||
@@ -98,22 +98,22 @@
|
||||
::else::
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
::end::
|
||||
|
||||
::raw notification.text::
|
||||
|
||||
::raw notification.text::
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- extra notification block for plugins -->
|
||||
::if extraNotifBlock!=null::
|
||||
::raw extraNotifBlock::
|
||||
::end::
|
||||
|
||||
|
||||
<div class="row">
|
||||
::raw __content__::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--<div class="row">
|
||||
<div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
@@ -124,7 +124,7 @@
|
||||
</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>
|
||||
@@ -133,12 +133,12 @@
|
||||
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>
|
||||
<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>
|
||||
@@ -146,18 +146,24 @@
|
||||
<li>
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<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 class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<!-- SQL LOG -->
|
||||
<table class="sqlLog table table-bordered" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
@@ -172,5 +178,5 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
+1
-51
@@ -1,51 +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.11.3"
|
||||
}
|
||||
{"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"}
|
||||
|
||||
+1
-1
@@ -203,7 +203,7 @@ class App extends sugoi.BaseApp {
|
||||
out.set("percent", "Pourcentage");
|
||||
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");
|
||||
out.set("unitType", "Unité");
|
||||
out.set("qt", "Quantité");
|
||||
out.set("Unit", "Pièce");
|
||||
|
||||
+22
-29
@@ -1,46 +1,39 @@
|
||||
package form;
|
||||
|
||||
import sugoi.form.elements.RadioGroup;
|
||||
import Common;
|
||||
|
||||
class ColorRadioGroup extends RadioGroup
|
||||
{
|
||||
|
||||
public function new(name:String, label:String,selected:String)
|
||||
{
|
||||
class ColorRadioGroup extends RadioGroup {
|
||||
public function new(name:String, label:String, selected:String) {
|
||||
var data = [];
|
||||
var i = 0;
|
||||
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++;
|
||||
}
|
||||
|
||||
|
||||
super(name, label, data, selected, "1", false, true);
|
||||
}
|
||||
|
||||
override public function render():String
|
||||
{
|
||||
|
||||
override public function render():String {
|
||||
var s = "";
|
||||
var n = parentForm.name + "_" +name;
|
||||
|
||||
var n = parentForm.name + "_" + name;
|
||||
|
||||
var c = 0;
|
||||
if (data != null)
|
||||
{
|
||||
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>";
|
||||
|
||||
s += "<label for=\"" + n+c + "\" class='checkbox' style='display: inline-block;'>"+radio + " "+img+" </label>";
|
||||
|
||||
if (data != null) {
|
||||
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>";
|
||||
|
||||
s += "<label for=\"" + n + c + "\" class='checkbox' style='display: inline-block;'>" + radio + " " + img + " </label>";
|
||||
|
||||
c++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+22
-20
@@ -13,26 +13,28 @@ class BaseView implements Dynamic {
|
||||
|
||||
public function init() {
|
||||
var app = App.current;
|
||||
|
||||
|
||||
this.user = app.user;
|
||||
this.session = app.session;
|
||||
this.LANG = App.config.LANG;
|
||||
this.HOST = App.config.HOST;
|
||||
this.DATA_HOST = App.config.DATA_HOST;
|
||||
this.DEBUG = App.config.DEBUG;
|
||||
this.BANDEAU_REGION = App.config.BANDEAU_REGION;
|
||||
this.NAME = App.config.NAME;
|
||||
this.isAdmin = app.user != null && app.user.isAdmin();
|
||||
|
||||
|
||||
//Access basic functions in views
|
||||
this.Std = Std;
|
||||
this.Math = Math;
|
||||
|
||||
|
||||
if ( App.config.SQL_LOG ) {
|
||||
this.Config = App.config;
|
||||
|
||||
|
||||
if ( App.config.SQL_LOG ) {
|
||||
this.sqlLog = untyped app.cnx == null ? null : app.cnx.log;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getMessage() {
|
||||
var session = App.current.session;
|
||||
if ( session == null ) return null;
|
||||
@@ -41,14 +43,14 @@ class BaseView implements Dynamic {
|
||||
if( n == null ) return null;
|
||||
return { text : n.text, error : n.error, next : session.messages.length > 0 };
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getMessages() {
|
||||
var out = [];
|
||||
var session = App.current.session;
|
||||
if ( session == null ) return [];
|
||||
if (session.messages == null) return [];
|
||||
|
||||
|
||||
for ( m in session.messages) {
|
||||
if( m == null ) continue;
|
||||
out.push( { text : m.text, error : m.error } );
|
||||
@@ -56,12 +58,12 @@ class BaseView implements Dynamic {
|
||||
session.messages = [];
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function urlEncode(str:String) {
|
||||
return StringTools.urlEncode(str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* To safely print a string in javascript
|
||||
* @param str
|
||||
@@ -70,13 +72,13 @@ class BaseView implements Dynamic {
|
||||
if (str == null) return "";
|
||||
return str.split("\\").join("\\\\").split("'").join("\\'").split("\r").join("\\r").split("\n").join("\\n");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a value from the Variable table
|
||||
* @param file
|
||||
*/
|
||||
function getVariable( file : String ) {
|
||||
|
||||
|
||||
var v = _vcache.get(file);
|
||||
if( v != null )
|
||||
return v;
|
||||
@@ -91,7 +93,7 @@ class BaseView implements Dynamic {
|
||||
function getParam( p : String ) {
|
||||
return App.current.params.get(p);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the url of a db.File record
|
||||
*/
|
||||
@@ -99,7 +101,7 @@ class BaseView implements Dynamic {
|
||||
if (file == null) throw "file is null";
|
||||
return "/file/"+sugoi.db.File.makeSign(file.id)+"."+file.getExtension();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Try to print an HTML table from any kind of object
|
||||
* @param data
|
||||
@@ -107,14 +109,14 @@ class BaseView implements Dynamic {
|
||||
function table(data:Dynamic) {
|
||||
return new sugoi.helper.Table("table table-bordered").toString(data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* newline to <br/>
|
||||
* @param txt
|
||||
*/
|
||||
public function nl2br(txt:String):String {
|
||||
public function nl2br(txt:String):String {
|
||||
if (txt == null) return "";
|
||||
return txt.split("\n").join("<br/>");
|
||||
return txt.split("\n").join("<br/>");
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +127,7 @@ class BaseView implements Dynamic {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//same function with params ( templo doesnt manage optionnal params in functions )
|
||||
public function __(str:String, params:Dynamic){
|
||||
return sugoi.i18n.Locale.texts.get(str, params);
|
||||
@@ -136,7 +138,7 @@ class BaseView implements Dynamic {
|
||||
neko.Web.logMessage("_call "+str);
|
||||
return StringTools.rtrim( str.split("||")[0] );
|
||||
}
|
||||
|
||||
|
||||
//same function with params ( templo doesnt manage optionnal params in functions )
|
||||
public function __(str:String, params:Dynamic):String {
|
||||
neko.Web.logMessage("_call "+str);
|
||||
@@ -159,5 +161,5 @@ class BaseView implements Dynamic {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ class Config {
|
||||
public var TPL:String;
|
||||
public var TPL_TMP:String;
|
||||
public var DEBUG:Bool;
|
||||
public var BANDEAU_REGION:Bool;
|
||||
public var HOST:String;
|
||||
public var NAME:String;
|
||||
public var KEY:String;
|
||||
@@ -28,6 +29,7 @@ class Config {
|
||||
TPL = PATH + "lang/" + LANG + "/tpl/";
|
||||
TPL_TMP = PATH + "lang/" + LANG + "/tmp/";
|
||||
DEBUG = get("debug", "0") == "1";
|
||||
BANDEAU_REGION = get("bandeau_region", "0") == "1";
|
||||
HOST = get("host");
|
||||
KEY = get("key");
|
||||
DATA_HOST = get("dataHost", "data." + HOST);
|
||||
|
||||
@@ -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 |
Reference in New Issue
Block a user