Commit b8b315cb authored by Kgneo's avatar Kgneo
Browse files

up noepage

parent f9b44f9d
......@@ -920,6 +920,7 @@ var urlCtrl = {
}
else
showPanel(panelName,null,title);
} else if( hash.indexOf("#gallery.index.id") >= 0 ){
hashT = hash.split(".");
showAjaxPanel( baseUrl+'/'+ moduleId + '/'+hash.replace( "#","" ).replace( /\./g,"/" ), 'ACTIONS in this '+typesLabels[hashT[3]],'rss' );
......@@ -937,6 +938,7 @@ var urlCtrl = {
slug=hashT;
else
slug=hashT[0];
$.ajax({
type: "POST",
url: baseUrl+"/"+moduleId+"/slug/getinfo/key/"+slug,
......@@ -948,6 +950,7 @@ var urlCtrl = {
hashT.shift();
viewPage="/"+hashT.join("/");
}
if(hashT[0]=="net") viewPage = "/view/net";
showAjaxPanel(baseUrl+'/'+ moduleId + '/app/page/type/'+data.contextType+'/id/'+data.contextId+viewPage);
}else
showAjaxPanel( baseUrl+'/'+ moduleId + '/app/index', 'Home','home' );
......
......@@ -224,7 +224,7 @@ class AppController extends CommunecterController {
public function actionPage($type, $id, $view=null, $dir=null){
CO2Stat::incNbLoad("co2-page");
//var_dump($type); exit;
//var_dump($view); exit;
if( $type == Person::COLLECTION || $type == Event::COLLECTION ||
$type == Project::COLLECTION || $type == Organization::COLLECTION ||
......@@ -268,7 +268,8 @@ class AppController extends CommunecterController {
"element" => $element);
$params = Element::getInfoDetail($params, $element, $type, $id);
echo $this->renderPartial("page", $params, true);
//var_dump(@$_POST); exit;
echo $this->renderPartial("page", $params, true);
}
public function actionInteroperability(){
......
......@@ -117,10 +117,10 @@
}
@media (min-width: 1300px) {
@media (min-width: 991px) {
.subModuleTitle{
width: 56% !important;
margin-left: 28% !important;
width: 100% !important;
margin-left: 11% !important;
}
}
......
......@@ -14,10 +14,14 @@
array( "layoutPath"=>$layoutPath ,
"page" => "page") );
?>
<style>
header {
display:none;
}
</style>
<div class="col-md-12 col-sm-12 col-xs-12 no-padding social-main-container">
<div class="padding-top-15" id="onepage">
<div class="" id="onepage">
<?php
if($type == Person::COLLECTION || $type == Event::COLLECTION ||
......@@ -39,7 +43,9 @@
if(@$invitedMe) $params["invitedMe"] = $invitedMe;
if(Yii::app()->params["CO2DomainName"] == "terla")
$this->renderPartial('../element/terla/index', $params );
else
else if($view == "net")
$this->renderPartial("../element/onepage", $params);
else
$this->renderPartial('../element/profilSocial', $params );
}
......
<style>
.menu-linksBtn{
text-shadow: 1px 1px 1px rgb(0,0,0);
padding: 5px 10px !important;
font-size: 14px !important;
text-transform: none !important;
border:none !important;
margin:0px !important;
border-radius: 0px !important;
padding: 5px 10px;
font-size: 14px;
text-transform: none;
border:none;
margin:0px;
border-radius: 0px;
float: left;
}
.menu-linksBtn i{
......
......@@ -23,15 +23,18 @@
$params = Element::getParamsOnepage($typeItem, $element["_id"]);
$edit = @$params["edit"];
$edit = @$params["edit"];
$events = @$params["events"];
$linksBtn = @$params["linksBtn"];
$members = @$params["members"];
$memberOf = @$params["memberOf"];
$needs = @$params["needs"];
$projects = @$params["projects"];
$tags = @$params["tags"];
$countStrongLinks = @$params["countStrongLinks"];
$hash = @$element["slug"] ? "#".$element["slug"] :
"#page.type.".$type.".id.".$element["_id"];
$typeItemHead = $typeItem;
if($typeItem == "organizations" && @$element["type"]) $typeItemHead = $element["type"];
......@@ -48,6 +51,7 @@
left:20px;
border-radius: 1px;
letter-spacing: 2px;
z-index: 50;
}
.dropdown .dropdown-onepage-main-menu{
......@@ -59,8 +63,8 @@
.dropdown-onepage-main-menu{
position: fixed;
top:130px;
left:20px;
top: 90px;
left: 10px;
max-height:400px;
/*width:200px;*/
background-color:transparent;
......@@ -83,6 +87,88 @@
.arrow_box:after, .arrow_box:before {
left: 19px;
}
header, .header{
margin-top: 48px;
}
#contentBanner{
margin-top:20px;
}
#contentBanner img{
border-bottom: 2px solid white;
}
#profil_imgPreview{
border:0px !important;
}
.fileupload-preview.thumbnail img.img-responsive,
.fileupload-new.thumbnail img.img-responsive{
border:3px solid white;
width: auto;
}
.btn-o {
border: 1px solid rgba(255, 255, 255, 0.5);
border-radius: 2px;
color: #ffffff !important;
display: inline-block;
/*font-family: open sans;*/
font-size: 15px !important;
font-weight: normal !important;
margin: 0 0 10px;
padding: 5px 11px;
text-decoration: none !important;
text-transform: uppercase;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.btn-o:hover {
background-color: rgba(255, 255, 255, 0.4) !important;
color: #fff !important;
}
.btn-o:hover {
background-color: rgba(255, 255, 255, 0.4) !important;
color: #fff !important;
}
.blockUsername .navbar-nav:hover .btn-o{
background-color: rgba(255, 255, 255, 0.4) !important;
color: #fff !important;
}
.fileupload, .fileupload-preview.thumbnail,
.fileupload-new .thumbnail,
.fileupload-new .thumbnail img,
.fileupload-preview.thumbnail img{
width:auto;
max-width: 100%;
}
.blockUsername{
background-color: transparent!important;
position: relative !important;
display:inline-block;
margin-bottom:10px;
}
.menu-linksBtn{
border-radius: 20px !important;
margin-left: 5px !important;
margin-right: 5px !important;
padding: 10px 10px !important;
margin-bottom:0px;
background-color: rgba(0, 0, 0, 0.6);
text-transform: none !important;
border:none !important;
line-height: 22px !important;
}
.menu-linksBtn{
background-color: rgba(173, 173, 173, 0.58) !important;
color: #363636 !important;
}
</style>
<div id="onepage">
<div class="dropdown">
......@@ -104,6 +190,25 @@
</div>
</div>
<div id="onepage">
<div id="contentBanner" class="col-md-12 col-sm-12 col-xs-12 no-padding">
<?php if (@$element["profilBannerUrl"] && !empty($element["profilBannerUrl"])){
$imgHtml='<img class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive"
src="'.Yii::app()->createUrl('/'.$element["profilBannerUrl"]).'">';
if (@$element["profilRealBannerUrl"] && !empty($element["profilRealBannerUrl"])){ ?>
<style>
#content-header{
margin-top: -150px;
}
</style>
<a href="<?php echo Yii::app()->createUrl('/'.$element["profilRealBannerUrl"]); ?>"
class="thumb-info"
data-title="<?php echo Yii::t("common","Cover image of")." ".$element["name"]; ?>"
data-lightbox="all">
<?php echo $imgHtml; ?>
</a>
<?php } ?>
<?php } ?>
</div>
<!-- Header -->
<section class="header" id="header">
<button class="btn btn-default btn-sm pull-right margin-right-15 hidden-xs btn-edit-section margin-top-70" data-id="#header">
......@@ -111,71 +216,80 @@
</button>
<div class="container">
<div class="row">
<div class="col-md-12">
<?php //var_dump($element["address"]); ?>
<div class="col-md-12 col-sm-12 col-xs-12" id="content-header">
<div class="col-md-3 col-sm-4 col-xs-10 text-right btn-tools no-padding">
<div class="col-md-12 col-sm-12">
<div class="col-md-3 col-sm-4 hidden-xs text-right btn-tools">
<?php if(@$edit == true){ ?>
<button class="btn btn-default">Editer les informations <i class="fa fa-pencil"></i></button><br>
<button class="btn btn-default"> Paramétrer la page <i class="fa fa-cog"></i></button>
<?php } ?>
<?php
$hash = @$element["slug"] ? "#".$element["slug"] :
"#page.type.".$type.".id.".$element["_id"];
?>
<button data-hash="<?php echo $hash; ?>" class="btn btn-default lbh">
Retour <i class="fa fa-chevron-left"></i>
</button>
</div>
<div class="col-md-6 col-sm-4 col-xs-12 text-center" style="margin-top:-20px;">
<?php if(@$element['profilMediumImageUrl'] && @$element['profilMediumImageUrl'] != "") { ?>
<?php if(@$typeItem){ ?>
<span class="col-md-12 col-sm-12 bold">
<?php if (@$element["typeSig"]!="people" && @$element["typeSig"]!="organizations") {
echo ucfirst(Yii::t("common", @$typeItem));
}
if (@$element["typeSig"]=="organizations")
echo Yii::t("common", $element["type"]);
?>
</span><br>
<?php } ?>
<img class="img-responsive thumbnail
<?php if(@$useBorderElement==true){ ?>thumb-type-color-<?php echo $iconColor; ?><?php } ?>"
src="<?php echo @$element['profilMediumImageUrl'] ? Yii::app()->createUrl('/'.@$element['profilMediumImageUrl']) : $imgDefault; ?>"
alt="">
<div class="col-md-6 col-sm-4 col-xs-12 text-center no-padding" style="margin-top:-20px;">
<?php if(@Yii::app()->session["userId"]){ ?>
<div class="blockUsername">
<?php $this->renderPartial('../element/linksMenu',
array("linksBtn"=>$linksBtn,
"elementId"=>(string)$element["_id"],
"elementType"=>$type,
"elementName"=> $element["name"],
"openEdition" => $openEdition)
);
?>
</div>
<?php } ?>
<?php if(@$element["profilMediumImageUrl"] && !empty($element["profilMediumImageUrl"]))
$images=array(
"medium"=>$element["profilMediumImageUrl"],
"large"=>$element["profilImageUrl"]
);
else $images="";
$this->renderPartial('../pod/fileupload',
array("itemId" => (string) $element["_id"],
"itemName" => $element["name"],
"type" => $type,
"resize" => false,
"contentId" => Document::IMG_PROFIL,
"show" => true,
"editMode" => $edit,
"image" => $images,
"openEdition" => $openEdition) );
?>
<?php if(@$useBorderElement==true && $icon != "" && $iconColor != ""){ ?>
<div class="col-md-12 col-sm-12 no-padding text-center i-item">
<i class="fa fa-<?php echo $icon; ?> i-type-color-<?php echo $iconColor; ?>"></i>
</div>
<?php } ?>
<?php } ?>
</div>
<div class="col-md-3 col-sm-4 col-xs-12 text-left btn-tools pull-right">
<div class="col-md-3 col-sm-4 col-xs-12 text-left btn-tools pull-right no-padding">
<button class="btn btn-default"><i class="fa fa-link"></i> <span class="hidden-xs">Suivre cette page</span></button><br>
<?php if($type == Organization::COLLECTION ){ ?>
<button class="btn btn-default"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">Devenir membre</span></button><br>
<?php } ?>
<?php if($type == Project::COLLECTION ){ ?>
<button class="btn btn-default"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">Devenir contributeur</span></button><br>
<?php } ?>
<!-- <button class="btn btn-default"><i class="fa fa-star"></i> <span class="hidden-xs">Favoris</span></button> -->
</div>
<?php if($type == Event::COLLECTION ){ ?>
<button class="btn btn-default"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">Je participe</span></button><br>
<?php } ?>
<div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 btn-tools margin-top-10 margin-bottom-10">
<?php if(@$edit == true){ ?>
<a href="<?php echo $hash; ?>.view.detail"
class="btn btn-default lbh">
<i class="fa fa-pencil hidden-xs"></i>
Editer les informations
</a>
<!-- <button class="btn btn-default"> Paramétrer la page <i class="fa fa-cog"></i></button> -->
<?php } ?>
<a href="<?php echo $hash; ?>" class="btn btn-default lbh">
<i class="fa fa-user-circle"></i> Page de profil
</a>
<button class="btn btn-default"><i class="fa fa-star"></i> <span class="hidden-xs">Favoris</span></button>
</div>
<div class="col-md-12 col-sm-12 intro-text">
<div class="col-md-12 col-sm-12 col-xs-12 intro-text">
<?php if(!@$element['profilMediumImageUrl'] || @$element['profilMediumImageUrl'] == "") { ?>
<?php if(@$typeItem){ ?>
<span class="col-md-12 col-sm-12 bold">
<span class="col-md-12 col-sm-12 col-xs-12 bold letter-<?php echo Element::getColorIcon($element["type"]); ?>">
<i class="fa fa-<?php echo Element::getFaIcon($element["type"]); ?>"></i>
<?php if (@$element["typeSig"]!="people" && @$element["typeSig"]!="organizations") {
echo ucfirst(Yii::t("common", @$typeItem));
}
......@@ -187,29 +301,48 @@
<?php } ?>
<span class="name"><?php echo @$element["name"]; ?></span><br>
<span class="email"><?php echo @$element["email"]; ?></span>
<?php if(@$element["preferences"]["publicFields"] &&
in_array("email", @$element["preferences"]["publicFields"])){ ?>
<span class="email"><?php echo @$element["email"]; ?></span>
<hr class="bold-hr">
<?php } ?>
<?php if(@$element["preferences"]["publicFields"] &&
in_array("phone", @$element["preferences"]["publicFields"])){ ?>
<?php if(@$element["telephone"]["fixe"]){ ?>
<i class="fa fa-phone"></i>
<span class="phone"><?php echo @$element["telephone"]["fixe"][0]; ?></span>
<?php } ?>
<?php if(@$element["telephone"]["mobile"]){ ?>
<i class="fa fa-phone <?php echo @$element["telephone"]["fixe"] ? "margin-left-15" : ""; ?>"></i>
<span class="phone"><?php echo @$element["telephone"]["mobile"][0]; ?></span>
<?php } ?>
<?php } ?>
<hr class="bold-hr">
<span class="skills"><?php echo @$element["shortDescription"]; ?></span>
</div>
</div>
<div class="col-md-12 col-sm-12">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="tags">
<?php if(@$element["tags"])
foreach ($element["tags"] as $key => $tag) { ?>
<span class="badge bg-red"><?php echo $tag; ?></span>
<?php } ?>
</div>
<div class="commune text-red homestead margin-top-10">
<?php if(@$element["address"] && @$element["address"]["addressLocality"]) {
echo "<i class='fa fa-university'></i> ".$element["address"]["addressLocality"];
if(@$element["address"]["postalCode"]) echo ", ";
}
if(@$element["address"] && @$element["address"]["postalCode"])
echo $element["address"]["postalCode"];
?>
</div>
<?php if(@$element["preferences"]["publicFields"] &&
in_array("locality", @$element["preferences"]["publicFields"])){ ?>
<div class="commune text-red homestead margin-top-10">
<?php if(@$element["address"] && @$element["address"]["addressLocality"]) {
echo "<i class='fa fa-university'></i> ".$element["address"]["addressLocality"];
if(@$element["address"]["postalCode"]) echo ", ";
}
if(@$element["address"] && @$element["address"]["postalCode"])
echo $element["address"]["postalCode"];
?>
</div>
<?php } ?>
</div>
</div>
......@@ -217,26 +350,8 @@
</div>
</section>
</div>
<!-- About Section -->
<?php if(isset($element["description"])){ ?>
<!-- <section class="darkblue padding-bottom-50 shadow hidden" id="description">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2>Description</h2>
<hr class="bold-hr">
</div>
</div>
<div class="row">
<div class="col-lg-12 text-description">
<p><?php echo $element["description"]; ?></p>
</div>
</div>
</div>
</section> -->
<?php } ?>
<!-- COMMUNAUTE Section -->
<!-- DESCRIPTION Section -->
<?php
$desc = array( array("shortDescription"=>@$element["description"]),
......@@ -281,24 +396,57 @@
<!-- PROJETS Section -->
<?php if(@$projects && sizeOf(@$projects)>0)
<?php if(@$projects && sizeOf(@$projects)>0){
$sectionTitle = "MES PROJETS";
if(@$typeItem != "citoyens") $sectionTitle = "NOS PROJETS";
$this->renderPartial('../pod/sectionElements',
array( "items" => $projects,
"sectionKey" => "projects",
"sectionTitle" => "NOS PROJETS",
"sectionShadow" => true,
"msgNoItem" => "Aucun projet à afficher",
"imgShape" => "square",
"useDesc" => false,
"useBorderElement"=>$useBorderElement,
"styleParams" => array( "bgColor"=>"#FFF",
"textBright"=>"dark",
"fontScale"=>3),
));
}
?>
<!-- COMMUNAUTE Section -->
<?php
$sectionTitle = "COMMUNAUTÉ";
if(@$typeItem == "organizations") $sectionTitle = "NOS MEMBRES";
if(@$typeItem == "projects") $sectionTitle = "ILS CONTRIBUENT AU PROJET";
if(@$typeItem == "events") $sectionTitle = "LES PARTICIPANTS";
if(@$members && sizeOf(@$members)>0)
$this->renderPartial('../pod/sectionElements',
array( "items" => $projects,
"sectionKey" => "projects",
"sectionTitle" => "NOS PROJETS",
array( "items" => $members,
"sectionKey" => "directory",
"sectionTitle" => $sectionTitle,
"sectionShadow" => true,
"msgNoItem" => "Aucun projet à afficher",
"msgNoItem" => "Aucun contact à afficher",
"imgShape" => "square",
"useDesc" => false,
"useBorderElement"=>$useBorderElement,
"countStrongLinks"=>$countStrongLinks,
"styleParams" => array( "bgColor"=>"#FFF",
"textBright"=>"dark",
"fontScale"=>3),
));
?>
?>
<!-- COMMUNAUTE Section -->
<?php
......@@ -306,10 +454,10 @@
if(@$typeItem == "organizations") $sectionTitle = "NOS MEMBRES";
if(@$typeItem == "projects") $sectionTitle = "ILS CONTRIBUENT AU PROJET";
if(@$typeItem == "events") $sectionTitle = "LES PARTICIPANTS";
if(@$members && sizeOf(@$members)>0)
if(@$members && sizeOf(@$memberOf)>0)
$this->renderPartial('../pod/sectionElements',
array( "items" => $members,
array( "items" => $memberOf,
"sectionKey" => "directory",
"sectionTitle" => $sectionTitle,
"sectionShadow" => true,
......@@ -553,7 +701,8 @@
var elementName = "<?php echo @$element["name"]; ?>";
var mapData = <?php echo json_encode(@$mapData) ?>;
var params = <?php echo json_encode(@$params) ?>;
var contextData = <?php echo json_encode( Element::getElementForJS(@$element, @$type) ); ?>;
//console.dir("allparams", params);
var currentIdSection = "";
jQuery(document).ready(function() {
......@@ -570,6 +719,8 @@
KScrollTo(target);
});
console.log("body width", $("body").width());
if($("body").width()>767)
$("#btn-onepage-main-menu").trigger("click");
$(".btn-full-desc").click(function(){
......@@ -586,7 +737,7 @@
Sig.showMapElements(Sig.map, mapData);
//showElementPad('news');
var url = "news/index/type/citoyens/id/<?php echo (string)$element["_id"] ?>?isFirst=1&";
var url = "news/index/type/<?php echo (string)$element["type"] ?>/id/<?php echo (string)$element["_id"] ?>?isFirst=1&";
//console.log("URL", url);
ajaxPost('#timeline-page', baseUrl+'/'+moduleId+'/'+url+"renderPartial=true&tpl=co2&nbCol=2",
null,
......
......@@ -111,6 +111,11 @@
#btn-show-activity-onmap{
width:100%;
}
#onepage section#social-header{
margin-top: 68px;
}
</style>
<?php
......
......@@ -12,155 +12,39 @@
$thumbAuthor = @$element['profilThumbImageUrl'] ?
Yii::app()->createUrl('/'.@$element['profilThumbImageUrl'])
: "";
?>
<style>
.img-thumb{
height: 50px;
width: 50px;
}