Commit e47e05c5 authored by Rejo Zenger's avatar Rejo Zenger

Merge branch '31-add-language-picker-to-top-of-window' into 'develop'

Resolve "Add language picker to top of window"

Closes #31

See merge request !11
parents 308359e3 f511a25e
......@@ -17,6 +17,9 @@ class Controller {
);
$f3->set('languages', $languages);
$f3->set('LOCALES','app/dict/');
$f3->set('LANGUAGE', $args['lang']);
// Init campaign informations
$f3->set('campaign', Api::get_campaign());
......
......@@ -15,5 +15,3 @@ DEBUG=3
;LANGUAGE='en'
; Global variables of website
LOCALES='app/dict/'
[routes]
; Main site
GET @home:/=Main->home
GET|POST @feedback:/feedback=Main->feedbackform
GET|POST @call:/call/@id=Main->call
GET @home:/@lang=Main->home
GET|POST @feedback:/@lang/feedback=Main->feedbackform
GET|POST @call:/@lang/call/@id=Main->call
GET @contactslist:/contactslist=Main->contactslist
GET @feedbacksip:/calls/@callid=SIP->feedbacksip
GET @campaign:/campaign=Main->campaign
GET @piphone:/piphone=Main->piphone
GET @about:/about=Main->about
GET @campaign:/@lang/campaign=Main->campaign
GET @piphone:/@lang/piphone=Main->piphone
GET @about:/@lang/about=Main->about
; Fake REST API
GET /restapi/campaigns/@id=RestApi->campaign
......@@ -17,3 +17,6 @@ GET /restapi/campaigns/@id/feedback/categories=RestApi->categories
POST /restapi/campaigns/@id/feedback/add=RestApi->feedback_add
GET /restapi/campaigns/@id/arguments/@lang=RestApi->arguments
[redirects]
GET /=/en
......@@ -213,6 +213,19 @@ h4{
font-size: 90%;
line-height: 170%;
}
.languages{
margin-right: 20px;
}
.languages img {
height: 13px;
width: 23px;
display: inline-block;
margin-left: 15px;
box-shadow: 1px 1px 2px #ddd;
}
.languages li{
float: right;
}
@media only screen and (max-width: 1000px){
.is-reversed .content {
margin: 0;
......
flags/de.png

535 Bytes

flags/nl.png

407 Bytes

......@@ -140,6 +140,7 @@ function display_mep(contact) {
};
function update_mep(element) {
var lang = '{{@PARAMS.lang}}';
var contact = JSON.parse($(element).attr('data-json'));
if (contact['photo'] !== '') {
$('#contact-image').attr('src', contact['photo']);
......@@ -147,7 +148,7 @@ function update_mep(element) {
$('#contact-full_name').html(contact['first_name'] + ' ' + contact['last_name']);
$('#contact-full_name-2').html(contact['first_name'] + ' ' + contact['last_name']
+ '<i class="material-icons right">close</i>');
$('#form-contact').attr('action', '/call/' + contact['id'] + '/#MEP');
$('#form-contact').attr('action', '/' + lang + '/call/' + contact['id'] + '/#MEP');
$('#contact_id').attr('value', contact['id']);
$('.groups').each(function() {
var group_type = $(this).attr('data-name');
......
......@@ -23,7 +23,7 @@
<include href="argumentation.html">
<p class="meme-text call-meme feedback-call">{{ @piphone.feedbackform }}</p>
<p class="small">{{ @piphone.pleasetellus }}</p>
<form class="form" method="post" action="/feedback/#thanks" >
<form class="form" method="post" action="/{{ @PARAMS.lang }}/feedback/#thanks" >
<input type="hidden" id="contact_id" name="contact_id" value="{{ @contact_id }}" />
<select name="feedback_category" id="feedback_category" class="input-field">
<repeat group="{{ @feedback_categories }}" value="{{ @feedback_category }}">
......
......@@ -3,8 +3,8 @@
<div class="container">
<div class="footer_item">
<ul>
<li><a href="/">{{ @footer.root }}</a></li>
<li><a href="/about">{{ @footer.contactcredits }}</a></li>
<li><a href="{{ 'home' | alias }}">{{ @footer.root }}</a></li>
<li><a href="{{ 'about' | alias }}">{{ @footer.contactcredits }}</a></li>
</ul>
</div>
<div class="footer_item mailinglist">
......
......@@ -23,28 +23,34 @@
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Materialize -->
<link type="text/css" rel="stylesheet" href="/css/material-font.css">
<link type="text/css" rel="stylesheet" href="/css/material-font.css">
<link type="text/css" rel="stylesheet" href="/static/css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="/static/css/piphone.css" media="screen,projection"/>
<!-- JS Materialize -->
<script src="/static/js/jquery-2.1.1.js"></script>
<script type="text/javascript" src="/static/js/materialize.min.js"></script>
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
// tracker methods like "setCustomDimension" should be called before "trackPageView"
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//stats.bof.nl/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '16']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
// tracker methods like "setCustomDimension" should be called before "trackPageView"
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//stats.bof.nl/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '16']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<link rel="stylesheet" href="/css/index.css">
</head>
<body>
<ul class="languages">
<li class="en"><a href="/en"><img src="/flags/en.png"></a></li>
<li class="de"><a href="/de"><img src="/flags/de.png"></a></li>
<li class="nl"><a href="/nl"><img src="/flags/nl.png"></a></li>
</ul>
<main>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment