Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a6f479d5c | ||
|
|
36d5e27bfb |
@@ -28,8 +28,6 @@ www/lang/*.mo
|
|||||||
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
@@ -1 +1 @@
|
|||||||
1.14.2
|
1.13.0
|
||||||
|
|||||||
+79
-33
@@ -1,5 +1,5 @@
|
|||||||
::use 'base.mtt'::
|
::use 'base.mtt'::
|
||||||
|
|
||||||
::if getParam('__redirect')!=null::
|
::if getParam('__redirect')!=null::
|
||||||
<!-- need to login to go to this page-->
|
<!-- need to login to go to this page-->
|
||||||
<script>$(function(){
|
<script>$(function(){
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
<h1>::_("Cagette.net")::</h1>
|
<h1>::_("Cagette.net")::</h1>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 accountBlock">
|
<div class="col-md-4 accountBlock">
|
||||||
::if user != null::
|
::if user != null::
|
||||||
<div class="dropdown pull-right text-right userName" style="margin-top:16px;">
|
<div class="dropdown pull-right text-right userName" style="margin-top:16px;">
|
||||||
|
|
||||||
<a class="" style="margin-right:16px;" href="/user/choose?show=1">
|
<a class="" style="margin-right:16px;" href="/user/choose?show=1">
|
||||||
<span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
|
<span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
|
||||||
</a>
|
</a>
|
||||||
@@ -29,46 +29,46 @@
|
|||||||
<span class="glyphicon glyphicon-user"></span>
|
<span class="glyphicon glyphicon-user"></span>
|
||||||
::user.getName()::
|
::user.getName()::
|
||||||
::if user.firstName2!=null::
|
::if user.firstName2!=null::
|
||||||
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
||||||
::end::
|
::end::
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
|
<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>
|
<li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
::else::
|
::else::
|
||||||
<div class="pull-right text-right">
|
<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 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>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
::if user != null && noGroup!=true::
|
::if user != null && noGroup!=true::
|
||||||
|
|
||||||
<nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
|
<nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
|
<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>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="cagette-navbar">
|
<div class="collapse navbar-collapse" id="cagette-navbar">
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-left">
|
<ul class="nav navbar-nav navbar-left">
|
||||||
<li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
|
<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=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
|
||||||
<li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
|
<li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li id="member" ::attr class if(category=="members") 'active' ::>
|
<li id="member" ::attr class if(category=="members") 'active' ::>
|
||||||
<a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
|
<a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
|
||||||
@@ -81,13 +81,13 @@
|
|||||||
<li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
|
<li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
|
||||||
<a href="/admin" >::_("Admin")::</a></li>
|
<a href="/admin" >::_("Admin")::</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div id="content" class="col-md-12">
|
<div id="content" class="col-md-12">
|
||||||
@@ -98,22 +98,22 @@
|
|||||||
::else::
|
::else::
|
||||||
<span class="glyphicon glyphicon-ok"></span>
|
<span class="glyphicon glyphicon-ok"></span>
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
::raw notification.text::
|
::raw notification.text::
|
||||||
</div>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- extra notification block for plugins -->
|
<!-- extra notification block for plugins -->
|
||||||
::if extraNotifBlock!=null::
|
::if extraNotifBlock!=null::
|
||||||
::raw extraNotifBlock::
|
::raw extraNotifBlock::
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
::raw __content__::
|
::raw __content__::
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<div class="row">
|
<!--<div class="row">
|
||||||
<div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
|
<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>
|
<span class="glyphicon glyphicon-cog"></span>
|
||||||
@@ -123,8 +123,54 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>-->
|
||||||
|
|
||||||
::use 'footer.mtt'::
|
<div class="row" id="footer">
|
||||||
::end::
|
|
||||||
|
<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">
|
||||||
|
<span>version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a></span>
|
||||||
|
</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::
|
::end::
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
<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'::
|
::use 'base.mtt'::
|
||||||
|
|
||||||
<div class="row header" style="margin-top:10px;">
|
|
||||||
<div class="col-md-8 col-md-offset-2" style="margin-top:12px;">
|
<div class="col-md-8 col-md-offset-2" style="margin-top:12px;">
|
||||||
|
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
@@ -13,19 +13,19 @@
|
|||||||
::else::
|
::else::
|
||||||
<span class="glyphicon glyphicon-ok"></span>
|
<span class="glyphicon glyphicon-ok"></span>
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
::raw notification.text::
|
::raw notification.text::
|
||||||
</div>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="article">
|
<div class="article">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
::if group._image!=null::
|
::if group._image!=null::
|
||||||
|
|
||||||
::if group.extUrl!=null && group.extUrl!=""::
|
::if group.extUrl!=null && group.extUrl!=""::
|
||||||
@@ -36,21 +36,21 @@
|
|||||||
|
|
||||||
::end::
|
::end::
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
::if isMember::
|
::if isMember::
|
||||||
<!-- connected and member of the group-->
|
<!-- connected and member of the group-->
|
||||||
<a href="/user/choose?amap=::group.id::" class="btn btn-primary">
|
<a href="/user/choose?amap=::group.id::" class="btn btn-primary">
|
||||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||||
::_("Go to my account")::
|
::_("Go to my account")::
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
::else::
|
::else::
|
||||||
|
|
||||||
<h4>Inscriptions :</h4>
|
<h4>Inscriptions :</h4>
|
||||||
::switch group._regOption::
|
::switch group._regOption::
|
||||||
|
|
||||||
::case::
|
::case::
|
||||||
<p>
|
<p>
|
||||||
::_("Contact the person in charge in order to subscribe to this group and get to know membership conditions.")::
|
::_("Contact the person in charge in order to subscribe to this group and get to know membership conditions.")::
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
::_("Subscription on waiting list")::
|
::_("Subscription on waiting list")::
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
::case::
|
::case::
|
||||||
<p>
|
<p>
|
||||||
<a href="/group/register/::group.id::" class="btn btn-primary">
|
<a href="/group/register/::group.id::" class="btn btn-primary">
|
||||||
@@ -84,12 +84,12 @@
|
|||||||
::_("This group is full and do not accept any more subscription.")::
|
::_("This group is full and do not accept any more subscription.")::
|
||||||
</p>
|
</p>
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
::if user==null::
|
::if user==null::
|
||||||
<hr />
|
<hr />
|
||||||
<h4>::_("Already member? Log in:")::</h4>
|
<h4>::_("Already member? Log in:")::</h4>
|
||||||
@@ -97,26 +97,26 @@
|
|||||||
<a href="#" onclick="_.loginBox('/group/::group.id::')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
<a href="#" onclick="_.loginBox('/group/::group.id::')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
||||||
</div>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
::group.name::
|
::group.name::
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
::if group.txtIntro!=null && group.txtIntro!=""::
|
::if group.txtIntro!=null && group.txtIntro!=""::
|
||||||
::raw nl2br(group.txtIntro)::
|
::raw nl2br(group.txtIntro)::
|
||||||
::end::
|
::end::
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<h3> ::_("Next deliveries")::</h3>
|
<h3> ::_("Next deliveries")::</h3>
|
||||||
|
|
||||||
::foreach d group.getDeliveries(4)::
|
::foreach d group.getDeliveries(4)::
|
||||||
|
|
||||||
<div style="display:inline-block;margin-right:8px;vertical-align:top;">
|
<div style="display:inline-block;margin-right:8px;vertical-align:top;">
|
||||||
::set s = getDate( d.date )::
|
::set s = getDate( d.date )::
|
||||||
::if isToday(d.date)::
|
::if isToday(d.date)::
|
||||||
@@ -125,15 +125,15 @@
|
|||||||
$$date(::s.dow::,::s.d::,::s.m::,::s.y::,::d._place::)
|
$$date(::s.dow::,::s.d::,::s.m::,::s.y::,::d._place::)
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
::end::
|
::end::
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<p ::cond group._contact!=null::>
|
<p ::cond group._contact!=null::>
|
||||||
<h3>::_("Contact")::</h3>
|
<h3>::_("Contact")::</h3>
|
||||||
|
|
||||||
<i class="icon-user"></i>
|
<i class="icon-user"></i>
|
||||||
<b>::group._contact.firstName:: ::group._contact.lastName::</b><br/>
|
<b>::group._contact.firstName:: ::group._contact.lastName::</b><br/>
|
||||||
<span ::cond group._contact.email!=null::>
|
<span ::cond group._contact.email!=null::>
|
||||||
@@ -144,49 +144,52 @@
|
|||||||
<span class="glyphicon glyphicon-phone-alt"></span> ::group._contact.phone::<br/>
|
<span class="glyphicon glyphicon-phone-alt"></span> ::group._contact.phone::<br/>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<h3>::_("Suppliers and products")::</h3>
|
<h3>::_("Suppliers and products")::</h3>
|
||||||
<p>
|
<p>
|
||||||
::_("Non-complete extract of available products:")::
|
::_("Non-complete extract of available products:")::
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
::foreach c contracts::
|
::foreach c contracts::
|
||||||
<p>
|
<p>
|
||||||
<b>::c.name::</b><br/>
|
<b>::c.name::</b><br/>
|
||||||
::c._vendor.name::, $$nullSafe(::c._vendor.zipCode::) $$nullSafe(::c._vendor.city::)
|
::c._vendor.name::, $$nullSafe(::c._vendor.zipCode::) $$nullSafe(::c._vendor.city::)
|
||||||
<div class="row">
|
<div class="row">
|
||||||
::foreach p c.getProductsPreview(6)::
|
::foreach p c.getProductsPreview(6)::
|
||||||
<div class="col-md-2" data-toggle="tooltip" data-placement="top" title="::p.name::" >
|
<div class="col-md-2" data-toggle="tooltip" data-placement="top" title="::p.name::" >
|
||||||
<div style="background-image:url('::p.getImage()::')" class="productImg"/>
|
<div style="background-image:url('::p.getImage()::')" class="productImg"/>
|
||||||
</div>
|
</div>
|
||||||
::end::
|
::end::
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="col-md-12">
|
||||||
::use 'footer.mtt'::
|
<div id="footer">
|
||||||
::end::
|
<a href="::_("http://www.cagette.net")::">::_("Cagette.net, the free software of food direct-selling")::</a>.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
::end::
|
::end::
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
::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
-1
@@ -1 +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.2"}
|
{"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"}
|
||||||
|
|||||||
+57
-52
@@ -1,5 +1,4 @@
|
|||||||
package controller;
|
package controller;
|
||||||
|
|
||||||
import db.Distribution;
|
import db.Distribution;
|
||||||
import db.UserContract;
|
import db.UserContract;
|
||||||
import haxe.Json;
|
import haxe.Json;
|
||||||
@@ -10,67 +9,67 @@ import Common;
|
|||||||
import tools.ArrayTool;
|
import tools.ArrayTool;
|
||||||
|
|
||||||
class Main extends Controller {
|
class Main extends Controller {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* public pages
|
* public pages
|
||||||
*/
|
*/
|
||||||
function doGroup(d:haxe.web.Dispatch) {
|
function doGroup(d:haxe.web.Dispatch){
|
||||||
d.dispatch(new controller.Group());
|
d.dispatch(new controller.Group());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Group homepage
|
Group homepage
|
||||||
**/
|
**/
|
||||||
@tpl("home.mtt")
|
@tpl("home.mtt")
|
||||||
function doDefault() {
|
function doDefault() {
|
||||||
view.category = 'home';
|
view.category = 'home';
|
||||||
|
|
||||||
var group = app.getCurrentGroup();
|
var group = app.getCurrentGroup();
|
||||||
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("/user/login");
|
||||||
throw Redirect("/group/1");
|
throw Redirect("/group/1");
|
||||||
else
|
|
||||||
throw Redirect("/user/login");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
view.amap = group;
|
view.amap = group;
|
||||||
|
|
||||||
// contract with open orders
|
//contract with open orders
|
||||||
var openContracts = Lambda.filter(group.getActiveContracts(), function(c) return c.isUserOrderAvailable());
|
var openContracts = Lambda.filter(group.getActiveContracts(), function(c) return c.isUserOrderAvailable());
|
||||||
view.openContracts = openContracts;
|
view.openContracts = openContracts;
|
||||||
|
|
||||||
// register to become "distributor"
|
//register to become "distributor"
|
||||||
view.contractsWithDistributors = app.user == null ? [] : Lambda.filter(app.user.amap.getActiveContracts(), function(c) return c.distributorNum > 0);
|
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;
|
view.newGroup = app.session.data.newGroup == true;
|
||||||
|
|
||||||
var n = Date.now();
|
var n = Date.now();
|
||||||
var now = new Date(n.getFullYear(), n.getMonth(), n.getDate(), 0, 0, 0);
|
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 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.distribs = distribs;
|
||||||
|
|
||||||
// view functions
|
//view functions
|
||||||
view.getWhosTurn = function(orderId:Int, distrib:Distribution) {
|
view.getWhosTurn = function(orderId:Int, distrib:Distribution) {
|
||||||
return db.UserContract.manager.get(orderId, false).getWhosTurn(distrib);
|
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");
|
var e = Blocks([], "home");
|
||||||
app.event(e);
|
app.event(e);
|
||||||
view.blocks = e.getParameters()[0];
|
view.blocks = e.getParameters()[0];
|
||||||
|
|
||||||
// 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>."),
|
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);
|
||||||
true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// login and stuff
|
//login and stuff
|
||||||
function doUser(d:Dispatch) {
|
function doUser(d:Dispatch) {
|
||||||
d.dispatch(new controller.User());
|
d.dispatch(new controller.User());
|
||||||
}
|
}
|
||||||
@@ -83,19 +82,26 @@ 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) {
|
|
||||||
// manage tink Errors (service errors)
|
}catch (e:tink.core.Error){
|
||||||
|
|
||||||
|
//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) {
|
|
||||||
// manage other errors
|
}catch (e:Dynamic){
|
||||||
|
|
||||||
|
//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")
|
||||||
@@ -108,30 +114,33 @@ 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)
|
||||||
|
|
||||||
Called from C:\HaxeToolkit\haxe\std/haxe/web/Dispatch.hx line 463
|
Called from C:\HaxeToolkit\haxe\std/haxe/web/Dispatch.hx line 463
|
||||||
Called from controller/Main.hx line 117
|
Called from controller/Main.hx line 117
|
||||||
*
|
*
|
||||||
var plugin = d.parts.shift();
|
var plugin = d.parts.shift();
|
||||||
for ( p in App.plugins) {
|
for ( p in App.plugins) {
|
||||||
var n = Type.getClassName(Type.getClass(p)).toLowerCase();
|
var n = Type.getClassName(Type.getClass(p)).toLowerCase();
|
||||||
n = n.split(".").pop();
|
n = n.split(".").pop();
|
||||||
if (plugin == n) {
|
if (plugin == n) {
|
||||||
d.dispatch( p.getController() );
|
d.dispatch( p.getController() );
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
throw Error("/","Plugin '"+plugin+"' introuvable.");
|
throw Error("/","Plugin '"+plugin+"' introuvable.");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
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';
|
||||||
@@ -140,17 +149,10 @@ class Main extends Controller {
|
|||||||
|
|
||||||
@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';
|
||||||
@@ -236,7 +238,8 @@ class Main extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@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;
|
||||||
@@ -251,7 +254,9 @@ class Main extends Controller {
|
|||||||
|
|
||||||
@admin
|
@admin
|
||||||
function doDb(d:Dispatch) {
|
function doDb(d:Dispatch) {
|
||||||
d.parts = []; // disable haxe.web.Dispatch
|
d.parts = []; //disable haxe.web.Dispatch
|
||||||
sys.db.Admin.handler();
|
sys.db.Admin.handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
package controller;
|
|
||||||
|
|
||||||
class MentionsLegales extends Controller {
|
|
||||||
public function new() {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
@tpl("mentions_legales/default.mtt")
|
|
||||||
function doDefault() {}
|
|
||||||
}
|
|
||||||
+29
-22
@@ -1,39 +1,46 @@
|
|||||||
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) {
|
{
|
||||||
var radio = "<input type=\"radio\" name=\"" + n + "\" id=\"" + n + c + "\" value=\"" + row.label + "\" "
|
for (row in data)
|
||||||
+ (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))
|
var radio = "<input type=\"radio\" name=\""+n+"\" id=\""+n+c+"\" value=\"" + row.label + "\" " + (row.label == Std.string(value) ? "checked":"") +" />\n";
|
||||||
+ ";'></div>";
|
|
||||||
|
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>";
|
|
||||||
|
s += "<label for=\"" + n+c + "\" class='checkbox' style='display: inline-block;'>"+radio + " "+img+" </label>";
|
||||||
|
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+20
-22
@@ -13,28 +13,26 @@ class BaseView implements Dynamic {
|
|||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
var app = App.current;
|
var app = App.current;
|
||||||
|
|
||||||
this.user = app.user;
|
this.user = app.user;
|
||||||
this.session = app.session;
|
this.session = app.session;
|
||||||
this.LANG = App.config.LANG;
|
this.LANG = App.config.LANG;
|
||||||
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 ) {
|
|
||||||
this.sqlLog = untyped app.cnx == null ? null : app.cnx.log;
|
this.sqlLog = untyped app.cnx == null ? null : app.cnx.log;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMessage() {
|
function getMessage() {
|
||||||
var session = App.current.session;
|
var session = App.current.session;
|
||||||
if ( session == null ) return null;
|
if ( session == null ) return null;
|
||||||
@@ -43,14 +41,14 @@ class BaseView implements Dynamic {
|
|||||||
if( n == null ) return null;
|
if( n == null ) return null;
|
||||||
return { text : n.text, error : n.error, next : session.messages.length > 0 };
|
return { text : n.text, error : n.error, next : session.messages.length > 0 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getMessages() {
|
function getMessages() {
|
||||||
var out = [];
|
var out = [];
|
||||||
var session = App.current.session;
|
var session = App.current.session;
|
||||||
if ( session == null ) return [];
|
if ( session == null ) return [];
|
||||||
if (session.messages == null) return [];
|
if (session.messages == null) return [];
|
||||||
|
|
||||||
for ( m in session.messages) {
|
for ( m in session.messages) {
|
||||||
if( m == null ) continue;
|
if( m == null ) continue;
|
||||||
out.push( { text : m.text, error : m.error } );
|
out.push( { text : m.text, error : m.error } );
|
||||||
@@ -58,12 +56,12 @@ class BaseView implements Dynamic {
|
|||||||
session.messages = [];
|
session.messages = [];
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function urlEncode(str:String) {
|
function urlEncode(str:String) {
|
||||||
return StringTools.urlEncode(str);
|
return StringTools.urlEncode(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To safely print a string in javascript
|
* To safely print a string in javascript
|
||||||
* @param str
|
* @param str
|
||||||
@@ -72,13 +70,13 @@ class BaseView implements Dynamic {
|
|||||||
if (str == null) return "";
|
if (str == null) return "";
|
||||||
return str.split("\\").join("\\\\").split("'").join("\\'").split("\r").join("\\r").split("\n").join("\\n");
|
return str.split("\\").join("\\\\").split("'").join("\\'").split("\r").join("\\r").split("\n").join("\\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a value from the Variable table
|
* Get a value from the Variable table
|
||||||
* @param file
|
* @param file
|
||||||
*/
|
*/
|
||||||
function getVariable( file : String ) {
|
function getVariable( file : String ) {
|
||||||
|
|
||||||
var v = _vcache.get(file);
|
var v = _vcache.get(file);
|
||||||
if( v != null )
|
if( v != null )
|
||||||
return v;
|
return v;
|
||||||
@@ -93,7 +91,7 @@ class BaseView implements Dynamic {
|
|||||||
function getParam( p : String ) {
|
function getParam( p : String ) {
|
||||||
return App.current.params.get(p);
|
return App.current.params.get(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the url of a db.File record
|
* Return the url of a db.File record
|
||||||
*/
|
*/
|
||||||
@@ -101,7 +99,7 @@ class BaseView implements Dynamic {
|
|||||||
if (file == null) throw "file is null";
|
if (file == null) throw "file is null";
|
||||||
return "/file/"+sugoi.db.File.makeSign(file.id)+"."+file.getExtension();
|
return "/file/"+sugoi.db.File.makeSign(file.id)+"."+file.getExtension();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to print an HTML table from any kind of object
|
* Try to print an HTML table from any kind of object
|
||||||
* @param data
|
* @param data
|
||||||
@@ -109,14 +107,14 @@ class BaseView implements Dynamic {
|
|||||||
function table(data:Dynamic) {
|
function table(data:Dynamic) {
|
||||||
return new sugoi.helper.Table("table table-bordered").toString(data);
|
return new sugoi.helper.Table("table table-bordered").toString(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* newline to <br/>
|
* newline to <br/>
|
||||||
* @param txt
|
* @param txt
|
||||||
*/
|
*/
|
||||||
public function nl2br(txt:String):String {
|
public function nl2br(txt:String):String {
|
||||||
if (txt == null) return "";
|
if (txt == null) return "";
|
||||||
return txt.split("\n").join("<br/>");
|
return txt.split("\n").join("<br/>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -127,7 +125,7 @@ class BaseView implements Dynamic {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//same function with params ( templo doesnt manage optionnal params in functions )
|
//same function with params ( templo doesnt manage optionnal params in functions )
|
||||||
public function __(str:String, params:Dynamic){
|
public function __(str:String, params:Dynamic){
|
||||||
return sugoi.i18n.Locale.texts.get(str, params);
|
return sugoi.i18n.Locale.texts.get(str, params);
|
||||||
@@ -138,7 +136,7 @@ class BaseView implements Dynamic {
|
|||||||
neko.Web.logMessage("_call "+str);
|
neko.Web.logMessage("_call "+str);
|
||||||
return StringTools.rtrim( str.split("||")[0] );
|
return StringTools.rtrim( str.split("||")[0] );
|
||||||
}
|
}
|
||||||
|
|
||||||
//same function with params ( templo doesnt manage optionnal params in functions )
|
//same function with params ( templo doesnt manage optionnal params in functions )
|
||||||
public function __(str:String, params:Dynamic):String {
|
public function __(str:String, params:Dynamic):String {
|
||||||
neko.Web.logMessage("_call "+str);
|
neko.Web.logMessage("_call "+str);
|
||||||
@@ -161,5 +159,5 @@ class BaseView implements Dynamic {
|
|||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ 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;
|
||||||
@@ -29,7 +28,6 @@ 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);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 153 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 212 KiB |
Reference in New Issue
Block a user