Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nico
piphone-front
Commits
8c40758d
Commit
8c40758d
authored
Nov 23, 2014
by
Mindiell
Browse files
Added page salespitch, restructuration of header
parent
6ababb63
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/Controller.php
View file @
8c40758d
...
...
@@ -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
...
...
app/Main.php
View file @
8c40758d
...
...
@@ -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'
);
}
};
app/routes.ini
View file @
8c40758d
...
...
@@ -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
...
...
templates/contact.html
View file @
8c40758d
<!-- 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 -->
templates/contactslist.html
View file @
8c40758d
<!-- 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 -->
templates/header.html
View file @
8c40758d
...
...
@@ -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>
templates/home.html
View file @
8c40758d
<!-- 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>
...
...
templates/salespitch.html
0 → 100644
View file @
8c40758d
<section>
<p>
{{ _("To do...") }}
</p>
</section>
templates/toolbar.html
0 → 100644
View file @
8c40758d
<!-- 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 -->
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment