index.php 16.1 KB
Newer Older
Tibor Katelbach's avatar
Tibor Katelbach committed
1 2 3 4 5 6 7 8 9 10 11 12
<?php 
$cssJS = array(
    '/plugins/jQuery-Knob/js/jquery.knob.js',
    '/plugins/jQuery-Smart-Wizard/js/jquery.smartWizard.js',
    //'/plugins/jQuery-Smart-Wizard/styles/smart_wizard.css',
	// SHOWDOWN
	'/plugins/showdown/showdown.min.js',
	// MARKDOWN
	'/plugins/to-markdown/to-markdown.js'
);
HtmlHelper::registerCssAndScriptsFiles($cssJS, Yii::app()->request->baseUrl); 

Tibor Katelbach's avatar
Tibor Katelbach committed
13 14
$cssJS = array('/js/docs/docs.js');
HtmlHelper::registerCssAndScriptsFiles($cssJS, Yii::app()->getModule( Yii::app()->params["module"]["parent"] )->getAssetsUrl());
Tibor Katelbach's avatar
Tibor Katelbach committed
15
 ?>
Tibor Katelbach's avatar
tweaks  
Tibor Katelbach committed
16 17 18 19 20 21 22


<?php 
if(@Yii::app()->session["costum"] && @Yii::app()->session["costum"]["docTpl"]){
	$this->renderPartial( Yii::app()->session["costum"]["docTpl"] ,true); 
 } else { ?>

Tibor Katelbach's avatar
Tibor Katelbach committed
23
<style type="text/css">
24 25 26 27 28 29 30 31
#docs-main-container{
	position: absolute;
	bottom: 0;
	top: 0px;
	left: 0;
	right: 0;
	z-index: 1000000
}
Clément Damiens's avatar
 
Clément Damiens committed
32 33 34 35 36 37 38 39
	#menu-left{
		position: fixed;
    	z-index: 100000;
	    bottom: 0;
	    top: 60px;
	    left: 0;
	    padding: 0;
	    overflow-y: scroll;
Clément Damiens's avatar
Clément Damiens committed
40
	    	background-color: white;
Clément Damiens's avatar
 
Clément Damiens committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
	}
	#header-doc{
		position: fixed;
		z-index: 100000;
		top: 0px;
		left: 0px;
		height: 60px;
		right: 0px;
		padding-top: 10px;
		background-color: white;
	}
	#header-doc h2{
		float: left;
	    color: #354C57;
	    font-size: 20px;
	    font-variant: small-caps;
	    line-height: 41px;
	    padding: 0px 10px;
	}
	#menu-left ul li{
		list-style: none;
	}
Clément Damiens's avatar
 
Clément Damiens committed
63 64 65 66 67 68 69 70
	#menu-left > ul > li > a{
		font-size: 20px;
	}
	ul.subMenu > li > a{
		font-size:16px;
	}
	#menu-left > ul > li > a, ul.subMenu > li > a{
		color: #354C57;
Clément Damiens's avatar
 
Clément Damiens committed
71 72 73 74 75
		width: 100%;
	    float: left;
	    padding: 5px 20px;
	    text-align: left;
	}
Clément Damiens's avatar
 
Clément Damiens committed
76 77 78 79
	#menu-left ul li .subMenu, #menu-left > ul > li > a{
		border-bottom: 1px solid #ccc;
	}
	#menu-left > ul > li > a.active, #menu-left > ul > li > a:hover{
Clément Damiens's avatar
 
Clément Damiens committed
80
		text-decoration: none;
Tibor Katelbach's avatar
Tibor Katelbach committed
81
		background-color:#65BA91;
Clément Damiens's avatar
 
Clément Damiens committed
82
		color: white;
Clément Damiens's avatar
 
Clément Damiens committed
83 84 85
		font-size: 22px;
	}
	ul.subMenu > li > a.active, ul.subMenu > li > a:hover{
Tibor Katelbach's avatar
Tibor Katelbach committed
86 87
		border-left: 4px solid #65BA91;
		color: #65BA91;
Clément Damiens's avatar
 
Clément Damiens committed
88 89 90 91 92
		font-size:18px;
		text-decoration: none;
	}
	#menu-left ul li a.active span.text-red, #menu-left ul li a:hover span.text-red{
		color:#354C57 !important;
Clément Damiens's avatar
 
Clément Damiens committed
93 94 95 96 97 98 99 100 101 102
	}
	.close-modal{
		top: 10px !important;
    	right: 10px !important;
     	z-index: 100000000000000 !important;
    	position: fixed !important;
	}
	.close-modal .lr, .close-modal .rl{
		height: 40px !important;
	}
Clément Damiens's avatar
doc up  
Clément Damiens committed
103
	ul.subMenu{
Clément Damiens's avatar
 
Clément Damiens committed
104 105 106 107 108
		/*display:none;*/

	}
	ul.subMenu{
		padding-left: 30px
Clément Damiens's avatar
doc up  
Clément Damiens committed
109
	}
Clément Damiens's avatar
Clément Damiens committed
110
#show-menu-xs, #close-docs{
111 112 113 114 115 116 117 118
	    padding: 7px 15px;
    font-size: 20px;
}
.keypan .panel-heading{
	margin-top: 20px;
    min-height: 70px;
}
.keypan{
Clément Damiens's avatar
 
Clément Damiens committed
119
	border: none;
120 121 122
    margin-bottom: 10px;
    box-shadow: none;
}
Clément Damiens's avatar
 
Clément Damiens committed
123 124 125 126 127 128 129 130 131 132 133 134
.keypan, .keypanList{
	box-shadow: none;	
}
.keypanList .panel-title i{
	margin-right: 10px;
}
.keypanList .panel-body ul{
	padding-left: 0px;
}
.keypanList .panel-title span{
	font-size: 24px !important;
}
135 136 137 138 139 140 141
.keypan .panel-body{
	min-height: 200px;
}
.keypan hr {
	width: 75%;
    margin: auto;
}
Clément Damiens's avatar
 
Clément Damiens committed
142
#header-docs .panel-title, .subtitleDocs .panel-title {
143 144
	font-size: 40px;
}
Clément Damiens's avatar
 
Clément Damiens committed
145
#header-docs .panel-title .sub-title, .subtitleDocs .panel-title .sub-title{
146 147 148
	font-size: 20px !important;
	font-style: italic;	
}
Clément Damiens's avatar
 
Clément Damiens committed
149
#container-docs{
Clément Damiens's avatar
Clément Damiens committed
150 151
	background-color: white;
	z-index: 10000;
152
	top: 60px;
Clément Damiens's avatar
 
Clément Damiens committed
153
}
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
@media (max-width: 991px) {
 /* .open-type-filter{
        display: block;
    position: absolute;
    right: -33px;
    height: 50px;
    width: 50px;
    border: 1px solid #dadada;
    border-radius: 100%;
    text-align: right;
    padding-right: 8px;
    z-index: -1;
    font-size: 20px;
  }*/
  #menu-left{
    width: 56%;
    left: -56%;
Clément Damiens's avatar
Clément Damiens committed
171
	bottom: 0px;
172 173 174 175 176 177 178 179 180
	}
  
}

@media (min-width: 991px) {
  #menu-left {
    left:0 !important;
  }
}
Tibor Katelbach's avatar
tweaks  
Tibor Katelbach committed
181
</style> 
182 183 184 185 186 187 188 189
<div id="docs-main-container">
	<div id="header-doc" class="shadow2">
		<a href='javascript:;' id="show-menu-xs" class="visible-xs visible-sm pull-left" data-placement="bottom" data-title="Menu"><i class="fa fa-bars"></i></a>
		<h2 class="elipsis no-margin"><i class="fa fa-book hidden-xs"></i> <?php echo Yii::t("docs", "All <span class='hidden-xs'>you need to know</span> about") ?></h2>
		<img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/LOGOS/CO2/logo-head-search.png" 
	                     class="logo-menutop main pull-left" height=30>
	    <a href='javascript:;' class="lbh pull-right" id="close-docs"><span><i class="fa fa-sign-out"></i> <?php echo Yii::t("common","Back") ?></span></a>
	</div>
Tibor Katelbach's avatar
Tibor Katelbach committed
190

191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
	<div id="menu-left" class="col-md-3 col-sm-2 col-xs-12 shadow2">
	  	<ul class="col-md-12 col-sm-12 col-xs-12 no-padding">
			<li class="col-xs-12 no-padding">
				<a href="javascript:" class="link-docs-menu down-menu" data-type="welcome" data-dir="<?php echo Yii::app()->language ?>">
					<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","WEL<span class='text-red'>CO</span>ME"); ?>
				</a>
			</li>
			<li class="col-xs-12 no-padding">
				<a href="javascript:" class="link-docs-menu down-menu" data-type="about" data-dir="<?php echo Yii::app()->language ?>">
					<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","A<span class='text-red'>BO</span>UT"); ?>
				</a>
				<ul class="subMenu col-xs-12 no-padding">
					<li class="col-xs-12 no-padding">
						<a href="javascript:;" class="link-docs-menu" data-type="openatlas" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("common","Open Atlas"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:;" class="link-docs-menu" data-type="philosophy" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","Philosophy"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="projects" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","Projects"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="keywords" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","Keywords"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="partners" data-dir="panels">
							<?php echo Yii::t("docs","Community"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="history" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","History"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="commandement" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","10 Commands"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md" target="_blank" class="">
							<?php echo Yii::t("docs","Social code"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="financement" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","Funding"); ?>
						</a>
					</li>
				</ul>
			</li>
			<li class="col-xs-12 no-padding">
				<a href="javascript:" class="link-docs-menu down-menu" data-type="modules">
					<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","HOW <span class='text-red'>TO</span> USE"); ?>
				</a>
				<ul class="subMenu col-xs-12 no-padding">
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="elements">
							 <?php echo Yii::t("docs","The elements"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="modules">
							<?php echo Yii::t("docs","Applications"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:;" class="link-docs-menu" data-type="import" data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","Game of data"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:;" class="link-docs-menu" data-type="faq">
							<?php echo Yii::t("docs","FAQ"); ?>
						</a>
					</li>
				</ul>
			</li>
			<li class="col-xs-12 no-padding">
				<a href="javascript:;" class="link-docs-menu down-menu" data-type="contribute" data-dir="<?php echo Yii::app()->language ?>">
					<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","<span class='text-red'>CO</span>NTRIBUTE"); ?>
				</a>
			</li>
			<li class="col-xs-12 no-padding">
				<a href="javascript:" class="link-docs-menu down-menu" data-type="5w" data-dir="<?php echo Yii::app()->language ?>">
					<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","<span class='text-red'>CO</span>DING"); ?>
				</a>
				<ul class="subMenu col-xs-12 no-padding">
					<li class="col-xs-12 no-padding">
						<a href="api" target="_blank" >
							<?php echo Yii::t("docs","Play with API"); ?>
						</a>
					</li>
					
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="openSourceWeUse"  data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","Open Source We use"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="ocdb"  data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("common","OCDB"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="rd">
						 <?php echo Yii::t("docs","Research&Dev"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="roadmap"  data-dir="<?php echo Yii::app()->language ?>">
							<?php echo Yii::t("docs","RoadMap"); ?>
						</a>
					</li>
				</ul>
			</li>
			
			<li class="col-xs-12 no-padding">
				<a href="javascript:" class="link-docs-menu down-menu"  data-type="contact" data-dir="panels">
					<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","<span class='text-red'>CO</span>MMUNICATE"); ?>
				</a>
				<ul class="subMenu no-padding">
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="contact" data-dir="panels">
							<?php echo Yii::t("docs","Contact"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="affiches" data-dir="communication">
							<?php echo Yii::t("docs","Drawings"); ?>
						</a>
					</li>
					<li class="col-xs-12 no-padding">
						<a href="javascript:" class="link-docs-menu" data-type="video" data-dir="">
						 <?php echo Yii::t("docs","Videos"); ?>
						</a>
					</li>
					<!--<li class="">
						<a href="javascript:" class="link-docs-menu" data-type="media">
							<i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","Medias"); ?>
						</a>
					</li>-->
				</ul>
			</li>
		</ul>
	</div>
Tibor Katelbach's avatar
Tibor Katelbach committed
345

346 347
	<div id="container-docs" class="col-md-offset-3 col-md-9 col-sm-12 col-xs-12 no-padding text-center">
	</div>
Tibor Katelbach's avatar
tweaks  
Tibor Katelbach committed
348 349 350
	<?php } ?>

	
Tibor Katelbach's avatar
Tibor Katelbach committed
351 352
</div>
<script type="text/javascript">
Tibor Katelbach's avatar
Tibor Katelbach committed
353

Clément Damiens's avatar
Clément Damiens committed
354 355
var page="<?php echo @$page ?>";
var dir="<?php echo @$dir ?>"; 
Tibor Katelbach's avatar
Tibor Katelbach committed
356

Tibor Katelbach's avatar
Tibor Katelbach committed
357
jQuery(document).ready(function() {
Tibor Katelbach's avatar
Tibor Katelbach committed
358 359
	mylog.log("render","co2.views.docs.index");
	
360
	dir=(dir=="") ? mainLanguage : dir;
Clément Damiens's avatar
Clément Damiens committed
361

Tibor Katelbach's avatar
Tibor Katelbach committed
362 363 364 365 366 367
	if(costum == null){
		if(page != "")
			initDocs(page, dir);
		else 
			initDocs("welcome", mainLanguage);
	}
Tibor Katelbach's avatar
Tibor Katelbach committed
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
	
	bindLinkDocs()
	

	$("#show-menu-xs").click(function(){
    if(!$(this).hasClass("show-dir")){
      $(this).addClass("show-dir").data("title", "<?php echo Yii::t("common","Close") ?>").find("i").removeClass("fa-chevron-right").addClass("fa-times");
      $("#menu-left").animate({ left : "0%" }, 400 );
    }else{
      $(this).removeClass("show-dir").data("title", "<?php echo Yii::t("common","Open filtering by type") ?>").find("i").removeClass("fa-times").addClass("fa-chevron-right");
      $("#menu-left").animate({ left : "-56%" }, 400 );
    
    }
  });
});
function bindLinkDocs() { 
	
Clément Damiens's avatar
Clément Damiens committed
385
	$(".link-docs-menu").off().on("click",function(){
Tibor Katelbach's avatar
Tibor Katelbach committed
386
		
Clément Damiens's avatar
 
Clément Damiens committed
387 388 389 390 391 392 393 394 395 396 397 398 399
		if($(this).hasClass("down-menu")){
			$("#menu-left > ul > li > a").removeClass("active").find("i").removeClass("fa-angle-down").addClass("fa-angle-right");
			$(".subMenu .link-docs-menu").removeClass("active");
			$(this).addClass("active").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
		}else{
			$(".subMenu .link-docs-menu").removeClass("active");
			$(this).addClass("active");
			if(!$(this).parents().eq(2).find(".link-docs-menu:first").hasClass("active")){
				$("#menu-left > ul > li > a").removeClass("active").find("i").removeClass("fa-angle-down").addClass("fa-angle-right");
				$(this).parents().eq(2).find(".link-docs-menu:first").addClass("active").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
			}
			
		}
400 401 402 403
		if($("#show-menu-xs").is(":visible")){
			$("#show-menu-xs").removeClass("show-dir");
			$("#menu-left").animate({ left : "-56%" }, 400 );
		}
Clément Damiens's avatar
Clément Damiens committed
404 405 406 407 408
		onchangeClick=false;
		hashDocs="#docs.page."+$(this).data("type");
		if(notNull($(this).data("dir")) && $(this).data("dir") != "")
			hashDocs+= ".dir."+$(this).data("dir");
		location.hash=hashDocs;
409 410 411
		//if(moduleId == activeModuleId)
		//	moduleInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
		//else 
Tibor Katelbach's avatar
Tibor Katelbach committed
412
		navInDocs($(this).data("type"), $(this).data("dir"), $(this).data("get"));
Clément Damiens's avatar
 
Clément Damiens committed
413
	});
Tibor Katelbach's avatar
Tibor Katelbach committed
414
 }
Clément Damiens's avatar
Clément Damiens committed
415
function initDocs(page, dir){
Clément Damiens's avatar
 
Clément Damiens committed
416
	if(urlBackHistory.indexOf("#docs") >= 0){
Clément Damiens's avatar
Clément Damiens committed
417 418 419 420 421
		if(userId!="")
			$("#close-docs").attr("href","#page.type.citoyens.id."+userId);
		else
			$("#close-docs").attr("href","#search");
	}else
Clément Damiens's avatar
 
Clément Damiens committed
422
		$("#close-docs").attr("href",urlBackHistory);
Clément Damiens's avatar
Clément Damiens committed
423 424 425 426 427 428 429
	navInDocs(page, dir);
	$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").addClass("active");
	if(!$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").hasClass("down-menu"))
		$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").parents().eq(2).find(".down-menu").addClass("active").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
	else
		$(".link-docs-menu[data-type='"+page+"'][data-dir='"+dir+"']").find("i").removeClass("fa-angle-right").addClass("fa-angle-down");
}
Clément Damiens's avatar
 
Clément Damiens committed
430
function navInDocs(page, dir, get){
Clément Damiens's avatar
 
Clément Damiens committed
431
	coInterface.simpleScroll(0);
Clément Damiens's avatar
 
Clément Damiens committed
432
	showLoader('#container-docs');
Clément Damiens's avatar
Clément Damiens committed
433
	urlToSend="docs/index/";
Clément Damiens's avatar
 
Clément Damiens committed
434
	if(notNull(dir) && dir !="")
Clément Damiens's avatar
Clément Damiens committed
435 436 437
		urlToSend+="dir/"+dir+"/";
	urlToSend+="page/"+page;
	ajaxPost('#container-docs' ,baseUrl+'/'+moduleId+"/"+urlToSend,
Clément Damiens's avatar
 
Clément Damiens committed
438 439
			 null,function(){},"html");
}
Clément Damiens's avatar
 
Clément Damiens committed
440
function getConceptList(list, dom, type){
441
	str="";
Clément Damiens's avatar
 
Clément Damiens committed
442 443
	classContainer = (notNull(type) && type=="list") ? "col-md-12 col-sm-12 col-xs-12" : "col-md-4 col-sm-6 col-xs-12";
	classKeypan = (notNull(type) && type=="list") ? "keypanList" : "keypan";
444
	$.each(list,function(i,obj) { 
Clément Damiens's avatar
 
Clément Damiens committed
445
		//icon = (obj.icon) ? obj.icon : "fa-tag" ;
446 447
		color = (obj.color) ? obj.color : "#E33551" ;
		size = (obj.size) ? obj.size : "20" ;
Clément Damiens's avatar
 
Clément Damiens committed
448 449 450 451
		str+='<div class="'+classContainer+'"><div class="'+classKeypan+' panel panel-white">';
				if(typeof obj.url != "undefined")
		str+=		'<a href="'+obj.url+'" targte="_blank">';	
		str+=	'<div class="panel-heading border-light ">'+
Clément Damiens's avatar
 
Clément Damiens committed
452
					'<span class="panel-title">'; 
Clément Damiens's avatar
 
Clément Damiens committed
453 454
						if(typeof obj.image != "undefined")
		str+=				'<img class="img-responsive" src="'+obj.image+'"/> ';
Clément Damiens's avatar
 
Clément Damiens committed
455 456 457 458 459 460
						if(typeof obj.icon != "undefined")
		str+=				'<i class="fa '+obj.icon+' faa-pulse animated-hover fa-2x"></i>';
						if(!notNull(type) || type!="list")
		str+=				'<br/>';
		str+=			'<span style="font-size: '+size+'px; color:'+color+';">'+obj.title.toUpperCase()+'</span>';
						if(typeof obj.subtitle != "undefined")
Clément Damiens's avatar
 
Clément Damiens committed
461 462
		str+=				'<span style="font-size: 16px;font-style:italic"> <br/>'+obj.subtitle+'</span>';
		str+=		'</span>'+
Clément Damiens's avatar
 
Clément Damiens committed
463 464 465 466 467 468 469 470 471 472 473 474 475 476
				'</div>';
				if(!notNull(type) || type!="list")
		str+=		'<hr/>';
		str+=	'<div class="panel-body">';
					if(typeof obj.date != "undefined")
		str+=			obj.date+"<br>";
					if(typeof obj.body != "undefined")
		str+=			obj.body+"<br>";
					if(typeof obj.link != "undefined"){
		str+=			"<a class='btn btn-danger btn-sm margin-top-10' href='"+obj.link.url+"'";
						if(typeof obj.link.blank != "undefined" && obj.link.blank)
		str+=				" target='_blank'"
		str+=			">"+obj.link.label+"</a>";
					}
Clément Damiens's avatar
 
Clément Damiens committed
477 478 479 480
		str+=	'</div>';
			if(typeof obj.url != "undefined")
		str+=	'</a>';
		str+="</div></div>";
481 482 483
	 });
	$(dom).html(str);
}
Clément Damiens's avatar
 
Clément Damiens committed
484
</script>