|
1
|
|
|
<?php |
|
2
|
|
|
require_once('../class.ProfilesPage.php'); |
|
3
|
|
|
class ProfilesLeadPage extends \Flipside\Http\FlipAdminPage |
|
4
|
|
|
{ |
|
5
|
|
|
private $is_lead; |
|
6
|
|
|
|
|
7
|
|
|
public function __construct($title) |
|
8
|
|
|
{ |
|
9
|
|
|
parent::__construct($title); |
|
10
|
|
|
if($this->user == false) |
|
11
|
|
|
{ |
|
12
|
|
|
$this->is_lead = false; |
|
13
|
|
|
} |
|
14
|
|
|
else |
|
15
|
|
|
{ |
|
16
|
|
|
$this->is_lead = $this->user->isInGroupNamed('Leads'); |
|
17
|
|
|
if(!$this->is_lead) |
|
18
|
|
|
{ |
|
19
|
|
|
$this->is_lead = $this->user->isInGroupNamed('CC'); |
|
20
|
|
|
} |
|
21
|
|
|
} |
|
22
|
|
|
if($this->is_lead) |
|
23
|
|
|
{ |
|
24
|
|
|
$this->is_admin = $this->is_lead; |
|
25
|
|
|
} |
|
26
|
|
|
$this->add_leads_css(); |
|
27
|
|
|
$this->addWellKnownJS(JS_DATATABLE, false); |
|
28
|
|
|
$this->addWellKnownJS(JQUERY_VALIDATE); |
|
29
|
|
|
$this->addWellKnownJS(JS_METISMENU); |
|
30
|
|
|
$this->addJS('../_admin/js/admin.js'); |
|
31
|
|
|
$this->addWellKnownJS(JS_LOGIN); |
|
32
|
|
|
|
|
33
|
|
|
$dirMenu = array( |
|
34
|
|
|
'All' => 'directory.php', |
|
35
|
|
|
'AAR' => 'directory.php?filter=aar', |
|
36
|
|
|
'AFs' => 'directory.php?filter=af', |
|
37
|
|
|
'CC' => 'directory.php?filter=cc', |
|
38
|
|
|
'360/24/7 Department' => 'directory.php?filter=360', |
|
39
|
|
|
'Art' => 'directory.php?filter=Art', |
|
40
|
|
|
'City Planning' => 'directory.php?filter=CityPlanning', |
|
41
|
|
|
'Communications' => 'directory.php?filter=Comm', |
|
42
|
|
|
'Genesis' => 'directory.php?filter=Genesis', |
|
43
|
|
|
'Safety' => 'directory.php?filter=Safety', |
|
44
|
|
|
'Site-Ops' => 'directory.php?filter=Ops', |
|
45
|
|
|
'Site Prep' => 'directory.php?filter=siteprep', |
|
46
|
|
|
'Site Sign-Off' => 'directory.php?filter=sign-off', |
|
47
|
|
|
'Volunteer Coordinator' => 'directory.php?filter=vc' |
|
48
|
|
|
); |
|
49
|
|
|
|
|
50
|
|
|
$this->content['header']['sidebar'] = array(); |
|
51
|
|
|
$this->content['header']['sidebar']['Dashboard'] = array('icon' => 'fa-dashboard', 'url' => 'index.php'); |
|
52
|
|
|
$this->content['header']['sidebar']['Directory'] = array('icon' => 'fa-th-list', 'menu' => $dirMenu); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
protected function add_leads_css() |
|
56
|
|
|
{ |
|
57
|
|
|
$this->addWellKnownCSS(CSS_DATATABLE); |
|
58
|
|
|
$this->addCSS('../css/profiles.css'); |
|
59
|
|
|
$this->addCSS('css/lead.css'); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
public function isAdmin() |
|
63
|
|
|
{ |
|
64
|
|
|
return $this->is_lead; |
|
65
|
|
|
} |
|
66
|
|
|
} |
|
67
|
|
|
/* vim: set tabstop=4 shiftwidth=4 expandtab: */ |
|
68
|
|
|
|