Skip to content

Commit

Permalink
[#1030] Removed border bottom search bar from groups and orgs media l…
Browse files Browse the repository at this point in the history
…istings
  • Loading branch information
johnmartin committed Oct 3, 2013
1 parent 34af1d5 commit 84fc66d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ckan/public/base/less/search.less
Expand Up @@ -84,6 +84,10 @@
color: @layoutBoldColor;
}
}
&.no-bottom-border {
border-bottom-width: 0;
margin-bottom: 0;
}
}

.tertiary {
Expand Down
6 changes: 4 additions & 2 deletions ckan/templates/group/index.html
Expand Up @@ -17,11 +17,13 @@
{% block primary_content_inner %}
<h1 class="hide-heading">{{ _('Groups') }}</h1>
{% block groups_search_form %}
{% snippet 'snippets/search_form.html', type='group', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search groups...'), show_empty=request.params %}
{% snippet 'snippets/search_form.html', type='group', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search groups...'), show_empty=request.params, no_bottom_border=true if c.page.items %}
{% endblock %}
{% block groups_list %}
{% if c.page.items or request.params %}
{% snippet "group/snippets/group_list.html", groups=c.page.items %}
{% if c.page.items %}
{% snippet "group/snippets/group_list.html", groups=c.page.items %}
{% endif %}
{% else %}
<p class="empty">
{{ _('There are currently no groups for this site') }}.
Expand Down
6 changes: 4 additions & 2 deletions ckan/templates/organization/index.html
Expand Up @@ -17,11 +17,13 @@
{% block primary_content_inner %}
<h1 class="hide-heading">{% block page_heading %}{{ _('Organizations') }}{% endblock %}</h1>
{% block organizations_search_form %}
{% snippet 'snippets/search_form.html', type='organization', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search organizations...'), show_empty=request.params %}
{% snippet 'snippets/search_form.html', type='organization', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search organizations...'), show_empty=request.params, no_bottom_border=true if c.page.items %}
{% endblock %}
{% block organizations_list %}
{% if c.page.items or request.params %}
{% snippet "organization/snippets/organization_list.html", organizations=c.page.items %}
{% if c.page.items %}
{% snippet "organization/snippets/organization_list.html", organizations=c.page.items %}
{% endif %}
{% else %}
<p class="empty">
{{ _('There are currently no organizations for this site') }}.
Expand Down
3 changes: 2 additions & 1 deletion ckan/templates/snippets/search_form.html
Expand Up @@ -3,8 +3,9 @@
{% set placeholder = placeholder if placeholder else _('Search...') %}
{% set sorting = sorting if sorting else [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %}
{% set search_class = search_class if search_class else 'search-giant' %}
{% set no_bottom_border = no_bottom_border if no_bottom_border else false %}

<form class="search-form" method="get" data-module="select-switch">
<form class="search-form{% if no_bottom_border %} no-bottom-border{% endif %}" method="get" data-module="select-switch">

{% block search_input %}
<div class="search-input control-group {{ search_class }}">
Expand Down

0 comments on commit 84fc66d

Please sign in to comment.