Skip to content

Commit

Permalink
[#2375] Show a friendly message when the user has no datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Aug 1, 2012
1 parent 6a2a9fb commit b271f03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ckan/public/base/less/profile.less
Expand Up @@ -69,6 +69,11 @@
margin: 0 -12px;
}

.activity:last-of-type {
border-bottom: none;
padding-bottom: 0;
}

.activity .actor img {
margin-top: -2px;
margin-right: 5px;
Expand Down
9 changes: 8 additions & 1 deletion ckan/templates/user/read.html
Expand Up @@ -77,7 +77,14 @@ <h1 class="heading">{{ user.fullname or _('No full name provided') }}</h1>
</section>
<section id="datasets" class="module-content tab-content active clearfix">
<h2 class="tab-heading">{{ _('Datasets') }}</h2>
{% snippet 'snippets/package_list.html', packages=user.datasets %}
{% if user.datasets %}
{% snippet 'snippets/package_list.html', packages=user.datasets %}
{% else %}
<p class="empty">
{{ _('You haven\'t created any datasets.') }}
{% link_for _('Create one now?'), controller='package', action='new' %}.
</p>
{% endif %}
</section>
<section id="activity" class="module-content module-activity tab-content">
<h2 class="tab-heading">{{ _('Activity Stream') }}</h2>
Expand Down

0 comments on commit b271f03

Please sign in to comment.