aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/views/default/object
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-29 00:56:55 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-29 00:56:55 +0000
commit855b008013aad0426ab0332b040bddb033bb6af9 (patch)
tree70c137e5c9a9c916bb9f8172daf3bd0483895bf6 /mod/reportedcontent/views/default/object
parent71dc8cbf9eecb4de149bc96bb5758b866116b1c8 (diff)
downloadelgg-855b008013aad0426ab0332b040bddb033bb6af9.tar.gz
elgg-855b008013aad0426ab0332b040bddb033bb6af9.tar.bz2
cleaned up the reported content plugin
git-svn-id: http://code.elgg.org/elgg/trunk@7466 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/views/default/object')
-rw-r--r--mod/reportedcontent/views/default/object/reported_content.php79
1 files changed, 79 insertions, 0 deletions
diff --git a/mod/reportedcontent/views/default/object/reported_content.php b/mod/reportedcontent/views/default/object/reported_content.php
new file mode 100644
index 000000000..fa809bae6
--- /dev/null
+++ b/mod/reportedcontent/views/default/object/reported_content.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Elgg reported content object view
+ *
+ * @package ElggReportContent
+ */
+
+$report = $vars['entity'];
+$reporter = $report->getOwnerEntity();
+
+$archive_url = elgg_get_site_url() . "action/reportedcontent/archive?guid=$report->guid";
+$delete_url = elgg_get_site_url() . "action/reportedcontent/delete?guid=$report->guid";
+
+//find out if the report is current or archive
+if ($report->state == 'archived') {
+ $reportedcontent_background = "archived_report";
+} else {
+ $reportedcontent_background = "active_report";
+}
+
+?>
+
+<div class="admin_settings reported_content <?php echo $reportedcontent_background; ?>">
+ <div class="clearfix controls">
+<?php
+ if ($report->state != 'archived') {
+ $params = array(
+ 'href' => $archive_url,
+ 'text' => elgg_echo('reportedcontent:archive'),
+ 'is_action' => true,
+ 'class' => 'action_button',
+ );
+ echo elgg_view('output/url', $params);
+ }
+ $params = array(
+ 'href' => $delete_url,
+ 'text' => elgg_echo('reportedcontent:delete'),
+ 'is_action' => true,
+ 'class' => 'action_button disabled',
+ );
+ echo elgg_view('output/url', $params);
+?>
+ </div>
+ <p>
+ <b><?php echo elgg_echo('reportedcontent:by'); ?>:</b>
+ <?php echo elgg_view('output/url', array(
+ 'href' => $reporter->getURL(),
+ 'text' => $reporter->name
+ ));
+ ?>,
+ <?php echo elgg_view_friendly_time($report->time_created); ?>
+ </p>
+ <p>
+ <b><?php echo elgg_echo('reportedcontent:objecttitle'); ?>:</b>
+ <?php echo $report->title; ?>
+ <br />
+ <?php echo elgg_view('output/url', array(
+ 'href' => '#',
+ 'text' => elgg_echo('reportedcontent:moreinfo'),
+ 'class' => 'details_link',
+ 'onclick' => "elgg_slide_toggle(this, '.reported_content', '.reported_content_more{$report->getGUID()}'); return false;"
+ ));
+ ?>
+ </p>
+ <div class="details hidden reported_content_more<?php echo $report->getGUID();?>">
+ <p>
+ <b><?php echo elgg_echo('reportedcontent:objecturl'); ?>:</b>
+ <?php echo elgg_view('output/url', array(
+ 'href' => $report->address,
+ 'text' => elgg_echo('reportedcontent:visit')
+ ));
+ ?>
+ </p>
+ <p>
+ <b><?php echo elgg_echo('reportedcontent:reason'); ?>:</b>
+ <?php echo $report->description; ?>
+ </p>
+ </div>
+</div>