]> git.mxchange.org Git - friendica.git/commitdiff
some notification text cleanup and notification page layout fixes for duepuntozero
authorFriendika <info@friendika.com>
Mon, 10 Oct 2011 03:26:17 +0000 (20:26 -0700)
committerFriendika <info@friendika.com>
Mon, 10 Oct 2011 03:26:17 +0000 (20:26 -0700)
mod/notifications.php
view/notifications.tpl
view/theme/duepuntozero/style.css

index 083476501abe387c1ca137def7aa00cf99f36b44..e1d94526ae9017fc48fdad5cf83dddf4bddd1e40 100644 (file)
@@ -212,7 +212,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_dislikes,array(
                                                        '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
+                                                       '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
                                                break;
@@ -226,24 +226,21 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_friends,array(
                                                        '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s is now friend with %s"), $it['author-name'], $it['fname']),
-                                                       '$item_when' => relative_date($it['created'])
-                                               ));
-                                               break;
-                                               
-                                       case ACTIVITY_POST;$notif_content .= replace_macros($tpl_item_posts,array(
-                                                       '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
-                                                       '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s posted"), $it['author-name']),
+                                                       '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
                                                break;
                                                
                                        default:
-                                               $notif_content .= replace_macros($tpl_item_comments,array(
+                                               $item_text = (($it['id'] == $it['parent'])
+                                                       ? sprintf( t("%s created a new post"), $it['author-name'])
+                                                       : sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']));
+                                               $tpl = (($it['id'] == $it['parent']) ? $tpl_item_posts : $tpl_item_comments);
+
+                                               $notif_content .= replace_macros($tpl,array(
                                                        '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s commented %s's post"), $it['author-name'], $it['pname']),
+                                                       '$item_text' => $item_text,
                                                        '$item_when' => relative_date($it['created'])
                                                ));
                                }
@@ -296,7 +293,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_dislikes,array(
                                                        '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s liked %s's post"), $it['author-name'], $it['pname']),
+                                                       '$item_text' => sprintf( t("%s disliked %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
 
@@ -310,7 +307,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_friends,array(
                                                        '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s is now friend with %s"), $it['author-name'], $it['fname']),
+                                                       '$item_text' => sprintf( t("%s is now friends with %s"), $it['author-name'], $it['fname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
 
@@ -319,7 +316,7 @@ function notifications_content(&$a) {
                                                $notif_content .= replace_macros($tpl_item_comments,array(
                                                        '$item_link' => $a->get_baseurl().'/display/'.$a->user['nickname']."/".$it['parent'],
                                                        '$item_image' => $it['author-avatar'],
-                                                       '$item_text' => sprintf( t("%s commented %s's post"), $it['author-name'], $it['pname']),
+                                                       '$item_text' => sprintf( t("%s commented on %s's post"), $it['author-name'], $it['pname']),
                                                        '$item_when' => relative_date($it['created'])
                                                ));
                                }
index 8656ea9d10763a2b60785d417fed1e1ab0b3dff7..24f78f37efe18d37f36142d3904e4a7b9fd68a4f 100644 (file)
@@ -7,6 +7,7 @@
        <a href="/notifications/intros" class="button tabs {{if $activetab==intros}}active{{endif}}">Introductions</a>
        <a href="/message" class="button tabs">Messages</a>
 </p>
+<div class="notification-listing-end"></div>
 
 <div class="notif-network-wrapper">
        $notif_content
index d488ed7e20027afa0aaa8f30ddd711a0e0c085f8..c098ae7d5a08d2202105578ba8d963309381030d 100644 (file)
@@ -2576,6 +2576,15 @@ a.mail-list-link {
        filter:alpha(opacity=100);
 }
 
+.notif-image {
+       height: 80px;
+       width: 80px;
+}
+.notification-listing-end {
+       clear: both;
+}
+
+
 /**
  * Plugins settings
  */