-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: v2.8.0
Are you sure you want to change the base?
Conversation
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
NEW_WINDOW = 1 | ||
SOFTPAGE = 2 | ||
|
||
TARGET_CHOICES = ( |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 %} |
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
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