Skip to content

deleted field softpage_enabled and added field link target which has a#73

Open
Cut3cumber wants to merge 1 commit intov2.8.0from
amal/feat/teaser-target-choices
Open

deleted field softpage_enabled and added field link target which has a#73
Cut3cumber wants to merge 1 commit intov2.8.0from
amal/feat/teaser-target-choices

Conversation

@Cut3cumber
Copy link
Copy Markdown
Contributor

property softpage_enabled so usage stays the same
added posibility to choose between softpage and new window
migrated field softpage ebabled so if it was set to true this would be represented in the new link_target field
fix typo in readme

property softpage_enabled so usage stays the same
added posibility to choose between softpage and new window
migrated field softpage ebabled so if it was set to true this would be represented in the new link_target field
fix typo in readme
@Cut3cumber Cut3cumber requested a review from tuerlefl April 20, 2020 09:10
NEW_WINDOW = 1
SOFTPAGE = 2

TARGET_CHOICES = (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move "TARGET_CHOICES" to AllinkTeaserPlugin as a class attribute.

return True if self.link_target == SOFTPAGE else False

@property
def new_window(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming

elif self.link_target == SOFTPAGE:
return 'data-icon-softpage'
else:
return None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "None" the correct default value to return here, when we want to open in the same window?

@@ -4,6 +4,8 @@
<div class="teaser__link">
{% if instance.softpage_enabled %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this if/ else statement is probably obsolete, since you added the properties "link_icon" and "link_attributes" on the model, right?

Copy link
Copy Markdown
Member

@tuerlefl tuerlefl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's discuss this tomorrow.

@Cut3cumber Cut3cumber changed the base branch from v2.x.x to v2.8.0 November 4, 2020 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants