From 40162cd6b712f45ecd21f41d7793b2a6be6ac021 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 17 Mar 2016 12:56:55 +0100 Subject: some work on profile listing --- mod/profiles.php | 25 ++++++++++++------------- view/css/mod_profiles.css | 23 +++++++++++++++++++++++ view/theme/redbasic/css/style.css | 31 ------------------------------- view/tpl/profile_edit.tpl | 16 +++++++++------- view/tpl/profile_entry.tpl | 20 ++++++++++---------- view/tpl/profile_listing_header.tpl | 21 +++++++++++---------- 6 files changed, 65 insertions(+), 71 deletions(-) diff --git a/mod/profiles.php b/mod/profiles.php index aebcc9022..f891c6033 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -758,21 +758,9 @@ function profiles_content(&$a) { local_channel()); if(count($r)) { - $tpl_header = get_markup_template('profile_listing_header.tpl'); - $o .= replace_macros($tpl_header,array( - '$header' => t('Edit/Manage Profiles'), - '$addstuff' => t('Add profile things'), - '$stuff_desc' => t('Include desirable objects in your profile'), - '$chg_photo' => t('Change profile photo'), - '$cr_new' => t('Create New Profile'), - '$cr_new_link' => 'profiles/new?t=' . get_form_security_token("profile_new") - )); - - $tpl = get_markup_template('profile_entry.tpl'); - foreach($r as $rr) { - $o .= replace_macros($tpl, array( + $profiles .= replace_macros($tpl, array( '$photo' => $rr['thumb'], '$id' => $rr['id'], '$alt' => t('Profile Image'), @@ -782,6 +770,17 @@ function profiles_content(&$a) { : '' . t('Edit visibility') . '') )); } + + $tpl_header = get_markup_template('profile_listing_header.tpl'); + $o .= replace_macros($tpl_header,array( + '$header' => t('Edit Profiles'), + '$cr_new' => t('Create New'), + '$cr_new_link' => 'profiles/new?t=' . get_form_security_token("profile_new"), + '$profiles' => $profiles + )); + + + } return $o; diff --git a/view/css/mod_profiles.css b/view/css/mod_profiles.css index eec67be15..4d83e6419 100644 --- a/view/css/mod_profiles.css +++ b/view/css/mod_profiles.css @@ -6,3 +6,26 @@ padding: 7px 10px; width: 100%; } + +.profile-listing-table { + display: table; + width: 100%; +} + +.profile-listing-row { + display: table-row; +} + +.profile-listing-cell { + display: table-cell; +} + +.profile-listing-edit-link { + margin: 10px; +} + +.profile-listing-photo { + width: 48px; + height: 48px; + margin: 10px 0px; +} diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 4115ea764..f0e057425 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -328,37 +328,6 @@ footer { margin-bottom: 15px; } -.profile-listing-photo-wrapper { - float: left; -} - -.profile-listing-edit-buttons-wrapper { - clear: both; -} -.profile-listing-photo-edit-link { - float: left; - width: 125px; -} -.profile-listing-end { - clear: both; -} -.profile-listing-edit-buttons-wrapper img{ - border: none; - margin-right: 20px; -} -.profile-listing { - margin-top: 25px; -} -.profile-listing-name { - float: left; - margin-left: 32px; - margin-top: 10px; - color: #3172BD; - font-weight: bold; - width: 200px; - -} - .app-name { overflow: none; } diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index c7da20f81..a02323e45 100755 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -6,24 +6,26 @@