about.php 38.1 KB
Newer Older
Raphael's avatar
Raphael committed
1
<?php
2
3
4
5
6
	$cssAnsScriptFilesModule = array(
		//Data helper
		'/js/dataHelpers.js',
		'/js/default/editInPlace.js',
	);
Tibor Katelbach's avatar
Tibor Katelbach committed
7
	HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->getParentAssetsUrl());
Raph El's avatar
Raph El committed
8
9
10
	$elementParams=@Yii::app()->session['paramsConfig']["element"];
	if(isset(Yii::app()->session["costum"])){
		$cssJsCostum=array();
Raph El's avatar
Raph El committed
11
12
13
14
		if(isset($elementParams["js"]) && $elementParams["js"] == "about.js")
			array_push($cssJsCostum, '/js/'.Yii::app()->session["costum"]["slug"].'/about.js');
		if(isset($elementParams["css"]) && $elementParams["js"] == "about.css")
			array_push($cssJsCostum, '/css/'.Yii::app()->session["costum"]["slug"].'/about.css');
Raph El's avatar
Raph El committed
15
16
17
		if(!empty($cssJsCostum))
			HtmlHelper::registerCssAndScriptsFiles($cssJsCostum, Yii::app()->getModule( "costum" )->getAssetsUrl());
	}
18
19
?>
<style type="text/css">
Kgneo's avatar
Kgneo committed
20
21
	.valueAbout{
		border-left: 1px solid #dbdbdb;
22
	}
Raph El's avatar
Raph El committed
23
	#shortDescriptionAbout{
Clément Damiens's avatar
   
Clément Damiens committed
24
25
		white-space: pre-line;
	}
Raph El's avatar
Raph El committed
26

Clément Damiens's avatar
   
Clément Damiens committed
27
	/*#descriptionAbout{
Raph El's avatar
Raph El committed
28
		padding-left : 10px;
Clément Damiens's avatar
   
Clément Damiens committed
29
	}*/
Raph El's avatar
Raph El committed
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
	.contentInformation{
		border-bottom: 1px solid #dbdbdb;
	}
	#ficheInfo{
		border:inherit !important;
	}
	.labelAbout span{
		width: 20px;
		padding-right: 5px;
		text-align: -moz-center;
		text-align: center;
		text-align: -webkit-center;
		float: left;
	}
	.labelAbout span i{
		font-size: 14px;
	}
	.panel-title{
		line-height:35px;
	}
Raphael's avatar
Raphael committed
51
52
53
54
55
56
57
58
59
60
61
62
63

	.md-preview{
		text-align:left;
		padding: 0px 10px;
	}

	.md-editor > textarea {
		padding: 10px;
	}

	.descriptiontextarea label{
		margin-left:10px;
	}
Raph El's avatar
Raph El committed
64
65


Clément Damiens's avatar
   
Clément Damiens committed
66
67
68
69
70
	@media (min-width: 1200px) {
		.no-ing{
			padding-left: 15px !important;
		}
	}
71
</style>
Kgneo's avatar
Kgneo committed
72

Kgneo's avatar
up    
Kgneo committed
73
<div class='col-md-12 margin-bottom-15'>
74
	<i class="fa fa-info-circle fa-2x"></i><span class='Montserrat' id='name-lbl-title'> <?php echo Yii::t("common","About") ?></span>
Kgneo's avatar
up    
Kgneo committed
75
76
77
78
79
</div>

<div id="ficheInfo" class="panel panel-white col-lg-12 col-md-12 col-sm-12 no-padding shadow2">
	
	<div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;">
Raphael's avatar
Raphael committed
80
		<h4 class="panel-title text-dark pull-left">
Clément Damiens's avatar
   
Clément Damiens committed
81
			<i class="fa fa-file-text-o"></i> <?php echo Yii::t("common","Descriptions") ?>
Kgneo's avatar
up    
Kgneo committed
82
		</h4>
Raphael's avatar
Raphael committed
83
		<?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?>
Kgneo's avatar
up    
Kgneo committed
84
85
86
87
88
89
90
91
		  	<button class="btn-update-descriptions btn btn-default letter-blue pull-right tooltips" 
				data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update description") ?>">
				<b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b>
			</button>
		 <?php } ?>
	</div>
	<div class="panel-body no-padding">
		<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
92
			<div class="col-md-3 col-sm-3 col-xs-3 hidden-xs labelAbout padding-10">
Clément Damiens's avatar
   
Clément Damiens committed
93
				<span><i class="fa fa-quote-left"></i></span> <?php echo Yii::t("common", "Short description") ?>
Kgneo's avatar
up    
Kgneo committed
94
			</div>
Clément Damiens's avatar
   
Clément Damiens committed
95
			<div id="shortDescriptionAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
96
				<span class="visible-xs col-xs-12 no-padding"><i class="fa fa-quote-left"></i> <?php echo Yii::t("common", "Short description") ?>: </span><?php echo (@$element["shortDescription"]) ? $element["shortDescription"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?>
Clément Damiens's avatar
   
Clément Damiens committed
97
			</div>
Raphael's avatar
Raphael committed
98
			<span id="shortDescriptionAboutEdit" name="shortDescriptionAboutEdit"  class="hidden" ><?php echo (!empty($element["shortDescription"])) ? $element["shortDescription"] : ""; ?></span>
Kgneo's avatar
up    
Kgneo committed
99
100
		</div>
		<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
101
			<div class="col-md-3 col-sm-3 col-xs-3 hidden-xs labelAbout padding-10">
Clément Damiens's avatar
   
Clément Damiens committed
102
				<span><i class="fa fa-paragraph"></i></span> <?php echo Yii::t("common", "Description") ?>
Kgneo's avatar
up    
Kgneo committed
103
			</div>
Kgneo's avatar
Kgneo committed
104
			<div class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-20" 
Raphael's avatar
Raphael committed
105
					style="word-wrap: break-word; overflow:hidden;">
Clément Damiens's avatar
   
Clément Damiens committed
106
107
108
109
110
				<span class="visible-xs col-xs-12 no-padding">
					<i class="fa fa-paragraph"></i> <?php echo Yii::t("common", "Description") ?>:
				</span>
				<div id="descriptionAbout"><?php echo (@$element["description"]) ? $element["description"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?>
				</div>
Kgneo's avatar
up    
Kgneo committed
111
112
113
			</div>
		</div>
	</div>
Kgneo's avatar
up    
Kgneo committed
114
115
</div>
<div id="ficheInfo" class="panel panel-white col-lg-8 col-md-12 col-sm-12 no-padding shadow2">
Kgneo's avatar
Kgneo committed
116
117

	<div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;">
118
		<h4 class="panel-title text-dark pull-left"> 
Clément Damiens's avatar
   
Clément Damiens committed
119
			<i class="fa fa-address-card-o"></i> <?php echo Yii::t("common","General information") ?>
120
		</h4>
Raphael's avatar
Raphael committed
121
		<?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?>
122
			<button class="btn-update-info btn btn-default letter-blue pull-right tooltips" 
Raphael's avatar
Raphael committed
123
				data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update general information") ?>">
124
125
126
127
128
				<b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b>
			</button>
		<?php } ?>
	</div>
	<div class="panel-body no-padding">
Kgneo's avatar
Kgneo committed
129
		<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
130
			<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
131
132
				<span><i class="fa fa-pencil"></i></span> <?php echo Yii::t("common", "Name") ?>
			</div>
Clément Damiens's avatar
   
Clément Damiens committed
133
134
			<div id="nameAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
				<span class="visible-xs pull-left margin-right-5"><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Name") ?> :</span> <?php echo $element["name"]; ?>
135
136
			</div>
		</div>
137
		<?php if($type==Project::COLLECTION){ ?>
Kgneo's avatar
Kgneo committed
138
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
139
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
140
					<span><i class="fa fa-line-chart"></i></span> <?php echo Yii::t("project","Project maturity"); ?>
141
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
142
				<div  id="avancementAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
143
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-line-chart"></i> <?php echo Yii::t("project","Project maturity"); ?> :</span><?php echo (@$element["properties"]["avancement"]) ? Yii::t("project",$element["properties"]["avancement"]) : '<i>'.Yii::t("common","Not specified").'</i>' ?>
144
145
146
147
148
				</div>
			</div>
		<?php } ?>

		<?php if($type==Person::COLLECTION){ ?>
Kgneo's avatar
Kgneo committed
149
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
150
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
151
152
					<span><i class="fa fa-user-secret"></i></span> <?php echo Yii::t("common","Username"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
153
				<div id="usernameAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
154
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-user-secret"></i><?php echo Yii::t("common","Username"); ?> :</span><?php echo (@$element["username"]) ? $element["username"] : '<i>'.Yii::t("common","Not specified").'</i>' ?>
155
156
157
				</div>
			</div>
		<?php if(Preference::showPreference($element, $type, "birthDate", Yii::app()->session["userId"])){ ?>
Kgneo's avatar
Kgneo committed
158
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
159
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
160
161
					<span><i class="fa fa-birthday-cake"></i></span> <?php echo Yii::t("person","Birth date"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
162
163
				<div id="birthDateAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-birthday-cake"></i> <?php echo Yii::t("person","Birth date"); ?> :</span><?php echo (@$element["birthDate"]) ? date("d/m/Y", strtotime($element["birthDate"]))  : '<i>'.Yii::t("common","Not specified").'</i>'; ?>
164
165
166
				</div>
			</div>
		<?php }
Raphael's avatar
Raphael committed
167
168
169
170
		} 


 		if($type==Organization::COLLECTION || $type==Event::COLLECTION){ ?>
Kgneo's avatar
Kgneo committed
171
 				<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
172
					<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
Raphael's avatar
Raphael committed
173
174
						<span><i class="fa fa-angle-right"></i></span><?php echo Yii::t("common", "Type"); ?> 
					</div>
Clément Damiens's avatar
   
Clément Damiens committed
175
					<div id="typeAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
Raph El's avatar
Raph El committed
176
177
						<span class="visible-xs pull-left margin-right-5"><i class="fa fa-angle-right"></i> <?php echo Yii::t("common", "Type"); ?> :</span>

Raph El's avatar
Raph El committed
178
179
180
181
						<?php
						// var_dump($typesList);
						// echo "<br/>";
						// var_dump($element);
Raph El's avatar
Raph El committed
182
						if(@$typesList && @$element["type"] && !empty($typesList[$element["type"]]))
183
184
185
186
187
188
							$showType=Yii::t( "category",$typesList[$element["type"]]);
						else if (@$element["type"])
							$showType=Yii::t( "category",$element["type"]);
						else
							$showType='<i>'.Yii::t("common","Not specified").'</i>';
						echo $showType; ?>
Raphael's avatar
Raphael committed
189
190
191
192
193
194
					</div>
				</div>
		<?php }

		if( (	$type==Person::COLLECTION && 
				Preference::showPreference($element, $type, "email", Yii::app()->session["userId"]) ) || 
Clément Damiens's avatar
Clément Damiens committed
195
		  	in_array($type, [Organization::COLLECTION, Project::COLLECTION, Event::COLLECTION])) { ?>
Kgneo's avatar
Kgneo committed
196
		  	<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
197
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
198
199
					<span><i class="fa fa-envelope"></i></span> <?php echo Yii::t("common","E-mail"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
200
201
				<div id="emailAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-envelope"></i> <?php echo Yii::t("common","E-mail"); ?> :</span><?php echo (@$element["email"]) ? $element["email"]  : '<i>'.Yii::t("common","Not specified").'</i>'; ?>
202
203
204
				</div>
			</div>
		<?php } ?>
205

206
207


Raph El's avatar
modif    
Raph El committed
208
		<?php if( $type != Person::COLLECTION /*&& $type != Organization::COLLECTION */ ){ ?>
209
210
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
Clément Damiens's avatar
Clément Damiens committed
211
					<span><i class="fa fa-link"></i></span> <?php echo Yii::t("common","Carried by"); ?>
212
213
				</div>
				<div id="parentAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
Clément Damiens's avatar
   
Clément Damiens committed
214
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php if($type == Event::COLLECTION) echo Yii::t("common","Planned on"); else echo Yii::t("common","Carried by"); ?> :</span>
215
				<?php 
Clément Damiens's avatar
   
Clément Damiens committed
216
217
218
219
220
221
222
223
224
225
226
					if(!empty($element["parent"])){
						$count=count($element["parent"]);
						foreach($element['parent'] as $key =>$v){
							$heightImg=($count>1) ? 35 : 25;
							$imgPath = (@$v["profilThumbImageUrl"] && !empty($v["profilThumbImageUrl"])) ? Yii::app()->createUrl('/'.$v["profilThumbImageUrl"]) : $this->module->assetsUrl.'/images/thumb/default_'.$v["type"].'.png' ?> 
							<a href="#page.type.<?php  echo $v['type']; ?>.id.<?php  echo $key; ?>" 
								class="lbh tooltips"
								<?php if($count>1) echo 'data-toggle="tooltip" data-placement="left" title="'.$v["name"].'"' ?>> 
								<img src="<?php echo $imgPath ?>" class="img-circle" width='<?php echo $heightImg ?>' height='<?php echo $heightImg ?>' />
								<?php  if ($count==1) echo $v['name']; ?>
							</a>
Raph El's avatar
modif    
Raph El committed
227
				<?php 	}
Clément Damiens's avatar
   
Clément Damiens committed
228
229
230
				 	}else
						echo '<i>'.Yii::t("common","Not specified").'</i>';
				?>
231
232
233
234
				</div>
			</div>
		<?php } ?>

Raph El's avatar
Raph El committed
235
236
237
238
239
240
241
242
		<?php if($type == Event::COLLECTION){ ?>
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
					<span><i class="fa fa-link"></i></span> <?php echo Yii::t("common","Organized by"); ?>
				</div>
				<div id="organizerAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php echo Yii::t("common","Organized by"); ?> :</span>
				<?php 
Clément Damiens's avatar
   
Clément Damiens committed
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
					if(!empty($element["organizer"])){
						$count=count($element["organizer"]);
						foreach($element['organizer'] as $key =>$v){
							$heightImg=($count>1) ? 35 : 25;
							$imgPath = (@$v["profilThumbImageUrl"] && !empty($v["profilThumbImageUrl"])) ? Yii::app()->createUrl('/'.$v["profilThumbImageUrl"]) : $this->module->assetsUrl.'/images/thumb/default_'.$v["type"].'.png' ?>
							<a href="#page.type.<?php  echo $v['type']; ?>.id.<?php  echo $key; ?>" 
								class="lbh tooltips"
								<?php if($count>1) echo 'data-toggle="tooltip" data-placement="left" title="'.$v["name"].'"' ?>> 
								<img src="<?php echo $imgPath ?>" class="img-circle" width='<?php echo $heightImg ?>' height='<?php echo $heightImg ?>' /> 
								<?php  if ($count==1) echo $v['name']; ?>
							</a>
				<?php 	} 
				 	}else
						echo '<i>'.Yii::t("common","Not specified").'</i>';
				?>
Raph El's avatar
Raph El committed
258
259
260
261
				</div>
			</div>
		<?php } ?>

262
263
264
265




266
		<?php if($type!=Poi::COLLECTION){ ?>
Kgneo's avatar
Kgneo committed
267
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
268
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
269
270
					<span><i class="fa fa-desktop"></i></span> <?php echo Yii::t("common","Website URL"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
271
272
				<div id="webAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php echo Yii::t("common","Website URL"); ?> :</span>
Raphael's avatar
Raphael committed
273
274
275
				<?php 
					if(@$element["url"]){
						//If there is no http:// in the url
Raphael's avatar
Raphael committed
276
						$scheme = ( (!preg_match("~^(?:f|ht)tps?://~i", $element["url"]) ) ? 'http://' : "" ) ;
Raphael's avatar
Raphael committed
277
278
279
					 	echo '<a href="'.$scheme.$element['url'].'" target="_blank" id="urlWebAbout" style="cursor:pointer;">'.$element["url"].'</a>';
					}else
						echo '<i>'.Yii::t("common","Not specified").'</i>'; ?>
280
281
				</div>
			</div>
282
		<?php } ?>
283
		<?php  if($type==Organization::COLLECTION || $type==Person::COLLECTION){ ?>
Kgneo's avatar
Kgneo committed
284
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
285
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
286
287
					<span><i class="fa fa-phone"></i></span> <?php echo Yii::t("common","Phone"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
288
289
				<div id="fixeAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5"><i class="fa fa-phone"></i> <?php echo Yii::t("common","Phone"); ?> :</span><?php
Raphael's avatar
Raphael committed
290
						$fixe = '<i>'.Yii::t("common","Not specified").'</i>';
Raphael's avatar
Raphael committed
291
292
293
						if( !empty($element["telephone"]["fixe"]))
							$fixe = ArrayHelper::arrayToString($element["telephone"]["fixe"]);
						
294
295
296
297
						echo $fixe;
					?>	
				</div>
			</div>
Kgneo's avatar
Kgneo committed
298
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
299
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
300
301
					<span><i class="fa fa-mobile"></i></span> <?php echo Yii::t("common","Mobile"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
302
303
304
305
				<div id="mobileAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5">
						<i class="fa fa-mobile"></i> <?php echo Yii::t("common","Mobile"); ?> :
					</span>
306
					<?php
Raphael's avatar
Raphael committed
307
						$mobile = '<i>'.Yii::t("common","Not specified").'</i>';
Raphael's avatar
Raphael committed
308
309
						if( !empty($element["telephone"]["mobile"]))
							$mobile = ArrayHelper::arrayToString($element["telephone"]["mobile"]);	
310
311
312
313
						echo $mobile;
					?>	
				</div>
			</div>
Kgneo's avatar
Kgneo committed
314
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
315
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
316
317
					<span><i class="fa fa-fax"></i></span> <?php echo Yii::t("common","Fax"); ?>
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
318
319
320
321
				<div id="faxAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5">
						<i class="fa fa-fax"></i> <?php echo Yii::t("common","Fax"); ?> :
					</span>
322
					<?php
Raphael's avatar
Raphael committed
323
						$fax = '<i>'.Yii::t("common","Not specified").'</i>';
Raphael's avatar
Raphael committed
324
						if( !empty($element["telephone"]["fax"]) )
Raphael's avatar
Raphael committed
325
							$fax = ArrayHelper::arrayToString($element["telephone"]["fax"]);		
326
						echo $fax;
Raphael's avatar
Raphael committed
327
328
329
330
331
					?>
				</div>
			</div>
		<?php } ?>

Kgneo's avatar
Kgneo committed
332
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Clément Damiens's avatar
   
Clément Damiens committed
333
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
Clément Damiens's avatar
   
Clément Damiens committed
334
					<span><i class="fa fa-hashtag"></i></span> <?php echo Yii::t("common","Tags"); ?>
Raphael's avatar
Raphael committed
335
				</div>
Clément Damiens's avatar
   
Clément Damiens committed
336
337
				<div id="tagsAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5">
Clément Damiens's avatar
   
Clément Damiens committed
338
						<i class="fa fa-hashtag"></i> <?php echo Yii::t("common","Tags"); ?> :
Clément Damiens's avatar
   
Clément Damiens committed
339
					</span>
Tibor Katelbach's avatar
Tibor Katelbach committed
340
341
342
343
344
345
346
347
					<?php 	
						if(!empty($element["tags"])){
							foreach ($element["tags"]  as $key => $tag) { 
	        					echo '<a href="#search?text=#'.$tag.'" class="lbh badge letter-red bg-white">'.$tag.'</a>';
	   						}
						}else{
							echo '<i>'.Yii::t("common","Not specified").'</i>';
						} ?>	
Tibor Katelbach's avatar
Tibor Katelbach committed
348
349
				</div>
			</div>
Benjamin Hoareau's avatar
Benjamin Hoareau committed
350
			
Tibor Katelbach's avatar
Tibor Katelbach committed
351

Clément Damiens's avatar
Clément Damiens committed
352
			<!--<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
Tibor Katelbach's avatar
Tibor Katelbach committed
353
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
Tibor Katelbach's avatar
Tibor Katelbach committed
354
					<span><i class="fa fa-child"></i></span> <?php echo Yii::t("common","Gamification"); ?>
Tibor Katelbach's avatar
Tibor Katelbach committed
355
356
357
				</div>
				<div id="tgamificationAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5">
Tibor Katelbach's avatar
Tibor Katelbach committed
358
						<i class="fa fa-child"></i> <?php echo Yii::t("common","Gamification"); ?> :
Tibor Katelbach's avatar
Tibor Katelbach committed
359
360
					</span>
					<?php 	
361
362
						echo Gamification::calcPoints( $type,(string)$element["_id"] ).Yii::t("common","pts , based on Links and Posts popularity");
					?>	
363
				</div>
Clément Damiens's avatar
Clément Damiens committed
364
			</div>-->
365
			
Clément Damiens's avatar
Clément Damiens committed
366
			<!--<div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding">
367
				<div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10">
Tibor Katelbach's avatar
Tibor Katelbach committed
368
					<a href="/co2/badges"><span><i class="fa fa-bookmark"></i></span> <?php echo Yii::t("common","Badge"); ?></a>
369
370
371
				</div>
				<div id="tbadgeAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10">
					<span class="visible-xs pull-left margin-right-5">
Tibor Katelbach's avatar
Tibor Katelbach committed
372
						<a href="/co2/badges"><i class="fa fa-bookmark"></i> <?php echo Yii::t("common","Badge"); ?></a> :
373
374
375
376
377
378
					</span>
					<style type="text/css">
						.badgePH{ 
							cursor: pointer;
							display: inline-block;
							margin-right: 10px;
Tibor Katelbach's avatar
Tibor Katelbach committed
379
							border: 1px solid #666;
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
						}
						.badgePH .fa-stack .main { font-size:2.2em}
						.badgePH .fa-stack .mainTop { margin-top:-3px}
						.badgePH .fa-stack .fa-circle-o{ font-size:4em;}
						/* Tooltip container */
						.opendata .mainTop{
						    color: black;
						    font-size: 1.3em;
						    padding: 5px;
						}
						.opendata .main{
						    color: #00cc00;
						}
					</style>
					
					<?php 

Tibor Katelbach's avatar
Tibor Katelbach committed
397
					if( $type==Person::COLLECTION && !empty($element["tags"])){
398
							
Tibor Katelbach's avatar
Tibor Katelbach committed
399
							$badges = PHDB::find("badges",array("tag" => array('$in' =>$element["tags"])));
Tibor Katelbach's avatar
Tibor Katelbach committed
400
							foreach ($badges as $k => $v) {
Tibor Katelbach's avatar
Tibor Katelbach committed
401
								//keep only badge definitions used 
Tibor Katelbach's avatar
Tibor Katelbach committed
402
403
								if(in_array( $v["tag"], $element["tags"]))
									$badges[$v["tag"]] = $v;
Tibor Katelbach's avatar
Tibor Katelbach committed
404
								unset($badges[$k]);
Tibor Katelbach's avatar
Tibor Katelbach committed
405
							}
Tibor Katelbach's avatar
Tibor Katelbach committed
406
407
408
							if(count($badges)){								
								foreach ($element["tags"] as $k => $v) {
								?>
Tibor Katelbach's avatar
Tibor Katelbach committed
409
410
411
412
								<div class="badgePH pull-left" data-title="<?php echo @$value["name"] ?>">
									<span class="fa-stack tooltips" style="margin-bottom:5px" data-toggle="tooltip" data-placement="bottom" title='<?php echo Yii::t("badge",@$value["name"], null, Yii::app()->controller->module->id)?>'>
										<?php if( @$badges[$v]["profilThumbImageUrl"] != "" ){ ?>
											<img class="img-responsive" src="<?php echo @$badges[$v]["profilThumbImageUrl"] ?>">
Tibor Katelbach's avatar
Tibor Katelbach committed
413
										<?php } else if(is_array(@$badges[$v]["icon"]) && count($badges[$v]["icon"]) == 1 ){ ?>
Tibor Katelbach's avatar
Tibor Katelbach committed
414
										<i class="fa <?php echo $badges[$v]["icon"][0] ?> main fa-2x fa-stack-1x" style="color:<?php echo (@$badges[$v]["color"]) ? $badges[$v]["color"] : "red" ?>"></i>
Tibor Katelbach's avatar
Tibor Katelbach committed
415
										<?php } else if(is_array(@$badges[$v]["icon"]) && count($badges[$v]["icon"]) == 2 ){ ?>
Tibor Katelbach's avatar
Tibor Katelbach committed
416
										<i class="fa <?php echo $badges[$v]["icon"][0] ?> main fa-2x fa-stack-1x" style="color:<?php echo (@$badges[$v]["color"]) ? $badges[$v]["color"] : "red"?>"></i>
Tibor Katelbach's avatar
Tibor Katelbach committed
417
										<i class="fa <?php echo $badges[$v]["icon"][0] ?> mainTop fa-stack-1x text-white"></i>
418
										<?php } else {?>
Tibor Katelbach's avatar
Tibor Katelbach committed
419
										<i class="fa <?php echo @$badges[$v]["icon"] ?> main fa-2x fa-stack-1x "  style="color:<?php echo (@$badges[$v]["color"]) ? $badges[$v]["color"] : "red"?>"></i>
420
										<?php } ?>
421
422
									</span>
								</div>
423
							<?php 
Tibor Katelbach's avatar
Tibor Katelbach committed
424
								}
425
426
							}
							
427

Raph El's avatar
Raph El committed
428
429
							// if( $badges = Badge::getBadgesByLinks($element["links"]) ){ 
							// 	foreach ($badges as $key => $b) {
430
431
								/* ?>
								 <div class="badgePH pull-left">
Raph El's avatar
Raph El committed
432
433
434
435
436
437
									<span class="fa-stack tooltips" style="margin-bottom:5px" data-toggle="tooltip" data-placement="bottom" title='<?php echo $b["name"]?>'>
										<?php if(@$b["img"]){ ?>
										<img src="<?php echo $b["img"]?>" class="img-circle" style="height:40px" >
										<?php } else { ?>
											<i class="fa fa-<?php echo Element::getFaIcon ( $b["type"] ) ?> main fa-2x fa-stack-1x text-red"></i>
										<?php } ?>
Raph El's avatar
merge    
Raph El committed
438

Raph El's avatar
Raph El committed
439
									</span>
440
441
								</div> 
							<?php */
Raph El's avatar
Raph El committed
442
443
444
445
446
447
						// }
						// 	} 
							?>


						<?php } ?>
448
				</div>
Clément Damiens's avatar
Clément Damiens committed
449
			</div>-->
450
	</div>
Kgneo's avatar
up    
Kgneo committed
451
	
452
</div>
Kgneo's avatar
Kgneo committed
453

Clément Damiens's avatar
   
Clément Damiens committed
454
<div class="no-ing col-lg-4 col-md-12 col-sm-12 col-xs-12 no-padding">
Raphael's avatar
Raphael committed
455
456
457
<?php if($type==Event::COLLECTION || $type==Project::COLLECTION){ ?>
		<div id="socialAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding shadow2">
			<div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;">
Raphael's avatar
Raphael committed
458
459
460
461
462
				<a id="dateTimezone" href="javascript:;" class="tooltips text-dark" data-original-title="" data-toggle="tooltip" data-placement="right">
					<h4 class="panel-title text-dark pull-left"> 
						<i class="fa fa-clock-o"></i> <?php echo Yii::t("common","When"); ?>
					</h4>
				</a>
Raphael's avatar
Raphael committed
463
				<?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?>
Raphael's avatar
Raphael committed
464
					<button class="btn-update-when btn btn-default letter-blue pull-right tooltips" 
465
						data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update date") ?>">
Raphael's avatar
Raphael committed
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
						<b><i class="fa fa-pencil"></i></b>
					</button>
				<?php } ?>
			</div>
			<div class="panel-body no-padding">
				<?php if($type==Event::COLLECTION){ ?> 
				<div class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10">
					<span><?php echo Yii::t("common","All day")?> : </span> 
					<span id="allDayAbout" class="" >
						<?php echo (isset($element["allDay"]) ? Yii::t("common","Yes") : Yii::t("common","No") ); ?>
					</span>
				</div>
				<?php } ?>

					<div id="divStartDate" class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10">
481
						<span><?php echo Yii::t("event","From") ?> </span><span id="startDateAbout" class="" ><?php echo (isset($element["startDate"]) ? $element["startDate"] : "" ); ?></span>
Raphael's avatar
Raphael committed
482
483
484
485
486
487
488
489
490
491
492
493
					</div>
					<div id="divEndDate"  class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10">
						<span><?php echo Yii::t("common","To") ?></span> <span id="endDateAbout" class=""><?php echo (isset($element["endDate"]) ? $element["endDate"] : "" ); ?></span> 
					</div>
					<div id="divNoDate" class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10">
						<span>Pas de date</span>
					</div>
				
			</div>	
	    </div>  
	<?php } ?>

Kgneo's avatar
Kgneo committed
494
	<div id="adressesAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding shadow2">
495
496
497
498
499
		<div class="panel-heading border-light padding-15" style="background-color: #dee2e680;">
			<h4 class="panel-title text-dark"> 
				<i class="fa fa-map-marker"></i> <?php echo Yii::t("common","Localitie(s)"); ?>
			</h4>
		</div>
Raphael's avatar
Raphael committed
500
501
		<div class="panel-body no-padding">		

Kgneo's avatar
Kgneo committed
502
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 labelAbout padding-10">
503
				<span><i class="fa fa-home"></i></span> <?php echo Yii::t("common", "Main locality") ?>
Raphael's avatar
Raphael committed
504
				<?php if (!empty($element["address"]["codeInsee"]) && ( $edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) ) { 
Raph El's avatar
Raph El committed
505
506
507
508
					// echo '<a href="javascript:;" id="btn-remove-geopos" class="pull-right tooltips" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Remove Locality").'">
					// 			<i class="fa text-red fa-trash-o"></i>
					// 		</a> 
					echo '<a href="javascript:;" class="btn-update-geopos pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Update Locality").'" >
509
510
511
512
								<i class="fa text-red fa-map-marker"></i>
							</a> ';	
				} ?>
			</div>
Raphael's avatar
Raphael committed
513
			<div class="col-md-12 col-xs-12 valueAbout no-padding" style="padding-left: 25px !important">
514
515
516
			<?php 
				if( ($type == Person::COLLECTION && Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"])) ||  $type!=Person::COLLECTION) {
					$address = "";
Raphael's avatar
Raphael committed
517
518
519
520
521
					$address .= '<span id="detailAddress"> '.
									(( @$element["address"]["streetAddress"]) ? 
										$element["address"]["streetAddress"]."<br/>": 
										((@$element["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality")));
					$address .= (( @$element["address"]["postalCode"]) ?
522
523
									 $element["address"]["postalCode"].", " :
									 "")
Raphael's avatar
Raphael committed
524
525
526
									." ".(( @$element["address"]["addressLocality"]) ? 
											 $element["address"]["addressLocality"] : "") ;
					$address .= (( @$element["address"]["addressCountry"]) ?
527
528
529
530
									 ", ".OpenData::$phCountries[ $element["address"]["addressCountry"] ] 
					 				: "").
					 			'</span>';
					echo $address;
Raph El's avatar
Raph El committed
531
532
533
534
535
536
					if( empty($element["address"]["codeInsee"]) && Yii::app()->session["userId"] == (String) $element["_id"]) { ?>
						<br><a href="javascript:;" class="cobtn btn btn-danger btn-sm" style="margin: 10px 0px;">
								<?php echo Yii::t("common", "Connect to your city") ?></a> 
							<a href="javascript:;" class="whycobtn btn btn-default btn-sm explainLink" style="margin: 10px 0px;" onclick="showDefinition('explainCommunectMe',true)">
								<?php echo  Yii::t("common", "Why ?") ?></a>
					<?php }
Raphael's avatar
Raphael committed
537
538
539
			}else
				echo '<i>'.Yii::t("common","Not specified").'</i>';
			?>
540
541
542
543
544
545
			</div>
		</div>
		<?php if( !empty($element["addresses"]) ){ ?>
			<div class="col-md-12 col-xs-12 labelAbout padding-10">
				<span><i class="fa fa-map"></i></span> <?php echo Yii::t("common", "Others localities") ?>
			</div>
Raphael's avatar
Raphael committed
546
			<div class="col-md-12 col-xs-12 valueAbout no-padding" style="padding-left: 25px !important">
547
548
549
550
			<?php	foreach ($element["addresses"] as $ix => $p) { ?>			
				<span id="addresses_<?php echo $ix ; ?>">
					<span>
					<?php 
Raphael's avatar
Raphael committed
551
552
553
554
555
556
557
558
559
560
561
562
563
					$address = '<span id="detailAddress_'.$ix.'"> '.
									(( @$p["address"]["streetAddress"]) ? 
										$p["address"]["streetAddress"]."<br/>": 
										((@$p["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality")));
					$address .= (( @$p["address"]["postalCode"]) ?
									 $p["address"]["postalCode"].", " :
									 "")
									." ".(( @$p["address"]["addressLocality"]) ? 
											 $p["address"]["addressLocality"] : "") ;
					$address .= (( @$p["address"]["addressCountry"]) ?
									 ", ".OpenData::$phCountries[ $p["address"]["addressCountry"] ] 
					 				: "").
					 			'</span>';
564
565
566
					echo $address;
					?>

Raph El's avatar
Raph El committed
567
568
569
570
					<?php //if( $edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) { ?>
						<!-- <a href='javascript:removeAddresses("<?php //echo $ix ; ?>");'  class="addresses pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="<?php //echo Yii::t("common","Remove Locality");?>"><i class="fa text-red fa-trash-o"></i></a>
						<a href='javascript:updateLocalityEntities("<?php //echo $ix ; ?>", <?php //echo json_encode($p);?>);' class=" pull-right pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="<?php //echo Yii::t("common","Update Locality");?>"><i class="fa text-red fa-map-marker addresses"></i></a></span> -->
					<?php //} ?>
571
				</span>
Raphael's avatar
Raphael committed
572
				<hr/>
573
574
575
576
			<?php 	} ?>
			</div>
		<?php } ?>
		<div class="text-right padding-10">
Raphael's avatar
Raphael committed
577
			<?php if(empty($element["address"]) && $type!=Person::COLLECTION && ($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) )){ ?>
Raphael's avatar
Raphael committed
578
				<b><a href="javascript:;" class="btn btn-default letter-blue margin-top-5 addresses btn-update-geopos">
579
580
581
582
					<i class="fa fa-map-marker"></i>
					<span class="hidden-sm"><?php echo Yii::t("common","Add a primary address") ; ?></span>
				</a></b>
			<?php	}
Raph El's avatar
Raph El committed
583
584
			//if($type!=Person::COLLECTION && !empty($element["address"]) && ($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) )) { ?>
				<!-- <b><a href='javascript:updateLocalityEntities("<?php //echo count(@$element["addresses"]) ; ?>");' id="btn-add-geopos" class="btn btn-default letter-blue margin-top-5 addresses" style="margin: 10px 0px;">
Clément Damiens's avatar
   
Clément Damiens committed
585
					<i class="fa fa-plus" style="margin:0px !important;"></i> 
Raph El's avatar
Raph El committed
586
587
588
					<span class="hidden-sm"><?php //echo Yii::t("common","Add an address"); ?></span>
				</a></b> -->
			<?php //} ?>						
589
590
		</div>
	</div>
591
592
593
594

	<?php

	if($type!=Poi::COLLECTION){ 
595
596
		$skype = (!empty($element["socialNetwork"]["skype"])? $element["socialNetwork"]["skype"]:"javascript:;") ;
		$telegram =  (!empty($element["socialNetwork"]["telegram"])? "https://web.telegram.org/#/im?p=@".$element["socialNetwork"]["telegram"]:"javascript:;") ;
597
598
		$diaspora =  (!empty($element["socialNetwork"]["diaspora"])? $element["socialNetwork"]["diaspora"]:"javascript:;") ;
		$mastodon =  (!empty($element["socialNetwork"]["mastodon"])? $element["socialNetwork"]["mastodon"]:"javascript:;") ;
599
600
601
		$facebook = (!empty($element["socialNetwork"]["facebook"])? $element["socialNetwork"]["facebook"]:"javascript:;") ;
		$twitter =  (!empty($element["socialNetwork"]["twitter"])? $element["socialNetwork"]["twitter"]:"javascript:;") ;
		$googleplus =  (!empty($element["socialNetwork"]["googleplus"])? $element["socialNetwork"]["googleplus"]:"javascript:;") ;
Raph El's avatar
Raph El committed
602
		$github =  (!empty($element["socialNetwork"]["github"])? $element["socialNetwork"]["github"]:"javascript:;") ;
603
604
		$instagram =  (!empty($element["socialNetwork"]["instagram"])? $element["socialNetwork"]["instagram"]:"javascript:;") ;
	?>
Kgneo's avatar
Kgneo committed
605
606
	<div id="socialAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding shadow2">
		<div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;">
Clément Damiens's avatar
   
Clément Damiens committed
607
			<h4 class="panel-title text-dark pull-left"> 
Raphael's avatar
Raphael committed
608
				<i class="fa fa-connectdevelop"></i> <?php echo Yii::t("common","Socials"); ?>
609
			</h4>
Raphael's avatar
Raphael committed
610
			<?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) {?>
Raphael's avatar
Raphael committed
611
612
				<button class="btn-update-network btn btn-default letter-blue pull-right tooltips" 
					data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update network") ?>">
Raphael's avatar
Raphael committed
613
					<b><i class="fa fa-pencil"></i></b>
Raphael's avatar
Raphael committed
614
615
				</button>
			<?php } ?>
616
617
		</div>
		<div class="panel-body no-padding">
618
619
620
			
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Diaspora">
				<span><i class="fa fa-diaspora"></i></span> 
Raph El's avatar
Hotfix    
Raph El committed
621
				<span id="divDiaspora">
622
623
624
625
626
				<?php if ($diaspora != "javascript:;"){ ?>
					<a href="<?php echo $diaspora ; ?>" target="_blank" id="diasporaAbout" class="socialIcon "><?php echo  $diaspora ; ?></a>
				<?php } else { 
					echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
				} ?>
Raph El's avatar
Hotfix    
Raph El committed
627
				</span>
628
629
630
631
			</div>

			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Mastodon">
				<span><i class="fa fa-mastodon"></i></span> 
Raph El's avatar
Hotfix    
Raph El committed
632
				<span id="divMastodon">
633
634
635
636
637
				<?php if ($mastodon != "javascript:;"){ ?>
					<a href="<?php echo $mastodon ; ?>" target="_blank" id="mastodonAbout" class="socialIcon "><?php echo  $mastodon ; ?></a>
				<?php } else { 
					echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
				} ?>
Raph El's avatar
Hotfix    
Raph El committed
638
				</span>
639
640
			</div>

Kgneo's avatar
Kgneo committed
641
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Facebook">
Raph El's avatar
Hotfix    
Raph El committed
642
643
644
645
646
647
648
649
				<span><i class="fa fa-facebook"></i></span>
				<span id="divFacebook">
					<?php if ($facebook != "javascript:;"){ ?>
						<a href="<?php echo $facebook ; ?>" target="_blank" id="facebookAbout" class="socialIcon "><?php echo  $facebook ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
650
			</div>
651

Kgneo's avatar
Kgneo committed
652
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Twitter">
Raph El's avatar
Hotfix    
Raph El committed
653
654
655
656
657
658
659
660
				<span><i class="fa fa-twitter"></i></span>
				<span id="divTwitter">
					<?php if ($twitter != "javascript:;"){ ?>
						<a href="<?php echo $twitter ; ?>" target="_blank" id="twitterAbout" class="socialIcon" ><?php echo $twitter ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
661
			</div>
662

Kgneo's avatar
Kgneo committed
663
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Instagram">
664
				<span><i class="fa fa-instagram"></i></span> 
Raph El's avatar
Hotfix    
Raph El committed
665
666
667
668
669
670
671
				<span id="divInstagram">
					<?php if ($instagram != "javascript:;"){ ?>
						<a href="<?php echo $instagram ; ?>" target="_blank" id="instagramAbout" class="socialIcon" ><?php echo $instagram ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
672
			</div>
Raph El's avatar
Hotfix    
Raph El committed
673
674
675
676
677
678
679
680
681
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Skype">
				<span><i class="fa fa-skype"></i></span>
				<span id="divSkype">
					<?php if ($skype != "javascript:;"){ ?>
						<a href="<?php echo $skype ; ?>" target="_blank" id="skypeAbout" class="socialIcon" ><?php echo $skype ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
682
			</div>
683

Kgneo's avatar
Kgneo committed
684
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Google Plus">
Raph El's avatar
Hotfix    
Raph El committed
685
686
687
688
689
690
691
692
				<span><i class="fa fa-google-plus"></i></span>
				<span id="divGpplus">
					<?php if ($googleplus != "javascript:;"){ ?>
						<a href="<?php echo $googleplus ; ?>" target="_blank" id="gpplusAbout" class="socialIcon" ><?php echo $googleplus ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
693
			</div>
694

Kgneo's avatar
Kgneo committed
695
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="GitHub">
Raph El's avatar
Hotfix    
Raph El committed
696
697
698
699
700
701
702
703
				<span><i class="fa fa-github"></i></span>
				<span id="divGithub">
					<?php if ($github != "javascript:;"){ ?>
						<a href="<?php echo $github ; ?>" target="_blank" id="githubAbout" class="socialIcon" ><?php echo $github  ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
704
			</div>
705

706
			<?php if($type==Person::COLLECTION){ ?> 
Kgneo's avatar
Kgneo committed
707
			<div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Telegram">
708
				<span><i class="fa fa-telegram"></i></span> 
Raph El's avatar
Hotfix    
Raph El committed
709
710
711
712
713
714
715
				<span id="divTelegram">
					<?php if ($telegram != "javascript:;"){ ?>
						<a href="<?php echo $telegram ; ?>" target="_blank" id="telegramAbout" class="socialIcon" ><?php echo $telegram ; ?></a>
					<?php } else { 
						echo '<i>'.Yii::t("common","Not specified").'</i>' ; 
					} ?>
				</span>
716
717
718
			</div>
			<?php } ?>
		</div>	
719
720
    </div> 
    <?php } ?> 
721
</div>
Kgneo's avatar
Kgneo committed
722

Raph El's avatar
Raph El committed
723
<?php $this->renderPartial('../pod/whycommunexion',array()); ?>
Kgneo's avatar
Kgneo committed
724

725
<script type="text/javascript">
Raphael's avatar
Raphael committed
726
727
728

	var formatDateView = "DD MMMM YYYY à HH:mm" ;
	var formatDatedynForm = "DD/MM/YYYY HH:mm" ;
Raphael's avatar
Raphael committed
729
	/*if( (typeof contextData.allDay != "undefined" && contextData.allDay == true) || contextData.type == "<?php //echo Project::COLLECTION; ?>" ) {
Raphael's avatar
Raphael committed
730
731
		formatDateView = "DD MMMM YYYY" ;
		formatDatedynForm = "DD/MM/YYYY" ;
Raphael's avatar
Raphael committed
732
	}*/
Raphael's avatar
Raphael committed
733

734
735
736
737
	jQuery(document).ready(function() {
		bindDynFormEditable();
		initDate();
		inintDescs();
Raphael's avatar
Raphael committed
738
		//changeHiddenFields();
739
		bindAboutPodElement();
Raph El's avatar
Hotfix    
Raph El committed
740
		bindExplainLinks();
741
742
743
744

		$("#small_profil").html($("#menu-name").html());
		$("#menu-name").html("");

Raphael's avatar
Raphael committed
745
746
747
		$(".cobtn").click(function () {
			communecterUser();				
		});
748

Raphael's avatar
Raphael committed
749
		$(".btn-update-geopos").click(function(){
750
751
752
			updateLocalityEntities();
		});

Raphael's avatar
Raphael committed
753
		$("#btn-add-geopos").click(function(){
754
755
756
			updateLocalityEntities();
		});

Raphael's avatar
Raphael committed
757
		$("#btn-update-organizer").click(function(){
758
759
			updateOrganizer();
		});
Raphael's avatar
Raphael committed
760
		$("#btn-add-organizer").click(function(){
761
762
763
			updateOrganizer();
		});

Raphael's avatar
Raphael committed
764
		$("#btn-remove-geopos").click(function(){
Raphael's avatar
Raphael committed
765
			removeAddress();	
766
767
768
769
770
771
772
		});

		$("#btn-update-geopos-admin").click(function(){
			findGeoPosByAddress();
		});

		//console.log("contextDatacontextData", contextData, contextData.type,contextData.id);
Raphael's avatar
Raphael committed
773
		//buildQRCode(contextData.type,contextData.id.$id);		
774
775
		
	});
Clément Damiens's avatar
Clément Damiens committed
776
777
	function inintDescs() {
	mylog.log("inintDescs");
Clément Damiens's avatar
   
Clément Damiens committed
778
	if(canEdit == true || openEdition== true)
Clément Damiens's avatar
Clément Damiens committed
779
780
781
782
783
784
785
786
787
788
789
		descHtmlToMarkdown();
	mylog.log("after");
	mylog.log("inintDescs", $("#descriptionAbout").html());
	var descHtml = "<i>"+trad.notSpecified+"</i>";
	if($("#descriptionAbout").html().length > 0){
		descHtml = dataHelper.markdownToHtml($("#descriptionAbout").html()) ;
	}
	$("#descriptionAbout").html(descHtml);
	//$("#descProfilsocial").html(descHtml);
	mylog.log("descHtml", descHtml);
}
790
	function initDate() {//DD/mm/YYYY hh:mm
Raphael's avatar
Raphael committed
791
		//moment.locale('fr');
Clément Damiens's avatar
   
Clément Damiens committed
792
		if(notNull(contextData) && ((typeof contextData.allDay != "undefined" && contextData.allDay == true) || contextData.type == "<?php echo Project::COLLECTION; ?>" )) {
Raphael's avatar
Raphael committed
793
794
795
796
797
798
799
			formatDateView = "DD MMMM YYYY" ;
			formatDatedynForm = "DD/MM/YYYY" ;
		}else{
			formatDateView = "DD MMMM YYYY à HH:mm" ;
			formatDatedynForm = "DD/MM/YYYY HH:mm" ;
		}

Clément Damiens's avatar
   
Clément Damiens committed
800
		if( notNull(contextData) && typeof contextData.startDate != "undefined" && contextData.startDate != "" ){
Raphael's avatar
Raphael committed
801
802
803
804
805
806
807
808
			$("#divStartDate").removeClass("hidden");
			$("#divNoDate").addClass("hidden");
		}
		else{
			$("#divStartDate").addClass("hidden");
			$("#divNoDate").removeClass("hidden");
		}

Clément Damiens's avatar
   
Clément Damiens committed
809
		if(notNull(contextData) && typeof contextData.endDate != "undefined" && contextData.endDate != "" )
Raphael's avatar
Raphael committed
810
811
812
			$("#divEndDate").removeClass("hidden");
		else
			$("#divEndDate").addClass("hidden");
Raphael's avatar
Raphael committed
813
		mylog.log("formatDateView", formatDateView);
Raph El's avatar
Raph El committed
814
815
		//if($("#startDateAbout").html() != "")
		if(!$("#divStartDate").hasClass("hidden"))
816
	    	$("#startDateAbout").html(moment(contextData.startDateDB).local().locale(mainLanguage).format(formatDateView));
Raph El's avatar
Raph El committed
817
	    if(!$("#divEndDate").hasClass("hidden"))
818
	    	$("#endDateAbout").html(moment( contextData.endDateDB).local().locale(mainLanguage).format(formatDateView));
Raphael's avatar
Raphael committed
819
820

	    if($("#birthDate").html() != "")
821
	    	$("#birthDate").html(moment($("#birthDate").html()).local().locale(mainLanguage).format("DD/MM/YYYY"));
822
823
824
	    $('#dateTimezone').attr('data-original-title', "Fuseau horaire : GMT " + moment().local().format("Z"));
	}

Raphael's avatar
Raphael committed
825
	
826

Raphael's avatar
Raphael committed
827
828
	

829
</script>