Smartysize index.php
This commit is contained in:
parent
c3fbbb8bf8
commit
a2f2118087
95
index.php
95
index.php
@ -16,85 +16,30 @@
|
|||||||
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
||||||
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
||||||
*/
|
*/
|
||||||
namespace Framadate;
|
|
||||||
|
use Framadate\Services\LogService;
|
||||||
|
use Framadate\Services\PollService;
|
||||||
|
use Framadate\Utils;
|
||||||
|
|
||||||
include_once __DIR__ . '/app/inc/init.php';
|
include_once __DIR__ . '/app/inc/init.php';
|
||||||
|
|
||||||
if (is_readable('bandeaux_local.php')) {
|
/* SERVICES */
|
||||||
include_once('bandeaux_local.php');
|
/* -------- */
|
||||||
} else {
|
$logService = '\Framadate\Services\LogService';
|
||||||
include_once('bandeaux.php');
|
$pollService = new PollService($connect, new $logService());
|
||||||
}
|
|
||||||
|
|
||||||
// affichage de la page
|
/* PAGE */
|
||||||
Utils::print_header( __('Generic\\Home') );
|
/* ---- */
|
||||||
bandeau_titre(__('Generic\\Make your polls'));
|
|
||||||
echo '
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-6 text-center">
|
|
||||||
<p class="home-choice"><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=date" class="opacity" role="button">
|
|
||||||
<img class="img-responsive center-block" src="'.Utils::get_server_name().'images/date.png" alt="" />
|
|
||||||
<br /><span class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-calendar"></span>
|
|
||||||
'. __('Homepage\\Schedule an event') . '</span>
|
|
||||||
</a></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 text-center">
|
|
||||||
<p class="home-choice"><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=autre" class="opacity" role="button">
|
|
||||||
<img alt="" class="img-responsive center-block" src="'.Utils::get_server_name().'images/classic.png" />
|
|
||||||
<br /><span class="btn btn-info btn-lg"><span class="glyphicon glyphicon-stats"></span>
|
|
||||||
'. __('Homepage\\Make a classic poll') . '</span>
|
|
||||||
</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr role="presentation" />
|
|
||||||
<div class="row">';
|
|
||||||
$nbcol = $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'];
|
|
||||||
if ($nbcol > 0){
|
|
||||||
$colmd = 12/$nbcol; // 3 =>col-md-4, 2 =>col-md-6, 1 =>col-md-12.
|
|
||||||
}
|
|
||||||
if($config['show_what_is_that'] == true){
|
|
||||||
echo '<div class="col-md-'.$colmd.'">
|
|
||||||
<h3>'. __('1st section\\What is that?') . '</h3>
|
|
||||||
<p class="text-center" role="presentation"><span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span></p>
|
|
||||||
<p>'. __('1st section\\Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'</p>
|
|
||||||
<p>'. __('1st section\\Here is how it works:') . '</p>
|
|
||||||
<ol>
|
|
||||||
<li>'. __('1st section\\Make a poll') . '</li>
|
|
||||||
<li>'. __('1st section\\Define dates or subjects to choose') . '</li>
|
|
||||||
<li>'. __('1st section\\Send the poll link to your friends or colleagues') . '</li>
|
|
||||||
<li>'. __('1st section\\Discuss and make a decision') . '</li>
|
|
||||||
</ol>
|
|
||||||
<p>'. __('1st section\\Do you want to ') . '<a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. __('1st section\\view an example?') .'</a></p>
|
|
||||||
</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config['show_the_software'] == true){
|
$demoPoll = $pollService->findById('aqg259dth55iuhwm');
|
||||||
echo '<div class="col-md-'.$colmd.'">
|
$nbcol = $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden'];
|
||||||
<h3>'. __('2nd section\\The software') .'</h3>
|
|
||||||
<p class="text-center" role="presentation"><span class="glyphicon glyphicon-cloud" style="font-size:50px"></span></p>
|
|
||||||
<p>'. __('2nd section\\Framadate was initially based on '). '<a href="https://sourcesup.cru.fr/projects/studs/">Studs</a>'. __('2nd section\\ a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.</p>
|
|
||||||
<p>'. __('2nd section\\This software needs javascript and cookies enabled. It is compatible with the following web browsers:') .'</p>
|
|
||||||
<ul>
|
|
||||||
<li>Microsoft Internet Explorer 9+</li>
|
|
||||||
<li>Google Chrome 19+</li>
|
|
||||||
<li>Firefox 12+</li>
|
|
||||||
<li>Safari 5+</li>
|
|
||||||
<li>Opera 11+</li>
|
|
||||||
</ul>
|
|
||||||
<p>'. __('2nd section\\It is governed by the ').'<a href="http://www.cecill.info">'. __('2nd section\\CeCILL-B license').'</a>.</p>
|
|
||||||
</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config['show_cultivate_your_garden'] == true){
|
$smarty->assign('show_what_is_that', $config['show_what_is_that']);
|
||||||
echo '<div class="col-md-'.$colmd.'">
|
$smarty->assign('show_the_software', $config['show_the_software']);
|
||||||
<h3>'. __('3rd section\\Cultivate your garden') .'</h3>
|
$smarty->assign('show_cultivate_your_garden', $config['show_cultivate_your_garden']);
|
||||||
<p class="text-center" role="presentation"><span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span></p>
|
$smarty->assign('col_size', 12 / $nbcol);
|
||||||
<p>'. __('3rd section\\To participate in the software development, suggest improvements or simply download it, please visit ') .'<a href="https://git.framasoft.org/framasoft/framadate">'.__('3rd section\\the development site').'</a>.</p>
|
$smarty->assign('demo_poll', $demoPoll);
|
||||||
<br />
|
|
||||||
<p>'. __('3rd section\\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>';
|
|
||||||
}
|
|
||||||
echo '</div>'."\n";
|
|
||||||
|
|
||||||
bandeau_pied();
|
$smarty->assign('title', __('Generic', 'Make your polls'));
|
||||||
|
|
||||||
|
$smarty->display('index.tpl');
|
||||||
|
@ -62,15 +62,15 @@
|
|||||||
"Define dates or subjects to choose": "Datum- oder Auswahlmöglichkeiten definieren",
|
"Define dates or subjects to choose": "Datum- oder Auswahlmöglichkeiten definieren",
|
||||||
"Send the poll link to your friends or colleagues": "Link zur Umfrage an Ihre Freunde oder Kollegen schicken",
|
"Send the poll link to your friends or colleagues": "Link zur Umfrage an Ihre Freunde oder Kollegen schicken",
|
||||||
"Discuss and make a decision": "Besprechen und Entscheidung treffen",
|
"Discuss and make a decision": "Besprechen und Entscheidung treffen",
|
||||||
"Do you want to ": "Wollen Sie sich ",
|
"Do you want to": "Wollen Sie sich",
|
||||||
"view an example?": "einen Beispiel ansehen?"
|
"view an example?": "einen Beispiel ansehen?"
|
||||||
},
|
},
|
||||||
"2nd section": {
|
"2nd section": {
|
||||||
"The software": "Die Software",
|
"The software": "Die Software",
|
||||||
"Framadate was initially based on ": "Framadate war am Anfang auf ",
|
"Framadate was initially based on ": "Framadate war am Anfang auf ",
|
||||||
" a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft": " basiert, eine von der Straßburg-Universität entwickelte Software. Heutzutage wird sie von der Framasoft-Vereinigung entwickelt.",
|
"a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.": "basiert, eine von der Straßburg-Universität entwickelte Software. Heutzutage wird sie von der Framasoft-Vereinigung entwickelt.",
|
||||||
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "Für diese Software müssen Javascript und Cookie aktiviert sein. Sie ist mit den folgenden Browsers kompatibel:",
|
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "Für diese Software müssen Javascript und Cookie aktiviert sein. Sie ist mit den folgenden Browsers kompatibel:",
|
||||||
"It is governed by the ": "Sie ist lizenziert unter der ",
|
"It is governed by the": "Sie ist lizenziert unter der",
|
||||||
"CeCILL-B license": "CeCILL-B Lizenz"
|
"CeCILL-B license": "CeCILL-B Lizenz"
|
||||||
},
|
},
|
||||||
"3rd section": {
|
"3rd section": {
|
||||||
|
@ -62,15 +62,15 @@
|
|||||||
"Define dates or subjects to choose": "Define dates or subjects to choose",
|
"Define dates or subjects to choose": "Define dates or subjects to choose",
|
||||||
"Send the poll link to your friends or colleagues": "Send the poll link to your friends or colleagues",
|
"Send the poll link to your friends or colleagues": "Send the poll link to your friends or colleagues",
|
||||||
"Discuss and make a decision": "Discuss and make a decision",
|
"Discuss and make a decision": "Discuss and make a decision",
|
||||||
"Do you want to ": "Do you want to ",
|
"Do you want to": "Do you want to",
|
||||||
"view an example?": "view an example?"
|
"view an example?": "view an example?"
|
||||||
},
|
},
|
||||||
"2nd section": {
|
"2nd section": {
|
||||||
"The software": "The software",
|
"The software": "The software",
|
||||||
"Framadate was initially based on ": "Framadate was initially based on ",
|
"Framadate was initially based on ": "Framadate was initially based on ",
|
||||||
" a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft": " a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft",
|
"a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.": "a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.",
|
||||||
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "This software needs javascript and cookies enabled. It is compatible with the following web browsers:",
|
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "This software needs javascript and cookies enabled. It is compatible with the following web browsers:",
|
||||||
"It is governed by the ": "It is governed by the ",
|
"It is governed by the": "It is governed by the",
|
||||||
"CeCILL-B license": "CeCILL-B license"
|
"CeCILL-B license": "CeCILL-B license"
|
||||||
},
|
},
|
||||||
"3rd section": {
|
"3rd section": {
|
||||||
|
@ -62,15 +62,15 @@
|
|||||||
"Define dates or subjects to choose": "ES_Déterminez les dates ou les sujets à choisir",
|
"Define dates or subjects to choose": "ES_Déterminez les dates ou les sujets à choisir",
|
||||||
"Send the poll link to your friends or colleagues": "ES_Envoyez le lien du sondage à vos amis ou collègues",
|
"Send the poll link to your friends or colleagues": "ES_Envoyez le lien du sondage à vos amis ou collègues",
|
||||||
"Discuss and make a decision": "ES_Discutez et prenez votre décision",
|
"Discuss and make a decision": "ES_Discutez et prenez votre décision",
|
||||||
"Do you want to ": "ES_Voulez-vous ",
|
"Do you want to": "ES_Voulez-vous",
|
||||||
"view an example?": "ES_voir un exemple ?"
|
"view an example?": "ES_voir un exemple ?"
|
||||||
},
|
},
|
||||||
"2nd section": {
|
"2nd section": {
|
||||||
"The software": "ES_Le logiciel",
|
"The software": "ES_Le logiciel",
|
||||||
"Framadate was initially based on ": "ES_Framadate est initialement basé sur ",
|
"Framadate was initially based on ": "ES_Framadate est initialement basé sur ",
|
||||||
" a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft": "ES_ un logiciel développé par l'Université de Strasbourg. Aujourd'hui, son développement est assuré par l’association Framasoft",
|
"a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.": "ES_ un logiciel développé par l'Université de Strasbourg. Aujourd'hui, son développement est assuré par l’association Framasoft.",
|
||||||
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "ES_Ce logiciel requiert l’activation du javascript et des cookies. Il est compatible avec les navigateurs web suivants :",
|
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "ES_Ce logiciel requiert l’activation du javascript et des cookies. Il est compatible avec les navigateurs web suivants :",
|
||||||
"It is governed by the ": "ES_Il est régi par la ",
|
"It is governed by the": "ES_Il est régi par la",
|
||||||
"CeCILL-B license": "ES_licence CeCILL-B"
|
"CeCILL-B license": "ES_licence CeCILL-B"
|
||||||
},
|
},
|
||||||
"3rd section": {
|
"3rd section": {
|
||||||
|
@ -62,15 +62,15 @@
|
|||||||
"Define dates or subjects to choose": "Déterminez les dates ou les sujets à choisir",
|
"Define dates or subjects to choose": "Déterminez les dates ou les sujets à choisir",
|
||||||
"Send the poll link to your friends or colleagues": "Envoyez le lien du sondage à vos amis ou collègues",
|
"Send the poll link to your friends or colleagues": "Envoyez le lien du sondage à vos amis ou collègues",
|
||||||
"Discuss and make a decision": "Discutez et prenez votre décision",
|
"Discuss and make a decision": "Discutez et prenez votre décision",
|
||||||
"Do you want to ": "Voulez-vous ",
|
"Do you want to": "Voulez-vous",
|
||||||
"view an example?": "voir un exemple ?"
|
"view an example?": "voir un exemple ?"
|
||||||
},
|
},
|
||||||
"2nd section": {
|
"2nd section": {
|
||||||
"The software": "Le logiciel",
|
"The software": "Le logiciel",
|
||||||
"Framadate was initially based on ": "Framadate est initialement basé sur ",
|
"Framadate was initially based on ": "Framadate est initialement basé sur ",
|
||||||
" a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft": " un logiciel développé par l'Université de Strasbourg. Aujourd'hui, son développement est assuré par l’association Framasoft",
|
"a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.": "un logiciel développé par l'Université de Strasbourg. Aujourd'hui, son développement est assuré par l’association Framasoft.",
|
||||||
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "Ce logiciel requiert l’activation du javascript et des cookies. Il est compatible avec les navigateurs web suivants :",
|
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "Ce logiciel requiert l’activation du javascript et des cookies. Il est compatible avec les navigateurs web suivants :",
|
||||||
"It is governed by the ": "Il est régi par la ",
|
"It is governed by the": "Il est régi par la",
|
||||||
"CeCILL-B license": "licence CeCILL-B"
|
"CeCILL-B license": "licence CeCILL-B"
|
||||||
},
|
},
|
||||||
"3rd section": {
|
"3rd section": {
|
||||||
|
112
tpl/index.tpl
Normal file
112
tpl/index.tpl
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
{extends file='page.tpl'}
|
||||||
|
|
||||||
|
{block name=main}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<p class="home-choice">
|
||||||
|
<a href="{$SERVER_URL}infos_sondage.php?choix_sondage=date" class="opacity" role="button">
|
||||||
|
<img class="img-responsive center-block" src="{'images/date.png'|resource}" alt=""/>
|
||||||
|
<br/>
|
||||||
|
<span class="btn btn-primary btn-lg">
|
||||||
|
<span class="glyphicon glyphicon-calendar"></span>
|
||||||
|
{__('Homepage', 'Schedule an event')}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<p class="home-choice">
|
||||||
|
<a href="{$SERVER_URL}infos_sondage.php?choix_sondage=autre" class="opacity" role="button">
|
||||||
|
<img alt="" class="img-responsive center-block" src="{'images/classic.png'|resource}"/>
|
||||||
|
<br/>
|
||||||
|
<span class="btn btn-info btn-lg">
|
||||||
|
<span class="glyphicon glyphicon-stats"></span>
|
||||||
|
{__('Homepage', 'Make a classic poll')}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr role="presentation"/>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
{if $show_what_is_that}
|
||||||
|
<div class="col-md-{$col_size}">
|
||||||
|
<h3>{__('1st section', 'What is that?')}</h3>
|
||||||
|
|
||||||
|
<p class="text-center" role="presentation">
|
||||||
|
<span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>{__('1st section', 'Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.')}</p>
|
||||||
|
|
||||||
|
<p>{__('1st section', 'Here is how it works:')}</p>
|
||||||
|
<ol>
|
||||||
|
<li>{__('1st section', 'Make a poll')}</li>
|
||||||
|
<li>{__('1st section', 'Define dates or subjects to choose')}</li>
|
||||||
|
<li>{__('1st section', 'Send the poll link to your friends or colleagues')}</li>
|
||||||
|
<li>{__('1st section', 'Discuss and make a decision')}</li>
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
{if $demo_poll != null}
|
||||||
|
<p>
|
||||||
|
{__('1st section', 'Do you want to')}
|
||||||
|
<a href="{'aqg259dth55iuhwm'|poll_url}">{__('1st section', 'view an example?')}</a>
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{if $show_the_software}
|
||||||
|
<div class="col-md-{$col_size}">
|
||||||
|
<h3>{__('2nd section', 'The software')}</h3>
|
||||||
|
|
||||||
|
<p class="text-center" role="presentation">
|
||||||
|
<span class="glyphicon glyphicon-cloud" style="font-size:50px"></span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>{__('2nd section', 'Framadate was initially based on ')}
|
||||||
|
<a href="https://sourcesup.cru.fr/projects/studs/">Studs</a>
|
||||||
|
{__('2nd section', 'a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.')}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>{__('2nd section', 'This software needs javascript and cookies enabled. It is compatible with the following web browsers:')}</p>
|
||||||
|
<ul>
|
||||||
|
<li>Microsoft Internet Explorer 9+</li>
|
||||||
|
<li>Google Chrome 19+</li>
|
||||||
|
<li>Firefox 12+</li>
|
||||||
|
<li>Safari 5+</li>
|
||||||
|
<li>Opera 11+</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
{__('2nd section', 'It is governed by the')}
|
||||||
|
<a href="http://www.cecill.info">{__('2nd section', 'CeCILL-B license')}</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
{if $show_cultivate_your_garden}
|
||||||
|
<div class="col-md-{$col_size}">
|
||||||
|
<h3>{__('3rd section', 'Cultivate your garden')}</h3>
|
||||||
|
|
||||||
|
<p class="text-center" role="presentation">
|
||||||
|
<span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{__('3rd section', 'To participate in the software development, suggest improvements or simply download it, please visit ')}
|
||||||
|
<a href="https://git.framasoft.org/framasoft/framadate">{__('3rd section', 'the development site')}</a>.
|
||||||
|
</p>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<p>{__('3rd section', '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>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/block}
|
Loading…
Reference in New Issue
Block a user