Skip to content
Snippets Groups Projects
Commit f4b201df authored by spennythug's avatar spennythug
Browse files

Merge branch 'develop' of git.unl.edu:iim/PlanetRed into develop

parents 1de8dafd 86ae702e
No related branches found
No related tags found
No related merge requests found
......@@ -177,7 +177,7 @@ ul.elgg-list.elgg-list-river {
list-style-type: none;
border-top: 5px solid #5b5b5a;
background-color: #eceae3;
/* padding: 1em; */
padding: 1em;
border-radius: 6px;
}
......@@ -626,52 +626,6 @@ ul.elgg-menu.elgg-menu-hover li {
background-color:#D00000;
}
.elgg-item-object-messages > .elgg-image-block > .elgg-body {
width: calc(100% - 51px);
}
.messages-owner {
font-size: 1.25em;
font-family: "Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif;
}
.messages-delete {
position:absolute;
top:2.75em;
right:1em;
}
.pr-message-checkbox {
position:absolute;
top:2.75em;
left: 1.25em;
}
.messages-timestamp {
font-size:.75em;
font-family: "Gotham SSm A","Gotham SSm B",Verdana,"Verdana Ref",Geneva,Tahoma,"Lucida Grande","Lucida Sans Unicode","Lucida Sans","DejaVu Sans","Bitstream Vera Sans","Liberation Sans",sans-serif;
}
.elgg-item-object-messages {
padding:0;
}
.pr-wire-from form fieldset {
border: 0;
margin: 0 0 2em 0;
padding: 0;
}
.pr-wire-from {
padding: 1em;
border-bottom: none;
box-shadow: 0px 1px 3px rgba(0,0,0,0.3);
margin-bottom: 1em;
list-style-type: none;
background-color: #eceae3;
border-radius: 6px;
}
@media (max-width: 1600px) {
.groups-profile-fields b {
display: block;
......
......@@ -28,7 +28,25 @@
}
/*** message metadata ***/
.messages-owner {
float: left;
width: 20%;
margin-right: 2%;
}
.messages-subject {
float: left;
width: 55%;
margin-right: 2%;
}
.messages-timestamp {
float: left;
width: 14%;
margin-right: 2%;
}
.messages-delete {
float: left;
width: 5%;
}
/*** topbar icon ***/
.messages-new {
color: #FFF;
......
<?php
/**
* File renderer.
*
* @package ElggFile
*/
$full = elgg_extract('full_view', $vars, false);
$message = elgg_extract('entity', $vars, false);
$bulk_actions = (bool) elgg_extract('bulk_actions', $vars, false);
if (!$message) {
return true;
}
if ($message->toId == elgg_get_page_owner_guid()) {
// received
$user = get_user($message->fromId);
if ($user) {
$icon = elgg_view_entity_icon($user, 'medium');
$user_link = elgg_view('output/url', array(
'href' => "messages/compose?send_to=$user->guid",
'text' => $user->name,
'is_trusted' => true,
));
} else {
$icon = '';
$user_link = elgg_echo('messages:deleted_sender');
}
if ($message->readYet) {
$class = 'message read';
} else {
$class = 'message unread';
}
} else {
// sent
$user = get_user($message->toId);
if ($user) {
$icon = elgg_view_entity_icon($user, 'medium');
$user_link = elgg_view('output/url', array(
'href' => "messages/compose?send_to=$user->guid",
'text' => elgg_echo('messages:to_user', array($user->name)),
'is_trusted' => true,
));
} else {
$icon = '';
$user_link = elgg_echo('messages:deleted_sender');
}
$class = 'message read';
}
$timestamp = elgg_view_friendly_time($message->time_created);
$subject_info = elgg_view('output/url', array(
'href' => $message->getURL(),
'text' => $message->title,
'is_trusted' => true,
));
$delete_link = elgg_view("output/url", array(
'href' => "action/messages/delete?guid=" . $message->getGUID() . "&full=$full",
'text' => elgg_view_icon('delete', 'float-alt'),
'confirm' => elgg_echo('deleteconfirm'),
'encode_text' => false,
));
$body = <<<HTML
<div class="messages-owner">$user_link</div>
<div class="messages-subject">$subject_info</div>
<div class="messages-timestamp">$timestamp</div>
<div class="messages-delete">$delete_link</div>
HTML;
if ($full) {
echo elgg_view_image_block($icon, $body, array('class' => $class));
echo elgg_view('output/longtext', array('value' => $message->description));
} else {
$body .= elgg_view("output/longtext", array("value" => elgg_get_excerpt($message->description), "class" => "elgg-subtext clearfloat"));
if ($bulk_actions) {
$checkbox = elgg_view('input/checkbox', array(
'name' => 'message_id[]',
'value' => $message->guid,
'default' => false,
'class' => 'pr-message-checkbox'
));
$entity_listing = elgg_view_image_block($icon, $body, array('class' => $class));
echo $checkbox;
echo elgg_view_image_block($entity_listing);
} else {
echo elgg_view_image_block($icon, $body, array('class' => $class));
}
}
\ No newline at end of file
......@@ -48,7 +48,7 @@ switch ($page_type) {
$options['relationship'] = 'friend';
break;
default:
$title = elgg_echo("Welcome to Planet Red!");
$title = elgg_echo('river:all');
$page_filter = 'all';
break;
}
......@@ -58,23 +58,13 @@ if (!$activity) {
$activity = elgg_echo('river:none');
}
$thewireform = "";
if (elgg_is_logged_in()) {
$thewireform .= "<div class='pr-wire-from'>What's on your mind?";
$form_vars = array('class' => 'thewire-form');
$thewireform .= elgg_view_form('thewire/add', $form_vars);
$thewireform .= elgg_view('input/urlshortener');
$thewireform .= "</div>";
}
$content = elgg_view('core/river/filter', array('selector' => $selector));
$sidebar = elgg_view('core/river/sidebar');
$params = array(
'title' => $title,
'content' => $thewireform . $content . $activity,
'content' => $content . $activity,
'sidebar' => $sidebar,
'filter_context' => $page_filter,
'class' => 'elgg-river-layout',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment