diff options
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/core/river/controls.php | 3 | ||||
-rw-r--r-- | views/default/css/elements/skin.php | 5 | ||||
-rw-r--r-- | views/default/css/screen.php | 3 | ||||
-rw-r--r-- | views/default/friends/river/create.php | 20 | ||||
-rw-r--r-- | views/default/river/item/list.php | 52 | ||||
-rw-r--r-- | views/default/river/item/wrapper.php | 61 | ||||
-rw-r--r-- | views/default/river/relationship/friend/create.php | 18 |
7 files changed, 28 insertions, 134 deletions
diff --git a/views/default/core/river/controls.php b/views/default/core/river/controls.php index 4ab087458..e239a2adb 100644 --- a/views/default/core/river/controls.php +++ b/views/default/core/river/controls.php @@ -9,7 +9,8 @@ $object = $vars['item']->getObjectEntity(); if (isloggedin()) { - if ($vars['item']->annotation_id == 0) { + // comments and non-objects cannot be commented on + if ($object->getType() == 'object' && $vars['item']->annotation_id == 0) { $params = array( 'href' => '#', 'text' => elgg_echo('generic_comments:text'), diff --git a/views/default/css/elements/skin.php b/views/default/css/elements/skin.php index 9e5fbe9ff..693e6e56e 100644 --- a/views/default/css/elements/skin.php +++ b/views/default/css/elements/skin.php @@ -201,6 +201,11 @@ a.selected { .elgg-icon-arrow-s:hover { background-position: -146px -76px; } +.elgg-icon-following { + background-position: -35px -100px; + width: 22px; + height: 20px; +} .ajax-loader { background-color: white; diff --git a/views/default/css/screen.php b/views/default/css/screen.php index f74823373..6b576f7d3 100644 --- a/views/default/css/screen.php +++ b/views/default/css/screen.php @@ -253,6 +253,9 @@ a.widget-edit-button:hover, a.widget-delete-button:hover { margin: 8px 0 5px 0; padding-left: 5px; } +.elgg-river-excerpt .usericon { + float: left; +} .elgg-river-layout .input-pulldown { float: right; margin: 10px 0; diff --git a/views/default/friends/river/create.php b/views/default/friends/river/create.php deleted file mode 100644 index d7a751945..000000000 --- a/views/default/friends/river/create.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php -/** - * Elgg create new friend river item - * - * @package Elgg - * - * @uses $vars['entity'] - */ -$performed_by = get_entity($vars['item']->subject_guid); -$performed_on = get_entity($vars['item']->object_guid); - -$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>"; -$string = elgg_echo("friends:river:add", array($url)) . " "; -$string .= "<a href=\"{$performed_on->getURL()}\">{$performed_on->name}</a>"; -$string .= "<div class=\"river_content_display\">"; -$string .= "<table><tr><td>" . elgg_view("profile/icon",array('entity' => $performed_by, 'size' => 'tiny')) . "</td>"; -$string .= "<td><div class=\"following_icon\"></div></td><td>" . elgg_view("profile/icon",array('entity' => $performed_on, 'size' => 'tiny')) . "</td></tr></table>"; -$string .= "</div>"; - -echo $string; diff --git a/views/default/river/item/list.php b/views/default/river/item/list.php deleted file mode 100644 index d791c74e8..000000000 --- a/views/default/river/item/list.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * - * @package Elgg - * @subpackage Core - * - */ -?> -<div class="river_item_list"> -<?php - if (isset($vars['items']) && is_array($vars['items'])) { - - $i = 0; - if (!empty($vars['items'])) { - foreach($vars['items'] as $item) { - echo elgg_view_river_item($item); - $i++; - if ($i >= $vars['limit']) { - break; - } - } - } - } - - if ($vars['pagination'] !== false) { - $baseurl = $_SERVER['REQUEST_URI']; - - $nav = ''; - - if (sizeof($vars['items']) > $vars['limit']) { - $newoffset = $vars['offset'] + $vars['limit']; - $nexturl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset)); - - $nav .= '<a class="back" href="'.$nexturl.'">« ' . elgg_echo('previous') . '</a> '; - } - - if ($vars['offset'] > 0) { - $newoffset = $vars['offset'] - $vars['limit']; - if ($newoffset < 0) { - $newoffset = 0; - } - $prevurl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset)); - - $nav .= '<a class="forward" href="'.$prevurl.'">' . elgg_echo('next') . ' »</a> '; - } - - if (!empty($nav)) { - echo '<div class="river_pagination"><p>'.$nav.'</p></div>'; - } - } -?> -</div>
\ No newline at end of file diff --git a/views/default/river/item/wrapper.php b/views/default/river/item/wrapper.php deleted file mode 100644 index 0bdf2f4aa..000000000 --- a/views/default/river/item/wrapper.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Elgg river item wrapper. - * Wraps all river items. - * - * @package Elgg - */ - -//get the site admins choice avatars or action icons -$avatar_icon = get_plugin_setting("avatar_icon","riverdashboard"); -if(!$avatar_icon) { - $avatar_icon = "icon"; -} - -if($avatar_icon == "icon"){ - - ?> - <div class="river_item"> - <div class="river_<?php echo $vars['item']->type; ?>"> - <div class="river_<?php echo $vars['item']->subtype; ?>"> - <div class="river_<?php echo $vars['item']->action_type; ?>"> - <div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>"> - <p> - <?php - echo $vars['body']; - ?> - <span class="entity-subtext"> - (<?php - echo elgg_view_friendly_time($vars['item']->posted); - ?>) - </span> - </p> - </div> - </div> - </div> - </div> - </div> - - <?php -} else { - ?> - <div class="river_item"> - <span class="river_item_useravatar"> - <?php - echo elgg_view("profile/icon",array('entity' => get_entity($vars['item']->subject_guid), 'size' => 'tiny')); - ?> - </span> - <p class="river_item_body"> - <?php - echo $vars['body']; - ?> - <span class="entity-subtext"> - (<?php - echo elgg_view_friendly_time($vars['item']->posted); - ?>) - </span> - </p> - </div> - <?php -} -?>
\ No newline at end of file diff --git a/views/default/river/relationship/friend/create.php b/views/default/river/relationship/friend/create.php new file mode 100644 index 000000000..80c567795 --- /dev/null +++ b/views/default/river/relationship/friend/create.php @@ -0,0 +1,18 @@ +<?php +/** + * Create friend river view + */ +$subject = $vars['item']->getSubjectEntity(); +$object = $vars['item']->getObjectEntity(); + +$object_link = "<a href=\"{$object->getURL()}\">$object->name</a>"; +$subject_icon = elgg_view("profile/icon", array('entity' => $subject, 'size' => 'tiny')); +$object_icon = elgg_view("profile/icon", array('entity' => $object, 'size' => 'tiny')); + +echo elgg_echo("friends:river:add", array($object_link)); + +echo '<div class="elgg-river-excerpt">'; +echo $subject_icon; +echo '<span class="elgg-icon elgg-icon-following"></span>'; +echo $object_icon; +echo '</div>'; |