Skip to content

Commit

Permalink
[#626] Fix for dashboard templates to go full width
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Jun 20, 2013
1 parent fabb8b9 commit ff5006d
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 40 deletions.
4 changes: 4 additions & 0 deletions ckan/public/base/less/media.less
Expand Up @@ -136,3 +136,7 @@
}
}
}

.wide .media-item {
width: 186px;
}
4 changes: 4 additions & 0 deletions ckan/public/base/less/module.less
Expand Up @@ -225,6 +225,10 @@
}
}

.no-nav .module:last-child {
margin-top: 0;
}

.module-image {
float: left;
width: 50px;
Expand Down
4 changes: 4 additions & 0 deletions ckan/public/base/less/toolbar.less
Expand Up @@ -94,3 +94,7 @@
}
}
}

.no-nav .page-header {
.border-radius(3px 3px 0 0);
}
64 changes: 28 additions & 36 deletions ckan/templates/user/dashboard.html
Expand Up @@ -4,47 +4,39 @@
<li class="active"><a href="{{ h.url_for(controller='user', action='dashboard') }}">{{ _('Dashboard') }}</a></li>
{% endblock %}

{% block primary_content_inner %}
<div data-module="dashboard">
{% snippet 'user/snippets/followee_dropdown.html', context=c.dashboard_activity_stream_context, followees=c.followee_list %}
<h2 class="page-heading">
{% block page_heading %}
{{ _('News feed') }}
{% endblock %}
<small>{{ _('Activity from items that you follow') }}</small>
</h2>
{% block activity_stream %}
{{ c.dashboard_activity_stream }}
{% endblock %}
</div>
{% block secondary %}{% endblock %}

{% block actions_content %}
<li>{% link_for _('Edit settings'), controller='user', action='edit', id=user.name, class_='btn', icon='cog' %}</li>
{% endblock %}

{% block secondary_content %}
{% block dashboard_activity_stream_context %}
{% if not c.dashboard_activity_stream_context.dict == None %}
<div class="context-info dashboard-context">
<span class="arrow"></span>
{% snippet 'snippets/context.html', type=c.dashboard_activity_stream_context.filter_type, dict=c.dashboard_activity_stream_context.dict %}
</div>
{% endif %}
{% endblock %}
{% block dashboard_context %}
<div class="dashboard-me">
{{ h.gravatar(user.email_hash, 50) }}
<strong>{{ h.truncate(user.display_name, 25) }}</strong>
<a href="{{ h.url_for('user_edit', id=user.name) }}">{{ _('Edit settings') }}</a>
</div>
{% endblock %}
{% block dashboard_subnav %}
<div class="module module-narrow module-shallow">
<ul class="nav nav-aside">
{% block dashboard_subnav_content %}
{% block primary %}
<article class="module">
{% block page_header %}
<header class="module-content page-header hug">
<ul class="nav nav-tabs">
{{ h.build_nav_icon('user_dashboard', _('News feed')) }}
{{ h.build_nav_icon('user_dashboard_datasets', _('My Datasets')) }}
{{ h.build_nav_icon('user_dashboard_organizations', _('My Organizations')) }}
{{ h.build_nav_icon('user_dashboard_groups', _('My Groups')) }}
{% endblock %}
</ul>
</ul>
</header>
{% endblock %}
<div class="module-content">
{% block primary_content_inner %}
<div data-module="dashboard">
{% snippet 'user/snippets/followee_dropdown.html', context=c.dashboard_activity_stream_context, followees=c.followee_list %}
<h2 class="page-heading">
{% block page_heading %}
{{ _('News feed') }}
{% endblock %}
<small>{{ _('Activity from items that you follow') }}</small>
</h2>
{% block activity_stream %}
{{ c.dashboard_activity_stream }}
{% endblock %}
</div>
{% endblock %}
</div>
{% endblock %}
</article>
{% endblock %}
6 changes: 4 additions & 2 deletions ckan/templates/user/dashboard_groups.html
Expand Up @@ -9,10 +9,12 @@
{% endblock %}

{% block primary_content_inner %}
<h2 class="page-heading">{{ _('My Groups') }}</h2>
<h2 class="hide-heading">{{ _('My Groups') }}</h2>
{% set groups = h.groups_available(am_member=True) %}
{% if groups %}
{% snippet "group/snippets/group_list.html", groups=groups %}
<div class="wide">
{% snippet "group/snippets/group_list.html", groups=groups %}
</div>
{% else %}
<p class="empty">
{{ _('You are not a member of any groups.') }}
Expand Down
6 changes: 4 additions & 2 deletions ckan/templates/user/dashboard_organizations.html
Expand Up @@ -9,10 +9,12 @@
{% endblock %}

{% block primary_content_inner %}
<h2 class="page-heading">{{ _('My Organizations') }}</h2>
<h2 class="hide-heading">{{ _('My Organizations') }}</h2>
{% set organizations = h.organizations_available() %}
{% if organizations %}
{% snippet "organization/snippets/organization_list.html", organizations=organizations %}
<div class="wide">
{% snippet "organization/snippets/organization_list.html", organizations=organizations %}
</div>
{% else %}
<p class="empty">
{{ _('You are not a member of any organizations.') }}
Expand Down

0 comments on commit ff5006d

Please sign in to comment.