aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/views
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-04 03:39:37 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-04 03:39:37 +0000
commit41063c981d2484b90b7ea146c02e8e74f2c54119 (patch)
tree9bb4ea79b4bd845e4be49f49c924966f881433e8 /mod/reportedcontent/views
parente209ef52571b1e0f6a3937d3e88c9150c384994c (diff)
downloadelgg-41063c981d2484b90b7ea146c02e8e74f2c54119.tar.gz
elgg-41063c981d2484b90b7ea146c02e8e74f2c54119.tar.bz2
Merged reported content interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5271 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/reportedcontent/views')
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/css.php92
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/form.php132
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/listing.php87
-rw-r--r--mod/reportedcontent/views/default/reportedcontent/owner_block.php9
4 files changed, 137 insertions, 183 deletions
diff --git a/mod/reportedcontent/views/default/reportedcontent/css.php b/mod/reportedcontent/views/default/reportedcontent/css.php
index 061a5e5f6..872ff36bb 100644
--- a/mod/reportedcontent/views/default/reportedcontent/css.php
+++ b/mod/reportedcontent/views/default/reportedcontent/css.php
@@ -1,43 +1,33 @@
<?php
-
- /**
- * Elgg reported content CSS
- *
- * @package reportedcontent
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.org/
- */
+/**
+ * Elgg reported content CSS
+ *
+ * @package reportedcontent
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
?>
-/* ***************************************
-PAGE-OWNER BLOCK
-*************************************** */
-#owner_block_report_this {
- padding:5px 0 0 0;
+/* link in footer */
+#report_this {
+ text-align: left;
+ float:left;
}
-#owner_block_report_this a {
+#report_this a {
font-size: 90%;
- color:#999999;
padding:0 0 4px 20px;
- background: url(<?php echo $vars['url']; ?>_graphics/icon_reportthis.gif) no-repeat left top;
-}
-#owner_block_report_this a:hover {
- color: #0054a7;
+ background: url(<?php echo $vars['url']; ?>mod/reportedcontent/graphics/icon_reportthis.gif) no-repeat left top;
}
-
-/* ***************************************
- ADMIN AREA - REPORTED CONTENT
-*************************************** */
-.reportedcontent_content {
+/* admin area */
+.admin_settings.reported_content {
margin:0 0 5px 0;
- padding:0 7px 4px 10px;
+ padding:5px 7px 3px 9px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
-.reportedcontent_content p.reportedcontent_detail,
-.reportedcontent_content p {
+.admin_settings.reported_content p {
margin:0;
}
.active_report {
@@ -48,44 +38,16 @@ PAGE-OWNER BLOCK
border:1px solid #666666;
background:#dedede;
}
-a.archive_report_button {
+.admin_settings.reported_content .controls {
float:right;
- font: 12px/100% Arial, Helvetica, sans-serif;
- font-weight: bold;
- color: #ffffff;
- background:#4690d6;
- border: 1px solid #4690d6;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- width: auto;
- padding: 4px;
- margin:15px 0 0 20px;
- cursor: pointer;
-}
-a.archive_report_button:hover {
- background: #0054a7;
- border: 1px solid #0054a7;
- text-decoration: none;
+ margin:14px 5px 0 0;
}
-a.delete_report_button {
+.admin_settings.reported_content a.action_button {
+ display:inline;
float:right;
- font: 12px/100% Arial, Helvetica, sans-serif;
- font-weight: bold;
- color: #ffffff;
- background:#999999;
- border: 1px solid #999999;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- width: auto;
- padding: 4px;
- margin:15px 0 0 20px;
- cursor: pointer;
-}
-a.delete_report_button:hover {
- background: #333333;
- border: 1px solid #333333;
- text-decoration:none;
+ margin-left:15px;
}
-.reportedcontent_content .collapsible_box {
- background: white;
+.admin_settings.reported_content .details_link {
+ cursor: pointer;
}
+
diff --git a/mod/reportedcontent/views/default/reportedcontent/form.php b/mod/reportedcontent/views/default/reportedcontent/form.php
index 73fbd5c93..9b8049297 100644
--- a/mod/reportedcontent/views/default/reportedcontent/form.php
+++ b/mod/reportedcontent/views/default/reportedcontent/form.php
@@ -1,74 +1,72 @@
<?php
+/**
+ * Elgg report content plugin form
+ *
+ * @package ElggReportContent
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
- /**
- * Elgg report content plugin form
- *
- * @package ElggReportContent
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider <info@elgg.com>
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.org/
- */
-
- $guid = 0;
- $title = get_input('title',"");
- $description = "";
- $address = get_input('address',"");
- if ($address == "previous")
- $address = $_SERVER['HTTP_REFERER'];
- $tags = array();
- $access_id = ACCESS_PRIVATE;
- $shares = array();
- $owner = $vars['user'];
+$guid = 0;
+$title = get_input('title',"");
+$description = "";
+$address = get_input('address',"");
+if ($address == "previous") {
+ $address = $_SERVER['HTTP_REFERER'];
+}
+$tags = array();
+$access_id = ACCESS_PRIVATE;
+$shares = array();
+$owner = $vars['user'];
?>
-<div class="contentWrapper">
- <form action="<?php echo $vars['url']; ?>action/reportedcontent/add" method="post">
- <?php echo elgg_view('input/securitytoken'); ?>
-
- <p>
- <label>
- <?php echo elgg_echo('reportedcontent:title'); ?>
- <?php
+<form action="<?php echo $vars['url']; ?>action/reportedcontent/add" method="post">
+<?php echo elgg_view('input/securitytoken'); ?>
+
+ <p>
+ <label>
+ <?php echo elgg_echo('reportedcontent:title'); ?>
+ <?php
+
+ echo elgg_view('input/text',array(
+ 'internalname' => 'title',
+ 'value' => $title,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <label>
+ <?php echo elgg_echo('reportedcontent:address'); ?>
+ <?php
- echo elgg_view('input/text',array(
- 'internalname' => 'title',
- 'value' => $title,
- ));
-
- ?>
- </label>
- </p>
- <p>
- <label>
- <?php echo elgg_echo('reportedcontent:address'); ?>
- <?php
+ echo elgg_view('input/url',array(
+ 'internalname' => 'address',
+ 'value' => $address,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p class="longtext_editarea">
+ <label>
+ <?php echo elgg_echo('reportedcontent:description'); ?>
+ <br />
+ <?php
- echo elgg_view('input/url',array(
- 'internalname' => 'address',
- 'value' => $address,
- ));
-
- ?>
- </label>
- </p>
- <p class="longtext_editarea">
- <label>
- <?php echo elgg_echo('reportedcontent:description'); ?>
- <br />
- <?php
+ echo elgg_view('input/longtext',array(
+ 'internalname' => 'description',
+ 'value' => $description,
+ ));
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <input type="submit" value="<?php echo elgg_echo('reportedcontent:report'); ?>" />
+ </p>
- echo elgg_view('input/longtext',array(
- 'internalname' => 'description',
- 'value' => $description,
- ));
-
- ?>
- </label>
- </p>
- <p>
- <input type="submit" value="<?php echo elgg_echo('reportedcontent:report'); ?>" />
- </p>
-
- </form>
-</div>
+</form>
diff --git a/mod/reportedcontent/views/default/reportedcontent/listing.php b/mod/reportedcontent/views/default/reportedcontent/listing.php
index 5d3d3d997..a7ce97797 100644
--- a/mod/reportedcontent/views/default/reportedcontent/listing.php
+++ b/mod/reportedcontent/views/default/reportedcontent/listing.php
@@ -1,43 +1,46 @@
-
<?php
-
- echo "<div class=\"contentWrapper\">";
-
- if($vars['entity']){
-
- foreach($vars['entity'] as $report){
-
- //get the user making the report
- $user = get_user($report->owner_guid)->name;
- $user_url = get_user($report->owner_guid)->getURL();
-
- //find out if the report is current or archive
- if($report->state == 'archived'){
- $reportedcontent_background = "archived_report";
- }else{
- $reportedcontent_background = "active_report";
- }
-
- echo "<div class=\"reportedcontent_content {$reportedcontent_background}\">";
- echo "<p class=\"reportedcontent_detail\">";
- if($report->state != 'archived') {
- $url = elgg_add_action_tokens_to_url($vars['url'] . "action/reportedcontent/archive?item=" . $report->guid );
- echo "<a class=\"archive_report_button\" href=\"$url\">" . elgg_echo('reportedcontent:archive') . "</a>";
- }
- $url = elgg_add_action_tokens_to_url($vars['url'] . "action/reportedcontent/delete?item=" . $report->guid);
- echo "<a class=\"delete_report_button\" href=\"$url\" onclick=\"return confirm('" . elgg_echo('reportedcontent:areyousure') . "')\">" . elgg_echo('reportedcontent:delete') . "</a></p>";
-
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:by') . ": </b><a href=\"{$user_url}\">" . $user . "</a>, " . friendly_time($report->time_created) . "</p>";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:objecttitle') . ": </b>" . $report->title . "</p>";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:objecturl') . ": </b><a href=\"{$report->address}\">" . elgg_echo('reportedcontent:visit') . "</a></p>";
- echo "<p><a class=\"collapsibleboxlink\">" . elgg_echo('reportedcontent:moreinfo') . "</a></p>";
- echo "<div class=\"collapsible_box\">";
- echo "<p class=\"reportedcontent_detail\"><b>" . elgg_echo('reportedcontent:reason') . ": </b>" .$report->description . "</p>";
- echo "</div></div>";
-
-
- }
-
- }
- echo "</div>";
-?>
+/**
+ * Elgg report content listing
+ *
+ * @package ElggReportContent
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider <info@elgg.com>
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+
+if($vars['entity']){
+ $id = 0;
+ foreach($vars['entity'] as $report){
+
+ // increment our id counter
+ $id++;
+
+ //get the user making the report
+ $user = get_user($report->owner_guid)->name;
+ $user_url = get_user($report->owner_guid)->getURL();
+
+ //find out if the report is current or archive
+ if($report->state == 'archived'){
+ $reportedcontent_background = "archived_report";
+ }else{
+ $reportedcontent_background = "active_report";
+ }
+
+ echo "<div class='admin_settings reported_content {$reportedcontent_background}'>";
+ echo "<div class='clearfloat controls'>";
+ if($report->state != 'archived')
+ echo "<a class='action_button' href=\"" . elgg_validate_action_url($vars['url'] . "action/reportedcontent/archive?item={$report->guid}") . "\">" . elgg_echo('reportedcontent:archive') . "</a>";
+ echo "<a class='action_button disabled' href=\"" . elgg_validate_action_url($vars['url'] . "action/reportedcontent/delete?item={$report->guid}") . "\" onclick=\"return confirm('" . elgg_echo('reportedcontent:areyousure') . "')\">" . elgg_echo('reportedcontent:delete') . "</a></div>";
+ echo "<p><b>" . elgg_echo('reportedcontent:by') . ": </b><a href=\"{$user_url}\">" . $user . "</a>, " . friendly_time($report->time_created) . "</p>";
+ echo "<p><b>" . elgg_echo('reportedcontent:objecttitle') . ": </b>" . $report->title;
+ echo "<br /><a href='#' onclick=\"elgg_slide_toggle(this,'.reported_content','.container{$id}');\" class='details_link'>" . elgg_echo('reportedcontent:moreinfo') . "</a></p>";
+ echo "<div class='details container{$id} hidden'>";
+ echo "<p><b>" . elgg_echo('reportedcontent:objecturl') . ": </b><a href=\"{$report->address}\">" . elgg_echo('reportedcontent:visit') . "</a></p>";
+ echo "<p><b>" . elgg_echo('reportedcontent:reason') . ": </b>" .$report->description . "</p>";
+ echo "</div></div>";
+ }
+
+} else {
+ echo elgg_echo('reportedcontent:none');
+} \ No newline at end of file
diff --git a/mod/reportedcontent/views/default/reportedcontent/owner_block.php b/mod/reportedcontent/views/default/reportedcontent/owner_block.php
deleted file mode 100644
index 3624a86d2..000000000
--- a/mod/reportedcontent/views/default/reportedcontent/owner_block.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-
-$label = elgg_echo('reportedcontent:report');
-$url = "'" . $vars['url'] . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)";
-
-?>
-<div id="owner_block_report_this">
-<a href="javascript:location.href=<?php echo $url; ?>"><?php echo $label ?></a>
-</div>