From df686b4df5e894eeced7f49073c45ccbb76800f3 Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Thu, 2 Feb 2012 23:08:57 +0000 Subject: [PATCH] [#1396,user/read][s]: list datasets using new datasets attribute in user dict. * Plus a little bit of css niceness. * tests: remove delicate test based on old layout (thought about replacing but doubtful of value and will be equally delicate). --- ckan/public/css/style.css | 13 ++++++++++--- ckan/templates/user/read.html | 30 ++++++++++++++---------------- ckan/tests/functional/test_user.py | 3 --- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/ckan/public/css/style.css b/ckan/public/css/style.css index 9810a711bbd..b296e61e129 100644 --- a/ckan/public/css/style.css +++ b/ckan/public/css/style.css @@ -4,7 +4,7 @@ body.no-sidebar #sidebar { display: none; } body.no-sidebar #content { border-right: 0; - width: 950px; + width: 960px; } .header.outer { @@ -679,7 +679,7 @@ ul.userlist .badge { body.user.read #sidebar { display: none; } body.user.read #content { border-right: 0; - width: 950px; + width: 960px; } .user.read .page_heading { @@ -699,6 +699,13 @@ body.user.read #content { color: #999; } +.user.read .rule { + clear: both; + margin-bottom: 15px; + padding-top: 20px; + border-bottom: 1px solid #ddd; +} + .vcard dt { width: 115px; float: left; @@ -1308,7 +1315,7 @@ body.package.read #sidebar li.widget-container { body.package.resource_read #sidebar { display: none; } body.package.resource_read #content { border-right: 0; - width: 950px; + width: 960px; } .resource_read .notes { diff --git a/ckan/templates/user/read.html b/ckan/templates/user/read.html index 4064001bd0e..8a46ce92bac 100644 --- a/ckan/templates/user/read.html +++ b/ckan/templates/user/read.html @@ -15,18 +15,8 @@ - -
  • -

    Activity

    -
      -
    • Number of edits: ${c.user_dict['number_of_edits']}
    • -
    • Number of datasets administered: ${c.user_dict['number_administered_packages']}
    • -
    -
  • -
    - -
    -
    +
    +
    Name
    @@ -66,11 +56,19 @@

    Activity

    -
    +
    -
    -

    Recent changes

    - ${revision_list_from_dict(c.user_dict['activity'])} +
    +
    +

    Datasets

    + ${package_list_from_dict(c.user_dict['datasets'])} +
    +
    +

    Public Activity

    + + ${revision_list_from_dict(c.user_dict['activity'])} + +
    diff --git a/ckan/tests/functional/test_user.py b/ckan/tests/functional/test_user.py index 1d6a0de00ee..c24db1ea78e 100644 --- a/ckan/tests/functional/test_user.py +++ b/ckan/tests/functional/test_user.py @@ -56,9 +56,6 @@ def test_user_read(self): 'target="_blank"', 'rel="nofollow"') assert 'Edit Profile' not in main_res, main_res - assert 'Number of edits: 3' in res, res - assert 'Number of datasets administered: 1' in res, res - assert 'Revision History' in res, res def test_user_read_without_id(self): offset = '/user/'