Skip to content

Commit

Permalink
Upgrading to newest bootstrap and font awesome - thanks @cXhristian!!
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaoming committed Jan 8, 2015
2 parents 3561b2a + f053c15 commit ffe4b81
Show file tree
Hide file tree
Showing 159 changed files with 19,351 additions and 17,193 deletions.
Binary file modified testproject/prepopulated.db
Binary file not shown.
2 changes: 1 addition & 1 deletion wiki/core/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BasePlugin(object):
'root': [], # General urlpatterns that will reside in /wiki/plugins/plugin-slug/...
'article': [], # urlpatterns that receive article_id or urlpath, i.e. /wiki/ArticleName/plugin/plugin-slug/...
}
article_tab = None #(_('Attachments'), "icon-file")
article_tab = None #(_('Attachments'), "fa fa-file")
article_view = None # A view for article_id/plugin/slug/
notifications = [] # A list of notification handlers to be subscribed if the notification system is active
# Example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ <h2>{% trans "Delete" %} "{{ attachment.current_revision.get_filename }}"?</h2>
<div class="col-lg-2"></div>
<div class="col-lg-10">
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn btn-default">
<span class="icon-arrow-left"></span>
<span class="fa fa-arrow-left"></span>
{% trans "Go back" %}
</a>
<button class="btn btn-danger btn-large">
<span class="icon-upload"></span>
<button class="btn btn-danger btn-lg">
<span class="fa fa-remove"></span>
{% trans "Delete it!" %}
</button>
</div>
Expand All @@ -49,11 +49,11 @@ <h2>{% trans "Remove" %} "{{ attachment.current_revision.get_filename }}"?</h2>
<div class="col-lg-2"></div>
<div class="col-lg-10">
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn btn-default">
<span class="icon-arrow-left"></span>
<span class="fa fa-arrow-left"></span>
{% trans "Go back" %}
</a>
<button class="btn btn-danger btn-large">
<span class="icon-upload"></span>
<button class="btn btn-danger btn-lg">
<span class="fa fa-remove"></span>
{% trans "Remove reference" %}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ <h2>{% trans "History of" %} "{{ attachment.current_revision.get_filename }}"</h
<form method="POST" action="{% url 'wiki:attachments_revision_change' path=urlpath.path article_id=article.id attachment_id=attachment.id revision_id=revision.id %}">
{% csrf_token %}
<a href="{% url 'wiki:attachments_download' path=urlpath.path article_id=article.id attachment_id=attachment.id revision_id=revision.id %}" class="btn btn-primary">
<span class="icon-download"></span>
<span class="fa fa-download"></span>
{% trans "Download" %}
</a>
{% if revision.attachment.article|can_write:user %}
<button{% if revision == attachment.current_revision %} disabled="disabled"{% endif %} class="btn btn-default">
<span class="icon-flag"></span>
<span class="fa fa-flag"></span>
{% trans "Use this!" %}
</button>
{% endif %}
Expand All @@ -46,7 +46,7 @@ <h2>{% trans "History of" %} "{{ attachment.current_revision.get_filename }}"</h
</tr>
{% endfor %}
</table>
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}"><span class="icon-arrow-left"></span> {% trans "Go back" %}</a>
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}"><span class="fa fa-arrow-left"></span> {% trans "Go back" %}</a>

{% endblock %}

Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ <h4 style="margin-top:0;">
<td style="width: 25%; text-align: right; white-space: nowrap;" rowspan="2">
{% if attachment|can_write:user %}
{% if not attachment.current_revision.deleted %}
<a href="{% url 'wiki:attachments_replace' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default btn-small">{% trans "Replace" %}</a>
<a href="{% url 'wiki:attachments_replace' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default btn-sm">{% trans "Replace" %}</a>
{% if attachment.article = article %}
<a href="{% url 'wiki:attachments_delete' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default btn-small">{% trans "Delete" %}</a>
<a href="{% url 'wiki:attachments_delete' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default btn-sm">{% trans "Delete" %}</a>
{% else %}
<a href="{% url 'wiki:attachments_delete' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default btn-small">{% trans "Detach" %}</a>
<a href="{% url 'wiki:attachments_delete' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default btn-sm">{% trans "Detach" %}</a>
{% endif %}
{% else %}
Deleted
{% endif %}
{% endif %}
<p style="margin-top: 10px; margin-bottom:0;">
<a href="{% url 'wiki:attachments_history' path=urlpath.path article_id=article.id attachment_id=attachment.id %}">
<span class="icon-time"></span>
<span class="fa fa-clock-o"></span>
{% trans "File history" %} ({{ attachment.attachmentrevision_set.all.count }} {% trans "revisions" %})
</a>
</p>
Expand All @@ -65,18 +65,16 @@ <h4 style="margin-top:0;">
</div>
<div class="col-lg-4" style="min-width: 330px;">
{% if article|can_write:user and not article|is_locked %}
<div class="accordion">

<div class="accordion-group">

<div class="accordion-heading">
<a class="accordion-toggle" href="#collapse_upload" data-toggle="collapse">
<h3>{% trans "Upload new file" %} <span class="icon icon-upload"></span></h3>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<a class="panel-toggle" href="#collapse_upload" data-toggle="collapse">
<h4 class="panel-title">{% trans "Upload new file" %} <span class="fa fa-upload"></span></h4>
</a>
</div>

<div id="collapse_upload" class="accordion-body collapse{% if form.errors %} in{% endif %}">
<div class="accordion-inner">
<div id="collapse_upload" class="panel-collapse collapse{% if form.errors %} in{% endif %}">
<div class="panel-body">
{% if anonymous_disallowed %}
{% include "wiki/includes/anonymous_blocked.html" %}
{% else %}
Expand All @@ -89,25 +87,24 @@ <h3>{% trans "Upload new file" %} <span class="icon icon-upload"></span></h3>
{% endif %}
</div>
</div>

</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse_add">
<h3>{% trans "Search and add file" %} <span class="icon icon-plus-sign"></span></h3>

<div class="panel panel-default">
<div class="panel-heading">
<a class="panel-toggle" data-toggle="collapse" href="#collapse_add">
<h4 class="panel-title">{% trans "Search and add file" %} <span class="fa fa-plus-circle"></span></h4>
</a>
</div>

<div id="collapse_add" class="accordion-body collapse">
<div class="accordion-inner">
<div id="collapse_add" class="panel-collapse collapse">
<div class="panel-body">
<p>{% trans "You can reuse files from other articles. These files are subject to updates on other articles which may or may not be a good thing." %}</p>
<form method="GET" action="{% url 'wiki:attachments_search' path=urlpath.path article_id=article.id %}" class="wiki-form-block">
<div class="input-group">
{{ search_form.query }}
<span class="input-group-btn">
<button class="btn btn-default" type="submit">
<span class="icon-search"></span>
<span class="fa fa-search"></span>
</button>
</span>
</div><!-- /input-group -->
Expand All @@ -117,14 +114,14 @@ <h3>{% trans "Search and add file" %} <span class="icon icon-plus-sign"></span><
</div>

{% if article|can_write:user %}
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" href="#collapse_restore">
<h3>{% trans "Restore attachments" %} <span class="icon icon-trash"></span></h3>
<div class="panel panel-default">
<div class="panel-heading">
<a class="panel-toggle" data-toggle="collapse" href="#collapse_restore">
<h4 class="panel-title">{% trans "Restore attachments" %} <span class="fa fa-trash"></span></h4>
</a>
</div>
<div id="collapse_restore" class="accordion-body collapse">
<div class="accordion-inner">
<div id="collapse_restore" class="panel-collapse collapse">
<div class="panel-body">

{% for attachment in deleted_attachments %}
<p>
Expand Down Expand Up @@ -155,7 +152,7 @@ <h3>{% trans "Restore attachments" %} <span class="icon icon-trash"></span></h3>

{% if article|is_locked %}
<p class="muted">
<i class="icon-lock"></i>
<i class="fa fa-lock"></i>
{% trans "The article is currently locked for editing, and therefore no new attachments can be added." %}
</p>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ <h3>
<div class="col-lg-2"></div>
<div class="col-lg-10">
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}" class="btn btn-default">
<span class="icon-arrow-left"></span>
<span class="fa fa-arrow-left"></span>
{% trans "Go back" %}
</a>
<button class="btn btn-primary">
<span class="icon-upload"></span>
<span class="fa fa-upload"></span>
{% trans "Upload replacement" %}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2>{% trans "Add attachment from other article" %}</h2>
<form method="GET" action="{% url 'wiki:attachments_search' path=urlpath.path article_id=article.id %}" class="form-search">
{{ search_form.query }}
<button class="btn btn-default">
<span class="icon-search"></span>
<span class="fa fa-search"></span>
{% trans "Search files and articles" %}
</button>
</form>
Expand Down Expand Up @@ -47,11 +47,11 @@ <h4>{{ attachment.original_filename }}</h4>
<form method="POST" action="{% url 'wiki:attachments_add' path=urlpath.path article_id=article.id attachment_id=attachment.id %}">
{% csrf_token %}
<a href="{% url 'wiki:attachments_download' path=urlpath.path article_id=article.id attachment_id=attachment.id %}" class="btn btn-default">
<span class="icon-download"></span>
<span class="fa fa-download"></span>
{% trans "Download" %}
</a>
<button class="btn btn-primary">
<span class="icon-plus"></span>
<span class="fa fa-plus-circle"></span>
{% trans "Add to article" %}
</button>
</form>
Expand All @@ -68,7 +68,7 @@ <h4>{{ attachment.original_filename }}</h4>
{% endwith %}

<p>
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}"><span class="icon-arrow-left"></span> {% trans "Go back" %}</a>
<a href="{% url 'wiki:attachments_index' path=urlpath.path article_id=article.id %}"><span class="fa fa-arrow-left"></span> {% trans "Go back" %}</a>
</p>

{% endblock %}
2 changes: 1 addition & 1 deletion wiki/plugins/attachments/wiki_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AttachmentPlugin(BasePlugin):
)
}

article_tab = (_('Attachments'), "icon-file")
article_tab = (_('Attachments'), "fa fa-file")
article_view = views.AttachmentView().dispatch

# List of notifications to construct signal handlers for. This
Expand Down
2 changes: 1 addition & 1 deletion wiki/plugins/help/wiki_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HelpPlugin(BasePlugin):
slug = 'help'

sidebar = {'headline': _('Help'),
'icon_class': 'icon-question-sign',
'icon_class': 'fa-question-circle',
'template': 'wiki/plugins/help/sidebar.html',
'form_class': None,
'get_form_kwargs': (lambda a: {})}
Expand Down
12 changes: 6 additions & 6 deletions wiki/plugins/images/templates/wiki/plugins/images/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<p class="lead">{% trans "The following images are available for this article. Copy the markdown tag to directly refer to an image from the article text." %}</p>
<p>
<a href="{% url 'wiki:edit' path=urlpath.path article_id=article.id %}">
<span class="icon-arrow-left"></span>
<span class="fa fa-arrow-left"></span>
{% trans "Back to edit page" %}
</a>
</p>
Expand All @@ -31,24 +31,24 @@
{% if image|can_write:user %}
<p>
<a href="{% url 'wiki:images_add_revision' path=urlpath.path article_id=article.id image_id=image.id %}">
<span class="icon-upload"></span>
<span class="fa fa-upload"></span>
{% trans "Upload replacement" %}
</a> <br />
{% if revision.deleted %}
<a href="{% url 'wiki:images_restore' path=urlpath.path article_id=article.id image_id=image.id %}">
<span class="icon-repeat"></span>
<span class="fa ra-repeat"></span>
{% trans "Restore image" %}
</a>
{% else %}
<a href="{% url 'wiki:images_delete' path=urlpath.path article_id=article.id image_id=image.id %}">
<span class="icon-remove"></span>
<span class="fa fa-remove"></span>
{% trans "Remove image" %}
</a>
{% endif %}
{% if article|can_moderate:user %}
<br />
<a href="{% url 'wiki:images_purge' path=urlpath.path article_id=article.id image_id=image.id %}">
<span class="icon-trash"></span>
<span class="fa fa-trash"></span>
{% trans "Completely delete" %}
</a>
{% endif %}
Expand Down Expand Up @@ -81,7 +81,7 @@
<td>
{% if image|can_write:user and old_revision != image.current_revision %}
<a href="#">
<span class="icon-refresh"></span>
<span class="fa fa-refresh"></span>
{% trans "Revert to this version" %}
</a>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions wiki/plugins/images/templates/wiki/plugins/images/purge.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<div class="col-lg-2"></div>
<div class="col-lg-10">
<a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn btn-default">
<span class="icon-arrow-left"></span>
<span class="fa fa-arrow-left"></span>
{% trans "Go back" %}
</a>
<button class="btn btn-primary">
<span class="icon-trash"></span>
<span class="fa fa-trash"></span>
{% trans "Remove it completely!" %}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<div class="col-lg-2"></div>
<div class="col-lg-10">
<a href="{% url 'wiki:images_index' path=urlpath.path article_id=article.id %}" class="btn btn-default">
<span class="icon-arrow-left"></span>
<span class="fa fa-arrow-left"></span>
{% trans "Go back" %}
</a>
<button class="btn btn-primary">
<span class="icon-upload"></span>
<span class="fa fa-upload"></span>
{% trans "Upload replacement" %}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
<td style="white-space: nowrap;">
<p>{% trans "Image id" %}: {{ image.id }}</code></p>
<p>
<a href="javascript:void(insert_image({{ image.id }}))"><span class="icon-edit"></span> {% trans "Insert" %}</a><br />
<a href="javascript:void(insert_image({{ image.id }}))"><span class="fa fa-edit"></span> {% trans "Insert" %}</a><br />
{% if image|can_write:user %}
<a href="{% url 'wiki:images_add_revision' path=urlpath.path article_id=article.id image_id=image.id %}"><span class="icon-upload"></span> {% trans "Replace" %}</a>
<a href="{% url 'wiki:images_add_revision' path=urlpath.path article_id=article.id image_id=image.id %}"><span class="fa fa-upload"></span> {% trans "Replace" %}</a>
{% endif %}
</p>
</td>
Expand Down Expand Up @@ -99,8 +99,8 @@ <h4>{% trans "Add new image" %}</h4>
{% endfor %}

<p>
<button type="submit" name="{{ plugin.slug }}_save" value="1" class="btn btn-default btn-large">
<span class="icon-upload"></span>
<button type="submit" name="{{ plugin.slug }}_save" value="1" class="btn btn-default btn-lg">
<span class="fa fa-upload"></span>
{% trans "Add image" %}
</button>
</p>
Expand Down
2 changes: 1 addition & 1 deletion wiki/plugins/images/wiki_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ImagePlugin(BasePlugin):
slug = settings.SLUG
sidebar = {
'headline': _('Images'),
'icon_class': 'icon-picture',
'icon_class': 'fa-picture-o',
'template': 'wiki/plugins/images/sidebar.html',
'form_class': forms.SidebarForm,
'get_form_kwargs': (lambda a: {'instance': models.Image(article=a)})
Expand Down
2 changes: 1 addition & 1 deletion wiki/plugins/links/mdx/urlize.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def handleMatch(self, m):
url = 'http://' + url

icon = markdown.util.etree.Element("span")
icon.set('class', 'icon-external-link')
icon.set('class', 'fa fa-external-link')

span_text = markdown.util.etree.Element("span")
span_text.text = markdown.util.AtomicString(" " + text)
Expand Down
4 changes: 1 addition & 3 deletions wiki/plugins/links/templates/wiki/plugins/links/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ <h4>{% trans "Link to another wiki page" %}</h4>

<pre>[Title of link](wiki:ArticleSlug)</pre>

<div class="row">
<div class="input-group col-sm-12">
<div class="input-group">
<input type="text" class="page_title_query form-control" id="links_page_title_query" value="" placeholder="Type to search..." />
<span class="input-group-btn">
<button type="button" class="btn btn-default" onclick="wikiInsertLink()">
{% trans "Insert" %}
</button>
</span>
</div>
</div>

<hr />

Expand Down
2 changes: 1 addition & 1 deletion wiki/plugins/links/wiki_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LinkPlugin(BasePlugin):
}

sidebar = {'headline': _('Links'),
'icon_class': 'icon-bookmark',
'icon_class': 'fa-bookmark',
'template': 'wiki/plugins/links/sidebar.html',
'form_class': None,
'get_form_kwargs': (lambda a: {})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if article_children %}
<div class="article-list">
<ul>
<li class="nav-header">{% trans "Article index" %} <i class="icon-list"></i></li>
<li class="nav-header">{% trans "Article index" %} <i class="fa fa-list"></i></li>
{% for child in article_children %}
{% article_list child depth %}
{% empty %}
Expand Down

0 comments on commit ffe4b81

Please sign in to comment.