Smartysize index.php

This commit is contained in:
Olivier PEREZ 2015-03-29 19:32:15 +02:00
parent c3fbbb8bf8
commit a2f2118087
6 changed files with 144 additions and 87 deletions

View File

@ -16,85 +16,30 @@
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
* 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';
if (is_readable('bandeaux_local.php')) {
include_once('bandeaux_local.php');
} else {
include_once('bandeaux.php');
}
/* SERVICES */
/* -------- */
$logService = '\Framadate\Services\LogService';
$pollService = new PollService($connect, new $logService());
// affichage de la 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">';
/* PAGE */
/* ---- */
$demoPoll = $pollService->findById('aqg259dth55iuhwm');
$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){
echo '<div class="col-md-'.$colmd.'">
<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>';
}
$smarty->assign('show_what_is_that', $config['show_what_is_that']);
$smarty->assign('show_the_software', $config['show_the_software']);
$smarty->assign('show_cultivate_your_garden', $config['show_cultivate_your_garden']);
$smarty->assign('col_size', 12 / $nbcol);
$smarty->assign('demo_poll', $demoPoll);
if($config['show_cultivate_your_garden'] == true){
echo '<div class="col-md-'.$colmd.'">
<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>';
}
echo '</div>'."\n";
$smarty->assign('title', __('Generic', 'Make your polls'));
bandeau_pied();
$smarty->display('index.tpl');

View File

@ -68,7 +68,7 @@
"2nd section": {
"The software": "Die Software",
"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:",
"It is governed by the": "Sie ist lizenziert unter der",
"CeCILL-B license": "CeCILL-B Lizenz"

View File

@ -68,7 +68,7 @@
"2nd section": {
"The software": "The software",
"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:",
"It is governed by the": "It is governed by the",
"CeCILL-B license": "CeCILL-B license"

View File

@ -68,7 +68,7 @@
"2nd section": {
"The software": "ES_Le logiciel",
"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 lassociation 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 lassociation Framasoft.",
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "ES_Ce logiciel requiert lactivation 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",
"CeCILL-B license": "ES_licence CeCILL-B"

View File

@ -68,7 +68,7 @@
"2nd section": {
"The software": "Le logiciel",
"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 lassociation 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 lassociation Framasoft.",
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "Ce logiciel requiert lactivation du javascript et des cookies. Il est compatible avec les navigateurs web suivants :",
"It is governed by the": "Il est régi par la",
"CeCILL-B license": "licence CeCILL-B"

112
tpl/index.tpl Normal file
View 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}