diff --git a/index.php b/index.php index b0199c4..e756076 100644 --- a/index.php +++ b/index.php @@ -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 ' -
-
-

- -
- '. __('Homepage\\Schedule an event') . ' -

-
-
-

- -
- '. __('Homepage\\Make a classic poll') . ' -

-
-
-
-
'; - $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 '
-

'. __('1st section\\What is that?') . '

- -

'. __('1st section\\Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'

-

'. __('1st section\\Here is how it works:') . '

-
    -
  1. '. __('1st section\\Make a poll') . '
  2. -
  3. '. __('1st section\\Define dates or subjects to choose') . '
  4. -
  5. '. __('1st section\\Send the poll link to your friends or colleagues') . '
  6. -
  7. '. __('1st section\\Discuss and make a decision') . '
  8. -
-

'. __('1st section\\Do you want to ') . ''. __('1st section\\view an example?') .'

-
'; - } +/* PAGE */ +/* ---- */ - if($config['show_the_software'] == true){ - echo '
-

'. __('2nd section\\The software') .'

- -

'. __('2nd section\\Framadate was initially based on '). 'Studs'. __('2nd section\\ a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.

-

'. __('2nd section\\This software needs javascript and cookies enabled. It is compatible with the following web browsers:') .'

- -

'. __('2nd section\\It is governed by the ').''. __('2nd section\\CeCILL-B license').'.

-
'; - } +$demoPoll = $pollService->findById('aqg259dth55iuhwm'); +$nbcol = $config['show_what_is_that'] + $config['show_the_software'] + $config['show_cultivate_your_garden']; - if($config['show_cultivate_your_garden'] == true){ - echo '
-

'. __('3rd section\\Cultivate your garden') .'

- -

'. __('3rd section\\To participate in the software development, suggest improvements or simply download it, please visit ') .''.__('3rd section\\the development site').'.

-
-

'. __('3rd section\\If you want to install the software for your own use and thus increase your independence, we help you on:') .'

-

framacloud.org

-
'; - } - echo '
'."\n"; +$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); -bandeau_pied(); +$smarty->assign('title', __('Generic', 'Make your polls')); + +$smarty->display('index.tpl'); diff --git a/locale/de.json b/locale/de.json index b78d228..418dc18 100644 --- a/locale/de.json +++ b/locale/de.json @@ -62,15 +62,15 @@ "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", "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?" }, "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 ", + "It is governed by the": "Sie ist lizenziert unter der", "CeCILL-B license": "CeCILL-B Lizenz" }, "3rd section": { diff --git a/locale/en.json b/locale/en.json index 1f79e89..b1b56ce 100644 --- a/locale/en.json +++ b/locale/en.json @@ -62,15 +62,15 @@ "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", "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?" }, "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 ", + "It is governed by the": "It is governed by the", "CeCILL-B license": "CeCILL-B license" }, "3rd section": { diff --git a/locale/es.json b/locale/es.json index abbe21d..3f2bc58 100644 --- a/locale/es.json +++ b/locale/es.json @@ -62,15 +62,15 @@ "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", "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 ?" }, "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 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 :", - "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" }, "3rd section": { diff --git a/locale/fr.json b/locale/fr.json index 1128f4a..0ebbc20 100644 --- a/locale/fr.json +++ b/locale/fr.json @@ -62,15 +62,15 @@ "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", "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 ?" }, "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 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 :", - "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" }, "3rd section": { diff --git a/tpl/index.tpl b/tpl/index.tpl new file mode 100644 index 0000000..ddd8cd7 --- /dev/null +++ b/tpl/index.tpl @@ -0,0 +1,112 @@ +{extends file='page.tpl'} + +{block name=main} +
+
+

+ + +
+ + + {__('Homepage', 'Schedule an event')} + +
+

+
+
+

+ + +
+ + + {__('Homepage', 'Make a classic poll')} + +
+

+
+
+
+
+ + {if $show_what_is_that} +
+

{__('1st section', 'What is that?')}

+ + + +

{__('1st section', 'Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.')}

+ +

{__('1st section', 'Here is how it works:')}

+
    +
  1. {__('1st section', 'Make a poll')}
  2. +
  3. {__('1st section', 'Define dates or subjects to choose')}
  4. +
  5. {__('1st section', 'Send the poll link to your friends or colleagues')}
  6. +
  7. {__('1st section', 'Discuss and make a decision')}
  8. +
+ + {if $demo_poll != null} +

+ {__('1st section', 'Do you want to')} + {__('1st section', 'view an example?')} +

+ {/if} +
+ {/if} + {if $show_the_software} +
+

{__('2nd section', 'The software')}

+ + + +

{__('2nd section', 'Framadate was initially based on ')} + Studs + {__('2nd section', 'a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.')} +

+ +

{__('2nd section', 'This software needs javascript and cookies enabled. It is compatible with the following web browsers:')}

+ +

+ {__('2nd section', 'It is governed by the')} + {__('2nd section', 'CeCILL-B license')}. +

+
+ {/if} + {if $show_cultivate_your_garden} +
+

{__('3rd section', 'Cultivate your garden')}

+ + + +

+ {__('3rd section', 'To participate in the software development, suggest improvements or simply download it, please visit ')} + {__('3rd section', 'the development site')}. +

+
+ +

{__('3rd section', 'If you want to install the software for your own use and thus increase your independence, we help you on:')}

+ +

+ + + framacloud.org + +

+
+ {/if} +
+{/block}