diff options
Diffstat (limited to 'mod/reportedcontent/views')
7 files changed, 252 insertions, 0 deletions
diff --git a/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php b/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php new file mode 100644 index 000000000..32f108312 --- /dev/null +++ b/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php @@ -0,0 +1,13 @@ +<?php +/** + * Elgg Reported content admin page + * + * @package ElggReportedContent + */ + +$list = elgg_list_entities(array('types' => 'object', 'subtypes' => 'reported_content')); +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/forms/reportedcontent/add.php b/mod/reportedcontent/views/default/forms/reportedcontent/add.php new file mode 100644 index 000000000..f9986849d --- /dev/null +++ b/mod/reportedcontent/views/default/forms/reportedcontent/add.php @@ -0,0 +1,57 @@ +<?php +/** + * Elgg report content plugin form + * + * @package ElggReportContent + */ + +$guid = 0; +$title = get_input('title', ""); +$address = get_input('address', ""); + +$description = ""; +$owner = elgg_get_logged_in_user_entity(); + +?> + +<div> + <label> + <?php + echo elgg_echo('reportedcontent:title'); + echo elgg_view('input/text', array( + 'name' => 'title', + 'value' => $title, + )); + ?> + </label> +</div> +<div> + <label> + <?php + echo elgg_echo('reportedcontent:address'); + echo elgg_view('input/url', array( + 'name' => 'address', + 'value' => $address, + )); + + ?> + </label> +</div> +<div> + <label> + <?php echo elgg_echo('reportedcontent:description'); ?> + </label> + <?php + echo elgg_view('input/longtext',array( + 'name' => 'description', + 'value' => $description, + )); + ?> +</div> +<div class="elgg-foot"> + <?php + echo elgg_view('input/submit', array( + 'value' => elgg_echo('reportedcontent:report'), + )); + ?> +</div> 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..0e733e154 --- /dev/null +++ b/mod/reportedcontent/views/default/object/reported_content.php @@ -0,0 +1,84 @@ +<?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 = "reported-content-archived"; +} else { + $reportedcontent_background = "reported-content-active"; +} + +?> + +<div class="reported-content <?php echo $reportedcontent_background; ?>"> + <div class="clearfix"> + <div class="clearfix controls"> +<?php + if ($report->state != 'archived') { + $params = array( + 'href' => $archive_url, + 'text' => elgg_echo('reportedcontent:archive'), + 'is_action' => true, + 'is_trusted' => true, + 'class' => 'elgg-button elgg-button-action', + ); + echo elgg_view('output/url', $params); + } + $params = array( + 'href' => $delete_url, + 'text' => elgg_echo('reportedcontent:delete'), + 'is_action' => true, + 'is_trusted' => true, + 'class' => 'elgg-button elgg-button-action', + ); + 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, + 'is_trusted' => true, + )); + ?>, + <?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' => "#report-$report->guid", + 'text' => elgg_echo('reportedcontent:moreinfo'), + 'rel' => "toggle", + )); + ?> + </p> + </div> + <div class="report-details hidden" id="report-<?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'), + 'is_trusted' => true, + )); + ?> + </p> + <p> + <b><?php echo elgg_echo('reportedcontent:reason'); ?>:</b> + <?php echo $report->description; ?> + </p> + </div> +</div> diff --git a/mod/reportedcontent/views/default/reportedcontent/admin_css.php b/mod/reportedcontent/views/default/reportedcontent/admin_css.php new file mode 100644 index 000000000..1ed240f3b --- /dev/null +++ b/mod/reportedcontent/views/default/reportedcontent/admin_css.php @@ -0,0 +1,46 @@ +<?php +/** + * Elgg reported content admin CSS + * + * @package ElggReportContent + */ +?> + +/* REPORTED CONTENT */ +.reported-content { + margin: 5px 0 0; + padding: 5px 7px 3px 9px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.reported-content p { + margin: 0; +} +.reported-content-active { + border: 1px solid #D3322A; + background: #F7DAD8; +} +.reported-content-archived { + border: 1px solid #666666; + background: #dedede; +} +.reported-content .controls { + float: right; + margin: 5px 0 0 10px; +} +.report-details { + background-color: white; + padding: 5px; + margin-bottom: 5px; + max-width: 500px; + + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.elgg-widget-content .reported-content .elgg-button { + display: block; + margin: 5px; +} diff --git a/mod/reportedcontent/views/default/reportedcontent/css.php b/mod/reportedcontent/views/default/reportedcontent/css.php new file mode 100644 index 000000000..da88ecf70 --- /dev/null +++ b/mod/reportedcontent/views/default/reportedcontent/css.php @@ -0,0 +1,14 @@ +<?php +/** + * Elgg reported content CSS + * + * Footer link CSS + * + * @package ElggReportContent + */ + +?> +/* Reported Content */ +.elgg-icon-report-this { + background: url(<?php echo elgg_get_site_url(); ?>mod/reportedcontent/graphics/icon_reportthis.gif) no-repeat left top; +} 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..4c6595653 --- /dev/null +++ b/mod/reportedcontent/views/default/widgets/reportedcontent/content.php @@ -0,0 +1,16 @@ +<?php +/** + * List the latest reports + */ + +$list = elgg_list_entities(array( + 'types' => 'object', + 'subtypes' => 'reported_content', + 'limit' => $vars['entity']->num_display, + 'pagination' => false, +)); +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..ecd732d23 --- /dev/null +++ b/mod/reportedcontent/views/default/widgets/reportedcontent/edit.php @@ -0,0 +1,22 @@ +<?php +/** + * Widget edit view + */ + +// set default value +if (!isset($vars['entity']->num_display)) { + $vars['entity']->num_display = 4; +} + +$params = array( + 'name' => 'params[num_display]', + 'value' => $vars['entity']->num_display, + 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), +); +$dropdown = elgg_view('input/dropdown', $params); + +?> +<div> + <?php echo elgg_echo('reportedcontent:numbertodisplay'); ?>: + <?php echo $dropdown; ?> +</div> |