From 968e7bb3b15cd4205e857c4245c5d328d17d6a66 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 26 Sep 2011 11:48:02 +0200 Subject: [PATCH] Fixes for testbubble --- include/conversation.php | 3 +- js/main.js | 4 +- view/theme/testbubble/nav.tpl | 89 +++++++++++++------------ view/theme/testbubble/profile_vcard.tpl | 45 +++++++++++++ view/theme/testbubble/wall_item.tpl | 9 ++- 5 files changed, 101 insertions(+), 49 deletions(-) create mode 100644 view/theme/testbubble/profile_vcard.tpl diff --git a/include/conversation.php b/include/conversation.php index 10d9bad2cd..acbbc9bd5e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -437,11 +437,12 @@ function conversation(&$a, $items, $mode, $update) { $star = false; if ($profile_owner == local_user() && $toplevelpost) { - $isstarred = (($item['starred']) ? "starred" : "hidden"); + $isstarred = (($item['starred']) ? "starred" : "unstarred"); $star = array( 'do' => t("add star"), 'undo' => t("remove star"), + 'toggle' => t("toggle star status"), 'classdo' => (($item['starred']) ? "hidden" : ""), 'classundo' => (($item['starred']) ? "" : "hidden"), 'starred' => t('starred'), diff --git a/js/main.js b/js/main.js index f08b669e3d..896cbeb569 100644 --- a/js/main.js +++ b/js/main.js @@ -267,12 +267,12 @@ $.get('starred/' + ident, function(data) { if(data.match(/1/)) { $('#starred-' + ident).addClass('starred'); - $('#starred-' + ident).removeClass('hidden'); + $('#starred-' + ident).removeClass('unstarred'); $('#star-' + ident).addClass('hidden'); $('#unstar-' + ident).removeClass('hidden'); } else { - $('#starred-' + ident).addClass('hidden'); + $('#starred-' + ident).addClass('unstarred'); $('#starred-' + ident).removeClass('starred'); $('#star-' + ident).removeClass('hidden'); $('#unstar-' + ident).addClass('hidden'); diff --git a/view/theme/testbubble/nav.tpl b/view/theme/testbubble/nav.tpl index f206833669..359d01bc1f 100644 --- a/view/theme/testbubble/nav.tpl +++ b/view/theme/testbubble/nav.tpl @@ -1,54 +1,55 @@ -$langselector + diff --git a/view/theme/testbubble/profile_vcard.tpl b/view/theme/testbubble/profile_vcard.tpl new file mode 100644 index 0000000000..0ee6919bc9 --- /dev/null +++ b/view/theme/testbubble/profile_vcard.tpl @@ -0,0 +1,45 @@ +
+
$profile.name
+ + + {{ if $pdesc }}
$profile.pdesc
{{ endif }} +
$profile.name
+ + + + {{ if $location }} +
$location
+
+ {{ if $profile.address }}
$profile.address
{{ endif }} + + $profile.locality{{ if $profile.locality }}, {{ endif }} + $profile.region + $profile.postal-code + + {{ if $profile.country-name }}$profile.country-name{{ endif }} +
+
+ {{ endif }} + + {{ if $gender }}
$gender
$profile.gender
{{ endif }} + + {{ if $profile.pubkey }}{{ endif }} + + {{ if $marital }}
$marital
$profile.marital
{{ endif }} + + {{ if $homepage }}
$homepage
$profile.homepage
{{ endif }} + + {{ inc diaspora_vcard.tpl }}{{ endinc }} + + +
+ +$contact_block + + diff --git a/view/theme/testbubble/wall_item.tpl b/view/theme/testbubble/wall_item.tpl index b8af3685fc..47f062affb 100644 --- a/view/theme/testbubble/wall_item.tpl +++ b/view/theme/testbubble/wall_item.tpl @@ -27,9 +27,14 @@
$vote - $plink + {{ if $plink }} + + {{ endif }} $edpost - $star + + {{ if $star }} + + {{ endif }} $drop