add multi-language, fix bug, clean code, delete obsolete files

This commit is contained in:
David Drapeau 2019-10-08 10:25:42 +02:00
parent ebf4ad4924
commit 21ce4addca
7 changed files with 47 additions and 12372 deletions

View File

@ -1,2 +1,27 @@
# globsi-admin
How to install Wefra for Odoo 11+
1. clone this repository
2. set the right parameters in the files above
=> modules/InterfaceConfig.php
=> modules/InterfacePostgreSQL.php
=> scripts/config.js
3. execute the SQL files
=> __private/install/install-v1.0.0.sql
=> __private/install/install.php
4. then set the right values in the SQL table erp_config to connect wefra to your odoo instance. And if needed you can change the settings of Wefra in core_config
Multi-languages:
Activate the languages you want in the SQL table core_lang. If the flag for the language does not display, you can copy paste from images/flags/world to images/flags/default and rename it with the language code that you can find in SQL table core_lang
Multi-currencies:
If you want to create a e-commerce frontend and use multi-currencies, activate the wanted currencies in SQL table core_currency
Naming convention:
FOR SQL:
(install|update)-(v1.N1.N2).sql where N1 is a middle evolution (a new feature) and N2 is a fix/imp
Organisation:
A module includes: the SQL file based

View File

@ -1,10 +0,0 @@
Options +FollowSymlinks
RewriteEngine on
#RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !index.php
#RewriteRule ^install$ custom/__private/install/install.php [L]
RewriteRule ^([a-z\-]+)-([0-9\.]+)$ index.php?page=$1&reference=$2 [L]
RewriteRule ^([a-z\-]+)$ index.php?page=$1 [L]

View File

@ -43,14 +43,14 @@ $lang_code = (isset($_SESSION['user']['lang_code']))?$_SESSION['user']['lang_cod
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="<?php echo $oConf->getURLRoot('themes/materialize/css/materialize.css'); ?>" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="<?php echo $oConf->getURLRoot('lib/materialize/materialize-1.1.0.min.css'); ?>" type="text/css" rel="stylesheet" media="screen,projection"/>
<link href="<?php echo $oConf->getURLRoot('themes/materialize/css/style.css'); ?>" type="text/css" rel="stylesheet" media="screen,projection"/>
<!--JQUERY and addons-->
<script src="<?php echo $oConf->getURLRoot('lib/jquery/jquery-3.2.1.js'); ?>"></script>
<script src="<?php echo $oConf->getURLRoot('lib/jquery/jquery-ui.js'); ?>"></script>
<script src="<?php echo $oConf->getURLRoot('themes/materialize/js/materialize.js'); ?>"></script>
<script src="<?php echo $oConf->getURLRoot('lib/materialize/materialize-1.1.0.min.js'); ?>"></script>
<script src="<?php echo $oConf->getURLRoot('themes/materialize/js/init.js'); ?>"></script>
<!--D3JS v5-->
@ -120,15 +120,29 @@ if(isset($display_cookie_message)){
} //ENDOF foreach($_SESSION['features'] as $k=>$v){
$li_list = '';
foreach($_SESSION['activeLanguages'] as $language){
if($language['code'] == $_SESSION['config']['default_lang_code']){
$li_active_language = '<img src="'.$oConf->getURLRoot("images/flags/default/".$language['code']).'.png" style="width:25px;">';
} else {
$li_list .= '<li><a href="'.$oConf->getURLRoot("scripts/changeLang.php?lang=".$language['code']).'"><img src="'.$oConf->getURLRoot("images/flags/default/".$language['code']).'.png" style="width:25px;"></a></li>';
}
}
?>
<!--DISPLAYS FLAGS FOR LANGUAGES-->
<ul id="dropdown1" class="dropdown-content">
<?php echo $li_list; ?>
</ul>
<li><a class="dropdown-trigger" href="#!" data-target="dropdown1"><?php echo $li_active_language; ?><i class="material-icons right">arrow_drop_down</i></a></li>
</ul>
<ul id="nav-mobile" class="sidenav">
<!--<li><a href="#">Navbar Link</a></li>-->
<!--<li><a href="#">Navbar Link</a></li>-->
<?php
foreach($_SESSION['features'] as $k=>$v){
// condition for guest features
if ($_SESSION['features'][$k]->is_menu_display == true && $_SESSION['features'][$k]->is_menu_backend != true && $_SESSION['features'][$k]->is_user_feature == false){
if ($_SESSION['features'][$k]->is_menu_display == true){
// condition for logout
if ($_SESSION['features'][$k]->code == 'logout'){
echo '
@ -218,9 +232,7 @@ if(isset($display_cookie_message)){
<!-- Scripts-->
<script type="text/javascript">
$(document).ready(function(){
$(function(){
$('select').formSelect();
});
$('select').formSelect();
});
</script>

View File

@ -3,6 +3,7 @@
$('.sidenav').sidenav();
$('.parallax').parallax();
$(".dropdown-trigger").dropdown();
}); // end of document ready
})(jQuery); // end of jQuery name space

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,16 +1,6 @@
<div id="index-banner" class="parallax-container">
<div class="section no-pad-bot">
<div class="container">
<br><br>
<h1 class="header center teal-text text-lighten-2">Code & Make Cash!</h1>
<div class="row center">
<h5 class="header col s12 light">We are seeking for software developers all around the world.</h5>
</div>
<br><br>
</div>
</div>
<div class="parallax"><img src="<?php echo $oConf->getURLRoot('images/geneva-xl-01-banner.jpg'); ?>" alt="Unsplashed background img 2"></div>
<div class="section no-pad-bot"></div>
<div class="parallax"><img src="<?php echo $oConf->getURLRoot('images/jmdn-group-business-data.jpg'); ?>" alt="Code && Make Cash!" style="max-width: 100px;"></div>
</div>
<?php