diff options
Diffstat (limited to 'mod/profile/views')
5 files changed, 151 insertions, 151 deletions
diff --git a/mod/profile/views/default/profile/commentwall/commentwall.php b/mod/profile/views/default/profile/commentwall/commentwall.php index f693a3317..79869a454 100644 --- a/mod/profile/views/default/profile/commentwall/commentwall.php +++ b/mod/profile/views/default/profile/commentwall/commentwall.php @@ -1,22 +1,22 @@ -<?php
-/**
- * Elgg Commentwall display page
- */
-
-// If there is any content to view, view it
-if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) {
-
- //start the div which will wrap all the message board contents
- echo "<div id='comment_wall_display'>";
-
- //loop through all annotations and display
- foreach($vars['annotation'] as $content) {
- echo elgg_view("profile/commentwall/commentwall_content", array('annotation' => $content));
- }
-
- //close the wrapper div
- echo "</div>";
-
-} else {
- echo "<p class='margin_top'>" . elgg_echo("profile:commentwall:none") . "</p>";
+<?php +/** + * Elgg Commentwall display page + */ + +// If there is any content to view, view it +if (is_array($vars['annotation']) && sizeof($vars['annotation']) > 0) { + + //start the div which will wrap all the message board contents + echo "<div id='comment_wall_display'>"; + + //loop through all annotations and display + foreach($vars['annotation'] as $content) { + echo elgg_view("profile/commentwall/commentwall_content", array('annotation' => $content)); + } + + //close the wrapper div + echo "</div>"; + +} else { + echo "<p class='margin_top'>" . elgg_echo("profile:commentwall:none") . "</p>"; }
\ No newline at end of file diff --git a/mod/profile/views/default/profile/commentwall/commentwall_content.php b/mod/profile/views/default/profile/commentwall/commentwall_content.php index 1317ba62e..cacea117c 100644 --- a/mod/profile/views/default/profile/commentwall/commentwall_content.php +++ b/mod/profile/views/default/profile/commentwall/commentwall_content.php @@ -1,32 +1,32 @@ -<?php
-/**
-* Elgg Message board individual item display page
- */
-?>
-<div class="entity_listing clearfloat">
- <!-- display the user icon of the user that posted the message -->
- <div class="entity_listing_icon">
- <?php
- echo elgg_view("profile/icon",array('entity' => get_entity($vars['annotation']->owner_guid), 'size' => 'tiny'));
- ?>
- </div>
-
- <div class="entity_listing_info">
- <?php
- // if the user looking at the comment can edit, show the delete link
- if ($vars['annotation']->canEdit()) {
- echo "<div class='entity_metadata'><span class='delete_button'>" . elgg_view("output/confirmlink",array(
- 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id,
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- )) . "</span></div>";
- } //end of can edit if statement
- ?>
- <!-- display the user's name who posted and the date/time -->
- <p class="entity_subtext">
- <?php echo get_entity($vars['annotation']->owner_guid)->name . " " . friendly_time($vars['annotation']->time_created); ?>
- </p>
- <!-- output the actual comment -->
- <?php echo elgg_view("output/longtext",array("value" => parse_urls($vars['annotation']->value))); ?>
- </div>
-</div>
+<?php +/** +* Elgg Message board individual item display page + */ +?> +<div class="entity_listing clearfloat"> + <!-- display the user icon of the user that posted the message --> + <div class="entity_listing_icon"> + <?php + echo elgg_view("profile/icon",array('entity' => get_entity($vars['annotation']->owner_guid), 'size' => 'tiny')); + ?> + </div> + + <div class="entity_listing_info"> + <?php + // if the user looking at the comment can edit, show the delete link + if ($vars['annotation']->canEdit()) { + echo "<div class='entity_metadata'><span class='delete_button'>" . elgg_view("output/confirmlink",array( + 'href' => $vars['url'] . "action/profile/deletecomment?annotation_id=" . $vars['annotation']->id, + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )) . "</span></div>"; + } //end of can edit if statement + ?> + <!-- display the user's name who posted and the date/time --> + <p class="entity_subtext"> + <?php echo get_entity($vars['annotation']->owner_guid)->name . " " . friendly_time($vars['annotation']->time_created); ?> + </p> + <!-- output the actual comment --> + <?php echo elgg_view("output/longtext",array("value" => parse_urls($vars['annotation']->value))); ?> + </div> +</div> diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php index 084ffc400..f5bd1bdce 100644 --- a/mod/profile/views/default/profile/commentwall/commentwalladd.php +++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php @@ -1,18 +1,18 @@ -<?php
-/**
- * Elgg profile comment wall add
- */
-?>
-<div id="comment_wall_add">
-<form action="<?php echo $vars['url']; ?>action/profile/addcomment" method="post" name="messageboardForm">
- <!-- textarea for the contents -->
- <textarea name="message_content" value="" class="commentwall"></textarea><br />
- <!-- the person posting an item on the message board -->
- <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" />
- <!-- the page owner, this will be the profile owner -->
- <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" />
- <?php echo elgg_view('input/securitytoken'); ?>
- <!-- submit messages input -->
- <input type="submit" id="postit" value="<?php echo elgg_echo('profile:commentwall:add'); ?>">
-</form>
-</div>
+<?php +/** + * Elgg profile comment wall add + */ +?> +<div id="comment_wall_add"> +<form action="<?php echo $vars['url']; ?>action/profile/addcomment" method="post" name="messageboardForm"> + <!-- textarea for the contents --> + <textarea name="message_content" value="" class="commentwall"></textarea><br /> + <!-- the person posting an item on the message board --> + <input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" /> + <!-- the page owner, this will be the profile owner --> + <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" /> + <?php echo elgg_view('input/securitytoken'); ?> + <!-- submit messages input --> + <input type="submit" id="postit" value="<?php echo elgg_echo('profile:commentwall:add'); ?>"> +</form> +</div> diff --git a/mod/profile/views/default/profile/editdefaultprofileitems.php b/mod/profile/views/default/profile/editdefaultprofileitems.php index 403943d23..4cd5d68e9 100644 --- a/mod/profile/views/default/profile/editdefaultprofileitems.php +++ b/mod/profile/views/default/profile/editdefaultprofileitems.php @@ -1,68 +1,68 @@ -<script language="javascript" type="text/javascript" src="<?php echo $vars['url']?>mod/profile/vendor/jquery.jeditable.mini.js"></script>
-<script language="javascript" type="text/javascript">
-var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>';
-function sortCallback(event, ui) {
- var orderArr = $('#sortableList').sortable('toArray');
- var orderStr = orderArr.join(',');
- console.log(orderArr);
- console.log(orderStr);
- jQuery.post(reorderURL, {'fieldorder': orderStr});
-}
-
-$(document).ready(function() {
- $('#sortableList').sortable({
- items: 'li',
- handle: '.handle',
- stop: sortCallback
- });
-});
-
-</script>
-<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/multiadmin/vendors/js/jquery.jeditable.js" ></script>
-
-<div id="list">
- <ul id="sortableList">
-<?php
-
- $save = elgg_echo('save');
- $cancel = elgg_echo('cancel');
- $edit_url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/editfield", FALSE);
-
- foreach($vars['items'] as $item) {
- echo <<< END
-
-<script language="javascript" type="text/javascript">
-
- $(function() {
- $(".{$item->shortname}_editable").editable("$edit_url ", {
- type : 'text',
- submitdata: { _method: "post", 'field': '{$item->shortname}' },
- onblur: 'submit',
- width:'300px',
- height:'none',
- style:'display:inline;',
- tooltip:'Click to edit label'
- });
- });
-
-</script>
-
-END;
-
- echo elgg_view("profile/", array('value' => $item->translation));
-
- //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- $url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/delete?id={$item->shortname}");
- echo "<li id=\"{$item->shortname}\"><div class=\"delete_note\" style=\"float:right\"><a href=\"$url\">" . elgg_echo('delete') . "</a></div>";
- echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='{$vars['url']}mod/profile/graphics/drag_handle.png'/>";
- echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]";
- echo "</li>";
-
- }
-
-?>
- </ul>
-</div>
-<div id="tempList"></div>
-
-<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $vars['fieldlist']; ?>" />
+<script language="javascript" type="text/javascript" src="<?php echo $vars['url']?>mod/profile/vendor/jquery.jeditable.mini.js"></script> +<script language="javascript" type="text/javascript"> +var reorderURL = '<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/profile/editdefault/reorder', FALSE); ?>'; +function sortCallback(event, ui) { + var orderArr = $('#sortableList').sortable('toArray'); + var orderStr = orderArr.join(','); + console.log(orderArr); + console.log(orderStr); + jQuery.post(reorderURL, {'fieldorder': orderStr}); +} + +$(document).ready(function() { + $('#sortableList').sortable({ + items: 'li', + handle: '.handle', + stop: sortCallback + }); +}); + +</script> +<script language="javascript" type="text/javascript" src="<?php echo $vars['url']; ?>mod/multiadmin/vendors/js/jquery.jeditable.js" ></script> + +<div id="list"> + <ul id="sortableList"> +<?php + + $save = elgg_echo('save'); + $cancel = elgg_echo('cancel'); + $edit_url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/editfield", FALSE); + + foreach($vars['items'] as $item) { + echo <<< END + +<script language="javascript" type="text/javascript"> + + $(function() { + $(".{$item->shortname}_editable").editable("$edit_url ", { + type : 'text', + submitdata: { _method: "post", 'field': '{$item->shortname}' }, + onblur: 'submit', + width:'300px', + height:'none', + style:'display:inline;', + tooltip:'Click to edit label' + }); + }); + +</script> + +END; + + echo elgg_view("profile/", array('value' => $item->translation)); + + //$even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; + $url = elgg_add_action_tokens_to_url("{$vars['url']}action/profile/editdefault/delete?id={$item->shortname}"); + echo "<li id=\"{$item->shortname}\"><div class=\"delete_note\" style=\"float:right\"><a href=\"$url\">" . elgg_echo('delete') . "</a></div>"; + echo "<img width='16' height='16' class='handle' alt='move' title='Drag here to reorder this item' src='{$vars['url']}mod/profile/graphics/drag_handle.png'/>"; + echo "<b class=\"profile_field_editable\"><span class=\"{$item->shortname}_editable\">$item->translation</span></b>: [".elgg_echo($item->type)."]"; + echo "</li>"; + + } + +?> + </ul> +</div> +<div id="tempList"></div> + +<input name="sortableListOrder" type="hidden" id="sortableListOrder" value="<?php echo $vars['fieldlist']; ?>" /> diff --git a/mod/profile/views/default/profile/profile_contents/commentwall.php b/mod/profile/views/default/profile/profile_contents/commentwall.php index c13c16331..f3a2adb1c 100644 --- a/mod/profile/views/default/profile/profile_contents/commentwall.php +++ b/mod/profile/views/default/profile/profile_contents/commentwall.php @@ -1,13 +1,13 @@ -<?php
-/**
- * Elgg profile comment wall
- */
-?>
-<div id="profile_content">
-<?php
-if(isloggedin()){
- echo elgg_view("profile/commentwall/commentwalladd");
-}
-echo elgg_view("profile/commentwall/commentwall", array('annotation' => $vars['comments']));
-?>
+<?php +/** + * Elgg profile comment wall + */ +?> +<div id="profile_content"> +<?php +if(isloggedin()){ + echo elgg_view("profile/commentwall/commentwalladd"); +} +echo elgg_view("profile/commentwall/commentwall", array('annotation' => $vars['comments'])); +?> </div>
\ No newline at end of file |