aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 14:10:51 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-07 14:10:51 +0000
commit538a22b85384008533aeef2ac356ff668766e0cb (patch)
tree0070a18c9d09241a15df94fcbeeeda16feed4138 /views
parent90cb880ec6b629376df97c89bc4a0b3e2db32c8e (diff)
downloadelgg-538a22b85384008533aeef2ac356ff668766e0cb.tar.gz
elgg-538a22b85384008533aeef2ac356ff668766e0cb.tar.bz2
Riverdashboard refreshed, and updated display of comments and likes (the loading of these needs to be moved to ajax callbacks)
git-svn-id: http://code.elgg.org/elgg/trunk@5643 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/annotation/annotate.php5
-rw-r--r--views/default/annotation/likes.php10
-rw-r--r--views/default/css.php29
-rw-r--r--views/default/js/initialise_elgg.php20
-rw-r--r--views/default/likes/forms/display.php25
-rw-r--r--views/default/likes/forms/edit.php13
-rw-r--r--views/default/likes/forms/link.php19
7 files changed, 70 insertions, 51 deletions
diff --git a/views/default/annotation/annotate.php b/views/default/annotation/annotate.php
index e66035204..2cb35798b 100644
--- a/views/default/annotation/annotate.php
+++ b/views/default/annotation/annotate.php
@@ -12,13 +12,14 @@
$comment = get_annotation($vars['item']->annotation_id)->value;
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$string = sprintf(elgg_echo("river:posted:generic"),$url) . " ";
- $string .= elgg_echo("{$subtype}:river:annotate") . " <a href=\"{$object->getURL()}\">" . $title . "</a> " . friendly_time($object->time_created);
+ $string .= elgg_echo("{$subtype}:river:annotate") . " <a href=\"{$object->getURL()}\">" . $title . "</a> <span class='entity_subtext'>". friendly_time($object->time_created) ."</span> <a class='river_comment_form_button link'>Comment</a>";
+ $string .= elgg_view('likes/forms/link', array('entity' => $object));
if(get_context() != 'riverdashboard'){
$string .= "<div class='river_content_display'>";
if($comment){
$contents = strip_tags($comment);//this is so we don't get large images etc in the activity river
if(strlen($contents) > 200)
- $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+ $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "&hellip;";
else
$string .= $contents;
}
diff --git a/views/default/annotation/likes.php b/views/default/annotation/likes.php
index 4cf27e82b..2808664df 100644
--- a/views/default/annotation/likes.php
+++ b/views/default/annotation/likes.php
@@ -6,8 +6,8 @@
$owner = get_user($vars['annotation']->owner_guid);
?>
-<div class="elgg_likes clearfloat">
- <div class="elgg_likes_icon">
+<div class="elgg_likes_user clearfloat">
+ <div class="entity_listing_icon">
<?php
echo elgg_view("profile/icon", array(
'entity' => $owner,
@@ -16,19 +16,19 @@ $owner = get_user($vars['annotation']->owner_guid);
?>
</div>
- <div class="elgg_likes_details">
+ <div class="entity_listing_info">
<?php
// if the user looking at the like listing can edit, show the delete link
if ($vars['annotation']->canEdit()) {
?>
- <span class="delete_button">
+ <div class="entity_metadata"><span class="delete_button">
<?php echo elgg_view("output/confirmlink",array(
'href' => $vars['url'] . "action/likes/delete?annotation_id=" . $vars['annotation']->id,
'text' => elgg_echo('remove'),
'confirm' => elgg_echo('deleteconfirm')
));
?>
- </span>
+ </span></div>
<?php
} //end of can edit if statement
?>
diff --git a/views/default/css.php b/views/default/css.php
index cc3c82d4b..70cc7ab4d 100644
--- a/views/default/css.php
+++ b/views/default/css.php
@@ -10,7 +10,7 @@
PAGE LAYOUT main page content blocks: header, sidebar, footer...
GENERIC SELECTORS reusable generic classes
ELGG TOPBAR elgg topbar
- TOOLS MENU drop-down tools menu in topbar
+ [ TOOLS MENU drop-down tools menu in topbar ]
HEADER CONTENTS
ELGG SITE NAVIGATION Primary site navigation in header
FOOTER CONTENTS
@@ -354,7 +354,7 @@ h2 {
width:100%;
}
#elgg_topbar_contents a {
- margin-right:20px;
+ margin-right:30px;
padding-top:2px;
display:inline;
float:left;
@@ -410,6 +410,7 @@ h2 {
/* ***************************************
TOOLS MENU
*************************************** */
+/*
#elgg_topbar_contents ul.tools_menu,
#elgg_topbar_contents ul.tools_menu ul {
margin:0;
@@ -448,7 +449,9 @@ h2 {
#elgg_topbar_contents ul.tools_menu ul li {
float: none;
}
+*/
/* elgg toolbar drop-down menu style */
+/*
#elgg_topbar_contents ul.tools_menu ul {
width: 150px;
top: 24px;
@@ -469,7 +472,7 @@ h2 {
text-decoration: none;
}
#elgg_topbar_contents ul.tools_menu ul li a {
- background-color: #333333; /* menu off-state color */
+ background-color: #333333;
font-weight: bold;
padding-left:6px;
padding-top:4px;
@@ -480,11 +483,12 @@ h2 {
border-bottom: 1px solid white;
}
#elgg_topbar_contents ul.tools_menu ul a.hover {
- background-color: #0054a7; /* menu hover-state color */
+ background-color: #0054a7;
}
#elgg_topbar_contents ul.tools_menu ul a {
opacity: 0.9;
}
+*/
@@ -1058,7 +1062,8 @@ li.navigation_more ul li {
}
.entity_subtext {
color:#666666;
- font-size: 90%;
+ font-size: 85%;
+ font-style: italic;
}
/* entity metadata block */
.entity_metadata {
@@ -1614,16 +1619,4 @@ a.action_button:focus {
.admin_settings.menuitems li.custom_menuitem {
margin-bottom:20px;
}
-.plugin_info_label {
- font-weight: bold;
-}
-.plugin_description {
- font-style: italic;
-}
-.plugin_screenshot {
- display: inline;
- margin: 3px;
-}
-.plugin_screenshot img {
- width: 100px;
-} \ No newline at end of file
+
diff --git a/views/default/js/initialise_elgg.php b/views/default/js/initialise_elgg.php
index 19b2224d9..c7dbed4aa 100644
--- a/views/default/js/initialise_elgg.php
+++ b/views/default/js/initialise_elgg.php
@@ -4,26 +4,6 @@ $(document).ready(function () {
// toggle widget box contents
$('a.toggle_box_contents').bind('click', toggleContent);
-/* // replaced with elgg_slide_toggle
- @todo - PH update widget canvases with the new toggle function
- // toggle widget box edit panel
- $('a.toggle_box_edit_panel').click(function () {
- $(this.parentNode.parentNode).children(".collapsable_box_editpanel").slideToggle("fast");
- return false;
- });
-
- // toggle customise edit panel
- $('a.toggle_customise_edit_panel').click(function () {
- $('div#customise_editpanel').slideToggle("fast");
- return false;
- });
-
- $('a.collapsibleboxlink').click(function () {
- $(this.parentNode.parentNode).children(".collapsible_box").slideToggle("fast");
- return false;
- });
-*/
-
// WIDGET GALLERY EDIT PANEL
// Sortable widgets
var els = ['#leftcolumn_widgets', '#middlecolumn_widgets', '#rightcolumn_widgets', '#widget_picker_gallery' ];
diff --git a/views/default/likes/forms/display.php b/views/default/likes/forms/display.php
new file mode 100644
index 000000000..f8fc661fd
--- /dev/null
+++ b/views/default/likes/forms/display.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Elgg likes - display users liked link/text
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
+
+if (isset($vars['entity']) && isloggedin()) {
+
+ //display the number of likes
+ $numoflikes = elgg_count_likes($vars['entity']);
+ if ($numoflikes != 0) {
+ if ($numoflikes == 1) {
+ $user_string = elgg_echo('likes:userlikedthis');
+ } else {
+ $user_string = elgg_echo('likes:userslikedthis');
+ }
+
+ echo "<a class='river_more_comments off likes_user_list_button link'>" . elgg_count_likes($vars['entity']) . " " . $user_string . "</a>";
+ }
+} \ No newline at end of file
diff --git a/views/default/likes/forms/edit.php b/views/default/likes/forms/edit.php
index 97497eca5..be019d749 100644
--- a/views/default/likes/forms/edit.php
+++ b/views/default/likes/forms/edit.php
@@ -13,8 +13,8 @@ if (isset($vars['entity']) && isloggedin()) {
$guid = $vars['entity']->getGuid();
$url = elgg_add_action_tokens_to_url($vars['url'] . "action/likes/add?guid={$guid}");
//check to see if the user has already liked
- if (!elgg_annotation_exists($guid, 'likes')) {
- echo "<a href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a><br />";
+ if (!elgg_annotation_exists($guid, 'likes') ) {
+ echo "<a class='user_like link' href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a>";
}
//display the number of likes
$numoflikes = elgg_count_likes($vars['entity']);
@@ -26,9 +26,10 @@ if (isset($vars['entity']) && isloggedin()) {
}
echo "<a class='likes_list_button link'>" . elgg_count_likes($vars['entity']) . " " . $user_string . "</a>";
+
+ //show the users who liked the object
+ echo "<div class='likes_list hidden'>";
+ echo list_annotations($vars['entity']->getGUID(), 'likes', 99);
+ echo "</div>";
}
- //show the users who liked the object
- echo "<div class='likes_list hidden'>";
- echo list_annotations($vars['entity']->getGUID(), 'likes', 99);
- echo "</div>";
} \ No newline at end of file
diff --git a/views/default/likes/forms/link.php b/views/default/likes/forms/link.php
new file mode 100644
index 000000000..6f5d41829
--- /dev/null
+++ b/views/default/likes/forms/link.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg likes link form - used on riverdashboard where we want the likes link separate from the list of users that liked the object
+ *
+ * @package Elgg
+ * @author Curverider Ltd <info@elgg.com>
+ * @link http://elgg.com/
+ *
+ * @uses $vars['entity']
+ */
+
+if (isset($vars['entity']) && isloggedin()) {
+ $guid = $vars['entity']->getGuid();
+ $url = elgg_add_action_tokens_to_url($vars['url'] . "action/likes/add?guid={$guid}");
+ //check to see if the user has already liked
+ if (!elgg_annotation_exists($guid, 'likes') ) {
+ echo "<span class='river_link_divider'> | </span><a class='river_user_like_button link' href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a>";
+ }
+} \ No newline at end of file