Skip to content

Commit

Permalink
[#613] Small tweaks to templates to make search in tertiary column a …
Browse files Browse the repository at this point in the history
…little nicer
  • Loading branch information
johnmartin committed Mar 13, 2013
1 parent 0f9fd61 commit 76d1468
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 5 deletions.
33 changes: 32 additions & 1 deletion ckan/public/base/less/dataset.less
Expand Up @@ -104,6 +104,11 @@
position: relative;
}

.search-normal {
display: block;
margin-bottom: 0;
}

.search-giant input {
.box-sizing(border-box);
font-size: 16px;
Expand Down Expand Up @@ -152,7 +157,7 @@

.control-order-by {
position: absolute;
bottom: -65px;
bottom: -73px;
right: 0;
}

Expand All @@ -165,6 +170,32 @@
width: 160px;
}

.search-aside {
.control-order-by {
clear: both;
overflow: hidden;
display: block;
position: relative;
bottom: 0;
label {
float: left;
font-weight: normal;
font-size: 12px;
line-height: 20px;
}
select {
float: left;
padding: 2px 4px;
margin: 0;
width: inherit;
font-size: 12px;
height: 20px;
line-height: 20px;
width: 120px;
}
}
}

// Resource List

.resource-list {
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/organization/bulk_process.html
Expand Up @@ -84,7 +84,7 @@ <h3 class="dataset-heading">
{% endif %}
</div>
<aside class="tertiary">
{% snippet 'snippets/simple_search.html', q=c.q, sort=c.sort_by_selected, placeholder=_('Search datasets...'), extra_sort=[(_('Last Modified'), 'data_modified asc')]%}
{% snippet 'snippets/simple_search.html', q=c.q, sort=c.sort_by_selected, placeholder=_('Search datasets...'), extra_sort=[(_('Last Modified'), 'data_modified asc')], input_class='search-normal', wrap_class='search-aside' %}
{{ h.snippet('snippets/facet_list.html', title='Tags', name='tags', within_tertiary=true, extras={'id':c.group_dict.name}) }}
{{ h.snippet('snippets/facet_list.html', title='Formats', name='res_format', within_tertiary=true, extras={'id':c.group_dict.name}) }}
</aside>
Expand Down
7 changes: 4 additions & 3 deletions ckan/templates/snippets/simple_search.html
@@ -1,7 +1,8 @@
<form class="dataset-search clearfix" method="GET" data-module="select-switch">
<span class="control-group search-giant">
{% set input_class = input_class or 'search-giant' %}
<form class="dataset-search {{ wrap_class }}" method="GET" data-module="select-switch">

This comment has been minimized.

Copy link
@tobes

tobes Mar 13, 2013

Contributor

should this be form_class feels a better name

This comment has been minimized.

Copy link
@johnmartin

johnmartin Mar 13, 2013

Author Contributor

@tobes Agreed.

<span class="control-group {{ input_class }}">
<input type="text" class="search" name="q" value="{{ q }}" autocomplete="off" placeholder="{{ placeholder }}" />
<button type="submit">{{ _('Search') }}</button>
<button type="submit"><i class="icon-search"></i> <span>{{ _('Search') }}</span></button>
</span>
<span class="form-select control-group control-order-by">
<label for="field-order-by">{{ _('Order by') }}</label>
Expand Down

0 comments on commit 76d1468

Please sign in to comment.