Skip to content

Commit

Permalink
feat: support for conditional account new link
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jan 17, 2021
1 parent 084a2a4 commit 9abf251
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/appier_extras/parts/admin/part.py
Expand Up @@ -159,6 +159,8 @@ def load(self):
self.owner.admin_layout_static = "admin/layout.static.html.tpl"
self.owner.admin_email_layout = "admin/email/layout.html.tpl"

self.owner.admin_email_account_new_link = True

self.owner.lib_loaders["appier_extras"] = self._appier_extras_loader
self.owner.lib_loaders["netius"] = self._netius_loader
self.owner.lib_loaders["pconvert"] = self._pconvert_loader
Expand Down
Expand Up @@ -9,10 +9,12 @@
Feel free to login with your account and explore all the features {{ owner.description }} has to offer.
</p>
{{ h2("Information") }}
<p>
You can view all the information about your account by clicking
{{ link(url_for("admin.show_entity", model = account.__class__._under(), _id = account._id, absolute = True), "here", False) }}.
</p>
{% if self.owner.admin_email_account_new_link %}
<p>
You can view all the information about your account by clicking
{{ link(url_for("admin.show_entity", model = account.__class__._under(), _id = account._id, absolute = True), "here", False) }}.
</p>
{% endif %}
<p>
<strong>Username:</strong> <span>{{ account.username }}</span><br/>
<strong>E-mail:</strong> <span>{{ link("mailto:" + account.email, account.email, False) }}</span>
Expand Down

0 comments on commit 9abf251

Please sign in to comment.