forked from rc/aircox
Compare commits
3 Commits
529ed25d7f
...
8ecf71b96e
Author | SHA1 | Date | |
---|---|---|---|
8ecf71b96e | |||
0788d4af37 | |||
05be58b0c1 |
|
@ -182,8 +182,7 @@ class BasePage(Renderable, models.Model):
|
||||||
|
|
||||||
# FIXME: rename
|
# FIXME: rename
|
||||||
class PageQuerySet(BasePageQuerySet):
|
class PageQuerySet(BasePageQuerySet):
|
||||||
def published(self):
|
pass
|
||||||
return self.filter(status=Page.STATUS_PUBLISHED, pub_date__lte=tz.now())
|
|
||||||
|
|
||||||
|
|
||||||
class Page(BasePage):
|
class Page(BasePage):
|
||||||
|
@ -241,7 +240,7 @@ class ChildPage(Page):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def display_title(self):
|
def display_title(self):
|
||||||
if self.is_published:
|
if self.title:
|
||||||
return self.title
|
return self.title
|
||||||
return self.parent and self.parent.title or ""
|
return self.parent and self.parent.title or ""
|
||||||
|
|
||||||
|
|
|
@ -76,10 +76,8 @@ Usefull context:
|
||||||
{% for item, render in items %}
|
{% for item, render in items %}
|
||||||
{{ render }}
|
{{ render }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock %}
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
{% include "./widgets/nav.html" %}
|
{% include "./widgets/nav.html" %}
|
||||||
{% endif %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
{% load aircox i18n %}
|
{% load aircox i18n %}
|
||||||
<div class="dropdown is-hoverable is-right">
|
{% if not user.is_authenticated %}
|
||||||
<div class="dropdown-trigger">
|
<div class="dropdown-trigger nav-item">
|
||||||
<button class="button square" aria-haspopup="true" aria-controls="dropdown-menu" type="button">
|
<a class="button square" href="{% url 'dashboard' %}" style="background-color:unset;">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fa-regular fa-user" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="dropdown is-hoverable is-right" style="display:block;">
|
||||||
|
<div class="dropdown-trigger nav-item">
|
||||||
|
<a class="button square" aria-haspopup="true" aria-controls="dropdown-menu" style="background-color:unset;">
|
||||||
<span class="icon">
|
<span class="icon">
|
||||||
<i class="fa-regular fa-user" aria-hidden="true" style="opacity: 0.6"></i>
|
<i class="fa-regular fa-user" aria-hidden="true"></i>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown-menu" id="dropdown-menu" role="menu" style="z-index:200">
|
<div class="dropdown-menu" id="dropdown-menu" role="menu" style="z-index:200">
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
|
@ -53,3 +62,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user