Skip to content

Commit

Permalink
Added Website Link
Browse files Browse the repository at this point in the history
  • Loading branch information
Noël Bossart committed Jan 24, 2012
1 parent 8f4ae57 commit 80a66c2
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 10 deletions.
27 changes: 27 additions & 0 deletions Classes/Domain/Model/Website.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ class Tx_Podcast_Domain_Model_Website extends Tx_Extbase_DomainObject_AbstractVa
*/
protected $title;

/**
* Link
*
* @var string
* @validate NotEmpty
*/
protected $link;

/**
* __construct
*
Expand Down Expand Up @@ -70,5 +78,24 @@ public function setTitle($title) {
$this->title = $title;
}

/**
* Returns the link
*
* @return string $link
*/
public function getLink() {
return $this->link;
}

/**
* Sets the link
*
* @param string $link
* @return void
*/
public function setLink($link) {
$this->link = $link;
}

}
?>
28 changes: 26 additions & 2 deletions Configuration/TCA/Website.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
$TCA['tx_podcast_domain_model_website'] = array(
'ctrl' => $TCA['tx_podcast_domain_model_website']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title',
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, link',
),
'types' => array(
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, link,--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.access,starttime, endtime'),
),
'palettes' => array(
'1' => array('showitem' => ''),
Expand Down Expand Up @@ -102,6 +102,30 @@
'eval' => 'trim,required'
),
),
'link' => array(
'exclude' => 0,
'label' => 'LLL:EXT:podcast/Resources/Private/Language/locallang_db.xml:tx_podcast_domain_model_website.link',
'config' => array (
'type' => 'input',
'size' => '43',
'max' => '256',
'eval' => 'trim,required',
'wizards' => array(
'_PADDING' => 10,
'link' => array(
'type' => 'popup',
'title' => 'LLL:EXT:podcast/Resources/Private/Language/locallang_db.xml:tx_podcast_domain_model_website.link',
'icon' => 'link_popup.gif',
'script' => 'browse_links.php?mode=wizard',
'params' => array(
'blindLinkOptions' => 'mail, page, spec, folder',
'allowedExtensions' => 'mp3,m4a,mp4,pdf,mov,wmv',
),
'JSopenParams' => 'height=500,width=600,status=0,menubar=0,scrollbars=1'
)
)
)
),
),
);
?>
2 changes: 1 addition & 1 deletion ExtensionBuilder.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Resources/Private/Language/locallang.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="language">en-us</label>
<label index="tx_podcast_domain_model_podcast">This is a podcast</label>
<label index="tx_podcast_domain_model_podcast.title">Title</label>
<label index="tx_podcast_domain_model_podcast.subtitle">Subtitle</label>
Expand Down Expand Up @@ -38,6 +39,9 @@
<label index="tx_podcast_domain_model_person.e_mail">E-Mail</label>
<label index="tx_podcast_domain_model_website">Website</label>
<label index="tx_podcast_domain_model_website.title">Title</label>
</languageKey>
<languageKey index="dee" type="array">
<label index="language">de-ch</label>
</languageKey>
</data>
</T3locallang>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<data type="array">
<languageKey index="default" type="array">
<label index="title.description">Title</label>
<label index="link.description">Link</label>
</languageKey>
</data>
</T3locallang>
2 changes: 1 addition & 1 deletion Resources/Private/Partials/episode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<f:if condition="{itunes}">
<f:then>
<itunes:author>{episode.author.name}</itunes:author>
<itunes:subtitle>{episode.author.description}</itunes:subtitle>
<itunes:subtitle>{episode.subtitle}</itunes:subtitle>
<itunes:summary>
{episode.description}
</itunes:summary>
Expand Down
8 changes: 4 additions & 4 deletions Resources/Private/Templates/Podcast/show.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
{podcast.title}
</title>
<link>{podcast.website.link}</link>
<language></language>
<language><f:translate key="language" /></language>
<copyright>{podcast.copyright}</copyright>
<f:if condition="{podcast.itunes}">
<f:then>
<itunes:subtitle>{podcast.subtitle}</itunes:subtitle>
<itunes:author>{podcast.autor}</itunes:author>
<itunes:author>{podcast.author.name}</itunes:author>
<itunes:owner>
<itunes:name>{podcast.autor.name}</itunes:name>
<itunes:email>{podcast.autor.email}</itunes:email>
<itunes:name>{podcast.author.name}</itunes:name>
<itunes:email>{podcast.author.email}</itunes:email>
</itunes:owner>
<f:if condition="{podcast.image}">
<f:then>
Expand Down
Binary file added Resources/Public/Icons/relation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions ext_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CREATE TABLE tx_podcast_domain_model_podcast (

title varchar(255) DEFAULT '' NOT NULL,
subtitle varchar(255) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
description varchar(255) DEFAULT '' NOT NULL,
copyright varchar(255) DEFAULT '' NOT NULL,
image varchar(255) DEFAULT '' NOT NULL,
itunes tinyint(1) unsigned DEFAULT '0' NOT NULL,
Expand Down Expand Up @@ -57,7 +57,7 @@ CREATE TABLE tx_podcast_domain_model_episode (
podcast int(11) unsigned DEFAULT '0' NOT NULL,

title varchar(255) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
description varchar(255) DEFAULT '' NOT NULL,
file varchar(255) DEFAULT '' NOT NULL,
publication_date int(11) DEFAULT '0' NOT NULL,
duration int(11) DEFAULT '0' NOT NULL,
Expand Down Expand Up @@ -183,6 +183,7 @@ CREATE TABLE tx_podcast_domain_model_website (


title varchar(255) DEFAULT '' NOT NULL,
link varchar(255) DEFAULT '' NOT NULL,

tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
Expand Down

0 comments on commit 80a66c2

Please sign in to comment.