Skip to content

Commit

Permalink
Merge branch '281-resource-listing-buttons'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Jan 24, 2013
2 parents 67900cb + 11c8de2 commit 75ef5fc
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 18 deletions.
42 changes: 31 additions & 11 deletions ckan/public/base/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4506,13 +4506,13 @@ ul.icons li .icon-large:before {
.simple-list:after {
clear: both;
}
.simple-list > li {
.simple-list > li {
font-size: 12px;
line-height: 1.1666666666666667em;
padding: 7px 25px;
border-bottom: 1px dotted #cccccc;
}
.simple-list > li:last-of-type {
.simple-list > li:last-of-type {
border-bottom: 0;
}
.simple-list .ckan-icon {
Expand Down Expand Up @@ -4669,6 +4669,8 @@ ul.icons li .icon-large:before {
padding-right: 15px;
}
.module-grid {
margin: 0;
list-style: none;
margin: 0;
list-style: none;
*zoom: 1;
Expand All @@ -4692,6 +4694,7 @@ ul.icons li .icon-large:before {
padding-left: 20px;
padding-bottom: 25px;
float: left;
float: left;
margin-left: 20px;
width: 460px;
padding-top: 10px;
Expand All @@ -4717,10 +4720,10 @@ ul.icons li .icon-large:before {
.ckanext-datapreview {
position: relative;
}
.ckanext-datapreview > iframe {
.ckanext-datapreview > iframe {
min-height: 400px;
}
.ckanext-datapreview > img {
.ckanext-datapreview > img {
max-height: 500px;
max-width: 100%;
overflow: hidden;
Expand Down Expand Up @@ -4884,13 +4887,13 @@ ol.media-grid:after {
.nav-simple:after {
clear: both;
}
.nav-simple > li {
.nav-simple > li {
font-size: 12px;
line-height: 1.1666666666666667em;
padding: 7px 25px;
border-bottom: 1px dotted #cccccc;
}
.nav-simple > li:last-of-type {
.nav-simple > li:last-of-type {
border-bottom: 0;
}
.nav-simple .ckan-icon {
Expand All @@ -4912,10 +4915,12 @@ ol.media-grid:after {
}
.nav-item.active > a {
background: url("../../../base/images/background-tag.png") no-repeat -13px center;
position: relative;
display: block;
font-size: 11px;
line-height: 27px;
color: #187794;
padding-left: 10px;
padding-right: 5px;
margin-right: 11px;
-webkit-box-sizing: border-box;
Expand Down Expand Up @@ -5221,6 +5226,8 @@ textarea {
background-image: url("../../../base/images/sprite-ckan-icons.png");
background-repeat: no-repeat;
background-position: 16px 16px;
width: 17px;
height: 17px;
background-position: -51px -16px;
position: absolute;
display: block;
Expand Down Expand Up @@ -5762,11 +5769,11 @@ textarea {
}
.resource-item {
position: relative;
padding: 10px 110px 10px 60px;
padding: 10px 10px 10px 60px;
margin-bottom: 0px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.resource-item:hover {
background-color: #efefef;
Expand All @@ -5787,7 +5794,7 @@ textarea {
}
.resource-item .btn-group {
position: absolute;
top: 13px;
top: 14px;
right: 10px;
}
.dataset-resource-form .dataset-form-resource-types {
Expand All @@ -5814,6 +5821,8 @@ textarea {
vertical-align: text-bottom;
position: relative;
top: 2px;
width: 16px;
height: 16px;
background-image: url("../../../base/images/sprite-ckan-icons.png");
background-repeat: no-repeat;
background-position: 16px 16px;
Expand Down Expand Up @@ -6673,6 +6682,7 @@ li .icon-large:before {
float: right;
}
[role=main] .secondary {
float: left;
margin-left: 20px;
width: 220px;
margin-left: 0;
Expand Down Expand Up @@ -7423,6 +7433,16 @@ header.masthead .debug {
.module-my-datasets .empty {
padding: 10px;
}
.dropdown:hover .dropdown-menu {
display: block;
}
.js .dropdown .dropdown-menu,
.js .dropdown:hover .dropdown-menu {
display: none;
}
.js .dropdown.open .dropdown-menu {
display: block;
}
body {
background-color: #00536b;
}
Expand Down
6 changes: 3 additions & 3 deletions ckan/public/base/less/dataset.less
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@

.resource-item {
position: relative;
padding: 10px 110px 10px 60px;
padding: 10px 10px 10px 60px;
margin-bottom: 0px;
.border-radius(2px);
.border-radius(3px);
&:hover {
background-color: @layoutBackgroundColor;
}
Expand All @@ -164,7 +164,7 @@

.resource-item .btn-group {
position: absolute;
top: 13px;
top: 14px;
right: 10px;
}

Expand Down
29 changes: 25 additions & 4 deletions ckan/templates/package/snippets/resource_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,29 @@
<span class="empty">{{ _('No description for this resource') }}</span>
{% endif %}
</p>
<p class="btn-group">
<a class="btn btn-primary" href="{{ url }}">{{ _('Explore Data') }}</a>
<a class="btn resource-url-analytics" href="{{ res.url }}" target="_blank">{{ _('Raw Data') }}</a>
</p>
{% block resource_item_explore %}
<div class="dropdown btn-group">
<a href="#" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<i class="icon-share-alt"></i>
{{ _('Explore') }}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% block resource_item_explore_links %}
<li>
<a href="{{ url }}">
<i class="icon-bar-chart"></i>
{{ _('Preview') }}
</a>
</li>
<li>
<a href="{{ res.url }}" class="resource-url-analytics" target="_blank">
<i class="icon-download"></i>
{{ _('Download') }}
</a>
</li>
{% endblock %}
</ul>
</div>
{% endblock %}
</li>

0 comments on commit 75ef5fc

Please sign in to comment.