Skip to content

Commit

Permalink
Merge pull request #628 from ZeitOnline/ZO-4651
Browse files Browse the repository at this point in the history
 ZO-4651: remove podcast block and header (everything podigee related)
  • Loading branch information
stollero committed Feb 22, 2024
2 parents 44ad458 + 464bee4 commit d4ed52f
Show file tree
Hide file tree
Showing 29 changed files with 124 additions and 386 deletions.
1 change: 1 addition & 0 deletions core/docs/changelog/ZO-4651.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ZO-4651: remove podcast block and header (everything podigee related)
6 changes: 0 additions & 6 deletions core/src/zeit/cms/content/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,6 @@ def __init__(
kind=None,
video=False,
fallback_image=False,
podigee_id=None,
podigee_url=None,
zonaudioapp_id=None,
color=None,
available=None,
Expand All @@ -516,8 +514,6 @@ def __init__(
self.kind = kind
self.video = video
self.fallback_image = fallback_image
self.podigee_url = podigee_url
self.podigee_id = podigee_id
self.zonaudioapp_id = zonaudioapp_id
self.color = color

Expand Down Expand Up @@ -549,8 +545,6 @@ def _values(self):
unicode_or_none(node.get('kind')),
node.get('video') == 'yes',
node.get('fallback_image') == 'yes',
unicode_or_none(node.get('podigee-id')),
unicode_or_none(node.get('podigee-url')),
unicode_or_none(node.get('zonaudioapp-id')),
unicode_or_none(node.get('color')),
unicode_or_none(node.get('available')),
Expand Down
25 changes: 0 additions & 25 deletions core/src/zeit/content/article/edit/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -585,27 +585,6 @@
weight="10"
/>

<!-- podcast -->

<browser:page
for="zeit.content.article.edit.interfaces.IPodcast"
layer="zeit.cms.browser.interfaces.ICMSLayer"
name="edit-podcast"
class=".edit.EditPodcast"
permission="zope.View"
/>

<browser:viewlet
for="zeit.content.article.edit.interfaces.IPodcast"
layer="zeit.cms.browser.interfaces.ICMSLayer"
view="zope.interface.Interface"
manager="zeit.edit.interfaces.IContentViewletManager"
name="edit-podcast"
class="zeit.edit.browser.form.FormLoader"
permission="zope.View"
weight="10"
/>

<!-- jobticker -->

<browser:viewlet
Expand Down Expand Up @@ -872,10 +851,6 @@
<implements interface="zeit.edit.interfaces.IFoldable" />
</class>

<class class="..podcast.Podcast">
<implements interface="zeit.edit.interfaces.IFoldable" />
</class>

<class class="..jobticker.JobTicker">
<implements interface="zeit.edit.interfaces.IFoldable" />
</class>
Expand Down
11 changes: 0 additions & 11 deletions core/src/zeit/content/article/edit/browser/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,17 +398,6 @@ def prefix(self):
return 'quiz.{0}'.format(self.context.__name__)


class EditPodcast(zeit.edit.browser.form.InlineForm):
legend = None
form_fields = zope.formlib.form.FormFields(zeit.content.article.edit.interfaces.IPodcast).omit(
*list(zeit.edit.interfaces.IBlock)
)

@property
def prefix(self):
return 'podcast.{0}'.format(self.context.__name__)


class EditBox(zeit.edit.browser.form.InlineForm):
legend = None
_form_fields = zope.formlib.form.FormFields(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,7 @@
background: url("/fanstatic/zeit.cms/icons/icons_sprites.png") no-repeat scroll 20px -835px transparent;
}

.type-article .module-icon-audio,
.type-article .module-icon-podcast {
.type-article .module-icon-audio {
background: url("/fanstatic/zeit.cms/icons/icons_sprites.png") no-repeat scroll 20px -776px transparent;
}

Expand Down Expand Up @@ -2106,10 +2105,6 @@
height: 180px;
}

.type-article .block.type-podcast .block-inner {
height: 130px;
}

.type-article .block.type-portraitbox .block-inner {
height: 300px;
}
Expand Down
14 changes: 0 additions & 14 deletions core/src/zeit/content/article/edit/browser/tests/test_podcast.py

This file was deleted.

11 changes: 0 additions & 11 deletions core/src/zeit/content/article/edit/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -327,17 +327,6 @@
/>
</class>

<class class=".podcast.Podcast">
<require
interface=".interfaces.IPodcast"
permission="zope.View"
/>
<require
set_schema=".interfaces.IPodcast"
permission="zeit.EditContent"
/>
</class>

<class class=".adplace.Adplace">
<require
interface=".interfaces.IAdplace"
Expand Down
4 changes: 0 additions & 4 deletions core/src/zeit/content/article/edit/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,10 +439,6 @@ class IQuiz(IBlock, zeit.content.modules.interfaces.IQuiz):
pass


class IPodcast(IBlock, zeit.content.modules.interfaces.PodcastBase):
pass


class IBox(IBlock):
"""
This box is a first step to generalizing other boxes
Expand Down
20 changes: 0 additions & 20 deletions core/src/zeit/content/article/edit/podcast.py

This file was deleted.

1 change: 0 additions & 1 deletion core/src/zeit/content/article/edit/tests/modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<module id="tickaroo_liveblog">Tickaroo Liveblog</module>
<module id="mail">Mail-Formular</module>
<module id="newslettersignup">Newsletter Signup Modul</module>
<module id="podcast">Podcast-Block</module>
<module id="portraitbox">Porträtbox</module>
<module id="puzzleform">Rätselformular</module>
<module id="quiz">Quiz</module>
Expand Down
2 changes: 1 addition & 1 deletion core/src/zeit/content/article/tests/article-templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<header name="embed" allow_header_module="true">
<title>Header-Modul oben</title>
</header>
<header name="podcast" allow_header_module="true">
<header name="podcast">
<title>Podcast</title>
</header>
<header name="narrow">
Expand Down
5 changes: 0 additions & 5 deletions core/src/zeit/content/audio/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class IPodcast(zope.interface.Interface):
image = zope.schema.URI(title=_('show art'))
distribution_channels = zope.interface.Attribute('distribution_channels')
feed = zope.schema.URI(title=_('feed'))
podigee_id = zope.interface.Attribute('podigee_id')


class Podcast(zeit.cms.content.sources.AllowedBase):
Expand All @@ -62,7 +61,6 @@ def __init__(
image=None,
distribution_channels=None,
feed=None,
podigee_id=None,
):
super().__init__(id, title, available=None)
self.external_id = external_id
Expand All @@ -73,7 +71,6 @@ def __init__(
self.distribution_channels = distribution_channels
# For parallel use of podcast hosts
self.feed = feed
self.podigee_id = podigee_id

def __eq__(self, other):
return (
Expand All @@ -86,7 +83,6 @@ def __eq__(self, other):
and self.image == other.image
and self.distribution_channels == other.distribution_channels
and self.feed == other.feed
and self.podigee_id == other.podigee_id
)


Expand Down Expand Up @@ -117,7 +113,6 @@ def _create_podcast(self, node):
node.get('image'),
distribution_channels,
node.get('feed'),
node.get('podigee_id'),
)
return podcast

Expand Down
2 changes: 1 addition & 1 deletion core/src/zeit/content/audio/tests/fixtures/podcasts.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<podcasts>
<podcast id="cat-jokes-pawdcast" title="Cat Jokes Pawdcast" external_id="1234" subtitle="A podcast of cat jokes" color='e5ded8' image='http://xml.zeit.de/2006/DSC00109_2.JPG' podigee_id="podigee-1234" feed='https://feeds.example.com/aRDC72E_'>
<podcast id="cat-jokes-pawdcast" title="Cat Jokes Pawdcast" external_id="1234" subtitle="A podcast of cat jokes" color='e5ded8' image='http://xml.zeit.de/2006/DSC00109_2.JPG' feed='https://feeds.example.com/aRDC72E_'>
<distribution_channel id="itunes" href="http://example.com/itunes">Apple Podcasts</distribution_channel>
<distribution_channel id="google" href="http://example.com/google">Google Podcasts</distribution_channel>
</podcast>
Expand Down
1 change: 0 additions & 1 deletion core/src/zeit/content/audio/tests/test_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_podcast_source(self):
'http://xml.zeit.de/2006/DSC00109_2.JPG',
distribution_channels,
'https://feeds.example.com/aRDC72E_',
'podigee-1234',
)
assert values[0] == podcast

Expand Down
9 changes: 0 additions & 9 deletions core/src/zeit/content/cp/blocks/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@
permission="zeit.EditContent"/>
</class>

<class class=".podcast.PodcastBlock">
<require
interface="..interfaces.IPodcastBlock"
permission="zope.View" />
<require
set_schema="..interfaces.IPodcastBlock"
permission="zeit.EditContent"/>
</class>

<class class=".cpextra.CPExtraBlock">
<require
interface="..interfaces.ICPExtraBlock"
Expand Down
23 changes: 0 additions & 23 deletions core/src/zeit/content/cp/blocks/podcast.py

This file was deleted.

1 change: 0 additions & 1 deletion core/src/zeit/content/cp/browser/blocks/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
<include file="xml.zcml" />
<include file="cpextra.zcml" />
<include file="playlist.zcml" />
<include file="podcast.zcml" />
<include file="quiz.zcml" />
<include file="headerimage.zcml" />
<include file="rawtext.zcml" />
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions core/src/zeit/content/cp/browser/blocks/podcast.py

This file was deleted.

26 changes: 0 additions & 26 deletions core/src/zeit/content/cp/browser/blocks/podcast.zcml

This file was deleted.

37 changes: 0 additions & 37 deletions core/src/zeit/content/cp/browser/blocks/tests/test_podcast.py

This file was deleted.

6 changes: 0 additions & 6 deletions core/src/zeit/content/cp/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,12 +734,6 @@ class IJobTickerBlock(zeit.content.modules.interfaces.IJobTicker, IBlock):
feed = zope.schema.Choice(title=_('Jobbox Ticker'), required=True, source=JOBTICKER_SOURCE)


class IPodcastBlock(IBlock, zeit.content.modules.interfaces.PodcastBase):
"""The Podcast block with a reference to a podcast."""

pass


class IMailBlock(zeit.content.modules.interfaces.IMail, IBlock):
pass

Expand Down
1 change: 0 additions & 1 deletion core/src/zeit/content/cp/tests/fixtures/blocks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<module id="headerimage" title="Headerbild"/>
<module id="markup" title="HTML-Block"/>
<module id="playlist" title="Video-Riegel"/>
<module id="podcast" title="Podcast"/>
<module id="quiz" title="Quiz-Block"/>
<module id="jobbox_ticker" title="Jobbox Ticker"/>
<module id="teaser" title="Teaser"/>
Expand Down
Loading

0 comments on commit d4ed52f

Please sign in to comment.