diff --git a/examples/demo/site/modules/admin/files/css/admin.css b/examples/demo/site/modules/admin/files/css/admin.css index c6386ae..3edb00a 100644 --- a/examples/demo/site/modules/admin/files/css/admin.css +++ b/examples/demo/site/modules/admin/files/css/admin.css @@ -5,13 +5,26 @@ ul.cms-users { } ul.cms-users li { border-top: dotted 1px #ccc; + display: flex; + flex-direction: row; + align-items: flex-start; } ul.cms-users li:first-child { border-top: none; } -ul.cms-users li.cms_user a::before { +ul.cms-users li span { + flex-grow: 1; + flex-basis: 20px; + padding-left: 2px; + text-align: left; +} +ul.cms-users li span.identifier a::before { content: "[user] "; } +ul.cms-users li span.roles { + color: #090; + font-weight: bold; +} ul.cms-roles { list-style-type: none; diff --git a/examples/demo/site/modules/admin/files/scss/admin.scss b/examples/demo/site/modules/admin/files/scss/admin.scss index b075b88..36d8709 100644 --- a/examples/demo/site/modules/admin/files/scss/admin.scss +++ b/examples/demo/site/modules/admin/files/scss/admin.scss @@ -1,5 +1,4 @@ ul.cms-users { - list-style-type: none; padding: 3px 3px 3px 3px; border: solid 1px #ccc; @@ -9,10 +8,22 @@ ul.cms-users { &:first-child { border-top: none; } - } - - li.cms_user a::before { - content: "[user] "; + display: flex; + flex-direction: row; + align-items: flex-start; + span { + flex-grow: 1; + flex-basis: 20px; + padding-left: 2px; + text-align: left; + &.identifier a::before { + content: "[user] "; + } + &.roles { + color: #090; + font-weight: bold; + } + } } } diff --git a/library/model/src/user/cms_user.e b/library/model/src/user/cms_user.e index 641e582..d17b5ef 100644 --- a/library/model/src/user/cms_user.e +++ b/library/model/src/user/cms_user.e @@ -196,6 +196,11 @@ feature -- Change element email_set: email = a_email end + set_creation_date (dt: like creation_date) + do + creation_date := dt + end + set_last_login_date (dt: like last_login_date) do last_login_date := dt diff --git a/modules/admin/handler/user/cms_admin_users_handler.e b/modules/admin/handler/user/cms_admin_users_handler.e index 0aad636..a1054fe 100644 --- a/modules/admin/handler/user/cms_admin_users_handler.e +++ b/modules/admin/handler/user/cms_admin_users_handler.e @@ -67,6 +67,7 @@ feature -- HTTP Methods l_count: INTEGER user_api: CMS_USER_API l_display_name: READABLE_STRING_32 + ago: DATE_TIME_AGO_CONVERTER do -- At the moment the template are hardcoded, but we can -- get them from the configuration file and load them into @@ -99,12 +100,13 @@ feature -- HTTP Methods if attached user_api.recent_users (create {CMS_DATA_QUERY_PARAMETERS}.make (l_page_helper.current_page_offset, l_page_helper.page_size)) as lst then s.append ("