Skip to content

Conversation

@Cut3cumber
Copy link
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
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
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
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?


{% if teaser_link %}
<div class="teaser__link">
{% if instance.softpage_enabled %}
Copy link
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
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.

3 participants