aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--images/icons.pngbin12574 -> 12638 bytes
-rw-r--r--include/ItemObject.php75
-rw-r--r--include/features.php1
-rw-r--r--version.inc2
-rw-r--r--view/theme/duepuntozero/css/style.css50
-rw-r--r--view/tpl/conv_item.tpl121
6 files changed, 175 insertions, 74 deletions
diff --git a/images/icons.png b/images/icons.png
index 7294bad07..34d77a136 100644
--- a/images/icons.png
+++ b/images/icons.png
Binary files differ
diff --git a/include/ItemObject.php b/include/ItemObject.php
index bb507fe00..e55c61433 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -11,7 +11,7 @@ require_once('boot.php');
*/
class Item extends BaseObject {
private $data = array();
- private $template = 'wall_thread.tpl';
+ private $template = 'conv_item.tpl';
private $comment_box_template = 'comment_item.tpl';
private $toplevel = false;
private $writable = false;
@@ -104,19 +104,31 @@ class Item extends BaseObject {
? t('Private Message')
: false);
$shareable = ((($conv->get_profile_owner() == local_user()) && ($item['private'] != 1)) ? true : false);
+
if(local_user() && link_compare($a->contact['url'],$item['author-link']))
$edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
else
$edpost = false;
- if(($this->get_data_value('uid') == local_user()) || $this->is_visiting())
+
+// FIXME - this is wrong.
+// if(($this->get_data_value('uid') == local_user()) || $this->is_visiting())
+
+ if($this->get_data_value('uid') == local_user())
$dropping = true;
- $drop = array(
- 'dropping' => $dropping,
- 'select' => t('Select'),
- 'delete' => t('Delete'),
- );
-
+ if($dropping) {
+ $drop = array(
+ 'dropping' => $dropping,
+ 'delete' => t('Delete'),
+ );
+ }
+
+ if($observer_is_pageowner) {
+ $multidrop = array(
+ 'select' => t('Select'),
+ );
+ }
+
$filer = (($conv->get_profile_owner() == local_user()) ? t("save to folder") : false);
$diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
@@ -158,8 +170,8 @@ class Item extends BaseObject {
if ($tag!="") $tags[] = bbcode($tag);
}
- $like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
- $dislike = ((x($dlike,$item['uri']) && feature_enabled($conv->get_profile_owner(),'dislike')) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
+ $showlike = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
+ $showdislike = ((x($dlike,$item['uri']) && feature_enabled($conv->get_profile_owner(),'dislike')) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
/*
* We should avoid doing this all the time, but it depends on the conversation mode
@@ -173,7 +185,8 @@ class Item extends BaseObject {
if($this->is_toplevel()) {
if($conv->get_profile_owner() == local_user()) {
- $isstarred = (($item['item_flags'] & ITEM_STARRED) ? "starred" : "unstarred");
+
+// FIXME we don't need all this stuff, some can be done in the template
$star = array(
'do' => t("add star"),
@@ -181,8 +194,12 @@ class Item extends BaseObject {
'toggle' => t("toggle star status"),
'classdo' => (($item['item_flags'] & ITEM_STARRED) ? "hidden" : ""),
'classundo' => (($item['item_flags'] & ITEM_STARRED) ? "" : "hidden"),
+ 'isstarred' => (($item['item_flags'] & ITEM_STARRED) ? "starred" : "unstarred"),
'starred' => t('starred'),
- 'tagger' => t("add tag"),
+ );
+
+ $tagger = array(
+ 'tagit' => t("add tag"),
'classtagger' => "",
);
}
@@ -191,11 +208,10 @@ class Item extends BaseObject {
}
if($conv->is_writable()) {
- $buttons = array(
- 'like' => array( t("I like this \x28toggle\x29"), t("like")),
- 'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
- );
- if ($shareable) $buttons['share'] = array( t('Share this'), t('share'));
+ $like = array( t("I like this \x28toggle\x29"), t("like"));
+ $dislike = array( t("I don't like this \x28toggle\x29"), t("dislike"));
+ if ($shareable)
+ $share = array( t('Share this'), t('share'));
}
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
@@ -233,17 +249,22 @@ class Item extends BaseObject {
'owner_url' => $this->get_owner_url(),
'owner_photo' => $this->get_owner_photo(),
'owner_name' => template_escape($this->get_owner_name()),
- 'plink' => get_plink($item),
- 'edpost' => $edpost,
- 'isstarred' => $isstarred,
- 'star' => $star,
- 'filer' => $filer,
- 'drop' => $drop,
- 'vote' => $buttons,
- 'like' => $like,
- 'dislike' => $dislike,
- 'nolike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? '1' : ''),
+// Item toolbar buttons
+ 'like' => $like,
+ 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''),
+ 'share' => $share,
+ 'plink' => get_plink($item),
+ 'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''),
+ 'star' => $star,
+ 'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''),
+ 'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''),
+ 'drop' => $drop,
+ 'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''),
+// end toolbar buttons
+
+ 'showlike' => $showlike,
+ 'showdislike' => $showdislike,
'comment' => $this->get_comment_box($indent),
'previewing' => ($conv->is_preview() ? ' preview ' : ''),
'wait' => t('Please wait'),
diff --git a/include/features.php b/include/features.php
index c4fe0df55..efd9c3455 100644
--- a/include/features.php
+++ b/include/features.php
@@ -25,6 +25,7 @@ array('archives', t('Search by Date'), t('Select posts by date ranges'))
array('dislike', t('Dislike Posts'), t('Ability to dislike posts/comments')),
array('savedsearch', t('Saved Searches'), t('Save search terms for re-use')),
array('preview', t('Post Preview'), t('Preview posts and comments before publishing them')),
+array('edit_posts', t('Edit Sent Posts'), t('Edit/correct posts and comments after sending')),
);
diff --git a/version.inc b/version.inc
index 6e327b8ef..986400c00 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2012-11-03.127
+2012-11-04.128
diff --git a/view/theme/duepuntozero/css/style.css b/view/theme/duepuntozero/css/style.css
index 40941c890..4ea58fb4a 100644
--- a/view/theme/duepuntozero/css/style.css
+++ b/view/theme/duepuntozero/css/style.css
@@ -342,6 +342,7 @@ div.wall-item-content-wrapper.shiny {
cursor: pointer;
}
+
#group-sidebar {
margin-bottom: 10px;
}
@@ -1091,57 +1092,15 @@ input#dfrn-url {
width: 100%;
}
-.wall-item-like-buttons {
+
+.item-tool {
float: left;
-/* margin-right: 10px; */
-/* padding-right: 10px; */
-/* border-right: 2px solid #fff; */
+ margin-right: 8px;
}
.like-rotator {
margin-left: 5px;
}
-.icon.dislike {
- margin-left: 3px;
-}
-.icon.remote-link {
- margin-left: 10px;
-}
-
-.wall-item-like-buttons > a,
-.wall-item-like-buttons > img {
- float: left;
-}
-
-.wall-item-like-buttons img {
- cursor: pointer;
-}
-
-.wall-item-share-buttons {
- margin-left: 10px;
-}
-
-.editpost {
- margin-left: 10px;
- float: left;
-}
-.star-item {
- margin-left: 10px;
- float: left;
-}
-.tag-item {
- margin-left: 10px;
- float: left;
-}
-
-.filer-item {
- margin-left: 10px;
- float: left;
-}
-
-.wall-item-links-wrapper {
- float: left;
-}
.wall-item-delete-wrapper {
float: right;
@@ -1155,7 +1114,6 @@ input#dfrn-url {
border: none;
}
-
.wall-item-wrapper-end {
clear: both;
}
diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl
new file mode 100644
index 000000000..a5a3c4958
--- /dev/null
+++ b/view/tpl/conv_item.tpl
@@ -0,0 +1,121 @@
+{{if $item.comment_firstcollapsed}}
+ <div class="hide-comments-outer">
+ <span id="hide-comments-total-$item.id" class="hide-comments-total">$item.num_comments</span> <span id="hide-comments-$item.id" class="hide-comments fakelink" onclick="showHideComments($item.id);">$item.hide_text</span>
+ </div>
+ <div id="collapsed-comments-$item.id" class="collapsed-comments" style="display: none;">
+{{endif}}
+<div id="thread-wrapper-$item.id" class="thread-wrapper $item.toplevel">
+<a name="$item.id" ></a>
+<div class="wall-item-outside-wrapper $item.indent$item.previewing{{ if $item.owner_url }} wallwall{{ endif }}" id="wall-item-outside-wrapper-$item.id" >
+ <div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
+ <div class="wall-item-info{{ if $item.owner_url }} wallwall{{ endif }}" id="wall-item-info-$item.id">
+ {{ if $item.owner_url }}
+ <div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" >
+ <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id">
+ <img src="$item.owner_photo" class="wall-item-photo$item.osparkle" id="wall-item-ownerphoto-$item.id" style="height: 80px; width: 80px;" alt="$item.owner_name" /></a>
+ </div>
+ <div class="wall-item-arrowphoto-wrapper" ><img src="images/larrow.gif" alt="$item.wall" /></div>
+ {{ endif }}
+ <div class="wall-item-photo-wrapper{{ if $item.owner_url }} wwfrom{{ endif }}" id="wall-item-photo-wrapper-$item.id"
+ onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')"
+ onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)">
+ <a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$item.id">
+ <img src="$item.thumb" class="wall-item-photo$item.sparkle" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /></a>
+ <span onclick="openClose('wall-item-photo-menu-$item.id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$item.id">menu</span>
+ <div class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id">
+ <ul>
+ $item.item_photo_menu
+ </ul>
+ </div>
+
+ </div>
+ <div class="wall-item-photo-end"></div>
+ <div class="wall-item-wrapper" id="wall-item-wrapper-$item.id" >
+ {{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
+ {{ else }}<div class="wall-item-lock"></div>{{ endif }}
+ <div class="wall-item-location" id="wall-item-location-$item.id">$item.location</div>
+ </div>
+ </div>
+ <div class="wall-item-author">
+ <a href="$item.profile_url" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a>{{ if $item.owner_url }} $item.to <a href="$item.owner_url" title="$item.olinktitle" class="wall-item-name-link"><span class="wall-item-name$item.osparkle" id="wall-item-ownername-$item.id">$item.owner_name</span></a> $item.vwall{{ endif }}<br />
+ <div class="wall-item-ago" id="wall-item-ago-$item.id" title="$item.localtime">$item.ago</div>
+ </div>
+ <div class="wall-item-content" id="wall-item-content-$item.id" >
+ <div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div>
+ <div class="wall-item-title-end"></div>
+ <div class="wall-item-body" id="wall-item-body-$item.id" >$item.body
+ <div class="body-tag">
+ {{ for $item.tags as $tag }}
+ <span class='tag'>$tag</span>
+ {{ endfor }}
+ </div>
+ {{ if $item.has_cats }}
+ <div class="categorytags"><span>$item.txt_cats {{ for $item.categories as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+
+ {{ if $item.has_folders }}
+ <div class="filesavetags"><span>$item.txt_folders {{ for $item.folders as $cat }}$cat.name <a href="$cat.removeurl" title="$remove">[$remove]</a> {{ if $cat.last }}{{ else }}, {{ endif }}{{ endfor }}
+ </div>
+ {{ endif }}
+ </div>
+ </div>
+ <div class="wall-item-tools" id="wall-item-tools-$item.id">
+ {{ if $item.like }}
+ <a href="#" class="icon like item-tool" title="$item.like.0" onclick="dolike($item.id,'like'); return false"></a>
+ {{ endif }}
+ {{ if $item.dislike }}
+ <a href="#" class="icon dislike item-tool" title="$item.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
+ {{ endif }}
+ {{ if $item.share }}
+ <a href="#" class="icon recycle item-tool" title="$item.share.0" onclick="jotShare($item.id); return false"></a>
+ {{ endif }}
+ {{ if $item.plink }}
+ <a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon item-tool remote-link$item.sparkle"></a>
+ {{ endif }}
+ {{ if $item.edpost }}
+ <a class="editpost icon pencil item-tool" href="$item.edpost.0" title="$item.edpost.1"></a>
+ {{ endif }}
+ {{ if $item.star }}
+ <a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon item-tool $item.star.isstarred" title="$item.star.toggle"></a>
+ {{ endif }}
+ {{ if $item.tagger }}
+ <a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon item-tool tagged" title="$item.tagger.tagit"></a>
+ {{ endif }}
+ {{ if $item.filer }}
+ <a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon item-tool" title="$item.filer"></a>
+ {{ endif }}
+ <img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
+
+ <div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
+ {{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
+ </div>
+ {{ if $item.drop.pagedrop }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
+ <div class="wall-item-delete-end"></div>
+ </div>
+ </div>
+ <div class="wall-item-wrapper-end"></div>
+ <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.showlike</div>
+ <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.showdislike</div>
+
+ {{ if $item.threaded }}
+ {{ if $item.comment }}
+ <div class="wall-item-comment-wrapper $item.indent" >
+ $item.comment
+ </div>
+ {{ endif }}
+ {{ endif }}
+
+<div class="wall-item-outside-wrapper-end $item.indent" ></div>
+</div>
+{{ for $item.children as $item }}
+ {{ inc $item.template }}{{ endinc }}
+{{ endfor }}
+
+{{ if $item.flatten }}
+<div class="wall-item-comment-wrapper" >
+ $item.comment
+</div>
+{{ endif }}
+</div>
+{{if $item.comment_lastcollapsed}}</div>{{endif}}