]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3024 thewire view for the profile page is finished
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Mar 2011 03:47:35 +0000 (03:47 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Mar 2011 03:47:35 +0000 (03:47 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8611 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/thewire/languages/en.php
mod/thewire/views/default/thewire/profile_status.php

index c17cfa782e2c18a5f50c4e294b5c522b8a6d0fe5..4143a40cb28aa53b194c843c3c0a0604d902b4ac 100644 (file)
@@ -20,6 +20,7 @@ $english = array(
        'thewire:tags' => "Wire posts tagged with '%s'",
        'thewire:noposts' => "No wire posts yet",
        'item:object:thewire' => "Wire posts",
+       'thewire:update' => 'Update',
 
        /**
         * The wire river
index 33b05f479988eb023e7443394cfd4c88915e0c72..cdf1e9409857f6befb5e5902b1f2fe4e1ebde3d5 100644 (file)
@@ -1,10 +1,11 @@
 <?php
 /**
  * Latest wire post on profile page
+ *
+ * @uses $vars['entity'] User that owns this profile page
  */
 
 $owner = $vars['entity']->guid;
-$url_to_wire = elgg_get_site_url() . "pg/thewire/owner/" . $vars['entity']->username;
 
 //grab the user's latest from the wire
 $params = array(
@@ -18,14 +19,25 @@ $latest_wire = elgg_get_entities($params);
 if ($latest_wire && count($latest_wire) > 0) {
        $latest_wire = $latest_wire[0];
        $content = thewire_filter($latest_wire->description);
-       $time = "<p class='entity-subtext'> (" . elgg_view_friendly_time($latest_wire->time_created) . ")</p>";
+       $time = "<p class='elgg-subtext'>(" . elgg_view_friendly_time($latest_wire->time_created) . ")</p>";
 
-       echo "<div class='wire_post'><div class='wire_post_contents clearfix radius8'>";
-       echo $content;
+       $button = '';
        if ($owner == elgg_get_logged_in_user_guid()) {
-               $text = elgg_echo('thewire:update');
-               echo "<a class='elgg-button elgg-button-action update small' href=\"{$url_to_wire}\">$text</a>";
+       $url_to_wire = "pg/thewire/owner/" . $vars['entity']->username;
+               $button = elgg_view('output/url', array(
+                       'text' => elgg_echo('thewire:update'),
+                       'href' => $url_to_wire,
+                       'class' => 'elgg-button elgg-button-action right',
+               ));
        }
-       echo $time;
-       echo "</div></div>";
+
+       $body = $content . $time;
+       $content = elgg_view_image_block('', $body, array('image_alt' => $button));
+
+       echo <<< HTML
+<div class="wire-status elgg-border-plain pam mbm clearfix">
+       $content
+</div>
+HTML;
+
 }