Commit 8c40758d authored by Mindiell's avatar Mindiell

Added page salespitch, restructuration of header

parent 6ababb63
......@@ -16,6 +16,9 @@ class Controller {
array("iso" => "en", "name"=>"English"),
);
$f3->set('languages', $languages);
// Init campaign informations
$f3->set('campaign', Api::get_campaign());
}
// Function called after routing
......
......@@ -6,7 +6,6 @@ class Main extends Controller {
* Presents campaign information and a random Contact
*/
function home($f3,$args) {
$f3->set('campaign', Api::get_campaign());
$f3->set('contact', Api::get_contact());
$f3->set('block_content','home.html');
}
......@@ -76,4 +75,9 @@ class Main extends Controller {
$f3->set('block_content', 'contactslist.html');
}
function salespitch($f3, $args) {
$f3->set('block_content', 'salespitch.html');
}
};
......@@ -5,6 +5,7 @@ GET|POST @feedback:/feedback=Main->feedbackform
GET|POST @call:/call/@id=Main->call
GET @contactslist:/contactslist=Main->contactslist
POST @feedbacksip:/feedbacksip=Main->feedbacksip
GET @salespitch:/salespitch=Main->salespitch
; Fake REST API
GET /restapi/campaign/@id=RestApi->campaign
......
<!-- contact page -->
<h3>Random MEP</h3>
<p class="left"><img src="http://www.europarl.europa.eu/mepphoto/108570.jpg" alt="mep"></p>
<p id="name">{{ @contact.first_name }} {{ @contact.last_name }}</p>
......@@ -11,9 +10,6 @@
</check>
</repeat>
</ul>
<a href="/call/{{ @contact.id }}">Use Piphone</a>
<ul id="committee">
<repeat group="{{ @contact.groups }}" value="{{ @group }}">
<check if="{{ @group.type=='Committee' }}">
......@@ -21,6 +17,7 @@
</check>
</repeat>
</ul>
<p id="info"><a href="https://memopol.lqdn.fr/europe/parliament/deputy/AmeliaAndersdotter/">Get more info…</a></p>
<p><a href="/call/{{ @contact.id }}">Use Piphone</a></p>
<!-- contact page -->
<!-- contacts list -->
<repeat group="{{ @contacts }}" value="{{ @contact }}">
<p>
<include href="contact.html" />
</p>
<form method="post" action="/call/{{ @contact.id }}">
<input type="submit" value="{{ _("Call") }}" />
</form>
<include href="contact.html" />
</repeat>
<!-- contacts list -->
......@@ -7,3 +7,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<section>
<h1>{{ _("PiPhone") }}</h1>
<h2>{{ _("Call Contact for free - and make yourself heard") }}</h2>
<repeat group="{{ @languages }}" value="{{ @language }}">
<a href="/lang/{{ @language.iso }}">{{ @language.name }}</a> |
</repeat>
</section>
<section>
<include href="toolbar.html" />
</section>
<section>
<h3>{{ @campaign.title }}</h3>
<p>{{ @campaign.description }}</p>
</section>
<!-- content -->
<h1>{{ _("PiPhone") }}</h1>
<h2>{{ _("Call Contact for free - and make yourself heard") }}</h2>
<section>
<repeat group="{{ @languages }}" value="{{ @language }}">
<a href="/lang/{{ @language.iso }}">{{ @language.name }}</a> |
</repeat>
</section>
<h3>{{ @campaign.title }}</h3>
<section id="abstract">{{ @campaign.description }}</section>
<section id="contact">
<include href="contact.html" />
</section>
......
<section>
<p>{{ _("To do...") }}</p>
</section>
<!-- toolbar page -->
<ul>
<li><a href="{{ @ALIASES.home }}">{{ _("Random Contact") }}</a></li>
<li><a href="{{ @ALIASES.contactslist }}">{{ _("Contacts list") }}</a></li>
<li><a href="{{ @ALIASES.salespitch }}">{{ _("Sales pitch") }}</a></li>
</ul>
<!-- toolbar page -->
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