aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/forms/comments/add.php34
1 files changed, 23 insertions, 11 deletions
diff --git a/views/default/forms/comments/add.php b/views/default/forms/comments/add.php
index f0d42fb80..48b8124b6 100644
--- a/views/default/forms/comments/add.php
+++ b/views/default/forms/comments/add.php
@@ -7,17 +7,29 @@
* @uses $vars['entity']
*/
+
if (isset($vars['entity']) && elgg_is_logged_in()) {
+
+ $inline = elgg_extract('inline', $vars, false);
+
+ if ($inline) {
+ echo elgg_view('input/text', array('name' => 'generic_comment'));
+ echo elgg_view('input/hidden', array(
+ 'name' => 'entity_guid',
+ 'value' => $vars['entity']->getGUID()
+ ));
+ echo elgg_view('input/submit', array('value' => elgg_echo('comment')));
+ } else {
?>
-<div class="mbn">
- <label><?php echo elgg_echo("generic_comments:add"); ?></label>
- <?php echo elgg_view('input/longtext', array('name' => 'generic_comment')); ?>
-</div>
+ <div class="mbn">
+ <label><?php echo elgg_echo("generic_comments:add"); ?></label>
+ <?php echo elgg_view('input/longtext', array('name' => 'generic_comment')); ?>
+ </div>
<?php
-
- echo elgg_view('input/hidden', array(
- 'name' => 'entity_guid',
- 'value' => $vars['entity']->getGUID()
- ));
- echo elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post")));
-}
+ echo elgg_view('input/hidden', array(
+ 'name' => 'entity_guid',
+ 'value' => $vars['entity']->getGUID()
+ ));
+ echo elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post")));
+ }
+} \ No newline at end of file