Skip to content

Commit 6032466

Browse files
committed
copy layout code to default layouts
1 parent 7cb5912 commit 6032466

2 files changed

Lines changed: 54 additions & 375 deletions

File tree

com_ccpbiosim/site/tmpl/coreteammembers/default.php

Lines changed: 24 additions & 188 deletions
Original file line numberDiff line numberDiff line change
@@ -34,196 +34,32 @@
3434
$wa->useStyle('com_ccpbiosim.site')
3535
->useScript('com_ccpbiosim.site');
3636
?>
37-
3837
<?php if ($this->params->get('show_page_heading')) : ?>
3938
<div class="page-header">
4039
<h1> <?php echo $this->escape($this->params->get('page_heading')); ?> </h1>
4140
</div>
4241
<?php endif;?>
43-
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post"
44-
name="adminForm" id="adminForm">
45-
46-
<div class="table-responsive">
47-
<table class="table table-striped" id="coreteammemberList">
48-
<thead>
49-
<tr>
50-
51-
<th class=''>
52-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_ID', 'a.id', $listDirn, $listOrder); ?>
53-
</th>
54-
55-
<th >
56-
<?php echo HTMLHelper::_('grid.sort', 'JPUBLISHED', 'a.state', $listDirn, $listOrder); ?>
57-
</th>
58-
59-
<th class=''>
60-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_TITLE', 'a.title', $listDirn, $listOrder); ?>
61-
</th>
62-
63-
<th class=''>
64-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_FIRSTNAME', 'a.firstname', $listDirn, $listOrder); ?>
65-
</th>
66-
67-
<th class=''>
68-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_SURNAME', 'a.surname', $listDirn, $listOrder); ?>
69-
</th>
70-
71-
<th class=''>
72-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_PROFILEPHOTO', 'a.profilephoto', $listDirn, $listOrder); ?>
73-
</th>
74-
75-
<th class=''>
76-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_ROLE', 'a.role', $listDirn, $listOrder); ?>
77-
</th>
78-
79-
<th class=''>
80-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_INSITUTION', 'a.insitution', $listDirn, $listOrder); ?>
81-
</th>
82-
83-
<th class=''>
84-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_GROUPWEBSITE', 'a.groupwebsite', $listDirn, $listOrder); ?>
85-
</th>
86-
87-
<th class=''>
88-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_PROGRAMME', 'a.programme', $listDirn, $listOrder); ?>
89-
</th>
90-
91-
<th class=''>
92-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_SOCIAL', 'a.social', $listDirn, $listOrder); ?>
93-
</th>
94-
95-
<th class=''>
96-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_CHAIR', 'a.chair', $listDirn, $listOrder); ?>
97-
</th>
98-
99-
<th class=''>
100-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_COSECPROJECTLEAD', 'a.cosecprojectlead', $listDirn, $listOrder); ?>
101-
</th>
102-
103-
<th class=''>
104-
<?php echo HTMLHelper::_('grid.sort', 'COM_CCPBIOSIM_CORETEAMMEMBERS_ADMINASSISTANT', 'a.adminassistant', $listDirn, $listOrder); ?>
105-
</th>
106-
107-
<?php if ($canEdit || $canDelete): ?>
108-
<th class="center">
109-
<?php echo Text::_('COM_CCPBIOSIM_CORETEAMMEMBERS_ACTIONS'); ?>
110-
</th>
111-
<?php endif; ?>
112-
113-
</tr>
114-
</thead>
115-
<tfoot>
116-
<tr>
117-
<td colspan="<?php echo isset($this->items[0]) ? count(get_object_vars($this->items[0])) : 10; ?>">
118-
<div class="pagination">
119-
<?php echo $this->pagination->getPagesLinks(); ?>
120-
</div>
121-
</td>
122-
</tr>
123-
</tfoot>
124-
<tbody>
125-
<?php foreach ($this->items as $i => $item) : ?>
126-
<?php $canEdit = $user->authorise('core.edit', 'com_ccpbiosim'); ?>
127-
<?php if (!$canEdit && $user->authorise('core.edit.own', 'com_ccpbiosim')): ?>
128-
<?php $canEdit = Factory::getApplication()->getIdentity()->id == $item->created_by; ?>
129-
<?php endif; ?>
130-
131-
<tr class="row<?php echo $i % 2; ?>">
132-
133-
<td>
134-
<?php echo $item->id; ?>
135-
</td>
136-
<td>
137-
<?php $class = ($canChange) ? 'active' : 'disabled'; ?>
138-
<a class="btn btn-micro <?php echo $class; ?>" href="<?php echo ($canChange) ? Route::_('index.php?option=com_ccpbiosim&task=coreteammember.publish&id=' . $item->id . '&state=' . (($item->state + 1) % 2), false, 2) : '#'; ?>">
139-
<?php if ($item->state == 1): ?>
140-
<i class="icon-publish"></i>
141-
<?php else: ?>
142-
<i class="icon-unpublish"></i>
143-
<?php endif; ?>
144-
</a>
145-
</td>
146-
<td>
147-
<?php echo $item->title; ?>
148-
</td>
149-
<td>
150-
<?php echo $item->firstname; ?>
151-
</td>
152-
<td>
153-
<?php echo $item->surname; ?>
154-
</td>
155-
<td>
156-
<img src="<?php echo Uri::root() . $item->profilephoto; ?>" alt="Preview" style="max-height: 50px;" />
157-
</td>
158-
<td>
159-
<?php echo $item->role; ?>
160-
</td>
161-
<td>
162-
<?php echo $item->insitution; ?>
163-
</td>
164-
<td>
165-
<?php echo $item->groupwebsite; ?>
166-
</td>
167-
<td>
168-
<?php echo $item->programme; ?>
169-
</td>
170-
<td>
171-
<?php echo $item->social; ?>
172-
</td>
173-
<td>
174-
<?php echo $item->chair; ?>
175-
</td>
176-
<td>
177-
<?php echo $item->cosecprojectlead; ?>
178-
</td>
179-
<td>
180-
<?php echo $item->adminassistant; ?>
181-
</td>
182-
<?php if ($canEdit || $canDelete): ?>
183-
<td class="center">
184-
<?php $canCheckin = Factory::getApplication()->getIdentity()->authorise('core.manage', 'com_ccpbiosim.' . $item->id) || $item->checked_out == Factory::getApplication()->getIdentity()->id; ?>
185-
186-
<?php if($canEdit && $item->checked_out == 0): ?>
187-
<a href="<?php echo Route::_('index.php?option=com_ccpbiosim&task=coreteammember.edit&id=' . $item->id, false, 2); ?>" class="btn btn-mini" type="button"><i class="icon-edit" ></i></a>
188-
<?php endif; ?>
189-
<?php if ($canDelete): ?>
190-
<a href="<?php echo Route::_('index.php?option=com_ccpbiosim&task=coreteammemberform.remove&id=' . $item->id, false, 2); ?>" class="btn btn-mini delete-button" type="button"><i class="icon-trash" ></i></a>
191-
<?php endif; ?>
192-
</td>
193-
<?php endif; ?>
194-
195-
</tr>
196-
<?php endforeach; ?>
197-
</tbody>
198-
</table>
199-
</div>
200-
<?php if ($canCreate) : ?>
201-
<a href="<?php echo Route::_('index.php?option=com_ccpbiosim&task=coreteammemberform.edit&id=0', false, 0); ?>"
202-
class="btn btn-success btn-small"><i
203-
class="icon-plus"></i>
204-
<?php echo Text::_('COM_CCPBIOSIM_ADD_ITEM'); ?></a>
205-
<?php endif; ?>
206-
207-
<input type="hidden" name="task" value=""/>
208-
<input type="hidden" name="boxchecked" value="0"/>
209-
<input type="hidden" name="filter_order" value=""/>
210-
<input type="hidden" name="filter_order_Dir" value=""/>
211-
<?php echo HTMLHelper::_('form.token'); ?>
212-
</form>
213-
214-
<?php
215-
if($canDelete) {
216-
$wa->addInlineScript("
217-
jQuery(document).ready(function () {
218-
jQuery('.delete-button').click(deleteItem);
219-
});
220-
221-
function deleteItem() {
222-
223-
if (!confirm(\"" . Text::_('COM_CCPBIOSIM_DELETE_MESSAGE') . "\")) {
224-
return false;
225-
}
226-
}
227-
", [], [], ["jquery"]);
228-
}
229-
?>
42+
<p>Our core team is made up of our chair, administrative support from the chairs institution and CoSeC support staff from UKRI - STFC.</br></p>
43+
44+
<div class="container container-md">
45+
<div class="row g-4">
46+
<?php foreach ($this->items as $i => $item) : ?>
47+
<?php $canEdit = $user->authorise('core.edit', 'com_ccpbiosim'); ?>
48+
<?php if (!$canEdit && $user->authorise('core.edit.own', 'com_ccpbiosim')): ?>
49+
<?php $canEdit = Factory::getApplication()->getIdentity()->id == $item->created_by; ?>
50+
<?php endif; ?>
51+
<div class="col-12 col-md-6 fade-up">
52+
<div class="core-team-card core-team-horizontal">
53+
<div class="core-team-image-wrap">
54+
<img src="<?php echo Uri::root() . $item->profilephoto; ?>" alt="<?php echo $item->title; ?> <?php echo $item->firstname; ?> <?php echo $item->surname; ?>">
55+
</div>
56+
<div class="core-team-content">
57+
<div class="core-team-name"><?php echo $item->title; ?> <?php echo $item->firstname; ?> <?php echo $item->surname; ?></div>
58+
<div class="core-team-institution"><?php echo $item->insitution; ?></div>
59+
<p class="core-team-bio"><?php echo $item->role; ?></p>
60+
</div>
61+
</div>
62+
</div>
63+
<?php endforeach; ?>
64+
</div>
65+
</div>

0 commit comments

Comments
 (0)