Skip to content

Commit 93cee47

Browse files
committed
add initial code for management group view
1 parent 1c34ef6 commit 93cee47

3 files changed

Lines changed: 59 additions & 187 deletions

File tree

com_ccpbiosim/media/css/teams.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.management-team-card-hover {
2+
transition: transform 0.25s ease, box-shadow 0.25s ease;
3+
}
4+
5+
.management-team-card-hover:hover {
6+
transform: translateY(-6px);
7+
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
8+
}
9+
10+
.management-team-social a {
11+
color: #555;
12+
margin: 0 8px;
13+
font-size: 1.2rem;
14+
transition: color 0.2s ease;
15+
}
16+
17+
.management-team-social a:hover {
18+
color: #0d6efd;
19+
}

com_ccpbiosim/media/joomla.asset.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
"name": "com_ccpbiosim.software",
4545
"type": "script",
4646
"uri": "com_ccpbiosim/software.js"
47+
},
48+
{
49+
"name": "com_ccpbiosim.teams",
50+
"type": "style",
51+
"uri": "com_ccpbiosim/teams.css"
4752
}
4853
]
4954
}

com_ccpbiosim/site/tmpl/managementteams/profile.php

Lines changed: 35 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -33,196 +33,44 @@
3333
$wa = $this->document->getWebAssetManager();
3434
$wa->useStyle('com_ccpbiosim.list');
3535
?>
36+
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
37+
<link rel="stylesheet" href="media/com_ccpbiosim/css/teams.css">
3638

3739
<?php if ($this->params->get('show_page_heading')) : ?>
3840
<div class="page-header">
3941
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
4042
</div>
4143
<?php endif;?>
42-
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post"
43-
name="adminForm" id="adminForm">
44-
45-
<div class="table-responsive">
46-
<table class="table table-striped" id="managementteamList">
47-
<thead>
48-
<tr>
49-
50-
<th class=''>
51-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_ID', 'a.id', $listDirn, $listOrder); ?>
52-
</th>
53-
54-
<th >
55-
<?php echo HTMLHelper::_('grid.sort', 'JPUBLISHED', 'a.state', $listDirn, $listOrder); ?>
56-
</th>
57-
58-
<th class=''>
59-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_TITLE', 'a.title', $listDirn, $listOrder); ?>
60-
</th>
61-
62-
<th class=''>
63-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_FIRSTNAME', 'a.firstname', $listDirn, $listOrder); ?>
64-
</th>
65-
66-
<th class=''>
67-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_SURNAME', 'a.surname', $listDirn, $listOrder); ?>
68-
</th>
69-
70-
<th class=''>
71-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_PROFILEPHOTO', 'a.profilephoto', $listDirn, $listOrder); ?>
72-
</th>
73-
74-
<th class=''>
75-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_ROLE', 'a.role', $listDirn, $listOrder); ?>
76-
</th>
77-
78-
<th class=''>
79-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_INSITUTION', 'a.insitution', $listDirn, $listOrder); ?>
80-
</th>
81-
82-
<th class=''>
83-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_GROUPWEBSITE', 'a.groupwebsite', $listDirn, $listOrder); ?>
84-
</th>
85-
86-
<th class=''>
87-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_SOCIAL', 'a.social', $listDirn, $listOrder); ?>
88-
</th>
89-
90-
<th class=''>
91-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_CHAIR', 'a.chair', $listDirn, $listOrder); ?>
92-
</th>
93-
94-
<th class=''>
95-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_COSECPROJECTLEAD', 'a.cosecprojectlead', $listDirn, $listOrder); ?>
96-
</th>
97-
98-
<th class=''>
99-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_ADMINASSISTANT', 'a.adminassistant', $listDirn, $listOrder); ?>
100-
</th>
101-
102-
<th class=''>
103-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_MANAGEMENTTEAMS_SECRETARY', 'a.secretary', $listDirn, $listOrder); ?>
104-
</th>
105-
106-
<?php if ($canEdit || $canDelete): ?>
107-
<th class="center">
108-
<?php echo Text::_('COM_CCPBIOSIM_MANAGEMENTTEAMS_ACTIONS'); ?>
109-
</th>
110-
<?php endif; ?>
111-
112-
</tr>
113-
</thead>
114-
<tfoot>
115-
<tr>
116-
<td colspan="<?php echo isset($this->items[0]) ? count(get_object_vars($this->items[0])) : 10; ?>">
117-
<div class="pagination">
118-
<?php echo $this->pagination->getPagesLinks(); ?>
119-
</div>
120-
</td>
121-
</tr>
122-
</tfoot>
123-
<tbody>
124-
<?php foreach ($this->items as $i => $item) : ?>
125-
<?php $canEdit = $user->authorise('core.edit', 'com_ccpbiosim'); ?>
126-
<?php if (!$canEdit && $user->authorise('core.edit.own', 'com_ccpbiosim')): ?>
127-
<?php $canEdit = Factory::getApplication()->getIdentity()->id == $item->created_by; ?>
128-
<?php endif; ?>
129-
130-
<tr class="row<?php echo $i % 2; ?>">
131-
132-
<td>
133-
<?php echo $item->id; ?>
134-
</td>
135-
<td>
136-
<?php $class = ($canChange) ? 'active' : 'disabled'; ?>
137-
<a class="btn btn-micro <?php echo $class; ?>" href="<?php echo ($canChange) ? Route::_('index.php?option=com_ccpbiosim&task=managementteam.publish&id=' . $item->id . '&state=' . (($item->state + 1) % 2), false, 2) : '#'; ?>">
138-
<?php if ($item->state == 1): ?>
139-
<i class="icon-publish"></i>
140-
<?php else: ?>
141-
<i class="icon-unpublish"></i>
142-
<?php endif; ?>
143-
</a>
144-
</td>
145-
<td>
146-
<?php echo $item->title; ?>
147-
</td>
148-
<td>
149-
<?php echo $item->firstname; ?>
150-
</td>
151-
<td>
152-
<?php echo $item->surname; ?>
153-
</td>
154-
<td>
155-
<img src="<?php echo Uri::root() . $item->profilephoto; ?>" alt="Preview" style="max-height: 50px;" />
156-
</td>
157-
<td>
158-
<?php echo $item->role; ?>
159-
</td>
160-
<td>
161-
<?php echo $item->insitution; ?>
162-
</td>
163-
<td>
164-
<?php echo $item->groupwebsite; ?>
165-
</td>
166-
<td>
167-
<?php echo $item->social; ?>
168-
</td>
169-
<td>
170-
<?php echo $item->chair; ?>
171-
</td>
172-
<td>
173-
<?php echo $item->cosecprojectlead; ?>
174-
</td>
175-
<td>
176-
<?php echo $item->adminassistant; ?>
177-
</td>
178-
<td>
179-
<?php echo $item->secretary; ?>
180-
</td>
181-
<?php if ($canEdit || $canDelete): ?>
182-
<td class="center">
183-
<?php $canCheckin = Factory::getApplication()->getIdentity()->authorise('core.manage', 'com_ccpbiosim.' . $item->id) || $item->checked_out == Factory::getApplication()->getIdentity()->id; ?>
184-
185-
<?php if($canEdit && $item->checked_out == 0): ?>
186-
<a href="<?php echo Route::_('index.php?option=com_ccpbiosim&task=managementteam.edit&id=' . $item->id, false, 2); ?>" class="btn btn-mini" type="button"><i class="icon-edit" ></i></a>
187-
<?php endif; ?>
188-
<?php if ($canDelete): ?>
189-
<a href="<?php echo Route::_('index.php?option=com_ccpbiosim&task=managementteamform.remove&id=' . $item->id, false, 2); ?>" class="btn btn-mini delete-button" type="button"><i class="icon-trash" ></i></a>
190-
<?php endif; ?>
191-
</td>
192-
<?php endif; ?>
193-
194-
</tr>
195-
<?php endforeach; ?>
196-
</tbody>
197-
</table>
198-
</div>
199-
<?php if ($canCreate) : ?>
200-
<a href="<?php echo Route::_('index.php?option=com_ccpbiosim&task=managementteamform.edit&id=0', false, 0); ?>"
201-
class="btn btn-success btn-small"><i
202-
class="icon-plus"></i>
203-
<?php echo Text::_('COM_CCPBIOSIM_ADD_ITEM'); ?></a>
204-
<?php endif; ?>
205-
206-
<input type="hidden" name="task" value=""/>
207-
<input type="hidden" name="boxchecked" value="0"/>
208-
<input type="hidden" name="filter_order" value=""/>
209-
<input type="hidden" name="filter_order_Dir" value=""/>
210-
<?php echo HTMLHelper::_('form.token'); ?>
211-
</form>
212-
213-
<?php
214-
if($canDelete) {
215-
$wa->addInlineScript("
216-
jQuery(document).ready(function () {
217-
jQuery('.delete-button').click(deleteItem);
218-
});
219-
220-
function deleteItem() {
221-
222-
if (!confirm(\"" . Text::_('COM_CCPBIOSIM_DELETE_MESSAGE') . "\")) {
223-
return false;
224-
}
225-
}
226-
", [], [], ["jquery"]);
227-
}
228-
?>
44+
<p>Our management team is made up of leading academics from UK universities and national facilities.</p>
45+
46+
<div class="container my-5">
47+
<div class="row g-4">
48+
49+
<?php foreach ($this->items as $i => $item) : ?>
50+
<?php $canEdit = $user->authorise('core.edit', 'com_ccpbiosim'); ?>
51+
<?php if (!$canEdit && $user->authorise('core.edit.own', 'com_ccpbiosim')): ?>
52+
<?php $canEdit = Factory::getApplication()->getIdentity()->id == $item->created_by; ?>
53+
<?php endif; ?>
54+
55+
<div class="col-md-6 col-lg-4">
56+
<div class="card h-100 text-center shadow-sm management-team-card-hover">
57+
<img src="<?php echo Uri::root() . $item->profilephoto; ?>" alt="Profile Photo"
58+
class="rounded-circle mx-auto mt-4"
59+
style="width:160px;height:160px;object-fit:cover;">
60+
<div class="card-body">
61+
<h5 class="mb-1"><?php echo $item->title; ?> <?php echo $item->firstname; ?> <?php echo $item->surname; ?></h5>
62+
<p class="text-muted mb-3"><?php echo $item->role; ?></p>
63+
<p><?php echo $item->insitution; ?></p>
64+
<div class="management-team-social mt-3">
65+
<a href="#"><i class="bi bi-linkedin"></i></a>
66+
<a href="#"><i class="bi bi-envelope"></i></a>
67+
<a href="#"><i class="bi bi-twitter-x"></i></a>
68+
</div>
69+
</div>
70+
</div>
71+
</div>
72+
73+
<?php endforeach; ?>
74+
75+
</div>
76+
</div>

0 commit comments

Comments
 (0)