use config options in index.php file

This commit is contained in:
Bob Le Bricodeur 2014-11-10 20:09:47 +01:00
parent 0db5daa371
commit a596436548
2 changed files with 29 additions and 11 deletions

View File

@ -17,5 +17,9 @@
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
*/
$my_option = "test";
$your_option = "test2";
/**
* index.php
*/
$show_what_is_that = true;
$show_the_software = true;
$show_cultivate_your_garden = true;

View File

@ -21,6 +21,7 @@ namespace Framadate;
use Framadate\Utils;
include_once __DIR__ . '/app/inc/init.php';
include_once __DIR__ . '/app/inc/functions.inc.php';
if (is_readable('bandeaux_local.php')) {
include_once('bandeaux_local.php');
@ -33,7 +34,7 @@ session_start();
// affichage de la page
Utils::print_header( _("Home") );
bandeau_titre(_("Make your polls"));
echo "test";
echo '
<div class="row">
<div class="col-md-6 text-center">
@ -52,8 +53,14 @@ echo '
</div>
</div>
<hr />
<div class="row">
<div class="col-md-4">
<div class="row">';
$nbcol = config_get('show_what_is_that') + config_get('show_the_software') + config_get('show_cultivate_your_garden');
if ($nbcol > 0){
$colmd = 12/$nbcol; // 3 =>col-md-4, 2 =>col-md-6, 1 =>col-md-12.
//echo "mon test : ".$nbActivation;
}
if(config_get('show_what_is_that') == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('What is that?') . '</h3>
<p class="text-center"><span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span></p>
<p>'. _('Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'</p>
@ -65,8 +72,11 @@ echo '
<li>'. _('Discuss and make a decision') . '</li>
</ol>
<p>'. _('Do you want to ') . '<a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. _("view an example?") .'</a></p>
</div>
<div class="col-md-4">
</div>';
}
if(config_get('show_the_software') == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('The software') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-cloud" style="font-size:50px"></span></p>
<p>'. _('Framadate was initially based on '). '<a href="https://sourcesup.cru.fr/projects/studs/">Studs</a>'. _(' a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.</p>
@ -79,15 +89,19 @@ echo '
<li>Opera 11+</li>
</ul>
<p>'. _('It is governed by the ').'<a href="http://www.cecill.info">'. _('CeCILL-B license').'</a>.</p>
</div>
<div class="col-md-4">
</div>';
}
if(config_get('show_cultivate_your_garden') == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('Cultivate your garden') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span></p>
<p>'. _('To participate in the software development, suggest improvements or simply download it, please visit ') .'<a href="https://git.framasoft.org/framasoft/framadate">'._('the development site').'</a>.</p>
<br />
<p>'. _('If you want to install the software for your own use and thus increase your independence, we help you on:') .'</p>
<p class="text-center"><a href="http://framacloud.org/cultiver-son-jardin/installation-de-framadate/" class="btn btn-success"><span class="glyphicon glyphicon-tree-deciduous"></span> framacloud.org</a></p>
</div>
</div>'."\n";
</div>';
}
echo '</div>'."\n";
bandeau_pied();