aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/views/default
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 02:08:49 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 02:08:49 +0000
commit2601fb071cf566ea1f8859268f9cbf22ae77f6a1 (patch)
treebb232fcf0b1c00ccdaaa748cf5555b7b3b2360c7 /mod/reportedcontent/views/default
parent2ef37109d866708def220d082c0430f77efd6410 (diff)
downloadelgg-2601fb071cf566ea1f8859268f9cbf22ae77f6a1.tar.gz
elgg-2601fb071cf566ea1f8859268f9cbf22ae77f6a1.tar.bz2
added reported content widget
git-svn-id: http://code.elgg.org/elgg/trunk@7932 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/views/default')
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/form.php8
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/user_report.php5
-rw-r--r--mod/reportedcontent/views/default/widgets/reportedcontent/content.php15
-rw-r--r--mod/reportedcontent/views/default/widgets/reportedcontent/edit.php23
4 files changed, 42 insertions, 9 deletions
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();
?>
-<form action="<?php echo elgg_get_site_url(); ?>action/reportedcontent/add" method="post" class="margin-top">
+<form action="<?php echo elgg_get_site_url(); ?>action/reportedcontent/add" method="post" class="mtm">
<?php echo elgg_view('input/securitytoken'); ?>
<p>
@@ -47,7 +47,7 @@ $owner = get_loggedin_user();
?>
</label>
</p>
- <p class="longtext_inputarea">
+ <p>
<label>
<?php echo elgg_echo('reportedcontent:description'); ?>
</label>
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 @@
-<li class="user_menu_profile">
-<?php
- echo "<a class='report_this' href=\"javascript:location.href='". elgg_get_site_url() . "pg/reportedcontent/add/?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>";
-?>
-</li> \ 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 @@
+<?php
+/**
+ * List the latest reports
+ */
+
+$list = elgg_list_entities(array(
+ 'types' => 'object',
+ 'subtypes' => 'reported_content',
+ 'limit' => $vars['entity']->num_display,
+));
+if (!$list) {
+ $list = '<p class="mtm">' . elgg_echo('reportedcontent:none') . '</p>';
+}
+
+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 @@
+<?php
+/**
+ * Widget edit view
+ */
+
+// set default value
+if (!isset($vars['entity']->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);
+
+?>
+<p>
+ <?php echo elgg_echo('reportedcontent:numbertodisplay'); ?>:
+ <?php echo $dropdown; ?>
+</p>
+