fix layout issues, deletable items and wall-wall

This commit is contained in:
Mike Macgirvin 2010-09-20 21:26:18 -07:00
parent cd61b46009
commit b9247f1dcc
3 changed files with 31 additions and 21 deletions

View File

@ -249,6 +249,9 @@ function profile_content(&$a, $update = 0) {
$tpl = file_get_contents('view/wall_item.tpl');
$droptpl = file_get_contents('view/wall_item_drop.tpl');
$fakedrop = file_get_contents('view/wall_fake_drop.tpl');
if($update)
$return_url = $_SESSION['return_url'];
else
@ -333,9 +336,12 @@ function profile_content(&$a, $update = 0) {
$profile_link = $profile_url;
$drop = '';
$dropping = false;
if(($item['contact-id'] == $_SESSION['visitor_id']) || ($item['uid'] == $_SESSION['uid']))
$drop = replace_macros(file_get_contents('view/wall_item_drop.tpl'), array('$id' => $item['id']));
$dropping = true;
$drop = replace_macros((($dropping)? $droptpl : $fakedrop), array('$id' => $item['id']));
$like = (($alike[$item['id']]) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');

2
view/wall_fake_drop.tpl Normal file
View File

@ -0,0 +1,2 @@
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$id" >&nbsp;</div>
<div class="wall-item-delete-end"></div>

View File

@ -1,4 +1,5 @@
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
<div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" >
<div class="wall-item-photo-wrapper" id="wall-item-ownerphoto-wrapper-$id" >
<a href="$owner_url" title="View $owner_name's profile" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$id">
<img src="$owner_photo" class="wall-item-photo" id="wall-item-ownerphoto-$id" height="80" width="80" alt="$owner_name" /></a>
@ -8,6 +9,7 @@
<a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id">
<img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
</div>
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
<a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a> to <a href="$owner_url" title="View $owner_name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-ownername-$id">$owner_name</span></a> via Wall-To-Wall:<br />
<div class="wall-item-ago" id="wall-item-ago-$id">$ago</div>
@ -19,7 +21,7 @@
<div class="wall-item-body" id="wall-item-body-$id" >$body</div>
</div>
$drop
</div>
<div class="wall-item-wrapper-end"></div>
<div class="wall-item-like" id="wall-item-like-$id">$like</div>
<div class="wall-item-dislike" id="wall-item-dislike-$id">$dislike</div>