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) * 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; use Framadate\Utils;
include_once __DIR__ . '/app/inc/init.php'; include_once __DIR__ . '/app/inc/init.php';
include_once __DIR__ . '/app/inc/functions.inc.php';
if (is_readable('bandeaux_local.php')) { if (is_readable('bandeaux_local.php')) {
include_once('bandeaux_local.php'); include_once('bandeaux_local.php');
@ -33,7 +34,7 @@ session_start();
// affichage de la page // affichage de la page
Utils::print_header( _("Home") ); Utils::print_header( _("Home") );
bandeau_titre(_("Make your polls")); bandeau_titre(_("Make your polls"));
echo "test";
echo ' echo '
<div class="row"> <div class="row">
<div class="col-md-6 text-center"> <div class="col-md-6 text-center">
@ -52,8 +53,14 @@ echo '
</div> </div>
</div> </div>
<hr /> <hr />
<div class="row"> <div class="row">';
<div class="col-md-4"> $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> <h3>'. _('What is that?') . '</h3>
<p class="text-center"><span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span></p> <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> <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> <li>'. _('Discuss and make a decision') . '</li>
</ol> </ol>
<p>'. _('Do you want to ') . '<a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. _("view an example?") .'</a></p> <p>'. _('Do you want to ') . '<a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. _("view an example?") .'</a></p>
</div> </div>';
<div class="col-md-4"> }
if(config_get('show_the_software') == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('The software') .'</h3> <h3>'. _('The software') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-cloud" style="font-size:50px"></span></p> <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> <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> <li>Opera 11+</li>
</ul> </ul>
<p>'. _('It is governed by the ').'<a href="http://www.cecill.info">'. _('CeCILL-B license').'</a>.</p> <p>'. _('It is governed by the ').'<a href="http://www.cecill.info">'. _('CeCILL-B license').'</a>.</p>
</div> </div>';
<div class="col-md-4"> }
if(config_get('show_cultivate_your_garden') == true){
echo '<div class="col-md-'.$colmd.'">
<h3>'. _('Cultivate your garden') .'</h3> <h3>'. _('Cultivate your garden') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span></p> <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> <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 /> <br />
<p>'. _('If you want to install the software for your own use and thus increase your independence, we help you on:') .'</p> <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> <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>';
</div>'."\n"; }
echo '</div>'."\n";
bandeau_pied(); bandeau_pied();