Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
piphone-front
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
piphone
piphone-front
Commits
11c151b4
Commit
11c151b4
authored
Jan 11, 2017
by
okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let's get group types
parent
a2c99ff6
Pipeline
#739
failed with stage
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
75 deletions
+87
-75
app/Api.php
app/Api.php
+6
-0
app/Main.php
app/Main.php
+7
-0
templates/contact.html
templates/contact.html
+74
-75
No files found.
app/Api.php
View file @
11c151b4
...
...
@@ -47,6 +47,12 @@ class Api {
return
json_decode
(
$json
,
true
);
}
// //Asking for complete list of group types
static
function
get_group_types
()
{
$json
=
Api
::
get
(
"campaigns/"
.
CAMPAIGN_ID
.
"/grouptypes"
);
return
json_decode
(
$json
,
true
);
}
// Asking for complete list of feedback categories
static
function
get_feedback_categories
()
{
$json
=
Api
::
get
(
"campaigns/"
.
CAMPAIGN_ID
.
"/categories"
);
...
...
app/Main.php
View file @
11c151b4
...
...
@@ -16,6 +16,13 @@ class Main extends Controller {
//TODO: use weight for random
$rand_id
=
rand
(
0
,
count
(
$f3
->
get
(
'contacts'
))
-
1
);
$contacts
=
$f3
->
get
(
'contacts'
);
$groups
=
Api
::
get_groups
();
$f3
->
set
(
'groups'
,
$groups
);
$group_types
=
Api
::
get_group_types
();
$f3
->
set
(
'group_types'
,
$group_types
);
$f3
->
set
(
'contact'
,
$contacts
[
$rand_id
]);
$f3
->
set
(
'random'
,
rand
(
0
,
2
));
$f3
->
set
(
'block_content'
,
'home.html'
);
...
...
templates/contact.html
View file @
11c151b4
...
...
@@ -42,7 +42,7 @@
<div>
<dl
class=
"dl-horizontal hidden-xs"
id=
"resume"
>
<repeat
group=
"{{ @contact.groups }}"
value=
"{{ @group }}"
>
<check
if=
"{{ @group.type!='C
ommittee' }}"
>
<check
if=
"{{ @group.type!='c
ommittee' }}"
>
<dt>
{{ @group.type }}:
</dt>
<dd><a
href=
"#"
>
{{ @group.name }}
</a></dd>
</check>
...
...
@@ -55,7 +55,7 @@
<div>
<ul
class=
"list-inline"
id=
"committee"
>
<repeat
group=
"{{ @contact.groups }}"
value=
"{{ @group }}"
>
<check
if=
"{{ @group.type=='C
ommittee' }}"
>
<check
if=
"{{ @group.type=='c
ommittee' }}"
>
<li><abbr
title=
"{{ @group.name }}"
class=
"initialism"
><ahref
="
https:
//
memopol.lqdn.fr
/
europe
/
parliament
/
committee
/{{
@
group.name
}}/"
><div
class=
"well well-sm"
>
{{ @group.name }}
</div></a></abbr></li>
</check>
</repeat>
...
...
@@ -90,7 +90,6 @@
<!-- /random -->
</div>
<!-- /droite -->
</div>
<!-- /row-->
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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