mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
ikiwiki: Update UI messages and minor refactoring
- In manage page, show a message to create new blog/wiki when there are none. - Elaborate on what gets deleted in delete page. - Add Ikiwiki in menu item label. This is in order to allow for other Wiki/Blog modules. - Indentation changes.
This commit is contained in:
parent
57e5799880
commit
9b674292c8
@ -30,4 +30,5 @@ depends = ['plinth.modules.apps']
|
|||||||
def init():
|
def init():
|
||||||
"""Initialize the ikiwiki module."""
|
"""Initialize the ikiwiki module."""
|
||||||
menu = cfg.main_menu.get('apps:index')
|
menu = cfg.main_menu.get('apps:index')
|
||||||
menu.add_urlname(_('Wiki & Blog'), 'glyphicon-edit', 'ikiwiki:index', 38)
|
menu.add_urlname(_('Wiki & Blog (Ikiwiki)'), 'glyphicon-edit',
|
||||||
|
'ikiwiki:index', 38)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ from gettext import gettext as _
|
|||||||
class IkiwikiForm(forms.Form):
|
class IkiwikiForm(forms.Form):
|
||||||
"""ikiwiki configuration form."""
|
"""ikiwiki configuration form."""
|
||||||
enabled = forms.BooleanField(
|
enabled = forms.BooleanField(
|
||||||
label=_('Enable ikiwiki site'),
|
label=_('Enable Ikiwiki'),
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
|
|
||||||
@ -35,8 +35,11 @@ class IkiwikiCreateForm(forms.Form):
|
|||||||
type = forms.ChoiceField(
|
type = forms.ChoiceField(
|
||||||
label=_('Type'),
|
label=_('Type'),
|
||||||
choices=[('wiki', 'Wiki'), ('blog', 'Blog')])
|
choices=[('wiki', 'Wiki'), ('blog', 'Blog')])
|
||||||
|
|
||||||
name = forms.CharField(label=_('Name'))
|
name = forms.CharField(label=_('Name'))
|
||||||
|
|
||||||
admin_name = forms.CharField(label=_('Admin Account Name'))
|
admin_name = forms.CharField(label=_('Admin Account Name'))
|
||||||
|
|
||||||
admin_password = forms.CharField(
|
admin_password = forms.CharField(
|
||||||
label=_('Admin Account Password'),
|
label=_('Admin Account Password'),
|
||||||
widget=forms.PasswordInput())
|
widget=forms.PasswordInput())
|
||||||
|
|||||||
@ -22,15 +22,15 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<p>When enabled, the ikiwiki site will be available from <a href="/ikiwiki">
|
<p>When enabled, the blogs and wikis will be available
|
||||||
/ikiwiki</a> path on the web server.</p>
|
from <a href="/ikiwiki">/ikiwiki</a>.</p>
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{{ form|bootstrap }}
|
{{ form|bootstrap }}
|
||||||
|
|
||||||
<input type="submit" class="btn btn-primary" value="Update setup"/>
|
<input type="submit" class="btn btn-primary" value="Update setup"/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -24,7 +24,9 @@
|
|||||||
|
|
||||||
<h3>Delete Wiki/Blog <em>{{ name }}</em></h3>
|
<h3>Delete Wiki/Blog <em>{{ name }}</em></h3>
|
||||||
|
|
||||||
<p>Delete this wiki/blog permanently?</p>
|
<p>This action will remove all the posts, pages and comments
|
||||||
|
including revision history. Delete this wiki/blog
|
||||||
|
permanently?</p>
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|||||||
@ -36,6 +36,13 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
|
{% if not sites %}
|
||||||
|
<p>No wikis or blogs available.</p>
|
||||||
|
<p>
|
||||||
|
<a class="btn btn-primary btn-md"
|
||||||
|
href="{% url 'ikiwiki:create' %}">Create a Wiki or Blog</a>
|
||||||
|
</p>
|
||||||
|
{% else %}
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{% for site in sites %}
|
{% for site in sites %}
|
||||||
<div class="list-group-item clearfix">
|
<div class="list-group-item clearfix">
|
||||||
@ -55,6 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user