From 4766f36a4d74924f21ff329c4318ce4e069ffa04 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 3 Mar 2010 17:53:05 +0000 Subject: Pulled in the interface changes. git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/thewire/views/default/object/thewire.php | 102 ++++++++++++++++ .../views/default/river/object/thewire/create.php | 17 +++ .../views/default/thewire/activity_view.php | 48 ++++++++ mod/thewire/views/default/thewire/css.php | 136 +++++++++++++++++++++ mod/thewire/views/default/thewire/forms/add.php | 44 +++++++ mod/thewire/views/default/thewire/notfound.php | 21 ++++ .../views/default/thewire/profile_status.php | 28 +++++ .../views/default/thewire/scripts/counter.js | 19 +++ mod/thewire/views/default/thewire/view.php | 27 ++++ mod/thewire/views/default/widgets/thewire/edit.php | 14 +++ mod/thewire/views/default/widgets/thewire/view.php | 29 +++++ 11 files changed, 485 insertions(+) create mode 100644 mod/thewire/views/default/object/thewire.php create mode 100644 mod/thewire/views/default/river/object/thewire/create.php create mode 100644 mod/thewire/views/default/thewire/activity_view.php create mode 100644 mod/thewire/views/default/thewire/css.php create mode 100644 mod/thewire/views/default/thewire/forms/add.php create mode 100644 mod/thewire/views/default/thewire/notfound.php create mode 100644 mod/thewire/views/default/thewire/profile_status.php create mode 100644 mod/thewire/views/default/thewire/scripts/counter.js create mode 100644 mod/thewire/views/default/thewire/view.php create mode 100644 mod/thewire/views/default/widgets/thewire/edit.php create mode 100644 mod/thewire/views/default/widgets/thewire/view.php (limited to 'mod/thewire/views') diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php new file mode 100644 index 000000000..3e8e53124 --- /dev/null +++ b/mod/thewire/views/default/object/thewire.php @@ -0,0 +1,102 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + * @question - do we want users to be able to edit thewire? + * + * @uses $vars['entity'] Optionally, the note to view + */ + + if (isset($vars['entity'])) { + + $user_name = $vars['entity']->getOwnerEntity()->name; + + //if the note is a reply, we need some more info + + $note_url = ''; + $note_owner = elgg_echo("thewire:notedeleted"); + +?> +
+
+ + +
+ +
+ $vars['entity']->getOwnerEntity(), 'size' => 'small')); + ?> +
+ +
+ + + parent == 0){ + ?> + reply + +
+ canEdit()) { + + + echo "
" . elgg_view("output/confirmlink",array( + 'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(), + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )) . "
"; + + } //end of can edit if statement + ?> +
+ + + {$user_name}: "; + + + $desc = $vars['entity']->description; + + $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@$1',$desc); + echo parse_urls($desc); + ?> + + +
+
+
+ + time_created) + ); + + echo " via " . elgg_echo($vars['entity']->method) . "."; + + ?> +
+ + +
+
+ \ No newline at end of file diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php new file mode 100644 index 000000000..9984e99e7 --- /dev/null +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -0,0 +1,17 @@ +subject_guid); // $statement->getSubject(); + $object = get_entity($vars['item']->object_guid); + $url = $object->getURL(); + + $string = "getURL()}\">{$performed_by->name}: "; + $desc .= $object->description; + $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@$1',$desc); + $string .= parse_urls($desc); + + $string .= " getOwnerEntity()->username}\" class=\"reply\">" . elgg_echo('thewire:reply') . ""; +?> + + \ No newline at end of file diff --git a/mod/thewire/views/default/thewire/activity_view.php b/mod/thewire/views/default/thewire/activity_view.php new file mode 100644 index 000000000..7edd64680 --- /dev/null +++ b/mod/thewire/views/default/thewire/activity_view.php @@ -0,0 +1,48 @@ + 'object', 'subtypes' => 'thewire', 'owner_guid' => $_SESSION['user']->getGUID(), 'limit' => 1, 'full_view' => TRUE, 'view_type_toggle' => FALSE, 'pagination' => FALSE)); + +?> + + + +
+ +
+ + " . elgg_echo('thewire:newpost') . "
"; + $display .= "
"; + echo $display; + echo elgg_echo("thewire:charleft") . "
"; + ?> + + + + +
+ +
+ +
+ + the wireRead the wire + +
\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/css.php b/mod/thewire/views/default/thewire/css.php new file mode 100644 index 000000000..6491af2ed --- /dev/null +++ b/mod/thewire/views/default/thewire/css.php @@ -0,0 +1,136 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ + +?> +/* widget */ +.thewire-singlepage { + margin:0 10px 0 10px; +} +.thewire-singlepage .note_body { + background: white; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; +} +.collapsable_box_content .note_body { + line-height:1.2em; +} +.thewire-singlepage .thewire-post { + margin-bottom:5px; + background:transparent url(mod/thewire/graphics/thewire_speech_bubble.gif) no-repeat right bottom; +} +.thewire-post { + background:#cccccc; + margin-bottom:10px; +} +.thewire-post .note_date { + font-size:90%; + color:#666666; + padding:0; +} +.thewire_icon { + float:left; + margin:0 8px 4px 2px; +} +.note_body { + margin:0; + padding:6px 4px 4px 4px; + min-height: 40px; + line-height: 1.4em; +} +.thewire_options { + float:right; + width:65px; +} +.thewire-post .reply { + font: 11px/100% Arial, Helvetica, sans-serif; + font-weight: bold; + color: #ffffff; + background:#999999; + border: 2px solid #999999; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + width: auto; + padding: 0 3px 2px 3px; + margin:0 0 5px 5px; + cursor: pointer; + float:right; +} +.thewire-post .reply:hover { + background: #4690d6; + border: 2px solid #4690d6; + color:white; + text-decoration: none; +} +.thewire-post .delete_note { + width:14px; + height:14px; + margin:3px 0 0 0; + float:right; +} +.thewire-post .delete_note a { + display:block; + cursor: pointer; + width:14px; + height:14px; + background: url("_graphics/icon_customise_remove.png") no-repeat 0 0; + text-indent: -9000px; +} +.thewire-post .delete_note a:hover { + background-position: 0 -16px; +} +/* IE 6 fix */ +* html .thewire-post .delete_note a { background-position-y: 2px; } +* html .thewire-post .delete_note a:hover { background-position-y: -14px; } + +.post_to_wire { + background: white; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + margin:0 10px 10px 10px; + padding:10px; +} +.post_to_wire input[type="submit"] { + margin:0; +} + +/* reply form */ +textarea#thewire_large-textarea { + width: 664px; + height: 40px; + padding: 6px; + font-family: Arial, 'Trebuchet MS','Lucida Grande', sans-serif; + font-size: 100%; + color:#666666; +} +/* IE 6 fix */ +* html textarea#thewire_large-textarea { + width: 642px; +} + +input.thewire_characters_remaining_field { + color:#333333; + border:none; + font-size: 100%; + font-weight: bold; + padding:0 2px 0 0; + margin:0; + text-align: right; + background: white; +} +input.thewire_characters_remaining_field:focus { + border:none; + background:white; +} +.thewire_characters_remaining { + text-align: right; +} + diff --git a/mod/thewire/views/default/thewire/forms/add.php b/mod/thewire/views/default/thewire/forms/add.php new file mode 100644 index 000000000..cf9ff15e6 --- /dev/null +++ b/mod/thewire/views/default/thewire/forms/add.php @@ -0,0 +1,44 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + */ + + $wire_user = get_input('wire_username'); + if (!empty($wire_user)) { $msg = '@' . $wire_user . ' '; } else { $msg = ''; } + +?> +
+

+ + +
+ {$msg}"; + $display .= "
"; + echo $display; + echo elgg_echo("thewire:charleft") . "
"; + echo elgg_view('input/securitytoken'); + ?> + + +
+
+ \ No newline at end of file diff --git a/mod/thewire/views/default/thewire/notfound.php b/mod/thewire/views/default/thewire/notfound.php new file mode 100644 index 000000000..bc53815fb --- /dev/null +++ b/mod/thewire/views/default/thewire/notfound.php @@ -0,0 +1,21 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ + +?> + +

+ +

\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php new file mode 100644 index 000000000..890b8b9c3 --- /dev/null +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -0,0 +1,28 @@ +guid; + $url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username; + + //grab the users latest from the wire + $latest_wire = elgg_get_entities(array('types' => 'object', 'subtypes' => 'thewire', 'owner_guid' => $owner, 'limit' => 1)); + + if($latest_wire){ + foreach($latest_wire as $lw){ + $content = $lw->description; + $time = " (" . friendly_time($lw->time_created) . ")"; + } + } + + if($latest_wire){ + echo "
"; + echo $content; + if($owner == $_SESSION['user']->guid) + echo " update"; + echo $time; + echo "
"; + } +?> \ No newline at end of file diff --git a/mod/thewire/views/default/thewire/scripts/counter.js b/mod/thewire/views/default/thewire/scripts/counter.js new file mode 100644 index 000000000..3a1ebdbc5 --- /dev/null +++ b/mod/thewire/views/default/thewire/scripts/counter.js @@ -0,0 +1,19 @@ +// I need to move this into a JS folder for the plugin + +/* + + + + + +*/ + +function textCounter(field,cntfield,maxlimit) { + // if too long...trim it! + if (field.value.length > maxlimit) { + field.value = field.value.substring(0, maxlimit); + } else { + // otherwise, update 'characters left' counter + cntfield.value = maxlimit - field.value.length; + } +} diff --git a/mod/thewire/views/default/thewire/view.php b/mod/thewire/views/default/thewire/view.php new file mode 100644 index 000000000..e63f88fc6 --- /dev/null +++ b/mod/thewire/views/default/thewire/view.php @@ -0,0 +1,27 @@ + + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + * + * @uses $vars['entity'] An array of wire notes to view + * + */ + + // If there are any wire notes to view, view them + if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) { + + foreach($vars['entity'] as $shout) { + + echo elgg_view_entity($shout); + + } + + } + +?> \ No newline at end of file diff --git a/mod/thewire/views/default/widgets/thewire/edit.php b/mod/thewire/views/default/widgets/thewire/edit.php new file mode 100644 index 000000000..32a5c8bf7 --- /dev/null +++ b/mod/thewire/views/default/widgets/thewire/edit.php @@ -0,0 +1,14 @@ + +

+ + +

\ No newline at end of file diff --git a/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/view.php new file mode 100644 index 000000000..4821b854b --- /dev/null +++ b/mod/thewire/views/default/widgets/thewire/view.php @@ -0,0 +1,29 @@ + + getGUID()); + } + + $num = $vars['entity']->num_display; + if(!$num) + $num = 4; + + $thewire = $page_owner->getObjects('thewire', $num); + + // If there are any thewire to view, view them + if (is_array($thewire) && sizeof($thewire) > 0) { + + foreach($thewire as $shout) { + + echo elgg_view_entity($shout); + + } + + } + + ?> -- cgit v1.2.3