Commit a07f74a6 authored by Alexander Stehlik's avatar Alexander Stehlik
Browse files

[FEATURE] Add link to PSL detail view in member list

parent 7d6a45ab
......@@ -19,6 +19,10 @@
*/
class Tx_T3oMembership_Domain_Model_Member extends Tx_Extbase_DomainObject_AbstractEntity
{
/**
* @var Tx_Typo3Agencies_Domain_Model_Agency
*/
protected $agency;
/**
* Member name
......@@ -117,6 +121,14 @@ class Tx_T3oMembership_Domain_Model_Member extends Tx_Extbase_DomainObject_Abstr
*/
protected $membership;
/**
* @return Tx_Typo3Agencies_Domain_Model_Agency
*/
public function getAgency()
{
return $this->agency;
}
/**
* Returns the name
*
......
......@@ -216,3 +216,15 @@ $TCA['tx_t3omembership_domain_model_member'] = array(
),
),
);
if (t3lib_extMgm::isLoaded('typo3_agencies')) {
$TCA['tx_t3omembership_domain_model_member']['columns']['agency'] = array(
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_typo3agencies_domain_model_agency',
'foreign_field' => 'related_member',
'minitems' => 0,
'maxitems' => 1,
),
);
}
......@@ -10,6 +10,7 @@
<th>
<f:translate key="tx_t3omembership_domain_model_member.name"/>
</th>
<th>Professional support</th>
<th>
<f:translate key="tx_t3omembership_domain_model_member.membership"/>
</th>
......@@ -32,21 +33,45 @@
</f:then>
<f:else>
<td>
<f:if condition="{member.url}">
<f:if condition="{member.agency}">
<f:then>
<f:link.external uri="{member.url}"
title="Website of TYPO3 {member.membership} member {member.name}"
target="_blank">
<f:link.action action="show" controller="Agency" pluginName="Pi1"
extensionName="Typo3Agencies" arguments="{agency: member.agency}"
pageUid="{settings.agenciesPid}"
title="Professional services of TYPO3 {member.membership} member {member.name}">
{member.name}
</f:link.external>
</f:link.action>
</f:then>
<f:else>
{member.name}
<f:if condition="{member.url}">
<f:then>
<f:link.external uri="{member.url}"
title="Website of TYPO3 {member.membership} member {member.name}"
target="_blank">
{member.name}
</f:link.external>
</f:then>
<f:else>
{member.name}
</f:else>
</f:if>
</f:else>
</f:if>
</td>
</f:else>
</f:if>
<td>
<f:if condition="{member.agency}">
<f:link.action action="show" controller="Agency" pluginName="Pi1"
extensionName="Typo3Agencies" arguments="{agency: member.agency}"
pageUid="{settings.agenciesPid}" class="supporttypes"
title="Professional services of TYPO3 {member.membership} member {member.name}">
<f:if condition="{member.agency.trainingService}"><span class="ico i-training"></span></f:if>
<f:if condition="{member.agency.hostingService}"><span class="ico i-hosting"></span></f:if>
<f:if condition="{member.agency.developmentService}"><span class="ico i-development"></span></f:if>
</f:link.action>
</f:if>
</td>
<td>{member.membership}</td>
</tr>
</f:cycle>
......
......@@ -20,6 +20,7 @@ CREATE TABLE tx_t3omembership_domain_model_member (
firstname varchar(255) DEFAULT '' NOT NULL,
lastname varchar(255) DEFAULT '' NOT NULL,
membership int(11) unsigned DEFAULT '0',
agency int(11) unsigned DEFAULT '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment