aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-06 03:47:35 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-06 03:47:35 +0000
commitf4c8dce8e8d4f08600780ed5aa719dafe05746fe (patch)
treec8b8b540ff8fe1c354f9016b3389f5decf9ec0f8
parent1d59e5fc4bcc10151831456436019aef90de2bd3 (diff)
downloadelgg-f4c8dce8e8d4f08600780ed5aa719dafe05746fe.tar.gz
elgg-f4c8dce8e8d4f08600780ed5aa719dafe05746fe.tar.bz2
Fixes #3024 thewire view for the profile page is finished
git-svn-id: http://code.elgg.org/elgg/trunk@8611 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/thewire/languages/en.php1
-rw-r--r--mod/thewire/views/default/thewire/profile_status.php28
2 files changed, 21 insertions, 8 deletions
diff --git a/mod/thewire/languages/en.php b/mod/thewire/languages/en.php
index c17cfa782..4143a40cb 100644
--- a/mod/thewire/languages/en.php
+++ b/mod/thewire/languages/en.php
@@ -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
diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php
index 33b05f479..cdf1e9409 100644
--- a/mod/thewire/views/default/thewire/profile_status.php
+++ b/mod/thewire/views/default/thewire/profile_status.php
@@ -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;
+
}