Skip to content

Commit

Permalink
update templates for font-awesome 4
Browse files Browse the repository at this point in the history
  • Loading branch information
fanjinfei committed Jan 18, 2017
1 parent 19ef8ee commit 7cae1c8
Show file tree
Hide file tree
Showing 77 changed files with 131 additions and 128 deletions.
2 changes: 1 addition & 1 deletion ckan/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def _create_link_text(text, **kwargs):
if kwargs.pop('inner_span', None):
text = literal('<span>') + text + literal('</span>')
if icon:
text = literal('<i class="icon-%s"></i> ' % icon) + text
text = literal('<i class="fa fa-%s"></i> ' % icon) + text
return text

icon = kwargs.pop('icon', None)
Expand Down
2 changes: 1 addition & 1 deletion ckan/plugins/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def info(self):
:param default_description: default description that will be used if
the view is created automatically (optional, defaults to '').
:param icon: icon for the view type. Should be one of the
`Font Awesome`_ types without the `icon-` prefix eg. `compass`
`Font Awesome`_ types without the `fa fa-` prefix eg. `compass`
(optional, defaults to 'picture').
:param always_available: the view type should be always available when
creating new views regardless of the format of the resource
Expand Down
4 changes: 2 additions & 2 deletions ckan/public/base/vendor/bootstrap/less/tests/css-tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ <h4>Buttons and button groups</h4>
<button class="btn btn-info">Add new</button>
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
<i class="icon-user"></i> User
<i class="fa fa-user"></i> User
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -1226,7 +1226,7 @@ <h1>Buttons</h1>
<h4>Mini buttons: text and icon</h4>
<div class="btn-group">
<button class="btn btn-mini">Button text</button>
<button class="btn btn-mini"><i class="icon-cog"></i></button>
<button class="btn btn-mini"><i class="fa fa-cog"></i></button>
</div>

<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
</a>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse collapse">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
</a>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse collapse">
Expand Down
6 changes: 3 additions & 3 deletions ckan/public/base/vendor/bootstrap/less/tests/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
</a>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse collapse">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/admin/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% block secondary_content %}
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ _('CKAN config options') }}
</h2>
<div class="module-content">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% block secondary_content %}
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ _('Administer CKAN') }}
</h2>
<div class="module-content">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/admin/trash.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{% block secondary_content %}
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ _('Trash') }}
</h2>
<div class="module-content">
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/dataviewer/snippets/data_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% else %}
<div class="data-viewer-error js-hide">
<p class="text-error">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ _('This resource can not be previewed at the moment.') }}
<a href="#" data-toggle="collapse" data-target="#data-view-error">
{{ _('Click here for more information.') }}
Expand All @@ -14,7 +14,7 @@
<p id="data-view-error" class="collapse"></p>
<p>
<a href="{{ raw_resource_url }}" class="btn btn-large resource-url-analytics" target="_blank">
<i class="icon-large icon-download"></i>
<i class="fa fa-lg fa-arrow-circle-o-down"></i>
{{ _('Download resource') }}
</a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/dataviewer/snippets/no_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="alert alert-block">
{{ _('No preview available.') }}
<button class="btn btn-link" data-toggle="collapse" data-target="#details">
<i class="icon-info-sign"></i> {{ _('More details...') }}
<i class="fa fa-info-circle"></i> {{ _('More details...') }}
</button>
<div id="details" class="collapse">
{% if reason %}
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/development/primer.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% snippet 'development/snippets/context.html' %}

<div class="module module-narrow module-shallow">
<h2 class="module-heading"><i class="icon-info-sign"></i> Helper text</h2>
<h2 class="module-heading"><i class="fa fa-info-circle"></i> Helper text</h2>
<div class="module-content">{{ lipsum(1) }}</div>
</div>

Expand All @@ -30,7 +30,7 @@ <h2 class="module-heading"><i class="icon-info-sign"></i> Helper text</h2>
<div class="module-content">
<span class="control-group search-giant">
<input type="text" class="search" name="q" value="" autocomplete="off" placeholder="Search something...">
<button type="submit"><i class="icon-search"></i> <span>Search</span></button>
<button type="submit"><i class="fa fa-search"></i> <span>Search</span></button>
</span>
</div>

Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/development/snippets/actions.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<li><a class="btn" href="#"><i class="icon-wrench"></i> Button</a></li>
<li><a class="btn btn-primary" href="#"><i class="icon-wrench"></i> Primary Button</a></li>
<li><a class="btn" href="#"><i class="fa fa-wrench"></i> Button</a></li>
<li><a class="btn btn-primary" href="#"><i class="fa fa-wrench"></i> Primary Button</a></li>
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/facet.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="module module-narrow">
{% with items=(("First", true), ("Second", false), ("Third", true), ("Fourth", false), ("Last", false)) %}
<h2 class="module-heading"><i class="icon-medium icon-filter"></i> Facet List</h2>
<h2 class="module-heading"><i class="fa fa-medium fa-filter"></i> Facet List</h2>
<nav>
<ul class="unstyled nav nav-simple nav-facet">
{% for value, active in items %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1 class="module-heading">{{ heading }}</h1>
<ul class="unstyled simple-list">
{% for value, active in items %}
<li>
{% if show_icons %}<i class="icon-cog"></i> {% endif %}{{ value }}
{% if show_icons %}<i class="fa fa-cog"></i> {% endif %}{{ value }}
</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/module.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% elif heading_action %}
<h{{ hn }} class="module-heading">{{ heading }}</h{{ hn }}>
{% elif heading_icon %}
<h{{ hn }} class="module-heading"><i class="icon-medium icon-wrench"></i> {{ heading }}</h{{ hn }}>
<h{{ hn }} class="module-heading"><i class="fa fa-medium fa-wrench"></i> {{ heading }}</h{{ hn }}>
{% else %}
<h{{ hn }} class="module-heading">{{ heading }}</h{{ hn }}>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h2 class="module-heading">{{ heading }}</h2>
<ul class="unstyled nav nav-simple">
{% for value, active in items %}
<li class="nav-item{{ ' active' if show_active and active }}">
<a href="#">{% if show_icons %}<i class="icon-cog"></i> {% endif %}{{ value }}</a>
<a href="#">{% if show_icons %}<i class="fa fa-cog"></i> {% endif %}{{ value }}</a>
</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/page_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ul class="nav nav-tabs">
{% for value, active in items %}
<li{{ ' class=active' if active }}>
<a href="#"><i class="icon-cog"></i> {{ value }}</a>
<a href="#"><i class="fa fa-cog"></i> {{ value }}</a>
</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/simple-input.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section class="module module-narrow module-shallow simple-input">
<h2 class="module-heading"><i class="icon-medium icon-link"></i> Module Narrow Input</h2>
<h2 class="module-heading"><i class="fa fa-medium fa-link"></i> Module Narrow Input</h2>
<div class="module-content field"><input type="text" value="simple-input" /></div>
</section>
2 changes: 1 addition & 1 deletion ckan/templates/group/member_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1 class="page-heading">
{{ super() }}
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-large icon-info-sign"></i>
<i class="fa fa-lg fa-info-circle"></i>
{{ _('What are roles?') }}
</h2>
<div class="module-content">
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/group/members.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ <h3 class="page-heading">{{ _('{0} members'.format(c.members|length)) }}</h3>
<td>
<div class="btn-group pull-right">
<a class="btn btn-small" href="{% url_for controller='group', action='member_new', id=c.group_dict.id, user=user_id %}" title="{{ _('Edit') }}">
<i class="icon-wrench"></i>
<i class="fa fa-wrench"></i>
</a>
<a class="btn btn-danger btn-small" href="{% url_for controller='group', action='member_delete', id=c.group_dict.id, user=user_id %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this member?') }}" title="{{ _('Delete') }}">{% block delete_button_text %}<i class="icon-remove"></i>{% endblock %}</a>
<a class="btn btn-danger btn-small" href="{% url_for controller='group', action='member_delete', id=c.group_dict.id, user=user_id %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this member?') }}" title="{{ _('Delete') }}">{% block delete_button_text %}<i class="fa fa-times"></i>{% endblock %}</a>
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/snippets/helper.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ _('What are Groups?') }}
</h2>
<div class="module-content">
Expand Down
16 changes: 8 additions & 8 deletions ckan/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% if c.userobj.sysadmin %}
<li>
<a href="{{ h.url_for(controller='admin', action='index') }}" title="{{ _('Sysadmin settings') }}">
<i class="icon-legal" aria-hidden="true"></i>
<i class="fa fa-gavel" aria-hidden="true"></i>
<span class="text">{{ _('Admin') }}</span>
</a>
</li>
Expand All @@ -25,23 +25,23 @@
<li class="notifications {% if new_activities > 0 %}notifications-important{% endif %}">
{% set notifications_tooltip = ngettext('Dashboard (%(num)d new item)', 'Dashboard (%(num)d new items)', new_activities) %}
<a href="{{ h.url_for(controller='user', action='dashboard') }}" title="{{ notifications_tooltip }}">
<i class="icon-dashboard" aria-hidden="true"></i>
<i class="fa fa-tachometer" aria-hidden="true"></i>
<span class="text">{{ _('Dashboard') }}</span>
<span class="badge">{{ new_activities }}</span>
</a>
</li>
{% block header_account_settings_link %}
<li>
<a href="{{ h.url_for(controller='user', action='edit', id=c.userobj.name) }}" title="{{ _('Edit settings') }}">
<i class="icon-cog" aria-hidden="true"></i>
<i class="fa fa-cog" aria-hidden="true"></i>
<span class="text">{{ _('Settings') }}</span>
</a>
</li>
{% endblock %}
{% block header_account_log_out_link %}
<li>
<a href="{{ h.url_for('/user/_logout') }}" title="{{ _('Log out') }}">
<i class="icon-signout" aria-hidden="true"></i>
<i class="fa fa-sign-out" aria-hidden="true"></i>
<span class="text">{{ _('Log out') }}</span>
</a>
</li>
Expand Down Expand Up @@ -73,9 +73,9 @@
{% endblock %}
<div class="container">
<button data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar" type="button">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
<span class="fa-bar"></span>
</button>
{# The .header-image class hides the main text and uses image replacement for the title #}
<hgroup class="{{ g.header_class }} pull-left">
Expand Down Expand Up @@ -115,7 +115,7 @@ <h1>
<div class="field">
<label for="field-sitewide-search">{% block header_site_search_label %}{{ _('Search Datasets') }}{% endblock %}</label>
<input id="field-sitewide-search" type="text" name="q" placeholder="{{ _('Search') }}" />
<button class="btn-search" type="submit"><i class="icon-search"></i></button>
<button class="btn-search" type="submit"><i class="fa fa-search"></i></button>
</div>
</form>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/home/snippets/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h3 class="heading">{{ _("Search data") }}</h3>
<div class="search-input control-group search-giant">
<input type="text" class="search" name="q" value="" autocomplete="off" placeholder="{% block search_placeholder %}{{ placeholder }}{% endblock %}" />
<button type="submit">
<i class="icon-search"></i>
<i class="fa fa-search"></i>
<span>{{ _('Search') }}</span>
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/macros/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
{% macro info(text='', inline=false, classes=[]) %}
{%- if text -%}
<div class="info-block{{ ' info-inline' if inline }}{{ " " ~ classes | join(' ') }}">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ text }}
</div>
{%- endif -%}
Expand Down
6 changes: 3 additions & 3 deletions ckan/templates/organization/bulk_process.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ <h3 class="page-heading">
<th class="table-actions">
<div class="btn-group">
<button name="bulk_action.public" value="public" class="btn" type="submit">
<i class="icon-eye-open"></i>
<i class="fa fa-eye"></i>
{{ _('Make public') }}
</button>
<button name="bulk_action.private" value="private" class="btn" type="submit">
<i class="icon-eye-close"></i>
<i class="fa fa-eye-slash"></i>
{{ _('Make private') }}
</button>
</div>
<div class="btn-group">
<button name="bulk_action.delete" value="delete" class="btn btn-danger" type="submit">
<i class="icon-remove"></i>
<i class="fa fa-times"></i>
{{ _('Delete') }}
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/member_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h1 class="page-heading">
{{ super() }}
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-large icon-info-sign"></i>
<i class="fa fa-lg fa-info-circle"></i>
{{ _('What are roles?') }}
</h2>
<div class="module-content">
Expand Down
7 changes: 5 additions & 2 deletions ckan/templates/organization/members.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
{% block subtitle %}{{ _('Members') }} - {{ super() }}{% endblock %}

{% block page_primary_action %}
{% link_for _('Add Member'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
{% if h.check_access('organization_update', {'id': organization.id}) %}

{% link_for _('Add Member'), controller='organization', action='member_new', id=c.group_dict.id, class_='btn btn-primary', icon='plus-sign-alt' %}
{% endif %}
{% endblock %}

{% block primary_content_inner %}
Expand All @@ -29,7 +32,7 @@ <h3 class="page-heading">{{ _('{0} members'.format(c.members|length)) }}</h3>
<td>
<div class="btn-group pull-right">
<a class="btn btn-small" href="{% url_for controller='organization', action='member_new', id=c.group_dict.id, user=user_id %}" title="{{ _('Edit') }}">
<i class="icon-wrench"></i>
<i class="fa fa-wrench"></i>
</a>
<a class="btn btn-danger btn-small" href="{% url_for controller='organization', action='member_delete', id=c.group_dict.id, user=user_id %}" data-module="confirm-action" data-module-content="{{ _('Are you sure you want to delete this member?') }}" title="{{ _('Delete') }}">{% block delete_button_text %}<i class="icon-remove"></i>{% endblock %}</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/snippets/help.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-large icon-info-sign"></i>
<i class="fa fa-lg fa-info-circle"></i>
{{ _('What are Organizations?') }}
</h2>
<div class="module-content">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/snippets/helper.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="module module-narrow module-shallow">
<h2 class="module-heading">
<i class="icon-info-sign"></i>
<i class="fa fa-info-circle"></i>
{{ _('What are Organizations?') }}
</h2>
<div class="module-content">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/snippets/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#}
{% if organization and h.check_access('organization_update', {'id':organization.id }) %}
<section class="module module-narrow package-info">
<h2 class="module-heading"><i class="icon-sitemap"></i> {{ _("Edit Organization") }}</h2>
<h2 class="module-heading"><i class="fa fa-sitemap"></i> {{ _("Edit Organization") }}</h2>
<ul class="unstyled nav nav-simple">
<li class="nav-item{% if action == 'edit' %} active{% endif %}">
{% link_for _("Edit Organization"), controller='organization', action='edit', id=organization.name %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/base_form_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{% block secondary_content %}
{% block info_module %}
<section class="module module-narrow module-shallow">
<h2 class="module-heading"><i class="icon-info-sign"></i> {{ _('What are datasets?') }}</h2>
<h2 class="module-heading"><i class="fa fa-info-circle"></i> {{ _('What are datasets?') }}</h2>
<div class="module-content">
<p>
{% trans %}
Expand Down
Loading

0 comments on commit 7cae1c8

Please sign in to comment.