diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-03-17 12:56:55 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-03-17 12:56:55 +0100 |
commit | 40162cd6b712f45ecd21f41d7793b2a6be6ac021 (patch) | |
tree | fa4f234f4deb22a868e08a194dfaace1da55c190 | |
parent | a41a05e6c0b0fa5f9497f0880a2db9d8d7374092 (diff) | |
download | volse-hubzilla-40162cd6b712f45ecd21f41d7793b2a6be6ac021.tar.gz volse-hubzilla-40162cd6b712f45ecd21f41d7793b2a6be6ac021.tar.bz2 volse-hubzilla-40162cd6b712f45ecd21f41d7793b2a6be6ac021.zip |
some work on profile listing
-rw-r--r-- | mod/profiles.php | 25 | ||||
-rw-r--r-- | view/css/mod_profiles.css | 23 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 31 | ||||
-rwxr-xr-x | view/tpl/profile_edit.tpl | 16 | ||||
-rwxr-xr-x | view/tpl/profile_entry.tpl | 20 | ||||
-rwxr-xr-x | 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) { : '<a href="' . $a->get_baseurl(true) . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>') )); } + + $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 @@ </button> <ul class="dropdown-menu"> <li class="nav-item"> - <a class="nav-link" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}">{{$profpic}}</a> + <a class="nav-link" href="profile_photo" id="profile-photo_upload-link" title="{{$profpic}}"><i class="icon-user"></i> {{$profpic}}</a> </li> {{if $is_default}} <li class="nav-item"> - <a href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}">{{$coverpic}}</a> + <a href="cover_photo" id="cover-photo_upload-link" title="{{$coverpic}}"><i class="icon-picture"></i> {{$coverpic}}</a> </li> {{/if}} + {{if ! $is_default}} <li class="nav-item"> - <a href="thing" id="profile-edit-thing-link" title="{{$addthing}}">{{$addthing}}</a> + <a href="profperm/{{$profile_id}}" id="profile-edit-visibility-link" title="{{$editvis}}"><i class="icon-pencil"></i> {{$editvis}}</a> </li> + {{/if}} <li class="nav-item"> - <a href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a> + <a href="thing" id="profile-edit-thing-link" title="{{$addthing}}"><i class="icon-plus-sign"></i> {{$addthing}}</a> </li> - {{if ! $is_default}} + <li class="divider"></li> <li class="nav-item"> - <a href="profperm/{{$profile_id}}" id="profile-edit-visibility-link" title="{{$editvis}}">{{$editvis}}</a> + <a href="profile/{{$profile_id}}/view" id="profile-edit-view-link" title="{{$viewprof}}">{{$viewprof}}</a> </li> - {{/if}} + {{if $profile_clone_link}} <li class="divider"></li> <li class="nav-item"> diff --git a/view/tpl/profile_entry.tpl b/view/tpl/profile_entry.tpl index ab81a7fbc..9ae870738 100755 --- a/view/tpl/profile_entry.tpl +++ b/view/tpl/profile_entry.tpl @@ -1,11 +1,11 @@ -<div class="generic-content-wrapper-styled"> -<div class="profile-listing" > -<div class="profile-listing-photo-wrapper" > -<a href="profiles/{{$id}}" class="profile-listing-edit-link"><img class="profile-listing-photo" id="profile-listing-photo-{{$id}}" src="{{$photo}}" alt="{{$alt}}" /></a> -</div> -<div class="profile-listing-photo-end"></div> -<div class="profile-listing-name" id="profile-listing-name-{{$id}}"><a href="profiles/{{$id}}" class="profile-listing-edit-link" >{{$profile_name}}</a></div> -<div class="profile-listing-visible">{{$visible}}</div> -</div> -<div class="profile-listing-end"></div> +<div class="profile-listing-row"> + <div class="profile-listing-cell" > + <a href="profiles/{{$id}}"><img class="profile-listing-photo" id="profile-listing-photo-{{$id}}" src="{{$photo}}" alt="{{$alt}}" /></a> + </div> + <div class="profile-listing-cell" id="profile-listing-name-{{$id}}"> + <a href="profiles/{{$id}}" class="profile-listing-edit-link" >{{$profile_name}}</a> + </div> + <div class="profile-listing-cell"> + {{$visible}} + </div> </div> diff --git a/view/tpl/profile_listing_header.tpl b/view/tpl/profile_listing_header.tpl index 09d00f982..2f39f0903 100755 --- a/view/tpl/profile_listing_header.tpl +++ b/view/tpl/profile_listing_header.tpl @@ -1,11 +1,12 @@ -<div class="generic-content-wrapper-styled"> -<h1>{{$header}}</h1> -<p id="profile-listing-desc" class="btn btn-default" > -<a href="profile_photo" >{{$chg_photo}}</a> -</p> -<p id="profile-stuff-link" class="btn btn-default"> -<a href="thing" title="{{$stuff_desc}}">{{$addstuff}}</a> -</p> -<p id="profile-listing-new-link-wrapper" class="btn btn-default" > -<a href="{{$cr_new_link}}" id="profile-listing-new-link" title="{{$cr_new}}" >{{$cr_new}}</a> +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <a class="btn btn-success btn-xs pull-right" href="{{$cr_new_link}}" id="profile-listing-new-link" title="{{$cr_new}}" ><i class="icon-plus-sign"></i> {{$cr_new}}</a> + <h2>{{$header}}</h2> + </div> + <div class="section-content-wrapper"> + <div class="profile-listing-table"> + {{$profiles}} + </div> + </div> + </div> |