profile visibility editor

This commit is contained in:
Friendika 2011-04-12 21:21:33 -07:00
parent f04e2e7044
commit e8a0dd40b2
6 changed files with 81 additions and 14 deletions

View File

@ -283,7 +283,15 @@
$('body .fakelink').css('cursor', 'wait'); $('body .fakelink').css('cursor', 'wait');
$.get('group/' + gid + '/' + cid, function(data) { $.get('group/' + gid + '/' + cid, function(data) {
$('#group-update-wrapper').html(data); $('#group-update-wrapper').html(data);
$('#group-update2-wrapper').html(data);
$('body .fakelink').css('cursor', 'auto'); $('body .fakelink').css('cursor', 'auto');
}); });
} }
function profChangeMember(gid,cid) {
$('body .fakelink').css('cursor', 'wait');
$.get('profperm/' + gid + '/' + cid, function(data) {
$('#prof-update-wrapper').html(data);
$('body .fakelink').css('cursor', 'auto');
});
}

View File

@ -459,16 +459,16 @@ function profiles_content(&$a) {
)); ));
$tpl_default = load_view_file('view/profile_entry_default.tpl');
$tpl = load_view_file('view/profile_entry.tpl'); $tpl = load_view_file('view/profile_entry.tpl');
foreach($r as $rr) { foreach($r as $rr) {
$template = (($rr['is-default']) ? $tpl_default : $tpl); $o .= replace_macros($tpl, array(
$o .= replace_macros($template, array(
'$photo' => $rr['thumb'], '$photo' => $rr['thumb'],
'$id' => $rr['id'], '$id' => $rr['id'],
'$alt' => t('Profile Image'), '$alt' => t('Profile Image'),
'$profile_name' => $rr['profile-name'] '$profile_name' => $rr['profile-name'],
'$visible' => (($rr['is-default']) ? t('Visible to everybody')
: '<a href="' . $a->get_baseurl() . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>')
)); ));
} }
} }

View File

@ -5,6 +5,7 @@
</div> </div>
<div class="profile-listing-photo-end"></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-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>
<div class="profile-listing-end"></div> <div class="profile-listing-end"></div>

View File

@ -1,9 +0,0 @@
<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>
<div class="profile-listing-end"></div>

View File

@ -2258,3 +2258,36 @@ a.mail-list-link {
#group-edit-desc { #group-edit-desc {
margin-top: 15px; margin-top: 15px;
} }
#prof-members {
margin-top: 20px;
padding: 10px;
height: 250px;
overflow: auto;
border: 1px solid #ddd;
}
#prof-members-end {
clear: both;
}
#prof-separator {
margin-top: 10px;
margin-bottom: 10px;
}
#prof-all-contacts {
padding: 10px;
height: 450px;
overflow: auto;
border: 1px solid #ddd;
}
#prof-all-contacts-end {
clear: both;
}
#prof-edit-desc {
margin-top: 15px;
}

View File

@ -2282,3 +2282,37 @@ a.mail-list-link {
#group-edit-desc { #group-edit-desc {
margin-top: 15px; margin-top: 15px;
} }
#prof-members {
margin-top: 20px;
padding: 10px;
height: 250px;
overflow: auto;
border: 1px solid #ddd;
}
#prof-members-end {
clear: both;
}
#prof-separator {
margin-top: 10px;
margin-bottom: 10px;
}
#prof-all-contacts {
padding: 10px;
height: 450px;
overflow: auto;
border: 1px solid #ddd;
}
#prof-all-contacts-end {
clear: both;
}
#prof-edit-desc {
margin-top: 15px;
}