From 2601fb071cf566ea1f8859268f9cbf22ae77f6a1 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 26 Jan 2011 02:08:49 +0000 Subject: added reported content widget git-svn-id: http://code.elgg.org/elgg/trunk@7932 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/reportedcontent/start.php | 6 +++--- .../views/default/reportedcontent/form.php | 8 ++++---- .../views/default/reportedcontent/user_report.php | 5 ----- .../default/widgets/reportedcontent/content.php | 15 ++++++++++++++ .../views/default/widgets/reportedcontent/edit.php | 23 ++++++++++++++++++++++ 5 files changed, 45 insertions(+), 12 deletions(-) delete mode 100644 mod/reportedcontent/views/default/reportedcontent/user_report.php create mode 100644 mod/reportedcontent/views/default/widgets/reportedcontent/content.php create mode 100644 mod/reportedcontent/views/default/widgets/reportedcontent/edit.php diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index 9708c3b14..4cb5bea12 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -5,7 +5,7 @@ * @package ElggReportedContent */ -elgg_register_event_handler('init','system','reportedcontent_init'); +elgg_register_event_handler('init', 'system', 'reportedcontent_init'); /** * Initialize the plugin @@ -55,11 +55,11 @@ function reportedcontent_page_handler($page) { $content .= elgg_view_title(elgg_echo('reportedcontent:this')); $content .= elgg_view('reportedcontent/form'); - $sidebar .= elgg_echo('reportedcontent:instructions'); + $sidebar = elgg_echo('reportedcontent:instructions'); $params = array( 'content' => $content, - 'sidebar' => $sidebar + 'sidebar' => $sidebar, ); $body = elgg_view_layout('one_sidebar', $params); diff --git a/mod/reportedcontent/views/default/reportedcontent/form.php b/mod/reportedcontent/views/default/reportedcontent/form.php index e70afacf8..c7e37ed36 100644 --- a/mod/reportedcontent/views/default/reportedcontent/form.php +++ b/mod/reportedcontent/views/default/reportedcontent/form.php @@ -6,9 +6,9 @@ */ $guid = 0; -$title = get_input('title',""); +$title = get_input('title', ""); $description = ""; -$address = get_input('address',""); +$address = get_input('address', ""); if ($address == "previous") { $address = $_SERVER['HTTP_REFERER']; } @@ -18,7 +18,7 @@ $shares = array(); $owner = get_loggedin_user(); ?> -
+

@@ -47,7 +47,7 @@ $owner = get_loggedin_user(); ?>

-

+

diff --git a/mod/reportedcontent/views/default/reportedcontent/user_report.php b/mod/reportedcontent/views/default/reportedcontent/user_report.php deleted file mode 100644 index 517e87c86..000000000 --- a/mod/reportedcontent/views/default/reportedcontent/user_report.php +++ /dev/null @@ -1,5 +0,0 @@ -

  • -" . elgg_echo('reportedcontent:report') . ""; -?> -
  • \ No newline at end of file diff --git a/mod/reportedcontent/views/default/widgets/reportedcontent/content.php b/mod/reportedcontent/views/default/widgets/reportedcontent/content.php new file mode 100644 index 000000000..4f8906ef2 --- /dev/null +++ b/mod/reportedcontent/views/default/widgets/reportedcontent/content.php @@ -0,0 +1,15 @@ + 'object', + 'subtypes' => 'reported_content', + 'limit' => $vars['entity']->num_display, +)); +if (!$list) { + $list = '

    ' . elgg_echo('reportedcontent:none') . '

    '; +} + +echo $list; \ No newline at end of file diff --git a/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php b/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php new file mode 100644 index 000000000..e47cf9740 --- /dev/null +++ b/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php @@ -0,0 +1,23 @@ +num_display)) { + $vars['entity']->num_display = 4; +} + +$params = array( + 'internalname' => 'params[num_display]', + 'value' => $vars['entity']->num_display, + 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), +); +$dropdown = elgg_view('input/pulldown', $params); + +?> +

    + : + +

    + -- cgit v1.2.3