Commit ac1b9c06 authored by ramiandrison gova's avatar ramiandrison gova
Browse files

Merge branch 'master' into pompe

parents e1874055 c664870e
.env.php
cookie.txt
<?php
use PixelHumain\PixelHumain\components\ThemeHelper;
/**
* CO Tools Module
*
......@@ -7,7 +10,7 @@
*
*/
class InteropModule extends CWebModule {
class InteropModule extends \yii\base\Module {
private $_assetsUrl;
......@@ -16,6 +19,7 @@ class InteropModule extends CWebModule {
private $_keywords = "interop, interoperability, module,opensource,CO,communecter";
private $_description = "Un module pour interopérer avec divers base de données";
private $_pageTitle = "interop";
public $controllerNamespace = 'PixelHumain\PixelHumain\modules\interop\controllers';
public function getVersion(){return $this->_version;}
public function getVersionDate(){return $this->_versionDate;}
......@@ -63,7 +67,7 @@ class InteropModule extends CWebModule {
//Apply theme
$themeName = $this->getTheme();
Yii::app()->theme = $themeName;
ThemeHelper::setWebsiteTheme($themeName);
if(@Yii::app()->request->cookies['lang'] && !empty(Yii::app()->request->cookies['lang']->value))
Yii::app()->language = (string)Yii::app()->request->cookies['lang'];
......@@ -78,20 +82,6 @@ class InteropModule extends CWebModule {
"assets" => array(),
"controllers" => array(),
));
$this->setImport(array(
'citizenToolKit.models.*',
'eco.models.*',
'dda.models.*',
'news.models.*',
'costum.models.*',
Yii::app()->params["module"]["parent"].'.models.*',
Yii::app()->params["module"]["parent"].'.components.*',
$this->id.'.models.*',
$this->id.'.components.*',
$this->id.'.messages.*',
$this->id.'./.env'
));
}
......
......@@ -10,35 +10,9 @@
/*Style for welcome page of module interop*/
.central-section {
display: grid;
margin-bottom: 5px;
grid-gap: 2%;
grid-template-columns: 12fr;
}
#header-interop {
grid-row: 1;
display: grid;
margin-bottom: 7px;
grid-gap: 5px;
grid-template-columns: 3fr 1fr 3fr 1fr 3fr 1fr 3fr;
}
#header-interop>h4 {
grid-column: 2/ 7;
grid-row: 1;
}
#button-bar {
grid-column: 2/ 11;
grid-row: 2;
display: inline-flex;
justify-content: space-around;
}
#search-bar-wiki {
grid-column: 8 / 12;
grid-row: 1;
}
.error-message {
......@@ -50,40 +24,55 @@
}
/*Style for menu-left of module interop*/
#header-interop>h4 {
margin: auto;
}
#header-interop {
margin-bottom: 5px;
padding-bottom: 5px;
}
#button-bar>.nav-item>a {
border-radius: 6px;
border-left: 3px solid #b63348;
border-top: 3px solid #b63348;
margin-top: 3px;
}
#search-bar-wiki {
font-size: 16px;
display: inline-flex;
}
#menu-left {
border-radius: 6px;
overflow: auto;
grid-row: 2;
grid-column: 1/ 5;
margin-top: 5px;
}
#loading {
#loading-menu {
border-radius: 6px;
margin-top: 5px;
}
#loading>ul {
position: relative;
background-color: rgb(151, 151, 151);
#pageWiki, #loading-page {
border-radius: 6px;
overflow: auto;
margin-top: 5px;
}
#loading>ul {
#loading-page>ul, #loading-menu>ul {
border-radius: 3px;
content: '';
display: block;
position: absolute;
width: 50%;
display: inline-block;
position: relative;
background: rgba(255, 255, 255, 0.20);
background: linear-gradient(to right, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(to right, #65BA91 0%, #116d41 100%);
animation: shine;
animation-duration: 2s;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
}
@keyframes shine {
from {
opacity: 0.5;
left: 15%;
opacity: 0.1;
left: 0%;
}
to {
opacity: 1;
......@@ -95,21 +84,28 @@
background-color: whitesmoke !important;
}
#menu-left>ul, #loading>ul {
#menu-left>ul, #loading-page>ul, #loading-menu>ul {
border-bottom: 1px solid #ccc;
list-style: none;
}
#title-menu {
#title-menu, #loading-page>p, #loading-menu>p {
font-size: 1.5em;
text-align: center;
}
/* #title-menu {
} */
/* #loading-page>p, #loading-menu>p {
overflow: hidden;
} */
#central-container, #loading>p {
#central-container>p {
font-size: 2em;
text-align: center;
overflow: auto;
}
#accordion>li, #loading>ul>li {
#accordion>li, #loading-menu>ul>li, #loading-page>ul>li {
text-align: center;
margin: auto;
width: 85%;
......@@ -134,136 +130,16 @@
overflow-wrap: break-word;
}
#block-interop {
grid-row: 2;
grid-gap: 5px;
}
#block-interop>div {
margin: 10px;
}
#menu-left-page {
grid-row: 3;
grid-column: 12;
overflow: auto;
}
#menu-left-page>button {
grid-column: 4;
margin: 5px;
}
#nameEl {
text-align: center;
grid-row: 3;
grid-column: 12;
margin: 5px;
}
#menu-left-page>button.community {
grid-column: repeat(4,3);
grid-row: 4;
}
#body-actors {
display: flex;
justify-content: space-between;
grid-column: 4/12;
grid-row: 1;
margin-left: 5px;
border-radius: 6px;
margin-top: 5px;
}
#body-actors>h4 {
grid-column: 1 / 12;
}
/*
#menu-left-page>button.community {
grid-column: 1 / 3;
grid-row: 4;
}
#menu-left-page>button.resource {
grid-column: 3 / 6;
grid-row: 4;
}
#menu-left-page>button.defis {
grid-column: 6 / 9;
grid-row: 4;
}
#menu-left-page>button.btw {
grid-column: 1 / 12;
grid-row: 5;
}
#menu-left-page>button {
grid-column: repeat(4,3);
grid-row: 4;
}
#body-actors {
#menu-top-page>.nav {
display: flex;
justify-content: space-between;
grid-column: 4/ 12;
margin-left: 5px;
border-radius: 6px;
margin-top: 5px;
}
#body-actors>h {
grid-column: 1 / 12;
grid-row: 1;
}
.btn-actor, .card {
margin: 5px;
border-radius: 6px;
}
.text-red, .card-header {
text-align: center;
font-size: 1.8em;
word-wrap: break-word;
}
.text, .card-body>p {
font-size: 1.1em;
}
.card-community, .card-defis, .card-ressources {
margin: 5px 15% 5px 15%;
width: 70%;
background-color: #f8f8f8;
}
.c-actor {
margin-top: 5px;
flex-direction: row;
justify-content: space-around;
padding-bottom: 5px;
}
.collapse>ul>li, .card-defis>ul>li {
margin-bottom: 3px;
margin-left: 5px;
.card>div>ul>li {
list-style: none;
}
.collapse>ul {
background-color: #f8f8f8;
}
.badge-primary {
background-color: #65BA91;
font-size: 1.5em;
margin: 2px 2px;
}
#btw>div>div>img {
margin-right: 10px;
}
.btn-lg:hover, .btn-lg:active {
background-color: #f8f8f8;
}
.badge-secondary {
background-color: rgb(134, 199, 167);
font-size: 1.2em;
margin: 2px 2px;
} */
\ No newline at end of file
......@@ -7,10 +7,12 @@ function show(id) {
$("#" + id).show();
}
$(document).ready(function () {
$('#loading-page').hide();
$('#block-interop').show();
$(".c-actor").hide();
$("#btw").show();
$(".btw").attr("style", "background-color:#65BA91");
$('#loading-page').hide();
$(".btn-sm").click(function () {
$("#body-actors").hide();
$("#subContent").show();
......@@ -20,14 +22,14 @@ $(document).ready(function () {
} else {
pageName = $(this).text();
}
interopMW.showLoader();
$('#loading>p').text($(this).text());
$('#loading-page>p').text($(this).text());
interopMW.showLoader('page');
interopMW.pageContent(pageName);
});
$("#edit-wiki").click(function () {
interopMW.mediaWiki.currentSlug = $(this).data('slug');
$(this).remove();
$("#mark-on-wiki").load("/interop/mediawiki/edit", interopMW.mediaWiki);
$("#mark-on-wiki").load(baseUrl+"/interop/mediawiki/edit", interopMW.mediaWiki);
});
$("#create-in-co").click(function () {
var data = {};
......@@ -35,9 +37,9 @@ $(document).ready(function () {
console.log(typeForm);
if (typeForm === 'ressources') {
data.section = "offer";
data.category = "service";
data.subtype = "househelp";
data.type = "ressources";
// data.category = "service";
// data.subtype = "househelp";
// data.type = "ressources";
}
if (typeof $('#imageEl').attr("src") != undefined) {
data.image = $('#imageEl').attr("src");
......@@ -65,6 +67,12 @@ $(document).ready(function () {
//if (typeForm === 'projets') {
dyFObj.openForm(typeForm, null, data);
// if (typeForm === 'ressources') {
// dyFObj.openForm(typeForm, null, null);
// }
// else{
// dyFObj.openForm(typeForm, null, data);
// }
});
$('#loading').hide();
});
\ No newline at end of file
......@@ -41,11 +41,11 @@ var interopMW = {
this.mediaWiki.page = searchText;
this.initMenu();
},
showLoader: function() {
showLoader: function(what) {
$("#menu-left-container").hide();
$("#menu-left").hide();
//$("#menu-left").hide();
$("#block-interop").hide();
$('#loading').show();
$('#loading-'+what).show();
},
//loader =
// initCreate: function () {
......
$(document).ready(function () {
$("#menu-left").show();
$('#loading-menu').hide();
$("#accordion>li").click(function () {
$("#accordion>li").removeClass("active");
if ($(this).attr("aria-expanded") == "false") {
......@@ -10,15 +11,14 @@ $(document).ready(function () {
});
$("#dropdown_search").html("");
$(".link-page").click(function () {
$("#menu-left").hide();
// $("#menu-left").hide();
var id = $(this).data("id");
var name = $(this).data("name");
var categorie = $(this).data("categorie");
var pageName = $(this).data("page");
interopMW.initObj(id, name, categorie);
interopMW.pageContent(pageName);
interopMW.showLoader();
$('#loading>p').text(pageName);
interopMW.showLoader('page');
$('#loading-page>p').text(pageName);
});
$('#loading').hide();
});
\ No newline at end of file
$(document).ready(function () {
$("#menu-left").hide();
$('#loading').hide();
$('#loading-menu').hide();
$('#loading-page').hide();
$(".btn-directory-categorie").click(function () {
$(".central-section").removeClass("col-md-9 col-sm-9 col-lg-10").addClass("col-md-12 col-sm-12 col-lg-12");
interopMW.showLoader();
$(".central-section").removeClass("col-md-9 col-sm-9 col-lg-10").addClass("col-xs-12");
let titleLoading = ($(this).data("categorie") === "actors") ? "acteurs" : "";
titleLoading = ($(this).data("categorie") === "classifieds") ? "ressources" : titleLoading;
titleLoading = ($(this).data("categorie") === "projects") ? "projets" : titleLoading;
$('#loading>p').text(titleLoading);
$("#bloc-interop").append(loading);
$("#menu-left").hide();
$('#loading-menu>p').text(titleLoading);
interopMW.showLoader('menu');
var name = $(this).data("name");
var categorie = titleLoading;
......@@ -24,16 +24,17 @@ $(document).ready(function () {
$("#close-interop").click(function () {
$("#menu-left").hide();
$("#menu-left-container").show();
$(".central-section").removeClass("col-md-12 col-sm-12 col-lg-12").addClass("col-md-9 col-sm-9 col-lg-10");
urlCtrl.loadByHash('#@'+contextData.slug);
$(".central-section").removeClass("col-xs-12").addClass("col-md-9 col-sm-9 col-lg-10");
//urlCtrl.loadByHash('#@'+contextData.slug);
pageProfil.views.mediawiki();
});
$("#search-in-wiki").click(function () {
var name = $(this).data("name");
var categorie = $(this).data("categorie");
var id = $(this).data("id");
var searchText = $("#search-bar-wiki>input").val();
interopMW.showLoader();
$('#loading>p').text(searchText);
$('#loading-menu>p').text(searchText);
interopMW.showLoader('menu');
if (searchText) {
interopMW.initObj(id, name, categorie);
interopMW.search(searchText);
......
<?php
namespace PixelHumain\PixelHumain\modules\interop\controllers;
use CommunecterController;
/**
* CoController.php
*
......@@ -10,14 +15,14 @@
class CoController extends CommunecterController {
protected function beforeAction($action) {
public function beforeAction($action) {
//parent::initPage();
return parent::beforeAction($action);
}
public function actions(){
return array(
'index' => 'interop.controllers.actions.IndexAction',
'index' => \PixelHumain\PixelHumain\modules\interop\controllers\actions\IndexAction::class,
);
}
}
<?php
namespace PixelHumain\PixelHumain\modules\interop\controllers;
use CommunecterController;
use Yii;
/**
* DefaultController.php
*
......@@ -30,7 +35,7 @@ class DefaultController extends CommunecterController
* @param string $action
* @return void
*/
protected function beforeAction($action)
public function beforeAction($action)
{
//parent::initPage();
return parent::beforeAction($action);
......@@ -80,9 +85,9 @@ class DefaultController extends CommunecterController
{
$this->actions = $this->getPossiblesActions();
if (Yii::app()->request->isAjaxRequest)
echo $this->renderPartial("index");
return $this->renderPartial("index");
else {
echo $this->render("index");
return $this->render("index");
}
}
......@@ -96,9 +101,9 @@ class DefaultController extends CommunecterController
{
$this->actions = $this->getPossiblesActions($_POST['name']);
if (Yii::app()->request->isAjaxRequest)
echo $this->renderPartial("indexMediaWiki");
return $this->renderPartial("indexMediaWiki");
else {
echo $this->render("indexMediaWiki");
return $this->render("indexMediaWiki");
}
}
......
<?php
namespace PixelHumain\PixelHumain\modules\interop\controllers;
use CommunecterController;
/**
* DefaultController.php
*
......@@ -9,14 +14,14 @@
*/
class ErrorController extends CommunecterController {
protected function beforeAction($action)
public function beforeAction($action)
{
return parent::beforeAction($action);
}
public function actions() {
return array(
'index' => 'citizenToolKit.controllers.error.IndexAction'
'index' => \PixelHumain\PixelHumain\modules\citizenToolKit\controllers\error\IndexAction::class
);
}
......
<?php
namespace PixelHumain\PixelHumain\modules\interop\controllers;
use CommunecterController, ApiGitlab, Rest;
/**
* MediawikiController.php
*
......@@ -29,7 +32,7 @@ class GitlabController extends CommunecterController
* @param string $action
* @return void
*/
protected function beforeAction($action)
public function beforeAction($action)
{
////$_POST must have min index['id','name','type','categorie] with set value
//var_dump($_POST);exit;
......
<?php
namespace PixelHumain\PixelHumain\modules\interop\controllers;
use CommunecterController, ApiMediaWiki, Yii;
/**
* MediawikiController.php
*
......@@ -28,7 +31,7 @@ class MediawikiController extends CommunecterController
* @param string $action
* @return void
*/
protected function beforeAction($action)
public function beforeAction($action)