Add empty bookmarks message
This commit is contained in:
parent
1b7f57999d
commit
7b27862795
|
@ -18,22 +18,5 @@
|
||||||
</library>
|
</library>
|
||||||
</libraries>
|
</libraries>
|
||||||
</data-source>
|
</data-source>
|
||||||
<data-source source="LOCAL" name="db [2]" uuid="037e6f47-0871-42e5-8f52-6fdef1f306f2">
|
|
||||||
<driver-ref>sqlite.xerial</driver-ref>
|
|
||||||
<synchronize>true</synchronize>
|
|
||||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
|
||||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/data/db.sqlite3</jdbc-url>
|
|
||||||
<driver-properties>
|
|
||||||
<property name="enable_load_extension" value="true" />
|
|
||||||
</driver-properties>
|
|
||||||
<libraries>
|
|
||||||
<library>
|
|
||||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.25.1/sqlite-jdbc-3.25.1.jar</url>
|
|
||||||
</library>
|
|
||||||
<library>
|
|
||||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.25.1/license.txt</url>
|
|
||||||
</library>
|
|
||||||
</libraries>
|
|
||||||
</data-source>
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -1,3 +1,5 @@
|
||||||
|
{% load shared %}
|
||||||
|
|
||||||
<ul class="bookmark-list">
|
<ul class="bookmark-list">
|
||||||
{% for bookmark in bookmarks %}
|
{% for bookmark in bookmarks %}
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<div class="empty">
|
||||||
|
<p class="empty-title h5">You have no bookmarks yet</p>
|
||||||
|
<p class="empty-subtitle">
|
||||||
|
You can get started by <a href="{% url 'bookmarks:new' %}">adding</a> bookmarks, <a
|
||||||
|
href="{% url 'bookmarks:settings.index' %}">importing</a> your existing bookmarks or <a
|
||||||
|
href="{% url 'bookmarks:bookmarklet' %}">configuring</a> the bookmarklet.
|
||||||
|
</p>
|
||||||
|
</div>
|
|
@ -20,7 +20,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if bookmarks.paginator.num_pages > 0 %}
|
{% if empty %}
|
||||||
|
{% include 'bookmarks/empty_bookmarks.html' %}
|
||||||
|
{% else %}
|
||||||
{% bookmark_list bookmarks %}
|
{% bookmark_list bookmarks %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -29,6 +29,7 @@ def index(request):
|
||||||
'bookmarks': bookmarks,
|
'bookmarks': bookmarks,
|
||||||
'tags': tags,
|
'tags': tags,
|
||||||
'query': query_string if query_string else '',
|
'query': query_string if query_string else '',
|
||||||
|
'empty': paginator.count == 0
|
||||||
}
|
}
|
||||||
return render(request, 'bookmarks/index.html', context)
|
return render(request, 'bookmarks/index.html', context)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue