Skip to content

Commit

Permalink
[2375] Style the dataset status
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed May 14, 2012
1 parent f0782fb commit f7fb128
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 16 deletions.
26 changes: 26 additions & 0 deletions ckan/public/base/less/dataset.less
Expand Up @@ -37,3 +37,29 @@
.dataset-resources li a {
background-color: #aaa;
}

.filter-list {
color: #aaa;
font-weight: bold;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px dotted #ccc;
}

.filter-list .results {
font-size: 24px;
color: #000;
}

.pill {
.border-radius(7px);
background-color: #ccc;
color: #fff;
padding: 1px 8px;
}

.pill .remove {
.hide-text;
position: relative;
top: 1px;
}
3 changes: 1 addition & 2 deletions ckan/public/base/less/variables.less
@@ -1,5 +1,5 @@
// Base variables
@image-path: "../images";
@image-path: "../../../images";

// Layout Variables
@layout-font-family: Arial, sans-serif;
Expand Down Expand Up @@ -27,4 +27,3 @@
@linkColor: @layout-link-color;
@iconSpritePath: "@{image-path}/bootstrap-glyphicons-halflings.png";
@iconWhiteSpritePath: "@{image-path}/bootstrap-glyphicons-halflings-white.png";

26 changes: 12 additions & 14 deletions ckan/templates/package/search.html
Expand Up @@ -26,29 +26,26 @@
</span>
<div id="dataset-search-ext"></div>
</form>
<div class="filter-list" py:if="c.fields">
<div class="filter-entry" py:for="(field, value) in c.fields">
<span class="name">${h.facet_title(field)}</span>
<span class="value" py:choose="">
<div class="filter-list">
<strong py:choose="" class="results">
<py:when test="request.params">${c.page.item_count} datasets<py:if test="c.q"> found for &#147;${c.q}&#148;</py:if></py:when>
<py:otherwise>All datasets</py:otherwise>
</strong>
<py:for each="(field, value) in c.fields">
<span class="facet">${h.facet_title(field)}:</span>
<span class="filtered pill" py:choose="">
<py:when test="c.translated_fields and c.translated_fields.has_key((field,value))">
${c.translated_fields[(field,value)]}
</py:when>
<py:otherwise>
${value}
</py:otherwise>
<py:otherwise>${value}</py:otherwise>
<a href="${c.remove_field(field, value)}" class="remove icon-remove icon-white">[remove]</a>
</span>
<a href="${c.remove_field(field, value)}">
${h.icon('unfilter')}
</a>
</div>
</py:for>
</div>
<py:if test="c.query_error">
<p i18n:msg="item_count"><strong>There was an error while searching.</strong>
Please try again.</p>
</py:if>
<py:if test="request.params">
<h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> datasets found</h4>
</py:if>
<py:if test="c.page.item_count == 0 and request.params">
<p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new dataset?</a></p>
</py:if>
Expand All @@ -57,6 +54,7 @@ <h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> datasets found</
${c.page.pager(q=c.q)}
</section>


<section class="module">
<p class="content">
You can also access this registry using the ${h.link_to(_('API'), h.url_for(controller='api', action='get_api', id=None, ver=1))}
Expand Down

0 comments on commit f7fb128

Please sign in to comment.