Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: v2.8.0
Choose a base branch
from

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?

@@ -4,6 +4,8 @@
<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.

2 participants